Last active
August 29, 2015 14:17
-
-
Save mersy/b199135d73ae6fc8f481 to your computer and use it in GitHub Desktop.
flexibleSearch テンプレートファイル類(2015-03-19 MT東京-11)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function ($) { | |
$("#search").flexibleSearch({ | |
searchDataPath: "/search.json", | |
searchDataPathPreload: "/search.json", | |
searchFormCreation: false, | |
loadingImgPath: "/flexiblesearch/loading.gif", | |
resultItemTmpl: [ | |
'{{#items}}', | |
'<article class="entry clearfix">', | |
'<div class="entry-meta"><time datetime="{{&datetime}}"><span class="year">{{&dateyear}}年</span><span class="monthday">{{&date}}</span></time><a href="{{&categoryarchivelink}}" class="category">{{&category}}</a></div>', | |
'<h1 class="entrytitle"><a href="{{&url}}">{{&title}}</a></h1>', | |
'<div class="entry-excerpt">{{&excerpt}}</div>', | |
'<div class="pagemore"><a href="{{&url}}" class="btn btn-primary">この記事の詳細を見る</a></div>', | |
'</article>', | |
'{{/items}}' | |
].join(""), | |
paginateTmpl: [ | |
'<div id="fs-paginate">', | |
'<ul class="pagination">', | |
'{{#page}}', | |
'<li{{#current}} class="active"{{/current}}><a href="#" title="{{pageNumber}}">{{pageNumber}}</a></li>', | |
'{{/page}}', | |
'</ul>', | |
'</div>' | |
].join(""), | |
dummy: false | |
}); | |
})(jQuery); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<header class="navbar"> | |
<div class="container"> | |
<h1 class="navbar-header"> | |
<a href="<$mt:BlogRelativeURL$>" class="brand"><img src="<$mt:BlogRelativeURL$>images/logo.png"></a> | |
<button class="navbar-toggle collapsed" data-target=".navbar-collapse" data-toggle="collapse" type="button"><i class="fa fa-list"></i></button> | |
</h1> | |
<nav class="navbar-collapse collapse navbar-right"> | |
<ul class="header-socialbtn"> | |
<mt:If name="facebook"><li class="facebook"><a href="<$mt:GetVar name="facebook"$>"><i class="fa fa-facebook"></i></a></li></mt:If> | |
<mt:If name="twitter"><li class="twitter"><a href="<$mt:GetVar name="twitter"$>"><i class="fa fa-twitter"></i></a></li></mt:If> | |
<mt:If name="google"><li class="googleplus"><a href="<$mt:GetVar name="google"$>"><i class="fa fa-google"></i></a></li></mt:If> | |
</ul> | |
<div style="float: right; padding: 5px 0px;"> | |
<form style="padding: 5px 0px;" action="/search.html" method="GET" class="form-inline"> | |
<input type="hidden" name="offset" value="0"> | |
<input type="hidden" name="limit" value="5"> | |
<input name="search" class="form-control" type="text" placeholder="キーワード検索" style="width:12em"><input type="submit" class="btn btn-primary" value="検索"></form> | |
</div> | |
<ul class="nav navbar-nav"> | |
<li><a href="<$mt:BlogRelativeURL$>">TOP</a></li> | |
<li> | |
<a href="#" class="dropdown-toggle" data-toggle="dropdown">ニュース<i class="fa fa-caret-down fa-sm"></i></a> | |
<ul class="dropdown-menu"> | |
<li><a href="<$mt:BlogRelativeURL$>news.html">TOP</a></li> | |
<mt:TopLevelCategories> | |
<mt:SetVarBlock name="category_count"><$mt:CategoryCount$></mt:SetVarBlock> | |
<mt:If name="category_count" ne="0"> | |
<li><a href="<$mt:CategoryArchiveLink$>"><$mt:CategoryLabel$></a></li> | |
</mt:If> | |
</mt:TopLevelCategories> | |
</ul> | |
</li> | |
<mt:Folders> | |
<mt:SetVarBlock name="description"><$mt:FolderDescription$></mt:SetVarBlock> | |
<mt:SetVarBlock name="currentpage"><$mt:FolderLabel$></mt:SetVarBlock> | |
<mt:Unless name="description" eq="footer_link"> | |
<li class="dropdown"> | |
<a href="#" class="dropdown-toggle" data-toggle="dropdown"><$mt:FolderLabel$><i class="fa fa-caret-down fa-sm"></i></a> | |
<ul class="dropdown-menu"> | |
<mt:Pages> | |
<li><a href="<$mt:PagePermalink$>"><$mt:PageTitle$></a></li> | |
</mt:Pages> | |
</ul> | |
</li> | |
</mt:Unless> | |
</mt:Folders> | |
<mt:Pages no_folder="1"> | |
<li><a href="<$mt:PagePermalink$>"><$mt:PageTitle$></a></li> | |
</mt:Pages> | |
</ul> | |
</nav> | |
</div> | |
</header> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html><$mt:Include module="config"$> | |
<html lang="<$mt:BlogLanguage$>" itemscope itemtype="http://schema.org/WebPage"> | |
<head> | |
<meta charset="<$mt:PublishCharset$>"> | |
<title>検索結果 | <$mt:BlogName encode_html="1"$></title> | |
<meta name="description" content="<$mt:BlogDescription encode_html="1" remove_html="1"$>"> | |
<meta name="keywords" content="<$mt:GetVar name="metakeywords"$>"> | |
<meta name="viewport" content="width=device-width,initial-scale=1"> | |
<link rel="shortcut icon" href="<$mt:BlogURL encode_html="1"$>images/favicon.ico"> | |
<link rel="start" href="<$mt:BlogURL encode_html="1"$>"> | |
<link rel="alternate" type="application/atom+xml" title="Recent Entries" href="<$mt:Link template="feed_recent"$>"> | |
<$mt:CanonicalLink$> | |
<!-- Open Graph Protocol --> | |
<meta property="og:type" content="article"> | |
<meta property="og:locale" content="<$mt:BlogLanguage setvar="blog_lang"$><mt:If name="blog_lang" eq="ja">ja_JP<mt:Else><$mt:Var name="blog_lang"$></mt:If>"> | |
<meta property="og:title" content="ニュース | <$mt:BlogName encode_html="1"$>"> | |
<meta property="og:url" content="<$mt:BlogURL encode_html="1"$>blog/"> | |
<meta property="og:description" content="<$mt:BlogDescription remove_html="1" encede_html="1"$>"> | |
<meta property="og:site_name" content="<$mt:BlogName encode_html="1"$>"> | |
<meta property="og:image" content="<$mt:BlogURL encode_html="1"$>images/ogimage.png"> | |
<!-- Microdata --> | |
<meta itemprop="description" content="<$mt:BlogDescription remove_html="1" encede_html="1"$>"> | |
<link itemprop="url" href="<$mt:BlogURL encode_html="1"$>blog/"> | |
<link itemprop="image" href="<$mt:BlogURL encode_html="1"$>images/ogimage.png"> | |
<$mt:Include module="common_stylesheet"$> | |
<$mt:Include module="common_head_js"$> | |
</head> | |
<body id="top"> | |
<mt:SetVarBlock name="thispage">blog</mt:SetVarBlock> | |
<$mt:Include module="header"$> | |
<section id="localnavi"> | |
<div class="container"> | |
<div class="row"> | |
<div class="col-sm-12"> | |
<nav role="navigation" class="breadcrumb"> | |
<ul class="clearfix"> | |
<li class="home"><a href="<$mt:BlogRelativeURL$>"><i class="fa fa-home fa-lg"></i></a></li> | |
<li><span>検索結果</span></li> | |
</ul> | |
</nav> | |
</div> | |
</div> | |
</div> | |
</section> | |
<section id="mainvisual-lower"> | |
<div class="overray"></div> | |
<div class="container"> | |
<div class="row"> | |
<div class="col-sm-12"> | |
<h2><i class="fa fa-book"></i>検索結果</h2> | |
</div> | |
</div> | |
</div> | |
</section> | |
<div id="content"> | |
<div class="container"> | |
<div class="row-fluid"> | |
<div class="col-sm-9" id="blog-primary-content"> | |
<div id="entry-list"> | |
<div id="fs-result"></div> | |
</div> | |
<div class="holder"></div> | |
</div><!-- /primary-content --> | |
<aside class="col-sm-3 pull-right" id="sidebar"> | |
<$mt:Include module="blog-sidemenu"$> | |
</aside><!-- sidebar --> | |
</div> | |
</div> | |
</div> | |
<$mt:Include module="footer"$> | |
<$mt:Include module="common_bottom_js"$> | |
<script src="/flexiblesearch/mustache.js"></script> | |
<script src="/flexiblesearch/flexibleSearch.js"></script> | |
<script src="/flexiblesearch/flexibleSearch-config.js"></script> | |
</body> | |
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"items":[ | |
<mt:entries lastn="0">{ | |
"title":"<mt:entryTitle>", | |
"datetime":"<$mt:EntryDate format="%Y-%m-%d"$>", | |
"dateyear":"<$mt:EntryDate format="%Y"$>", | |
"date":"<$mt:EntryDate format="%b月%e日"$>", | |
<mt:EntryCategories type="primary">"category":"<$mt:CategoryLabel$>", | |
"categoryarchivelink":"<$mt:CategoryArchiveLink$>",</mt:EntryCategories> | |
"url":"<mt:entryPermalink>", | |
"excerpt":"<mt:EntryExcerpt remove_html="1" strip_linefeeds="1">", | |
"body":"<mt:entryBody remove_html="1" strip_linefeeds="1">" | |
}<mt:unless name="__last__">,</mt:unless> | |
</mt:entries> | |
]} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment