Skip to content

Commit

Permalink
re theme
Browse files Browse the repository at this point in the history
  • Loading branch information
muan committed Nov 25, 2013
1 parent d63d93a commit 0c88f00
Show file tree
Hide file tree
Showing 13 changed files with 335 additions and 412 deletions.
52 changes: 12 additions & 40 deletions _assets/responsive.scss
Original file line number Diff line number Diff line change
@@ -1,50 +1,22 @@
@media (max-device-width: 768px) {
.tip { display: none; }
}

@media (max-width: 768px) {
.fork-me {
display: none;
}
.wrapper {
overflow: hidden;
}
}

@media (max-width: 480px) {

body {
padding: 10px;
.site-header {
margin-bottom: 10px;
}
.pagination {
text-align: center;
}
.post {
.post-link {
// border: 0;
margin-bottom: 10px;
&:hover {
// border: 0;
box-shadow: none;
.post-cover {
opacity: 1;
}
}
&.has-cover {
padding-right: 25px;
.mark {
top: 210px;
}
}
.post-cover {
opacity: 1;
position: static;
height: 200px;
margin: -25px -25px 25px;
width: auto;
border-width: 1px;
}
}

}
.wrapper {
padding: 15px;
}

article img {
margin: 0 !important;
float: none !important;
min-width: 100% !important;
}

}
33 changes: 14 additions & 19 deletions _assets/stuff.coffee
Original file line number Diff line number Diff line change
@@ -1,22 +1,17 @@
jQuery ->
$(document).on "keydown", (e) ->
if e.keyCode == 39 && $("#js-next-post").length
location.href = $("#js-next-post").attr("href")
if e.keyCode == 37 && $("#js-previous-post").length
location.href = $("#js-previous-post").attr("href")

$.each $("[data-time]"), ( index, ele ) ->
$(ele).html( prettyDate( new Date( $(this).data("time") ) ) )
$(document).on "click", "a[id]", (e) ->
e.stopImmediatePropagation()
_gaq.push ["_trackEvent", "Clicks", "clicked on " + e.target.id]

$(document).on "keydown", (e) ->
if e.keyCode == 39 && $("#js-next-post").length
location.href = $("#js-next-post").attr("href")
if e.keyCode == 37 && $("#js-previous-post").length
location.href = $("#js-previous-post").attr("href")

# tracking stuff
$.each $("a[id]"), (index, ele) ->
$(ele).click (e) ->
e.stopImmediatePropagation()
_gaq.push ["_trackEvent", "Clicks", "clicked on " + e.target.id]
$(document).on "click", "a:not([id])", (e) ->
e.stopImmediatePropagation()
_gaq.push ["_trackEvent", "Clicks", "clicked on " + $(this).text()]

$.each $("a:not([id])"), (index, ele) ->
$(ele).click (e) ->
e.stopImmediatePropagation()
console.log e.currentTarget.innerText
_gaq.push ["_trackEvent", "Clicks", "clicked on " + $(ele).text()]
$ ->
$.each $("[data-time]"), ( index, ele ) ->
$(ele).html( prettyDate( new Date( $(this).data("time") ) ) )
Loading

0 comments on commit 0c88f00

Please sign in to comment.