Skip to content

Instantly share code, notes, and snippets.

View cazuki's full-sized avatar

Cazuki Hoshina cazuki

View GitHub Profile
@cazuki
cazuki / functions-imagemagick-change.php
Created August 7, 2017 07:38
imagemagickのライブラリ順序変更
function change_graphic_lib($array) {
return array('WP_Image_Editor_GD', 'WP_Image_Editor_Imagick');
}
add_filter('wp_image_editors', 'change_graphic_lib');
@cazuki
cazuki / sns-count-cache.php
Created October 13, 2016 08:06
SNS Count Cache 0.10.0 修正後
// Share Facebook Crawl Strategy
$parameters = array(
'app_id' => $this->share_facebook_app_id,
'app_secret' => $this->share_facebook_app_secret
);
@cazuki
cazuki / sns-count-cache.php
Last active October 13, 2016 08:07
SNS Count Cache 0.10.0 修正前
// Share Facebook Crawl Strategy
$parameters = array(
'app_id' => $this->follow_facebook_app_id,
'app_secret' => $this->follow_facebook_app_secret
);
p {
margin: 0 0 1rem 0;
@include smartphone {
margin: 0 0 0.5rem 0;
}
}
$width-desktop:1024px;
$width-tablet:768px;
$width-smartphone:568px;
$width-scrollbar:20px;
// Media Queries
@mixin desktop {
//PC表示: 768+20=788px〜
@media only screen and (min-width: $width-tablet + $width-scrollbar) {
@content;
$url = self::DEF_BASE_URL . '&' . http_build_query( $this->query_parameters , '' , '&' );
const DEF_BASE_URL = 'https://graph.facebook.com/?access_token=appid|appsecret';
<!DOCTYPE html>
<html amp lang="ja">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1">
<title><mt:EntryTitle></title>
<link rel="canonical" href="<mt:EntryID zero_pad="6">.html">
<script async src="https://cdn.ampproject.org/v0.js"></script>
<script custom-element="amp-anim" async src="https://cdn.ampproject.org/v0/amp-anim-0.1.js"></script>
<script custom-element="amp-iframe" async src="https://cdn.ampproject.org/v0/amp-iframe-0.1.js"></script>
#ranklet-{{context.id}} {
.ranklet-wrapper { counter-reset:ranklet-item; }
.ranklet-item {
position:relative;
margin:0 0 12px;
overflow:hidden;
cursor:pointer;
&:first-child:before {
width:40px;
height:40px;
<aside class="ranklet ranklet-reset">
<div class="ranklet-wrapper">
{{#context.pages}}
<div class="ranklet-item">
<a href="{{url}}" class="ranklet-link">
{{#image}}
<figure class="ranklet-image"><img src="{{image}}" alt="{{title}}"></figure>
{{/image}}
<p class="ranklet-title">{{title}}</p>
<!-- /.ranklet-link --></a>