This repository has been archived by the owner on May 12, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 282
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
129 additions
and
116 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
"use strict" | ||
|
||
$(document).ready -> | ||
|
||
window.Uno = Uno = | ||
|
||
version: '1.1.17' | ||
|
||
cover: | ||
width: -> $(".panel-cover").width() | ||
isCollapsed: -> $(".panel-cover").hasClass("panel-cover--collapsed") | ||
|
||
search: | ||
container: -> $('#results') | ||
form: (action) -> $("#search")[action]() | ||
|
||
loadingBar: (action) -> $(".pace")[action]() | ||
|
||
readTime: do -> | ||
|
||
container = $('.content-wrapper') | ||
readingTime = $(".post-reading-time") | ||
|
||
if container.length > 0 and readingTime.length > 0 | ||
postDate = $('.post-meta > time').html() | ||
postDateNow = new Date(Date.now()) | ||
postDateInDays = Math.floor((postDateNow - new Date(postDate)) / 86400000) | ||
|
||
if postDateInDays is 0 then postDateInDays = 'today' | ||
else if postDateInDays is 1 then postDateInDays = "yesterday" | ||
else postDateInDays = "#{postDateInDays} days ago" | ||
|
||
$('.post-meta > time').html(postDateInDays) | ||
$('.post-meta > time').mouseover -> $(this).html(postDate) | ||
$('.post-meta > time').mouseout -> $(this).html(postDateInDays) | ||
container.readingTime readingTimeTarget: ".post-reading-time" | ||
|
||
$("body").removeClass "no-js" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
"use strict" | ||
|
||
$(document).ready -> | ||
|
||
unless Uno.cover.isCollapsed() | ||
$(".navigation--social").css "margin-left", "1.5em" | ||
Uno.loadingBar 'hide' | ||
Uno.search.form 'hide' | ||
|
||
$("a.blog-button").click -> | ||
Uno.search.form 'show' | ||
$(".navigation--social").css "margin-left", "0px;" | ||
|
||
unless Uno.cover.isCollapsed() | ||
if Uno.cover.width() < 960 | ||
$(".panel-cover").addClass "panel-cover--collapsed" | ||
$(".content-wrapper").addClass "animated slideInRight" | ||
else | ||
$(".navigation--social").css "margin-left", "0px" | ||
$(".panel-cover").css "max-width", Uno.cover.width() | ||
$(".panel-cover").animate | ||
"max-width": "400px" | ||
width: "28%" | ||
, 400, swing = "swing", -> {} | ||
|
||
if location.hash is "#open" | ||
$(".navigation--social").css "margin-left", "0px" | ||
$(".panel-cover").addClass "panel-cover--collapsed" | ||
Uno.search.form 'show' | ||
|
||
if window.location.pathname and window.location.pathname isnt "/" | ||
Uno.search.form 'show' | ||
|
||
if window.location.pathname.substring(0, 5) is "/tag/" | ||
$(".panel-cover").addClass "panel-cover--collapsed" | ||
|
||
$(".btn-mobile-menu").click -> | ||
$(".navigation-wrapper").toggleClass "visible animated bounceInDown" | ||
$(".btn-mobile-menu__icon").toggleClass "icon-list icon-x-circle animated fadeIn" | ||
|
||
$(".navigation-wrapper .blog-button").click -> | ||
$(".navigation-wrapper").toggleClass "visible" | ||
$(".btn-mobile-menu__icon").toggleClass "icon-list icon-x-circle animated fadeIn" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
"use strict" | ||
|
||
## -- Private ----------------------------------------------------------------- | ||
|
||
showSearch = -> | ||
$(".content-wrapper__inner").hide() | ||
Uno.search.container.css "margin-top", "3rem" | ||
Uno.search.container.css "margin-bottom", "9rem" | ||
|
||
hideSearch = -> | ||
$(".content-wrapper__inner").show() | ||
Uno.search.container.css "padding-top", "0" | ||
Uno.search.container.css "margin-bottom", "0" | ||
|
||
## -- Main -------------------------------------------------------------------- | ||
|
||
$(document).ready -> | ||
$("#search-field").ghostHunter | ||
results : "#results" | ||
zeroResultsInfo : false | ||
onKeyUp : true | ||
displaySearchInfo : true | ||
onComplete : (query) -> | ||
if query.length > 0 then showSearch() else hideSearch() |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,13 @@ | ||
{ | ||
"name": "uno-zen", | ||
"description": "Minimalist and Elegant theme for Ghost", | ||
"version": "1.1.8", | ||
"version": "1.1.17", | ||
"authors": [ | ||
"Kiko Beats <[email protected]>" | ||
], | ||
"dependencies": { | ||
"ghostHunter": "git://github.com/i11ume/ghostHunter/" | ||
"ghostHunter": "git://github.com/i11ume/ghostHunter/", | ||
"animate.css": "~3.2.0" | ||
}, | ||
"ignore": [ | ||
"**/.*", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters