Initial website

This commit is contained in:
Deon George
2018-09-03 17:41:16 +10:00
commit fd1bd20c85
238 changed files with 20819 additions and 0 deletions

View File

@@ -0,0 +1,32 @@
<% var last, postCount = 0; %>
<% page.posts.each(function(post, i) { %>
<% var year = post.date.year(); %>
<% if (last != year) { %>
<% if (last != null) { %>
</div></section>
<% } %>
<% last = year; postCount = 0;%>
<section class="archives-wrap">
<div class="archive-year-wrap">
<a href="<%- url_for('archives/' + year) %>" class="archive-year"><i class="icon fa fa-calendar-o"></i><%= year %></a>
</div>
<div class="archives">
<% } %>
<% postCount++; %>
<% if (postCount % 2 == 1) { %>
<div class="article-row">
<% } %>
<%- partial('summary', { post: post }) %>
<% if (postCount == page.posts.length || postCount % 2 == 0) { %>
</div>
<% } %>
<% }) %>
<% if (page.posts.length) { %>
</div></section>
<% } %>
<% if (page.total > 1) { %>
<nav id="page-nav">
<span class="pages"><%= _p('nav.current_page', page.current) %><%= _p('nav.total_page', page.total) %></span>
<%- paginator({prev_text: '&laquo;', next_text: '&raquo;'}) %>
</nav>
<% } %>

View File

@@ -0,0 +1,24 @@
<article id="<%= post.layout %>-<%= post.slug %>" class="article article-single article-type-<%= post.layout %><%= (post.direction && post.direction.toLowerCase() === 'rtl' ? ' rtl' : '') %>" itemscope itemprop="blogPost">
<div class="article-inner">
<% if (post.link || post.title) { %>
<header class="article-header">
<%- partial('post/title', { class_name: 'article-title' }) %>
</header>
<% } %>
<% if (post.layout != 'page') { %>
<div class="article-meta">
<%- partial('post/date', { class_name: 'article-date', date_format: null }) %>
<%- partial('post/author') %>
<%- partial('post/tag') %>
</div>
<% } %>
<%- partial('post/gallery') %>
<div class="article-entry" itemprop="articleBody">
<%- post.content %>
</div>
<footer class="article-footer">
<%- partial('share/index', { post: post }) %>
</footer>
</div>
</article>
<%- partial('comment/index') %>

View File

@@ -0,0 +1,39 @@
<div class="main-body-header">
<h1 class="header">
<%
var title = page.title;
if (page.archive) {
title = __('index.archive');
if (page.month) {
title += ': ' + page.year + '/' + page.month;
} else if (page.year) {
title += ': ' + page.year;
}
title = '<i class="icon fa fa-archive"></i>' + title;
} else if (page.author && !is_post()) {
title = page.author.name;
if (page.author.about) {
title += ' - ' + page.author.about;
}
} else if (page.category) {
title = '<i class="icon fa fa-folder-open"></i>' + __('index.category') + ': <em class="page-title-link">' + page.category + '</em>';
} else if (page.tag) {
title = '<i class="icon fa fa-tag"></i>' + __('index.tag') + ': <em>' + page.tag + '</em>';
} else if (is_post()) {
title = list_categories(page.categories, {show_count: false, style: 'none', class: 'page-title', separator: '<i class="icon fa fa-angle-right"></i>'});
if (title == "") {
title = __('index.uncategorized');
}
} else if (is_home()) {
title = '<em class="page-title-link" data-url="home">' + __('index.home') + '</em>';
} else if (page.subtitle) {
title = '<em class="page-title-link" data-url="' + url_for(page.path) + '">' + page.subtitle + '</em>';
} else if (page.title) {
title = '<em class="page-title-link" data-url="' + url_for(page.path) + '">' + page.title + '</em>';
} else {
title = config.title;
}
%>
<%- title %>
</h1>
</div>

View File

@@ -0,0 +1,17 @@
<footer id="footer">
<div class="container">
<div class="container-inner">
<a id="back-to-top" href="javascript:;"><i class="icon fa fa-angle-up"></i></a>
<div class="credit">
<h1 class="logo-wrap">
<a href="<%- url_for() %>" class="logo"></a>
</h1>
<p>&copy; <%= date(new Date(), 'YYYY') %> <%= config.author || config.title %></p>
<p>Powered by <a href="//hexo.io/" target="_blank">Hexo</a>. Theme by <a href="//github.com/ppoffice" target="_blank">PPOffice</a></p>
</div>
<div class="footer-plugins">
<%- partial('plugin/scripts', { isFooter: true }) %>
</div>
</div>
</div>
</footer>

