This file contains hidden or 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
$ hexo init <folder> | |
$ cd <folder> | |
$ npm install |
This file contains hidden or 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
var gulp = require('gulp'); | |
var $ = require('gulp-load-plugins')(); | |
var ejs = require('gulp-ejs'); | |
var jade = require('gulp-jade'); | |
var browserSync = require('browser-sync').create(); | |
var plumber = require('gulp-plumber'); | |
var dir = "../dist/"; | |
var html_preprocessor = "jade"; |
This file contains hidden or 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
{ | |
"name": "foundation-sites-template", | |
"version": "1.0.0", | |
"description": "Basic template for a new Foundation for Sites project.", | |
"main": "gulpfile.js", | |
"devDependencies": { | |
"browser-sync": "^2.11.1", | |
"ejs": "^2.4.1", | |
"gulp": "^3.9.1", | |
"gulp-autoprefixer": "^3.1.0", |
This file contains hidden or 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
doctype html | |
html.no-js(lang='en') | |
head | |
meta(charset='utf-8') | |
meta(http-equiv='x-ua-compatible', content='ie=edge') | |
meta(name='viewport', content='width=device-width, initial-scale=1.0') | |
title Foundation for Sites | |
link(rel='stylesheet', href='css/app.css') | |
body | |
.row |
This file contains hidden or 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
var gulp = require('gulp'); | |
var plumber = require('gulp-plumber'); | |
var sass = require('gulp-sass'); | |
var jade = require('gulp-jade'); | |
var sourcemaps = require('gulp-sourcemaps'); | |
var webserver = require('gulp-webserver'); | |
gulp.task('sass', function() { | |
gulp.src(["scss/**/*.scss","!scss/**/_*.scss"]) | |
.pipe(plumber()) |
This file contains hidden or 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
// img roll over | |
$(function(){ | |
$("img[src*='_on']").addClass("current"); | |
$("img,input[type='image']").hover(function(){ | |
if ($(this).attr("src")){ | |
$(this).attr("src",$(this).attr("src").replace("_off.", "_on.")); | |
} | |
},function(){ | |
if ($(this).attr("src") && !$(this).hasClass("current") ){ |
This file contains hidden or 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
// add class current page navigation | |
$(document).ready(function() { | |
var url = location.pathname; | |
if(location.pathname != "/") { | |
$('nav.subpage_sidebar a[href^="' + location.pathname + '"]').parent().addClass('active'); | |
} else $('nav.subpage_sidebar a:eq(0)').parent().addClass('active'); | |
//console.log(url); |
This file contains hidden or 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
// this script depends on jQuery | |
$('#toTop').click(function(){ | |
var speed = 400; | |
var href= $(this).attr("href"); | |
var target = $(href == "#" || href == "" ? 'html' : href); | |
var position = target.offset().top; | |
$("html, body").animate({scrollTop:position}, speed, "swing"); | |
return false; | |
}); |
This file contains hidden or 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
// img roll over | |
$(function(){ | |
$("img[src*='_on']").addClass("current"); | |
$("img,input[type='image']").hover(function(){ | |
if ($(this).attr("src")){ | |
$(this).attr("src",$(this).attr("src").replace("_off.", "_on.")); | |
} | |
},function(){ | |
if ($(this).attr("src") && !$(this).hasClass("current") ){ |
This file contains hidden or 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
doctype html | |
html.no-js(lang='en') | |
head | |
meta(charset='utf-8') | |
meta(name='viewport', content='width=device-width, initial-scale=1.0') | |
title Foundation | |
link(rel='stylesheet', href='stylesheets/app.css') | |
script(src='bower_components/modernizr/modernizr.js') | |
body | |
.row |