Skip to content

Instantly share code, notes, and snippets.

@atstyle
atstyle / gist:8573440
Created January 23, 2014 05:35
Bootstrap 2.3 Carousel
<div id="myCarousel" class="carousel">
<!-- Carousel items -->
<div class="carousel-inner">
<div class="active item">...</div>
<div class="item">...</div>
<div class="item">...</div>
</div>
<!-- Carousel nav -->
<a class="carousel-control left" href="#myCarousel" data-slide="prev">&lsaquo;</a>
<a class="carousel-control right" href="#myCarousel" data-slide="next">&rsaquo;</a>
@atstyle
atstyle / gist:8573482
Created January 23, 2014 05:39
Bootstrap 3.0でlabelとinputを横並び
<form class="well form-horizontal" action="xxx.cgi" method="post">
<fieldset>
<legend accesskey="1"><kbd>1</kbd>お客様の情報をご記入ください</legend>
<div class="form-group">
<label for="name" class="col-sm-5 control-label">名前<kbd>n</kbd> <strong>必須</strong></label>
<div class="col-sm-7">
<input type="text" class="form-control" id="name" value="" size="24" placeholder="お名前をご記入ください" required>
</div>
</div>
</fieldset>
@atstyle
atstyle / gist:8573517
Last active January 4, 2016 05:09
Bread crumb (ウェブサイトのウェブページ) MTML
<ul class="breadcrumb">
<li><a href="<$mt:WebsiteURL$>">Home</a></li>
<mt:SetVarBlock name="pagebasename"><$mt:PageBaseName$></mt:SetVarBlock>
<mt:ParentFolder>
<li><a href="<$mt:WebsiteURL$><$mt:FolderPath>/"><$mt:FolderLabel remove_html="1"$></a></li>
</mt:ParentFolder>
<mt:Unless name="pagebasename" eq="index">
<mt:PageFolder>
<li><a href="<$mt:WebsiteURL$><$mt:FolderPath$>/"><$mt:FolderLabel remove_html="1"$></a></li>
</mt:PageFolder>
@atstyle
atstyle / gist:8573513
Last active January 4, 2016 05:09
canonical要素 MTML
<link rel="canonical" href="<$MTBlogURL$>">
<link rel="canonical" href="<$MTEntryPermaLink$>">
<link rel="canonical" href="<$MTPagePermaLink$>">
@atstyle
atstyle / gist:8573558
Created January 23, 2014 05:46
高速化 .htaccess
AddOutputFilterByType DEFLATE text/html text/plain text/xml application/xml application/xhtml+xml text/javascript text/css application/x-javascript
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4.0[678] no-gzip
BrowserMatch bMSIE !no-gzip !gzip-only-text/html
<FilesMatch ".(flv|gif|jpe?g|png|ico|swf|js|css|pdf)$">
Header set Cache-Control "max-age=2592000"
</FilesMatch>
# explicitly disable caching for scripts and other dynamic files
<FilesMatch ".(pl|php|cgi|spl|scgi|fcgi)$">
Header unset Cache-Control
@atstyle
atstyle / gist:8573809
Last active January 4, 2016 05:18
エントリリストへ、特定カテゴリ用画像を付与する MTML
<mt:SetHashVar name="Compare">
<mt:SetVar name="Category1" value="<img src="http://www.example.com/blog/blogimg/001.gif" />">
<mt:SetVar name="Category2" value="<img src="http://www.example.com/blog/blogimg/002.gif" />">
</mt:SetHashVar>
<ul>
<mt:Entries lastn="999">
<mt:Setvar name="Find" value="0">
<mt:SetVarBlock name="EntCat"><mt:EntryCategory></mt:SetVarBlock>
<mt:Loop name="Compare" sort_by="key">
<mt:SetVar name="imga" value="$__value__">
@atstyle
atstyle / gist:8573822
Last active January 4, 2016 05:18
狙ったフォルダのみを隠すフォルダリスト MTML
<mt:SetVar name="keyword" value="dog">
<ul>
<mt:Folders>
<mt:SetVarBlock name="CurFldName"><mt:FolderLabel></mt:SetVarBlock>
<mt:Unless name="CurFldName" like="$keyword">
<li><$mt:FolderLabel$> (<$mt:FolderCount$>)</a></li>
</mt:Unless>
</mt:Folders>
</ul>
@atstyle
atstyle / gist:8573793
Last active January 4, 2016 05:18
サムネイルでエントリリスト MTML
<$mt:setvar name="counter" value="0"$>
<mt:Blogs include_blogs="children">
<mt:Entries lastn="0">
<mt:EntryAssets type="image" lastn="1">
<$mt::setvar name="counter" op="++"$>
<mt:SetVarBlock name="EntDate">
<$mt:EntryDate format_name="iso8601"$>
</mt:SetVarBlock>
<mt:SetVarBlock name="EntryLink[$counter]">
<$mt:EntryPermalink$>
@atstyle
atstyle / gist:8573818
Last active January 4, 2016 05:18
狙ったフォルダのみを表示してウェブページを展開 MTML
<mt:SetVar name="keyword" value="dog">
<ul>
<mt:Folders>
<mt:SetVarBlock name="CurFldName"><mt:FolderLabel></mt:SetVarBlock>
<mt:If name="CurFldName" like="$keyword">
<li><$mt:FolderLabel$>(<$mt:FolderCount$>)</li>
<ul>
<mt:Pages folder="$CurFldName" lastn="5">
<li><a href="<$mt:PagePermalink$>"><$mt:PageTitle$></a></li>
</mt:Pages>
@atstyle
atstyle / gist:8664157
Created January 28, 2014 08:42
Bootstrap 2.3のドロップダウン用CSS
.dropdown-backdrop {
position: static;
}