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
| /** | |
| * | |
| * Web Starter Kit | |
| * Copyright 2014 Google Inc. All rights reserved. | |
| * | |
| * Licensed under the Apache License, Version 2.0 (the "License"); | |
| * you may not use this file except in compliance with the License. | |
| * You may obtain a copy of the License at | |
| * | |
| * http://www.apache.org/licenses/LICENSE-2.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
| // 特定のURL、固定ページのみ「theme」を切り替える | |
| // http://ja.forums.wordpress.org/topic/13483 | |
| function my_theme_switcher($theme){ | |
| // yes, it's hardcoded! | |
| if ( $_SERVER['REQUEST_URI'] == 'HOMEからのパス' ) { // /lp/2014/ | |
| $overrideTheme = wp_get_theme('テーマ名'); | |
| if ( $overrideTheme->exists() ) { | |
| return $overrideTheme['テーマ名']; | |
| } else { |
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
| 'use strict'; | |
| var gulp = require('gulp'), | |
| $ = require('gulp-load-plugins')(), | |
| jade = require('gulp-jade'), | |
| browserSync = require('browser-sync'), | |
| reload = browserSync.reload, | |
| runSequence = require('run-sequence'); | |
| gulp.task('jade', function() { |
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 vender = (/webkit/i).test(navigator.appVersion) ? 'webkit' : | |
| (/firefox/i).test(navigator.userAgent) ? 'moz' : | |
| (/trident/i).test(navigator.userAgent) ? 'ms' : | |
| 'opera' in window ? 'O' : ''; |
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 date = new Date(); | |
| //t=now-date | |
| //b=最初の値 | |
| //c=最後の値 | |
| //d=何秒 | |
| Math.ease = function(t, b, c, d, s) { | |
| if(s == undefined) s = 1.70158; | |
| return c*(t/=d)*t*((s+1)*t - s) + b; |
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
| Math.ease = function (t, b, c, d) { | |
| t /= d/2; | |
| if (t < 1) return c/2*t*t*t + b; | |
| t -= 2; | |
| return c/2*(t*t*t + 2) + b; | |
| }; | |
| function smoothScroll(hash){ | |
| var date = new Date(), |
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
| for (var i = 0, item; item = 配列[i++];) { | |
| // item について何かする | |
| } |
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
| lightbox = (function(){ | |
| var lightboxList = document.querySelectorAll('.js-gallery img'), | |
| lightboxLength = lightboxList.length; | |
| for (var i = 0; i < lightboxLength; i++) { | |
| lightboxList[i].setAttribute('deta-lb-number',i); | |
| lightboxList[i].addEventListener('click', lightboxShow, 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
| function deleteVendor(vendor){ | |
| var re = /^webkit|^moz|^ms|^O/g, | |
| str = vendor, | |
| newstr = str.replace(re, ""); | |
| return newstr.toLowerCase(); | |
| } |
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
| ;(function(window,config){ | |
| function deleteVendor(vendor){ | |
| var re = /^webkit|^moz|^ms|^O/g, | |
| str = vendor, | |
| noVendor = str.replace(re, ""); | |
| return noVendor.toLowerCase(); | |
| } |