aboutsummaryrefslogtreecommitdiffstats
path: root/library/font_awesome/src/assets/js/site.js
diff options
context:
space:
mode:
authorTreer <treer.git@the-bordello.com>2016-04-30 21:36:19 +1000
committerTreer <treer.git@the-bordello.com>2016-04-30 21:36:19 +1000
commit45654ffc5cc4532c2189c88d46a0374038b53c9f (patch)
treefc1c9949dcabd360c120d318c9fe3181d47c8f42 /library/font_awesome/src/assets/js/site.js
parent931a4fafe316b23bacf92ac1ff35f9b8467415dd (diff)
downloadvolse-hubzilla-45654ffc5cc4532c2189c88d46a0374038b53c9f.tar.gz
volse-hubzilla-45654ffc5cc4532c2189c88d46a0374038b53c9f.tar.bz2
volse-hubzilla-45654ffc5cc4532c2189c88d46a0374038b53c9f.zip
update font-awesome library to 4.6.1
Perhaps this should be done as a submodule instead?
Diffstat (limited to 'library/font_awesome/src/assets/js/site.js')
-rw-r--r--library/font_awesome/src/assets/js/site.js101
1 files changed, 70 insertions, 31 deletions
diff --git a/library/font_awesome/src/assets/js/site.js b/library/font_awesome/src/assets/js/site.js
index 16fa261a6..f64dde81d 100644
--- a/library/font_awesome/src/assets/js/site.js
+++ b/library/font_awesome/src/assets/js/site.js
@@ -1,38 +1,77 @@
-$(function() {
+$(function () {
+ $("#newsletter").validate();
+
+ var ads = [
+ {
+ quote: "Take your icon game to the next level. Check out <strong>Fort Awesome</strong>, from the maker of Font Awesome.",
+ class: "fort-awesome",
+ url: "https://fonticons.com/?utm_source=font_awesome_homepage&utm_medium=display&utm_content=ad_1_next_level&utm_campaign=promo_4.5_update",
+ btn_text: "Gimme Some!"
+ },
+ {
+ quote: "Make your icons load 10x faster! Check out <strong>Fort Awesome</strong>, from the maker of Font Awesome.",
+ class: "fort-awesome",
+ url: "https://fonticons.com/?utm_source=font_awesome_homepage&utm_medium=display&utm_content=ad_3_faster_loading&utm_campaign=promo_4.5_update",
+ btn_text: "Gimme Some!"
+ },
+ {
+ quote: "Looking for other great icon sets? Check out <strong>Fort Awesome</strong>, from the maker of Font Awesome.",
+ class: "fort-awesome",
+ url: "https://fonticons.com/?utm_source=font_awesome_homepage&utm_medium=display&utm_content=ad_4_more_icons&utm_campaign=promo_4.5_update",
+ btn_text: "Gimme Some!"
+ },
+ {
+ quote: "Want to add your own icon? Check out <strong>Fort Awesome</strong>, from the maker of Font Awesome.",
+ class: "fort-awesome",
+ url: "https://fonticons.com/?utm_source=font_awesome_homepage&utm_medium=display&utm_content=ad_6_your_own_icon&utm_campaign=promo_4.5_update",
+ btn_text: "Gimme Some!"
+ },
+
+
+ {
+ quote: "<strong>Black Tie</strong>, from the creator of Font Awesome. On sale at the Kickstarter price for a limited time.",
+ class: "black-tie",
+ url: "http://blacktie.io/?utm_source=font_awesome_homepage&utm_medium=display&utm_content=ad_2_kickstarter&utm_campaign=promo_4.5_update",
+ btn_text: "Check it Out!"
+ },
+ {
+ quote: "Want clean, minimalist icons? Check out <strong>Black Tie</strong>, the new multi-weight icon font from the maker of Font Awesome.",
+ class: "black-tie",
+ url: "http://blacktie.io/?utm_source=font_awesome_homepage&utm_medium=display&utm_content=ad_5_clean_minimalist&utm_campaign=promo_4.5_update",
+ btn_text: "Check it Out!"
+ },
+ {
+ quote: "Want a different icon look? Check out <strong>Black Tie</strong>, our new multi-weight icon set.",
+ class: "black-tie",
+ url: "http://blacktie.io/?utm_source=font_awesome_homepage&utm_medium=display&utm_content=ad_6_different_look&utm_campaign=promo_4.5_update",
+ btn_text: "Check it Out!"
+ },
+ {
+ quote: "Check out <strong>Black Tie</strong>, our new multi-weight icon set!",
+ class: "black-tie",
+ url: "http://blacktie.io/?utm_source=font_awesome_homepage&utm_medium=display&utm_content=ad_7_our_new_multi_weight&utm_campaign=promo_4.5_update",
+ btn_text: "Check it Out!"
+ }
+ ];
+
+ selectAd();
+
// start the icon carousel
- $('#iconCarousel').carousel({
+ $('#icon-carousel').carousel({
interval: 5000
});
+ $('[data-toggle="tooltip"]').tooltip();
+ $('[data-toggle="popover"]').popover();
+ function selectAd() {
+ random_number = Math.floor(Math.random() * ads.length);
+ random_ad = ads[random_number];
-
- // make code pretty
-// $('pre').addClass('prettyprint');
-// window.prettyPrint && prettyPrint();
-
- // Disable links with href="#" inside <section>, so users can click on them
- // to preview :active state without being scrolled up to the top of the page.
-// $('section a[href="#"]').click(function(e) {
-// e.preventDefault();
-// e.stopPropagation();
-// });
-
-// // inject twitter & github counts
-// $.ajax({
-// url: 'http://api.twitter.com/1/users/show.json',
-// data: {screen_name: 'fortaweso_me'},
-// dataType: 'jsonp',
-// success: function(data) {
-// $('#followers').html(data.followers_count);
-// }
-// });
-// $.ajax({
-// url: 'https://api.github.com/repos/fortawesome/Font-Awesome',
-// dataType: 'jsonp',
-// success: function(data) {
-// $('#watchers').html(data.data.watchers);
-// $('#forks').html(data.data.forks);
-// }
-// });
+ $('#banner').addClass(random_ad.class);
+ $('#rotating-message').html(random_ad.quote);
+ $('#rotating-url').attr("href", random_ad.url);
+ $('#rotating-url').html(random_ad.btn_text);
+ $('#banner').collapse('show');
+ }
});