Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Initial commit, porting in progress
  • Loading branch information
carsonip committed Feb 18, 2017
0 parents commit 275f414
Show file tree
Hide file tree
Showing 17 changed files with 362 additions and 0 deletions.
11 changes: 11 additions & 0 deletions .gitignore
@@ -0,0 +1,11 @@
.idea
*~
.DS_Store
.sass-cache
assets
node_modules
src/_bower_components
static/js/*
!static/js/script-*.min.js
static/css/*
!static/css/style-*.min.css
20 changes: 20 additions & 0 deletions LICENSE.md
@@ -0,0 +1,20 @@
The MIT License (MIT)

Copyright (c) 2017 YOUR_NAME_HERE

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
5 changes: 5 additions & 0 deletions README.md
@@ -0,0 +1,5 @@
# Minos

Minos is a hugo theme ported from Hexo theme [Minos](https://github.com/ppoffice/hexo-theme-minos) by [@ppoffice](https://github.com/ppoffice/).

Work in progress.
6 changes: 6 additions & 0 deletions archetypes/default.md
@@ -0,0 +1,6 @@
+++
Description = ""
Tags = ["development", "golang"]
Categories = ["Development", "Golang"]
menu = ""
+++
Empty file added layouts/404.html
Empty file.
31 changes: 31 additions & 0 deletions layouts/_default/list.html
@@ -0,0 +1,31 @@
{{ partial "head.html" . }}
<body>
<div id="container">
{{ partial "header.html" . }}
<section id="main" class="outer">
<section class="archives-wrap">
<div class="archive-category-wrap">
<span class="archive-category">{{ .Title }}</span>
</div>
<div class="archives">
{{ range .Data.Pages }}
<article class="archive-article archive-type-post">
<div class="archive-article-inner">
<header class="archive-article-header">
<a href="{{ .RelPermalink }}" class="archive-article-date">
<time datetime='{{ .Date.Format "2006-01-02T15:04:05.000-07:00" }}' itemprop="datePublished">{{ .Date.Format "2006 Jan 2" }}</time>
</a>
<h1 itemprop="name">
<a class="archive-article-title" href="{{ .RelPermalink }}">{{ .Title }}</a>
</h1>
</header>
</div>
</article>
{{ end }}
</div></section>
</section>
{{ partial "footer.html" . }}
<!--<%- partial('_partial/after-footer') %>-->
</div>
</body>
</html>
54 changes: 54 additions & 0 deletions layouts/_default/single.html
@@ -0,0 +1,54 @@
{{ partial "head.html" . }}

<body>
<div id="container">
{{ partial "header.html" . }}
<section id="main" class="outer">
{{ partial "article.html" . }}

<!--<% if (!index && theme.share_jia){ %>-->
<!--<%- partial('post/share_jia') %>-->
<!--<% } %>-->

<!--<% if (!index && theme.share_addthis){ %>-->
<!--<%- partial('post/share_addthis') %>-->
<!--<% } %>-->
{{ partial "share_addthis.html" . }}

{{ if not .Params.nocomment }}
{{ template "_internal/disqus.html" . }}
{{ end }}
<!--<% if (!index && post.comments && config.disqus_shortname){ %>-->
<!--<section id="comments">-->
<!--<div id="disqus_thread">-->
<!--<noscript>Please enable JavaScript to view the <a href="//disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>-->
<!--</div>-->
<!--</section>-->
<!--<% } %>-->

<!--<% if (!index && post.comments && config.duoshuo_shortname){ %>-->
<!--<section id="comments">-->
<!--&lt;!&ndash; 多说评论框 start &ndash;&gt;-->
<!--<div class="ds-thread" data-thread-key="<%= post.layout %>-<%= post.slug %>" data-title="<%= post.title %>" data-url="<%= page.permalink %>"></div>-->
<!--&lt;!&ndash; 多说评论框 end &ndash;&gt;-->
<!--&lt;!&ndash; 多说公共JS代码 start (一个网页只需插入一次) &ndash;&gt;-->
<!--<script type="text/javascript">-->
<!--var duoshuoQuery = {short_name:'<%= config.duoshuo_shortname %>'};-->
<!--(function() {-->
<!--var ds = document.createElement('script');-->
<!--ds.type = 'text/javascript';ds.async = true;-->
<!--ds.src = (document.location.protocol == 'https:' ? 'https:' : 'http:') + '//static.duoshuo.com/embed.js';-->
<!--ds.charset = 'UTF-8';-->
<!--(document.getElementsByTagName('head')[0]-->
<!--|| document.getElementsByTagName('body')[0]).appendChild(ds);-->
<!--})();-->
<!--</script>-->
<!--&lt;!&ndash; 多说公共JS代码 end &ndash;&gt;-->
<!--</section>-->
<!--<% } %>-->
</section>
{{ partial "footer.html" . }}
<!--<%- partial('_partial/after-footer') %>-->
</div>
</body>
</html>
65 changes: 65 additions & 0 deletions layouts/index.html
@@ -0,0 +1,65 @@
{{ partial "head.html" . }}
<body>
<div id="container">
{{ partial "header.html" . }}
<section id="main" class="outer">
{{ range .Data.Pages }}
<article class="article article-type-post" itemscope itemprop="blogPost">
<div class="article-inner">
<!--<%- partial('post/gallery') %>-->
{{ if .Title }}
<header class="article-header">
<h1 class="article-title" itemprop="name">{{ .Title }}</h1>
</header>
{{ end }}
<div class="article-meta">
<a href="{{ .RelPermalink }}" class="article-date">
<time datetime='{{ .Date.Format "2006-01-02T15:04:05.000-07:00" }}' itemprop="datePublished">{{ .Date.Format "2006-01-02" }}</time>
</a>
{{ $Site := .Site }}
{{ if .Params.categories }}
<div class="post-categories">
<div class="article-category">
{{ range $i, $e := .Params.categories }}
{{ if gt $i 0 }}
<span>&gt;</span>
{{ end }}
<a class="article-category-link" href="{{ $Site.BaseURL }}/categories/{{ $e | urlize }}">{{ $e }}</a>
{{ end }}
</div>
</div>
{{ end }}
{{ if and (isset .Site.Params "disqusShortname") (ne .Site.Params.disqusShortname "") }}
<div class="article-comment-link-wrap">
<a href="{{ .RelPermalink }}#ds-thread" class="article-comment-link">Comments</a>
</div>
{{ end }}
</div>
<div class="article-entry" itemprop="articleBody">
{{ .Summary }}
<p class="article-more-link">
<a href="{{ .RelPermalink }}">Read More</a>
</p>
</div>

{{ if .Params.tags }}
<footer class="article-footer">
<ul class="article-tag-list">
{{ range .Params.tags }}
<li class="article-tag-list-item">
<a class="article-tag-list-link" href="{{ $Site.BaseURL}}/tags/{{ . | urlize }}">{{ . }}
</a>
</li>
{{ end }}
</ul>
</footer>
{{ end }}
</div>
</article>
{{ end }}
</section>
{{ partial "footer.html" . }}
<!--<%- partial('_partial/after-footer') %>-->
</div>
</body>
</html>
59 changes: 59 additions & 0 deletions layouts/partials/article.html
@@ -0,0 +1,59 @@
<article class="article article-type-post" itemscope itemprop="blogPost">
<div class="article-inner">
<!--<%- partial('post/gallery') %>-->
{{ if .Title }}
<header class="article-header">
<h1 class="article-title" itemprop="name">{{ .Title }}</h1>
</header>
{{ end }}
<div class="article-meta">
<a href="{{ .RelPermalink }}" class="article-date">
<time datetime='{{ .Date.Format "2006-01-02T15:04:05.000-07:00" }}' itemprop="datePublished">{{ .Date.Format "2006-01-02" }}</time>
</a>
{{ $Site := .Site }}
{{ if .Params.categories }}
<div class="post-categories">
<div class="article-category">
{{ range $i, $e := .Params.categories }}
{{ if gt $i 0 }}
<span>&gt;</span>
{{ end }}
<a class="article-category-link" href="{{ $Site.BaseURL }}/categories/{{ $e | urlize }}">{{ $e }}</a>
{{ end }}
</div>
</div>
{{ end }}
{{ if and (isset .Site.Params "disqusShortname") (ne .Site.Params.disqusShortname "") }}
<div class="article-comment-link-wrap">
<a href="{{ .RelPermalink }}#ds-thread" class="article-comment-link">Comments</a>
</div>
{{ end }}
</div>
<div class="article-entry" itemprop="articleBody">
{{ .Content }}
</div>

{{ if not .Params.notoc }}
{{ if .TableOfContents }}
<div class="article-toc">
<h3>Contents</h3>
{{ .TableOfContents }}
</div>
{{ end }}
{{ end }}

{{ if .Params.tags }}
<footer class="article-footer">
<ul class="article-tag-list">
{{ range .Params.tags }}
<li class="article-tag-list-item">
<a class="article-tag-list-link" href="{{ $Site.BaseURL}}/tags/{{ . | urlize }}">{{ . }}
</a>
</li>
{{ end }}
</ul>
</footer>
{{ end }}
</div>
{{ partial "nav.html" . }}
</article>
2 changes: 2 additions & 0 deletions layouts/partials/doctype.html
@@ -0,0 +1,2 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en-us">
8 changes: 8 additions & 0 deletions layouts/partials/footer.html
@@ -0,0 +1,8 @@
<footer id="footer">
<div class="outer">
<div id="footer-info" class="inner">
&copy; {{ .Now.Format "2006"}} {{ or .Site.Author .Site.Title }}&nbsp;
Powered by <a href="https://gohugo.io" target="_blank">Hugo</a> with theme <a href="https://github.com/carsonip/hugo-theme-minos">Minos</a>
</div>
</div>
</footer>
31 changes: 31 additions & 0 deletions layouts/partials/head.html
@@ -0,0 +1,31 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>{{ .Title }}{{ if ne .Title .Site.Title }} // {{ .Site.Title }}{{ end }}</title>

<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
{{ partial "og.html" . }}

<link href="{{ .RSSlink }}" rel="alternate" type="application/rss+xml" title="{{ .Site.Title }}" />
<link rel="shortcut icon" href="/favicon.png">

<link href="{{ .Site.BaseURL }}/css/webfonts/ptserif/main.css" rel='stylesheet' type='text/css'>
<link href="{{ .Site.BaseURL }}/css/webfonts/source-code-pro/main.css" rel="stylesheet" type="text/css">

<link rel="stylesheet" href="{{ .Site.BaseURL }}/css/style.css">

<link href="http://gmpg.org/xfn/11" rel="profile">
<meta http-equiv="content-type" content="text/html; charset=utf-8">

<!-- Enable responsiveness on mobile devices-->
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1">

<meta name="description" content="{{ .Description }}">
<meta name="keywords" content="{{ range .Keywords }}{{ . }},{{ end }}">
<meta name="author" content="{{ .Params.author }}">

{{ template "_internal/google_analytics.html" . }}

{{ .Hugo.Generator }}
</head>
18 changes: 18 additions & 0 deletions layouts/partials/header.html
@@ -0,0 +1,18 @@
<header id="header">
<div id="header-outer" class="outer">
<div id="header-inner" class="inner">
<a id="main-nav-toggle" class="nav-icon" href="javascript:;"></a>
<a id="logo" class="logo-text" href="{{ .Site.BaseURL }}">{{ .Site.Title }}</a>
<nav id="main-nav">
{{ range .Site.Menus.main }}
<a class="main-nav-link" href="{{ .URL }}">{{ .Name }}</a>
{{ end }}
</nav>
<nav id="sub-nav">
<div id="search-form-wrap">
<!--<%- search_form({button: '&#xF002;'}) %>-->
</div>
</nav>
</div>
</div>
</header>
14 changes: 14 additions & 0 deletions layouts/partials/nav.html
@@ -0,0 +1,14 @@
<nav id="article-nav">
{{ if .Prev }}
<a href="{{ .Prev.RelPermalink }}" id="article-nav-newer" class="article-nav-link-wrap">
<div class="article-nav-title"><span>&lt;</span>&nbsp;
{{ .Prev.Title }}
</div>
</a>
{{ end }}
{{ if .Next }}
<a href="{{ .Next.RelPermalink }}" id="article-nav-older" class="article-nav-link-wrap">
<div class="article-nav-title">{{ .Next.Title }}&nbsp;<span>&gt;</span></div>
</a>
{{ end }}
</nav>
8 changes: 8 additions & 0 deletions layouts/partials/og.html
@@ -0,0 +1,8 @@
<meta property="og:title" content="{{ if .Params.ogtitle }}{{ .Params.ogtitle }}{{ else }}{{ .Title }}{{ end }}" />
<meta property="og:description" content="{{ if .Params.ogdescription }}{{ .Params.ogdescription }}{{ else }}{{ .Description }}{{ end }}" />
<meta property="og:type" content="website" />
<meta property="og:locale" content="en_US" />
<meta property="og:url" content="{{ .Permalink }}" />
{{ if .Params.ogimage }}
<meta property="og:image" content="{{ .Params.ogimage }}" />
{{ end }}
9 changes: 9 additions & 0 deletions layouts/partials/share_addthis.html
@@ -0,0 +1,9 @@
<div class="share_addthis">
<div class="sharing addthis_toolbox share">
<a class="addthis_button_facebook_like"></a>
<a class="addthis_button_tweet"></a>
<a class="addthis_button_google_plusone" g:plusone:size="medium"></a>
<a class="addthis_counter addthis_pill_style"></a>
</div>
<script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js#pubid=ra-560c64c35486b3d4" async="async"></script>
</div>
21 changes: 21 additions & 0 deletions theme.toml
@@ -0,0 +1,21 @@
# theme.toml template for a Hugo theme
# See https://github.com/spf13/hugoThemes#themetoml for an example

name = "Minos"
license = "MIT"
licenselink = "https://github.com/carsonip/hugo-theme-minos/blob/master/LICENSE.md"
description = ""
homepage = "https://github.com/carsonip/hugo-theme-minos"
tags = ["", ""]
features = ["", ""]
min_version = 0.15

[author]
name = "Carson Ip"
homepage = "https://github.com/carsonip"

# If porting an existing theme
[original]
name = "Minos"
homepage = "https://github.com/ppoffice/hexo-theme-minos"
repo = "https://github.com/ppoffice/hexo-theme-minos"

0 comments on commit 275f414

Please sign in to comment.