Skip to content

Instantly share code, notes, and snippets.

@atstyle
atstyle / gist:8573428
Created Jan 23, 2014
Bootstrap 2.3モーダルウィンドウ
View gist:8573428
<div id="myModal" class="modal hide fade">
<div class="modal-header">
<a class="close" data-dismiss="modal" >&times;</a>
<h3>画像の説明(alt)</h3>
</div>
<div class="modal-body">
<img alt="" src="画像" class="mt-image-none" style="" height="375" width="500"><!-- 527pxまでOK -->
</div>
<div class="modal-footer">
<a href="#" class="btn" data-dismiss="modal" >閉じる</a>
@atstyle
atstyle / gist:8573440
Created Jan 23, 2014
Bootstrap 2.3 Carousel
View gist:8573440
<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:8573449
Created Jan 23, 2014
Bootstrap 3.0で左Sidebar
View gist:8573449
<div class="row">
<div class="col-md-9 col-md-push-3">.col-md-9 .col-md-push-3</div>
<div class="col-md-3 col-md-pull-9">.col-md-3 .col-md-pull-9</div>
</div>
@atstyle
atstyle / gist:8573465
Last active Jan 4, 2016
Bootstrap 3.0で中央寄せのナローカラム
View gist:8573465
<div class="col-md-8 col-md-offset-2"></div>
@atstyle
atstyle / gist:8573482
Created Jan 23, 2014
Bootstrap 3.0でlabelとinputを横並び
View gist:8573482
<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:8573497
Created Jan 23, 2014
RWDでのFacebookのLike Box
View gist:8573497
.fbcomments,
.fb_iframe_widget,
.fb_iframe_widget[style],
.fb_iframe_widget iframe[style],
.fbcomments iframe[style],
.fb_iframe_widget span{
width: 100% !important;
}
@atstyle
atstyle / gist:8573513
Last active Jan 4, 2016
canonical要素 MTML
View gist:8573513
<link rel="canonical" href="<$MTBlogURL$>">
<link rel="canonical" href="<$MTEntryPermaLink$>">
<link rel="canonical" href="<$MTPagePermaLink$>">
@atstyle
atstyle / gist:8573517
Last active Jan 4, 2016
Bread crumb (ウェブサイトのウェブページ) MTML
View gist:8573517
<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:8573529
Last active Jan 4, 2016
MTMLで新着マーク
View gist:8573529
<mt:SetVarBlock name="today"><$mt:Date format="%Y%j"%></mt:SetVarBlock>
<mt:Entries lastn="1" include_blogs="ブログID" category="カテゴリ名">
<mt:SetVarBlock name="passed"><$mt:EntryDate format="%Y%j"%></mt:SetVarBlock>
<mt:SetVar name="passed" value="$today" op="sub">
<mt:If name="passed" ge="-5"><span class="newmark">New!</span></mt:If>
<mt:If name="passed" ge="-640"><mt:If name="passed" le="-635"><span class="newmark">New!</span></mt:If>
</mt:If>
</mt:Entries>
@atstyle
atstyle / gist:8573558
Created Jan 23, 2014
高速化 .htaccess
View gist:8573558
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
You can’t perform that action at this time.