Skip to content

Instantly share code, notes, and snippets.

Kohki SHIKATA kohki-shikata

  • Osaka, Japan
Block or report user

Report or block kohki-shikata

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@kohki-shikata
kohki-shikata / bash
Last active Oct 3, 2017
【随時更新】Hexo まとめ(Node.js製のブログ型静的サイトジェネレーター) ref: http://qiita.com/kohki-shikata/items/dc0cb4ccc97cb38b8023
View bash
$ hexo init <folder>
$ cd <folder>
$ npm install
@kohki-shikata
kohki-shikata / gulpfile.js
Last active Aug 12, 2016
f6 with jade gulpfile.js
View gulpfile.js
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";
@kohki-shikata
kohki-shikata / package.json
Last active Jul 12, 2017
Foundation 6 with pug(ex:jade) or EJS
View package.json
{
"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",
@kohki-shikata
kohki-shikata / index.jade
Created Apr 4, 2016
Jade version of index.html for Foundation 6
View index.jade
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
View gulpfile.js
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())
@kohki-shikata
kohki-shikata / app.js
Created Nov 16, 2015
jQuery img rollover
View app.js
// 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") ){
@kohki-shikata
kohki-shikata / app.js
Created Nov 12, 2015
jQuery add class current page navigation
View app.js
// 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);
@kohki-shikata
kohki-shikata / to_top.js
Last active Nov 28, 2015
jQuery ToTop button
View to_top.js
// 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;
});
@kohki-shikata
kohki-shikata / app.js
Created Nov 12, 2015
jQuery Roll Over
View app.js
// 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") ){
@kohki-shikata
kohki-shikata / index.jade
Created Aug 15, 2015
Jade version of Initial index.html for Foundation 5
View index.jade
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
You can’t perform that action at this time.