Skip to content

Commit

Permalink
Extract selector into variables
Browse files Browse the repository at this point in the history
  • Loading branch information
Kikobeats committed Jan 2, 2016
1 parent 4166995 commit d43b3c9
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
4 changes: 4 additions & 0 deletions assets/js/src/__init.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -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')
8 changes: 4 additions & 4 deletions assets/js/src/main.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -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'
4 changes: 2 additions & 2 deletions assets/scss/global.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit d43b3c9

Please sign in to comment.