Initial pages site
This commit is contained in:
172
themes/spd/layout/_partial/footer.ejs
Normal file
172
themes/spd/layout/_partial/footer.ejs
Normal file
@@ -0,0 +1,172 @@
|
||||
<!-- Footer -->
|
||||
<footer>
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
|
||||
<ul class="list-inline text-center">
|
||||
<% if (config.RSS) { %>
|
||||
<li>
|
||||
<a href="<%= config.root + 'feed.xml' %>">
|
||||
<span class="fa-stack fa-lg">
|
||||
<i class="fa fa-circle fa-stack-2x"></i>
|
||||
<i class="fa fa-rss fa-stack-1x fa-inverse"></i>
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
<% } %>
|
||||
<% if (config.twitter_username) { %>
|
||||
<li>
|
||||
<a target="_blank" href="https://twitter.com/<%= config.twitter_username %>">
|
||||
<span class="fa-stack fa-lg">
|
||||
<i class="fa fa-circle fa-stack-2x"></i>
|
||||
<i class="fa fa-twitter fa-stack-1x fa-inverse"></i>
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
<% } %>
|
||||
|
||||
<% if (config.facebook_username) { %>
|
||||
<li>
|
||||
<a target="_blank" href="https://www.facebook.com/<%= config.facebook_username %>">
|
||||
<span class="fa-stack fa-lg">
|
||||
<i class="fa fa-circle fa-stack-2x"></i>
|
||||
<i class="fa fa-facebook fa-stack-1x fa-inverse"></i>
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
<% } %>
|
||||
|
||||
<% if (config.github_username) { %>
|
||||
<li>
|
||||
<a target="_blank" href="https://github.com/<%= config.github_username %>">
|
||||
<span class="fa-stack fa-lg">
|
||||
<i class="fa fa-circle fa-stack-2x"></i>
|
||||
<i class="fa fa-github fa-stack-1x fa-inverse"></i>
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
<% } %>
|
||||
|
||||
<% if (config.linkedin_username) { %>
|
||||
<li>
|
||||
<a target="_blank" href="https://www.linkedin.com/in/<%= config.linkedin_username %>">
|
||||
<span class="fa-stack fa-lg">
|
||||
<i class="fa fa-circle fa-stack-2x"></i>
|
||||
<i class="fa fa-linkedin fa-stack-1x fa-inverse"></i>
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
<% } %>
|
||||
|
||||
</ul>
|
||||
<p class="copyright text-muted">
|
||||
Copyright © <%= config.author %> <%= new Date().getFullYear() %>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
<!-- jQuery -->
|
||||
<%- js('js/jquery.min.js') %>
|
||||
|
||||
<!-- Bootstrap Core JavaScript -->
|
||||
<%- js('js/bootstrap.min.js') %>
|
||||
|
||||
<!-- Custom Theme JavaScript -->
|
||||
<%- js('js/hux-blog.min.js') %>
|
||||
|
||||
|
||||
<!-- async load function -->
|
||||
<script>
|
||||
function async(u, c) {
|
||||
var d = document, t = 'script',
|
||||
o = d.createElement(t),
|
||||
s = d.getElementsByTagName(t)[0];
|
||||
o.src = u;
|
||||
if (c) { o.addEventListener('load', function (e) { c(null, e); }, false); }
|
||||
s.parentNode.insertBefore(o, s);
|
||||
}
|
||||
</script>
|
||||
|
||||
<!--
|
||||
Because of the native support for backtick-style fenced code blocks
|
||||
right within the Markdown is landed in Github Pages,
|
||||
From V1.6, There is no need for Highlight.js,
|
||||
so Huxblog drops it officially.
|
||||
|
||||
- https://github.com/blog/2100-github-pages-now-faster-and-simpler-with-jekyll-3-0
|
||||
- https://help.github.com/articles/creating-and-highlighting-code-blocks/
|
||||
-->
|
||||
<!--
|
||||
<script>
|
||||
async("http://cdn.bootcss.com/highlight.js/8.6/highlight.min.js", function(){
|
||||
hljs.initHighlightingOnLoad();
|
||||
})
|
||||
</script>
|
||||
<link href="http://cdn.bootcss.com/highlight.js/8.6/styles/github.min.css" rel="stylesheet">
|
||||
-->
|
||||
|
||||
|
||||
<!-- jquery.tagcloud.js -->
|
||||
<script>
|
||||
// only load tagcloud.js in tag.html
|
||||
if($('#tag_cloud').length !== 0){
|
||||
async("<%= config.url%><%= config.root%>js/jquery.tagcloud.js",function(){
|
||||
$.fn.tagcloud.defaults = {
|
||||
//size: {start: 1, end: 1, unit: 'em'},
|
||||
color: {start: '#bbbbee', end: '#0085a1'},
|
||||
};
|
||||
$('#tag_cloud a').tagcloud();
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
<!--fastClick.js -->
|
||||
<script>
|
||||
async("https://cdn.bootcss.com/fastclick/1.0.6/fastclick.min.js", function(){
|
||||
var $nav = document.querySelector("nav");
|
||||
if($nav) FastClick.attach($nav);
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
<!-- Google Analytics -->
|
||||
|
||||
<% if (config.ga_track_id) { %>
|
||||
<script>
|
||||
// dynamic User by Hux
|
||||
var _gaId = '<%= config.ga_track_id %>';
|
||||
var _gaDomain = '<%= config.ga_domain %>';
|
||||
|
||||
// Originial
|
||||
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
|
||||
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
|
||||
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
|
||||
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
|
||||
|
||||
ga('create', _gaId, _gaDomain);
|
||||
ga('send', 'pageview');
|
||||
</script>
|
||||
|
||||
<% } %>
|
||||
|
||||
|
||||
<!-- Baidu Tongji -->
|
||||
<% if (config.ba_track_id) { %>
|
||||
<script>
|
||||
// dynamic User by Hux
|
||||
var _baId = '<%= config.ba_track_id %>';
|
||||
|
||||
// Originial
|
||||
var _hmt = _hmt || [];
|
||||
(function() {
|
||||
var hm = document.createElement("script");
|
||||
hm.src = "//hm.baidu.com/hm.js?" + _baId;
|
||||
var s = document.getElementsByTagName("script")[0];
|
||||
s.parentNode.insertBefore(hm, s);
|
||||
})();
|
||||
</script>
|
||||
<% } %>
|
||||
|
||||
|
50
themes/spd/layout/_partial/head.ejs
Normal file
50
themes/spd/layout/_partial/head.ejs
Normal file
@@ -0,0 +1,50 @@
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="google-site-verification" content="xBT4GhYoi5qRD5tr338pgPM5OWHHIDR6mNg1a3euekI" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta name="description" content="<%= config.description %>">
|
||||
<meta name="keyword" content="<%= config.keyword %>">
|
||||
<!-- <link rel="shortcut icon" href="<%= config.root %>img/shortcut.png"> -->
|
||||
<!-- Place this tag in your head or just before your close body tag. -->
|
||||
<script async defer src="https://buttons.github.io/buttons.js"></script>
|
||||
<title>
|
||||
<% if (page.title) { %>
|
||||
<%= page.title + ' - ' + config.SEOTitle %>
|
||||
<% } else{%>
|
||||
<%= config.SEOTitle %>
|
||||
<% } %>
|
||||
</title>
|
||||
|
||||
<link rel="canonical" href="<%= config.url + config.root + (page.path||'').replace('index.html', '') %>">
|
||||
|
||||
<!-- Bootstrap Core CSS -->
|
||||
<%- css('css/bootstrap.min.css') %>
|
||||
|
||||
<!-- Custom CSS -->
|
||||
<%- css('css/beantech.min.css')%>
|
||||
|
||||
<!-- Pygments Highlight CSS -->
|
||||
<%- css('css/highlight') %>
|
||||
|
||||
<%- css('css/widget')%>
|
||||
|
||||
<%- css('css/signature')%>
|
||||
|
||||
<%- css('css/toc')%>
|
||||
|
||||
<%- css('css/backtotop')%>
|
||||
|
||||
<!-- Custom Fonts -->
|
||||
<link href="https://cdn.staticfile.org/font-awesome/4.5.0/css/font-awesome.min.css" rel="stylesheet" type="text/css">
|
||||
|
||||
<!-- 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:// -->
|
||||
<!--[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>
|
||||
<![endif]-->
|
||||
|
||||
<!-- ga & ba script hoook -->
|
||||
<script></script>
|
||||
</head>
|
56
themes/spd/layout/_partial/header.ejs
Normal file
56
themes/spd/layout/_partial/header.ejs
Normal file
@@ -0,0 +1,56 @@
|
||||
<!-- Modified by Yu-Hsuan Yen -->
|
||||
<!-- Post Header -->
|
||||
<style type="text/css">
|
||||
header.intro-header{
|
||||
<% if (is_home()) { %>
|
||||
background-image: url('<%= config.root + config["header-img"] %>')
|
||||
/*config*/
|
||||
<%} else if (is_post()){%>
|
||||
background-image: url('<%= page["header-img"] %>')
|
||||
/*post*/
|
||||
<%} else {%>
|
||||
background-image: url('<%= config.root + page["header-img"] %>')
|
||||
/*page*/
|
||||
<%} %>
|
||||
}
|
||||
<% if (config.signature) {%>
|
||||
#signature{
|
||||
background-image: url('<%= config.root + config["signature-img"] %>');
|
||||
}
|
||||
<%}%>
|
||||
</style>
|
||||
|
||||
<header class="intro-header" >
|
||||
<!-- Signature -->
|
||||
<div id="signature">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
|
||||
<% if (is_post()) { %>
|
||||
<div class="post-heading">
|
||||
<div class="tags">
|
||||
<% page.tags.forEach(function(tag){ %>
|
||||
<a class="tag" href="<%= config.root %>tags/#<%= tag.name %>" title="<%= tag.name %>"><%= tag.name %></a>
|
||||
<% }) %>
|
||||
</div>
|
||||
<h1><%= page.title %></h1>
|
||||
<h2 class="subheading"><%= page.subtitle || "" %></h2>
|
||||
<span class="meta">
|
||||
Posted by <%- page.author || config.author %> on
|
||||
<%= page.date.format(config.date_format) %>
|
||||
</span>
|
||||
</div>
|
||||
<% } else { %>
|
||||
<div class="site-heading">
|
||||
<h1><%= page.title || config.title %></h1>
|
||||
<!--<hr class="small">-->
|
||||
<span class="subheading"><%= page.description || config.subtitle || "" %></span>
|
||||
</div>
|
||||
<% } %>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
71
themes/spd/layout/_partial/nav.ejs
Normal file
71
themes/spd/layout/_partial/nav.ejs
Normal file
@@ -0,0 +1,71 @@
|
||||
<!-- Navigation -->
|
||||
<nav class="navbar navbar-default navbar-custom navbar-fixed-top">
|
||||
<div class="container-fluid">
|
||||
<!-- Brand and toggle get grouped for better mobile display -->
|
||||
<div class="navbar-header page-scroll">
|
||||
<button type="button" class="navbar-toggle">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="<%= config.root %>"><%= config.title %></a>
|
||||
</div>
|
||||
|
||||
<!-- Collect the nav links, forms, and other content for toggling -->
|
||||
<!-- Known Issue, found by Hux:
|
||||
<nav>'s height woule be hold on by its content.
|
||||
so, when navbar scale out, the <nav> will cover tags.
|
||||
also mask any touch event of tags, unfortunately.
|
||||
-->
|
||||
<div id="huxblog_navbar">
|
||||
<div class="navbar-collapse">
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<li>
|
||||
<a href="<%= config.root %>">Home</a>
|
||||
</li>
|
||||
|
||||
<% site.pages.forEach(function(page){ %>
|
||||
|
||||
<% if(page.title){ %>
|
||||
<li>
|
||||
<a href="<%= config.root %><%= page.path.replace('index.html', '') %>"><%= page.title %></a>
|
||||
</li>
|
||||
<% } %>
|
||||
<% }); %>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.navbar-collapse -->
|
||||
</div>
|
||||
<!-- /.container -->
|
||||
</nav>
|
||||
<script>
|
||||
// Drop Bootstarp low-performance Navbar
|
||||
// Use customize navbar with high-quality material design animation
|
||||
// in high-perf jank-free CSS3 implementation
|
||||
var $body = document.body;
|
||||
var $toggle = document.querySelector('.navbar-toggle');
|
||||
var $navbar = document.querySelector('#huxblog_navbar');
|
||||
var $collapse = document.querySelector('.navbar-collapse');
|
||||
|
||||
$toggle.addEventListener('click', handleMagic)
|
||||
function handleMagic(e){
|
||||
if ($navbar.className.indexOf('in') > 0) {
|
||||
// CLOSE
|
||||
$navbar.className = " ";
|
||||
// wait until animation end.
|
||||
setTimeout(function(){
|
||||
// prevent frequently toggle
|
||||
if($navbar.className.indexOf('in') < 0) {
|
||||
$collapse.style.height = "0px"
|
||||
}
|
||||
},400)
|
||||
}else{
|
||||
// OPEN
|
||||
$collapse.style.height = "auto"
|
||||
$navbar.className += " in";
|
||||
}
|
||||
}
|
||||
</script>
|
8
themes/spd/layout/_partial/pagination.ejs
Normal file
8
themes/spd/layout/_partial/pagination.ejs
Normal file
@@ -0,0 +1,8 @@
|
||||
<ul class="pager">
|
||||
<% if (page.prev){ %>
|
||||
<li class="previous"><a href="<%- config.root %><%- page.prev_link %>">← <%- __('next')%></a></li>
|
||||
<% } %>
|
||||
<% if (page.next){ %>
|
||||
<li class="next"><a href="<%- config.root %><%- page.next_link %>"><%- __('prev')%> →</a></li>
|
||||
<% } %>
|
||||
</ul>
|
13
themes/spd/layout/_partial/sidebar.ejs
Normal file
13
themes/spd/layout/_partial/sidebar.ejs
Normal file
@@ -0,0 +1,13 @@
|
||||
<!-- Sidebar Container -->
|
||||
<div class="
|
||||
col-lg-3 col-lg-offset-0
|
||||
col-md-3 col-md-offset-0
|
||||
col-sm-12
|
||||
col-xs-12
|
||||
sidebar-container
|
||||
">
|
||||
<% theme.widgets.forEach(function(widget){ %>
|
||||
<%- partial('_widget/' + widget) %>
|
||||
<hr>
|
||||
<% }) %>
|
||||
</div>
|
15
themes/spd/layout/_partial/toc.ejs
Normal file
15
themes/spd/layout/_partial/toc.ejs
Normal file
@@ -0,0 +1,15 @@
|
||||
<!-- Table of Contents -->
|
||||
<% if (page.catalog) { %>
|
||||
<% if (is_post()){ %>
|
||||
<aside id="sidebar">
|
||||
<div id="toc" class="toc-article">
|
||||
<strong class="toc-title"><%= __('Contents') %></strong>
|
||||
<% if (toc(page.content) != ""){ %>
|
||||
<%- toc(page.content, { "class": "toc-nav" }) %>
|
||||
<% } else { %>
|
||||
<ol class="nav"><%= __('none') %></ol>
|
||||
<% } %>
|
||||
</div>
|
||||
</aside>
|
||||
<% } %>
|
||||
<% } %>
|
Reference in New Issue
Block a user