From d43b3c9868450a9fe1fc80ae172dd5788a2c6804 Mon Sep 17 00:00:00 2001 From: Kiko Beats Date: Sat, 2 Jan 2016 16:10:30 +0100 Subject: [PATCH] Extract selector into variables --- assets/js/src/__init.coffee | 4 ++++ assets/js/src/main.coffee | 8 ++++---- assets/scss/global.scss | 4 ++-- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/assets/js/src/__init.coffee b/assets/js/src/__init.coffee index 3664f0e..11f6f76 100644 --- a/assets/js/src/__init.coffee +++ b/assets/js/src/__init.coffee @@ -17,3 +17,7 @@ window.Bloggy = Bloggy = return 'mobile' if (w <= 480) return 'tablet' if (w <= 1024) 'desktop' + +$ -> + $(feature_one_selector).attr('id', 'feature-one') + $(feature_two_selector).attr('id', 'feature-two') diff --git a/assets/js/src/main.coffee b/assets/js/src/main.coffee index 5c00bd3..c7e73ae 100644 --- a/assets/js/src/main.coffee +++ b/assets/js/src/main.coffee @@ -14,10 +14,10 @@ $(window).load -> $(window).smartresize casperFullImg $ -> - el = Itch.app - el.dataset.page = Itch.context() - el.dataset.device = Itch.device() + el = Bloggy.app + el.dataset.page = Bloggy.context() + el.dataset.device = Bloggy.device() $('.post-content').fitVids() - FastClick.attach el unless Itch.is 'device', 'desktop' + FastClick.attach el unless Bloggy.is 'device', 'desktop' diff --git a/assets/scss/global.scss b/assets/scss/global.scss index ea6de71..568301e 100644 --- a/assets/scss/global.scss +++ b/assets/scss/global.scss @@ -934,11 +934,11 @@ pre[class*="language-"] { min-height: 30px; } -li.nav-unete > a { +#feature-one { @include feature-header-button($feature-one-color); } -li.nav-contacto > a { +#feature-two { @include feature-header-button($feature-two-color); margin-left: 15px;