View File

@@ -0,0 +1,60 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<%- partial('pwa/index') %>
<%
var title = page.title;
if (is_archive()) {
title = __('index.archive');
if (is_month()) {
title += ': ' + page.year + '/' + page.month;
} else if (is_year()) {
title += ': ' + page.year;
}
} else if (is_category()) {
title = __('index.category') + ': ' + page.category;
} else if (is_tag()) {
title = __('index.tag') + ': ' + page.tag;
}
%>
<title><% if (title) { %><%= title %> | <% } %><%= config.title %></title>
<% if (theme.plugins.bing_site_verification) { %>
<meta name="msvalidate.01" content="<%- theme.plugins.bing_site_verification %>" />
<% } %>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<% if (page.tags) {
var keywords = [];
for (var i in page.tags.data) {
keywords.push(page.tags.data[i].name);
}
%>
<meta name="keywords" content="<%= keywords.join(',') %>" />
<% } %>
<%- open_graph({
image: thumbnail(page),
fb_app_id: theme.miscellaneous.open_graph.fb_app_id,
fb_admins: theme.miscellaneous.open_graph.fb_admins,
twitter_id: theme.miscellaneous.open_graph.twitter_id,
google_plus: theme.miscellaneous.open_graph.google_plus,
}) %>
<%- meta(page) %>
<% if (theme.customize && theme.customize.social_links && theme.customize.social_links.rss) { %>
<link rel="alternate" href="<%- theme.customize.social_links.rss %>" title="<%= config.title %>" type="application/atom+xml" />
<% } %>
<% if (theme.customize.favicon) { %>
<link rel="icon" href="<%- url_for(theme.customize.favicon) %>" />
<% } %>
<%- css('libs/font-awesome/css/font-awesome.min') %>
<%- css('libs/titillium-web/styles') %>
<%- css('libs/source-code-pro/styles') %>
<%- css('css/style') %>
<%- js('libs/jquery/3.3.1/jquery.min') %>
<%- partial('plugin/scripts', { isHead: true }) %>
</head>

View File

@@ -0,0 +1,41 @@
<header id="header">
<div id="header-outer" class="outer">
<div class="container">
<div class="container-inner">
<div id="header-title">
<h1 class="logo-wrap">
<a href="<%- url_for() %>" class="logo"></a>
</h1>
<% if (theme.subtitle) { %>
<h2 class="subtitle-wrap">
<p class="subtitle"><%= theme.subtitle %></p>
</h2>
<% } %>
</div>
<div id="header-inner" class="nav-container">
<a id="main-nav-toggle" class="nav-icon fa fa-bars"></a>
<div class="nav-container-inner">
<ul id="main-nav">
<% for (var i in theme.menu) {
if (i == 'Categories') { %>
<%- list_categories({
depth: 2,
style: 'list',
class: 'main-nav',
show_count: false,
}) %>
<% } else { %>
<li class="main-nav-list-item" >
<a class="main-nav-list-link" href="<%- url_for(theme.menu[i]) %>"><%= __('index.' + i.toLowerCase()) %></a>
</li>
<% }} %>
</ul>
<nav id="sub-nav">
<%- partial('search/index') %>
</nav>
</div>
</div>
</div>
</div>
</div>
</header>

View File

@@ -0,0 +1,5 @@
<% if (post.authorId) { %>
<div class="article-author">
<a href="<%- config.root %><%- 'author/' + post.authorId %>"><%= post.author.name %></a>
</div>
<% } %>

View File

@@ -0,0 +1,7 @@
<% if (post.date) { %>
<div class="<%= class_name %>">
<a href="<%- url_for(post.path) %>" class="<%= class_name %>">
<time datetime="<%= date_xml(post.date) %>" itemprop="datePublished"><%= date(post.date, date_format) %></time>
</a>
</div>
<% } %>

View File

@@ -0,0 +1,9 @@
<% if (post.photos && post.photos.length) { %>
<div class="article-gallery">
<% post.photos.forEach(function(photo, i) { %>
<a class="gallery-item" href="<%- url_for(photo) %>" rel="gallery_<%= post._id %>">
<img src="<%- url_for(photo) %>" itemprop="image" />
</a>
<% }) %>
</div>
<% } %>

View File

