Skip to content

Commit

Permalink
Fix stupid bug
Browse files Browse the repository at this point in the history
  • Loading branch information
pikesley committed Nov 9, 2016
1 parent b0b29ef commit deb4f65
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 29 deletions.
18 changes: 9 additions & 9 deletions public/css/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -9100,49 +9100,49 @@ html {
/* line 16, ../sass/styles.scss */
body {
background: url(/assets/images/retina_wood.png);
color: #582a72;
background-color: black;
font-family: "spectrum";
text-align: center;
}

/* line 23, ../sass/styles.scss */
/* line 24, ../sass/styles.scss */
a {
color: #554600;
}

/* line 27, ../sass/styles.scss */
/* line 28, ../sass/styles.scss */
img {
max-width: 80%;
}

/* line 31, ../sass/styles.scss */
/* line 32, ../sass/styles.scss */
h1 {
font-size: 2em;
margin-top: 5px;
}

/* line 36, ../sass/styles.scss */
/* line 37, ../sass/styles.scss */
h2 {
font-size: 1.5em;
}

/* line 40, ../sass/styles.scss */
/* line 41, ../sass/styles.scss */
.error-message {
text-transform: none;
font-size: 1em;
}

/* line 45, ../sass/styles.scss */
/* line 46, ../sass/styles.scss */
h1, h2 {
color: rgba(88, 42, 114, 0.9);
}

/* line 50, ../sass/styles.scss */
/* line 51, ../sass/styles.scss */
hr {
border-color: #808015;
}

/* line 54, ../sass/styles.scss */
/* line 55, ../sass/styles.scss */
p {
text-align: justify;
font-size: 0.8em;
Expand Down
3 changes: 2 additions & 1 deletion public/sass/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ html {

body {
background: url(/assets/images/retina_wood.png);
color: $brand-primary;
//color: $brand-primary;
background-color: black;
font-family: $font-primary;
text-align: center;
}
Expand Down
24 changes: 5 additions & 19 deletions views/javascript/hammer.js.erb
Original file line number Diff line number Diff line change
@@ -1,29 +1,15 @@
<script>
<% current = request.path.gsub('/', '') %>
current = '<%= current %>'
<% np = next_and_previous current %>

<% np = next_and_previous request.path.gsub('/', '') %>
body = document.getElementById('body')

<% if np[:next] %>
Hammer(body).on('swipeleft', function() {
<% if np[:next] %>
document.getElementById('<%= "#{np[:next]}" %>').click()
<% else %>
swell()
<% end %>
})
<% end %>
<% if np[:previous] %>
Hammer(body).on('swiperight', function() {
<% if np[:previous] %>
document.getElementById('<%= "#{np[:previous]}" %>').click()
<% else %>
swell()
<% end %>
})

function swell() {
size = parseInt($('#' + current).css('font-size').replace('px', ''))

$('#' + current).animate({ fontSize: (size * 1.5) + 'px' }, 1000, 'easeOutElastic')
$('#' + current).animate({ fontSize: size}, 1000)
}
<% end %>
</script>

0 comments on commit deb4f65

Please sign in to comment.