Skip to content

Instantly share code, notes, and snippets.

@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: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: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: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:8664157
Created January 28, 2014 08:42
Bootstrap 2.3のドロップダウン用CSS
.dropdown-backdrop {
position: static;
}
@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 / 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: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";