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
$theme-colors: ( | |
primary: #ffffff, | |
secondary: #cccccc, | |
success: #28a745, | |
info: #aaaaaa, | |
warning: #ffc107, | |
danger: #dc3545, | |
light: #f8f9fa, | |
dark: #343a40 | |
); |
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
.col-c5 | |
width: 20% | |
position: relative | |
min-height: 1px | |
padding-right: 15px | |
padding-left: 15px | |
.col-c7 | |
width: #{(100% / 7)} | |
position: relative | |
min-height: 1px |
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
// bootstrap gutter | |
// ex: .row.gutter-10 | |
@for $num from 1 through 5 | |
$v: $num * 5px / 2 | |
.gutter-#{$num*5} | |
margin-left: #{$v * -1} | |
margin-right: #{$v * -1} | |
> [class*='col-'] | |
padding-left: $v | |
padding-right: $v |
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
/** | |
* lazysizes対応のattachment_image_attributes | |
*/ | |
function lazysizes_attachment_image_attributes( $atts, $attachment ) { | |
if(!empty($atts['class'])){ | |
if(strpos($atts['class'], 'lazyload') !== false){ | |
$atts['data-src'] = $atts['src']; | |
$atts['src'] = 'data:image/gif;base64,R0lGODlhAQABAGAAACH5BAEKAP8ALAAAAAABAAEAAAgEAP8FBAA7'; | |
if(!empty($atts['srcset'])) { | |
$atts['data-srcset'] = $atts['srcset']; |
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
add_action( 'wp_enqueue_scripts', 'mb_scripts' ); | |
function mb_scripts() { | |
wp_enqueue_script( 'lazysizes', get_template_directory_uri() . '/js/vendor/lazysizes.min.js', NULL, NULL, true ); | |
} |
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
function echo_filename(){ | |
if(WP_DEBUG){ | |
$obj = debug_backtrace(); | |
$parent = $obj[0]; | |
$path = $parent['file']; | |
$filename = basename($path); | |
echo "<!-- $filename -->"; | |
} | |
} |
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
@echo off | |
set /P QUALITY="quality(90):" || SET QUALITY=90 | |
cd /d "%~dp0" | |
if "%~1" == "" goto error | |
mkdir "%~dp1mozjpeg\" | |
:loop | |
if not "%~nx1"=="" ( |
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
@echo off | |
cd /d "%~dp0" | |
if "%~1" == "" goto error | |
mkdir "%~dp1webm\" | |
:loop | |
if not "%~nx1"=="" ( | |
echo ---- %~nx1 ffmpeg... |
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
/** | |
* 部分印刷 | |
* @param {Element} element: 印刷する要素 | |
*/ | |
const Print = function(element = false){ | |
if(!element) return | |
// 印刷用の要素を作成 | |
var print_element=document.createElement('div') | |
print_element.id = "PrintArea" |
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
// OGP | |
function the_ogp(){ | |
// OGP ===================== | |
// image | |
$OG_IMAGE_NAME = "/img/ogp.png"; | |
$og_image = ""; | |
// site_name | |
$og_site_name = get_bloginfo('name'); |
NewerOlder