Skip to content

Instantly share code, notes, and snippets.

Avatar

Yuki Sekiguchi redamoon

View GitHub Profile
View index.html
<div id="app">
<div v-for="(v, i) in fliterTagList">
<div>{{ v.label }}</div>
</div>
</div>
View index.html
<div id="app">
<div v-for="(v, i) in fliterTagList">
<div>{{ v.label }}</div>
</div>
</div>
View index.html
<div class="header">
<h1><a href="/">www.ni4.jp</a></h1>
<div class="mode-change">
<input type="checkbox" name="view-mode" id="view-mode">
<label for="view-mode">mode: </label>
</div>
</div>
View script.babel
// true が dark mode
// false が normal mode
function getMode(type) {
const $body = $('body');
// typeの引数でonとoffを判別
const check = type ? 'on' : 'off';
type ? $body.addClass('dark') : $body.addClass('light');
type ? $body.removeClass('light') : $body.removeClass('dark');
$('input[name="view-mode"]').prop('checked', type);
$.cookie(type, check, { expires: 365, path:'/'});
@redamoon
redamoon / index.html
Last active Nov 27, 2019
position sticky load scrollLeft End
View index.html
<!-- <div class="table-wrap">
<table>
<tr>
<th>テスト</th>
<th>テスト</th>
<th>テスト</th>
<th>テスト</th>
<th>テスト</th>
<th>テスト</th>
<th>テスト</th>
@redamoon
redamoon / multiField_foreach_nestvar.html
Last active Nov 27, 2019
mt:Foreach・NestVar・mt:Loopで出力した例
View multiField_foreach_nestvar.html
<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="UTF-8">
<title>マルチフィールドのサンプルコード(mt:Foreachを使った例)</title>
<!-- UIkit CSS -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/uikit/3.0.0-rc.23/css/uikit.min.css" />
<!-- UIkit JS -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/uikit/3.0.0-rc.23/js/uikit.min.js"></script>
@redamoon
redamoon / multiField_vue.html
Last active Nov 27, 2019
Vue.jsで出力した例
View multiField_vue.html
<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="UTF-8">
<title>マルチフィールドのサンプルコード(Vue.jsを使った例)</title>
<!-- UIkit CSS -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/uikit/3.0.0-rc.23/css/uikit.min.css" />
<!-- UIkit JS -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/uikit/3.0.0-rc.23/js/uikit.min.js"></script>
@redamoon
redamoon / MTML.html
Last active Dec 9, 2017
Nunjucks + MTML SaCSS vol91
View MTML.html
<mt:Ignore>記事のコンポーネント</mt:Ignore>
<mt:SetVarTemplate name="_base_entries" key="entries" note="記事のコンポーネント">
<mt:Loop name="entries">
<mt:If name="__first__">
<ul>
</mt:If>
<a href="<mt:Var name="_link" /><mt:Var name="_date" />:<mt:Var name="_title" /></a>
<mt:If name="__last__">
<ul>
</mt:If>
View index.html
<div class="js-switch">
<ul>
<li>
<input name="radio" class="radio" type="radio" id="radio01" value="" data-radio=".change01" checked>
<label for="radio01">switch01</label>
</li>
<li>
<input name="radio" class="radio" type="radio" id="radio02" value="" data-radio=".change02">
<label for="radio02">switch02</label>
</li>