Skip to content

Instantly share code, notes, and snippets.

View az1979's full-sized avatar

Kazuki Azumi az1979

View GitHub Profile
@az1979
az1979 / sample.css
Created January 17, 2018 08:33
スタイルシートのサンプル
a {
color: red;
}
@az1979
az1979 / wordpress-fixed-sidebar.css
Created January 6, 2018 13:10
WordPressのサイドバーを固定しよう - スクロールに追従させる
#secondary {
position: -webkit-sticky;
position: sticky;
top: 130px;
}
@az1979
az1979 / package.json
Created January 5, 2018 15:17
Reactが動作するサンプルプロジェクトのpackage.json
{
"name": "test",
"version": "1.0.0",
"description": "",
"main": "entry.jsx",
"scripts": {
"build": "webpack --display-error-details",
"watch": "webpack --watch"
},
"author": "",
@az1979
az1979 / wordpress-datetime-3.css
Last active January 5, 2018 10:38
WordPress - 投稿日の代わりに更新日を表示する方法(日付操作) - Type.3
article time.published:before {
content: '投稿日: ';
}
article time.updated:not(.published) {
display: inline;
}
article time.updated:not(.published):before {
content: ' / 更新日: ';
}
article .byline:before {
@az1979
az1979 / wordpress-datetime-2.css
Last active January 5, 2018 10:38
WordPress - 投稿日の代わりに更新日を表示する方法(日付操作) - Type.2
article time.published:before {
content: '投稿日: ';
}
article time.published:not(.updated) {
display: none;
}
article time.updated:not(.published) {
display: inline;
}
article time.updated:not(.published):before {
@az1979
az1979 / wordpress-datetime-1.css
Last active January 5, 2018 10:38
WordPress - 投稿日の代わりに更新日を表示する方法(日付操作) - Type.1
article time.published:not(.updated) {
display: none;
}
article time.updated:not(.published) {
display: inline;
}
@az1979
az1979 / wordpress-slide-contents.html
Last active December 30, 2017 09:45
WordPressの記事の一部を折りたたんで表示する方法 – HTML
<button data-slide-contents="slide-contents-1">スライドボタン</button>
<a href="#" data-slide-contents="slide-contents-1">スライドリンク</a>
<div id="slide-contents-1" class="slide-contents">
テストコメント
</div>
@az1979
az1979 / wordpress-slide-contents.js
Last active December 30, 2017 09:45
WordPressの記事の一部を折りたたんで表示する方法 – JS
jQuery(function(){
jQuery('[data-slide-contents]').click(function(event) {
event.preventDefault();
var slideContents = jQuery(this).data('slide-contents');
jQuery('#' + slideContents).slideToggle(400);
});
});
@az1979
az1979 / wordpress-slide-contents.css
Created December 30, 2017 08:19
WordPressの記事の一部を折りたたんで表示する方法 – CSS
.slide-contents {
background: #f2f2f2;
width: 100%;
border: #666 1px solid;
margin: 0 0 20px 0;
padding: 20px 20px 0 20px;
display: none;
}
@az1979
az1979 / wordpress-font.css
Last active December 16, 2017 09:34
WordPressのフォントを変更して印象をガラッと変えてみよう
body {
font-family: '游ゴシック', 'Yu Gothic', sans-serif !important;
}
.entry-content p {
line-height: 1.8em;
}