Skip to content

Instantly share code, notes, and snippets.

@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";
@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>
@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 / Bootstrap 2.3
Created January 28, 2014 15:29
Bootstrapでツールチップ
<a href="#" rel="tooltip" data-placement="bottom" data-original-title="this is tooltip">tooltip</a>
@atstyle
atstyle / gist:8664164
Created January 28, 2014 08:43
Bootstrap 3.0 BASIC Template
<!DOCTYPE html>
<html>
<head>
<title>Bootstrap 101 Template</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- Bootstrap -->
<link href="css/bootstrap.min.css" rel="stylesheet">
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
@atstyle
atstyle / gist:8664157
Created January 28, 2014 08:42
Bootstrap 2.3のドロップダウン用CSS
.dropdown-backdrop {
position: static;
}
@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: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>