@@ -0,0 +1,24 @@
<% if (post.prev || post.next) { %>
<nav id="article-nav">
<% if (post.prev) { %>
<a href="<%- url_for(post.prev.path) %>" id="article-nav-newer" class="article-nav-link-wrap">
<strong class="article-nav-caption"><%= __('sidebar.newer') %></strong>
<p class="article-nav-title">
<% if (post.prev.title) { %>
<%= post.prev.title %>
<% } else { %>
(no title)
<% } %>
</p>
<i class="icon fa fa-chevron-right" id="icon-chevron-right"></i>
</a>
<% } %>
<% if (post.next) { %>
<a href="<%- url_for(post.next.path) %>" id="article-nav-older" class="article-nav-link-wrap">
<strong class="article-nav-caption"><%= __('sidebar.older') %></strong>
<p class="article-nav-title"><%= post.next.title %></p>
<i class="icon fa fa-chevron-left" id="icon-chevron-left"></i>
</a>
<% } %>
</nav>
<% } %>

View File

@@ -0,0 +1,6 @@
<% if (post.tags && post.tags.length) { %>
<div class="article-tag">
<i class="fa fa-tag"></i>
<%- list_tags(post.tags, { show_count: false, style: 'link' }) %>
</div>
<% } %>

View File

@@ -0,0 +1,15 @@
<% if (post.link) { %>
<h1 itemprop="name">
<a class="<%= class_name %>" href="<%- url_for(post.link) %>" target="_blank" itemprop="url"><%= post.title %></a>
</h1>
<% } else if (post.title) { %>
<% if (typeof(linkable) !== 'undefined' && linkable) { %>
<h1 class="<%= class_name %>" itemprop="name">
<a href="<%- url_for(post.path) %>"><%= post.title %></a>
</h1>
<% } else { %>
<h1 class="<%= class_name %>" itemprop="name">
<%= post.title %>
</h1>
<% } %>
<% } %>

View File

@@ -0,0 +1,5 @@
<%- partial('comment/scripts') %>
<%- partial('plugin/scripts') %>
<!-- Custom Scripts -->
<%- js('js/main') %>

View File

@@ -0,0 +1,27 @@
<aside id="sidebar">
<a class="sidebar-toggle" title="Expand Sidebar"><i class="toggle icon"></i></a>
<div class="sidebar-top">
<p><%= __('sidebar.follow') %>:</p>
<ul class="social-links">
<% for (var i in theme.customize.social_links) { %>
<% if (theme.customize.social_links[i]) { %>
<li>
<a class="social-tooltip" title="<%= i %>" href="<%- url_for(theme.customize.social_links[i]) %>" target="_blank" rel="noopener">
<i class="icon fa fa-<%= i %>"></i>
</a>
</li>
<% } %>
<% } %>
</ul>
</div>
<% if (is_post()) { %>
<%- partial('post/nav', {post: page}) %>
<% } %>
<div class="widgets-container">
<% if (theme.widgets) { %>
<% theme.widgets.forEach(function(widget) { %>
<%- partial('widget/' + widget, {post: page}) %>
<% }) %>
<% } %>
</div>
</aside>

View File

@@ -0,0 +1,23 @@
<article class="article article-summary<%= (post.direction && post.direction.toLowerCase() === 'rtl' ? ' rtl' : '') %>">
<div class="article-summary-inner">
<% if (theme.customize.thumbnail === true) { %>
<%- partial('common/thumbnail', { counter: true }) %>
<% } %>
<div class="article-meta">
<div class="category">
<%- list_categories(post.categories, {
depth:2,
style: 'none',
show_count: false,
class: 'article-category',
separator: '<i class="icon fa fa-angle-right"></i>',
}) %>
</div>
<div class="date"><time datetime="<%= date_xml(post.date) %>" itemprop="datePublished"><%= date(post.date) %></time></div>
</div>
<%- partial('post/title', { class_name: 'article-title', linkable: true }) %>
<p class="article-excerpt">
<%- excerpt(post) %>
</p>
</div>
</article>

View File

@@ -0,0 +1,11 @@
<a href="<%- url_for(post.link ? post.link : post.path) %>" class="thumbnail">
<% var thumbnailUrl = thumbnail(post) %>
<% if (thumbnailUrl) { %>
<span style="background-image:url(<%- thumbnailUrl %>)" alt="<%= post.title %>" class="thumbnail-image"></span>
<% } else { %>
<span class="thumbnail-image thumbnail-none"></span>
<% } %>
<% if (typeof(counter) !== 'undefined' && counter) { %>
<%- partial('comment/counter') %>
<% } %>
</a>