Skip to content
This repository has been archived by the owner on May 12, 2019. It is now read-only.

Commit

Permalink
WIP – split scripts in two files
Browse files Browse the repository at this point in the history
  • Loading branch information
Kikobeats committed Feb 25, 2015
1 parent ee8ca5f commit a109b64
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 19 deletions.
2 changes: 1 addition & 1 deletion assets/css/uno.css

Large diffs are not rendered by default.

15 changes: 0 additions & 15 deletions assets/js/src/__init.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -35,18 +35,3 @@ $ ->
cb?()

DateInDays ".post.meta > time"

## Main
$ ->
el = document.body
el.dataset.page ?= Uno.context()
Uno.readTime()
FastClick.attach el unless Uno.is 'device', 'desktop'

if Uno.is 'page', 'post'
$('.main').readingTime readingTimeTarget: '.post.reading-time > span'

$('#panic-button').click ->
s = document.createElement 'script'
s.setAttribute 'src','https://nthitz.github.io/turndownforwhatjs/tdfw.js'
document.body.appendChild s
15 changes: 15 additions & 0 deletions assets/js/src/main.coffee
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
'use strict'

$ ->
el = document.body
el.dataset.page ?= Uno.context()
Uno.readTime()
FastClick.attach el unless Uno.is 'device', 'desktop'

if Uno.is 'page', 'post'
$('.main').readingTime readingTimeTarget: '.post.reading-time > span'

$('#panic-button').click ->
s = document.createElement 'script'
s.setAttribute 'src','https://nthitz.github.io/turndownforwhatjs/tdfw.js'
document.body.appendChild s
4 changes: 2 additions & 2 deletions assets/js/uno.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion assets/scss/modules/_fonts.scss
Original file line number Diff line number Diff line change
Expand Up @@ -726,7 +726,7 @@
content: "\f1e4";
display: inline-block;
vertical-align: middle;
height: 40px;
height: 36px;
font-size: 26px;
margin-left: 9px;
}
Expand Down
1 change: 1 addition & 0 deletions gulpfile.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ src =
files : ['assets/scss/**/**']
js :
main : ['assets/js/src/__init.coffee'
'assets/js/src/main.coffee'
'assets/js/src/cover.coffee'
'assets/js/src/search.coffee'
'assets/js/src/post.coffee']
Expand Down

0 comments on commit a109b64

Please sign in to comment.