Skip to content

Instantly share code, notes, and snippets.

@atstyle
atstyle / gist:8800396
Last active August 29, 2015 13:56
記事ページのog:image
<mt:Setvarblock name="ogimage"><mt:EntryAssets sort_order="ascend" lastn="1"><$mt:AssetURL$></mt:EntryAssets></mt:Setvarblock>
<meta property="og:image" content="<mt:If name='ogimage'><$mt:Getvar name='ogimage'><mt:Else>イメージのURL</mt:If>">
@atstyle
atstyle / gist:8804545
Last active August 29, 2015 13:56
Bootstrap 3.1 Basic Template
<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Bootstrap Basic Template</title>
<link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.1.0/css/bootstrap.min.css">
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
#!/usr/bin/perl -w
my $result = `unzip MT-6.0.2.zip`;
print "Content-type: text/html\n\n$result";
@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>
@atstyle
atstyle / new_file0
Created April 26, 2015 05:31
mt:StatsSnippetで出力される【 type="text/javascript"】を消す
<$mt:StatsSnippet replace=' type="text/javascript"','' $>
@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 / 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: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>