site.js 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. $(function () {
  2. $("#newsletter").validate();
  3. var ads = [
  4. {
  5. quote: "<i class='fas fas-perfect fas-2x valign-middle margin-right'></i>Looking for the best icon sets? Check out <strong>Symbolset</strong>, <a href='https://articles.fortawesome.com/fort-awesome-acquires-symbolset-72229dab2c13'>now</a> from the maker of Font Awesome.",
  6. class: "symbolset",
  7. url: "https://symbolset.com/?utm_source=font_awesome_homepage&utm_medium=display&utm_content=ad_1_best_icons&utm_campaign=promo_4.6_update",
  8. btn_text: "Gimme Some!"
  9. },
  10. {
  11. quote: "<i class='fas fas-curate fas-2x valign-middle margin-right'></i>Need a different look for your icons? Check out <strong>Symbolset</strong>, <a href='https://articles.fortawesome.com/fort-awesome-acquires-symbolset-72229dab2c13'>now</a> from the maker of Font Awesome.",
  12. class: "symbolset",
  13. url: "https://symbolset.com/?utm_source=font_awesome_homepage&utm_medium=display&utm_content=ad_2_different_look&utm_campaign=promo_4.6_update",
  14. btn_text: "Gimme Some!"
  15. },
  16. // {
  17. // quote: "Fort Awesome <a href='#'>acquires</a> Symbolset!",
  18. // class: "symbolset",
  19. // url: "https://symbolset.com/?utm_source=font_awesome_homepage&utm_medium=display&utm_content=ad_3_acquires&utm_campaign=promo_4.6_update",
  20. // btn_text: "Check out Symbolset"
  21. // },
  22. // {
  23. // quote: "<a href='#' class='no-underline'>Fort Awesome <i class='fa fa-plus fa-lg'></i> Symbolset = <i class='fa fa-heart fa-lg'></i></a>",
  24. // class: "symbolset",
  25. // url: "https://symbolset.com/?utm_source=font_awesome_homepage&utm_medium=display&utm_content=ad_4_math&utm_campaign=promo_4.6_update",
  26. // btn_text: "Check out Symbolset"
  27. // },
  28. // {
  29. // quote: "Take your icon game to the next level. Check out <strong>Fort Awesome</strong>, from the maker of Font Awesome.",
  30. // class: "fort-awesome",
  31. // url: "https://fortawesome.com/start?utm_source=font_awesome_homepage&utm_medium=display&utm_content=ad_1_next_level&utm_campaign=promo_4.6_update",
  32. // btn_text: "Gimme Some!"
  33. // },
  34. // {
  35. // quote: "Make your icons load 10x faster! Check out <strong>Fort Awesome</strong>, from the maker of Font Awesome.",
  36. // class: "fort-awesome",
  37. // url: "https://fortawesome.com/start?utm_source=font_awesome_homepage&utm_medium=display&utm_content=ad_3_faster_loading&utm_campaign=promo_4.6_update",
  38. // btn_text: "Gimme Some!"
  39. // },
  40. // {
  41. // quote: "Looking for other great icon sets? Check out <strong>Fort Awesome</strong>, from the maker of Font Awesome.",
  42. // class: "fort-awesome",
  43. // url: "https://fortawesome.com/start?utm_source=font_awesome_homepage&utm_medium=display&utm_content=ad_4_more_icons&utm_campaign=promo_4.6_update",
  44. // btn_text: "Gimme Some!"
  45. // },
  46. // {
  47. // quote: "Want to add your own icon? Check out <strong>Fort Awesome</strong>, from the maker of Font Awesome.",
  48. // class: "fort-awesome",
  49. // url: "https://fortawesome.com/start?utm_source=font_awesome_homepage&utm_medium=display&utm_content=ad_6_your_own_icon&utm_campaign=promo_4.6_update",
  50. // btn_text: "Gimme Some!"
  51. // },
  52. //
  53. //
  54. // {
  55. // quote: "<strong>Black Tie</strong>, from the creator of Font Awesome. On sale at the Kickstarter price for a limited time.",
  56. // class: "black-tie",
  57. // url: "http://blacktie.io/?utm_source=font_awesome_homepage&utm_medium=display&utm_content=ad_2_kickstarter&utm_campaign=promo_4.6_update",
  58. // btn_text: "Check it Out!"
  59. // },
  60. // {
  61. // quote: "Want clean, minimalist icons? Check out <strong>Black Tie</strong>, the new multi-weight icon font from the maker of Font Awesome.",
  62. // class: "black-tie",
  63. // url: "http://blacktie.io/?utm_source=font_awesome_homepage&utm_medium=display&utm_content=ad_5_clean_minimalist&utm_campaign=promo_4.6_update",
  64. // btn_text: "Check it Out!"
  65. // },
  66. // {
  67. // quote: "Want a different icon look? Check out <strong>Black Tie</strong>, our new multi-weight icon set.",
  68. // class: "black-tie",
  69. // url: "http://blacktie.io/?utm_source=font_awesome_homepage&utm_medium=display&utm_content=ad_6_different_look&utm_campaign=promo_4.6_update",
  70. // btn_text: "Check it Out!"
  71. // },
  72. // {
  73. // quote: "Check out <strong>Black Tie</strong>, our new multi-weight icon set!",
  74. // class: "black-tie",
  75. // url: "http://blacktie.io/?utm_source=font_awesome_homepage&utm_medium=display&utm_content=ad_7_our_new_multi_weight&utm_campaign=promo_4.6_update",
  76. // btn_text: "Check it Out!"
  77. // }
  78. ];
  79. selectAd();
  80. // start the icon carousel
  81. $('#icon-carousel').carousel({
  82. interval: 5000
  83. });
  84. $('[data-toggle="tooltip"]').tooltip();
  85. $('[data-toggle="popover"]').popover();
  86. function selectAd() {
  87. random_number = Math.floor(Math.random() * ads.length);
  88. random_ad = ads[random_number];
  89. $('#banner').addClass(random_ad.class);
  90. $('#rotating-message').html(random_ad.quote);
  91. $('#rotating-url').attr("href", random_ad.url);
  92. $('#rotating-url').html(random_ad.btn_text);
  93. $('#banner').collapse('show');
  94. }
  95. });