Skip to content

Instantly share code, notes, and snippets.

@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: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:8573428
Created January 23, 2014 05:34
Bootstrap 2.3モーダルウィンドウ
<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:8573529
Last active January 4, 2016 05:09
MTMLで新着マーク
<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:8573497
Created January 23, 2014 05:41
RWDでのFacebookのLike Box
.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:8573465
Last active January 4, 2016 05:09
Bootstrap 3.0で中央寄せのナローカラム
<div class="col-md-8 col-md-offset-2"></div>
@atstyle
atstyle / gist:8573449
Created January 23, 2014 05:36
Bootstrap 3.0で左Sidebar
<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 / new_file0
Created April 26, 2015 05:31
mt:StatsSnippetで出力される【 type="text/javascript"】を消す
<$mt:StatsSnippet replace=' type="text/javascript"','' $>
@atstyle
atstyle / gist:6a1b8518bf1a36adf142
Last active August 29, 2015 13:58
相対ルートURL
<mt:SetVarBlock name="website_absolute_URL">http://<$mt:BlogHost$>/</mt:SetVarBlock>
<mt:Entries>
<h1><a href="<$mt:EntryPermalink replace="$website_absolute_URL","/"$><$mt:EntryTitle$></a></h1>
<$mt:EntryBody replace="$website_absolute_URL","/"$>
<$mt:EntryMore replace="$website_absolute_URL","/"$>
</mt:Entries>
#!/usr/bin/perl -w
my $result = `unzip MT-6.0.2.zip`;
print "Content-type: text/html\n\n$result";