瀏覽代碼

First commit

master
Adrian Short 6 年之前
當前提交
8ec37661d4
共有 14 個文件被更改,包括 408 次插入0 次删除
  1. +20
    -0
      LICENSE.md
  2. +2
    -0
      archetypes/default.md
  3. +0
    -0
      layouts/404.html
  4. +4
    -0
      layouts/_default/baseof.html
  5. +5
    -0
      layouts/_default/li.html
  6. +14
    -0
      layouts/_default/list.html
  7. +10
    -0
      layouts/_default/single.html
  8. +7
    -0
      layouts/index.html
  9. +17
    -0
      layouts/partials/data/title
  10. +3
    -0
      layouts/partials/footer.html
  11. +35
    -0
      layouts/partials/header.html
  12. +5
    -0
      layouts/partials/tags.html
  13. +265
    -0
      static/css/main.css
  14. +21
    -0
      theme.toml

+ 20
- 0
LICENSE.md 查看文件

@@ -0,0 +1,20 @@
The MIT License (MIT)

Copyright (c) 2018 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.

+ 2
- 0
archetypes/default.md 查看文件

@@ -0,0 +1,2 @@
+++
+++

+ 0
- 0
layouts/404.html 查看文件


+ 4
- 0
layouts/_default/baseof.html 查看文件

@@ -0,0 +1,4 @@
{{ partial "header" . }}
{{ block "main" . }}
{{ end }}
{{ partial "footer" . }}

+ 5
- 0
layouts/_default/li.html 查看文件

@@ -0,0 +1,5 @@
<div class="list-item list-{{ .Type }}">
<h2><a href="{{ .Permalink | relURL }}">{{ .Title }}</a></h2>
{{ .Description }}
<p class=list-date>{{ .Date.Format "2 January 2006" }}</p>
</div>

+ 14
- 0
layouts/_default/list.html 查看文件

@@ -0,0 +1,14 @@
{{ define "main" }}
{{ $.Scratch.Set "fa_icon" "fa-tag" }}

{{ if isset .Params "fa_icon" }}
{{ $.Scratch.Set "fa_icon" .Params.fa_icon }}
{{ end }}

<h1><!--<i class="fa {{ $.Scratch.Get "fa_icon" }}"></i>-->{{ .Title }}</h1>
{{ range .Paginator.Pages }}
{{ .Render "li" }}
{{ end }}
{{ template "_internal/pagination.html" . }}
{{ end }}


+ 10
- 0
layouts/_default/single.html 查看文件

@@ -0,0 +1,10 @@
{{ define "main" }}
<article>
<h1 class=post-title>{{ .Title }}</h1>
<div class="postmeta">
<p><a href="/">{{ .Site.Params.AuthorName }}</a> &middot; {{ .Date.Format "2 January 2006" }}</p>
</div>
{{ .Content }}
{{ partial "tags.html" . }}
</article>
{{ end }}

+ 7
- 0
layouts/index.html 查看文件

@@ -0,0 +1,7 @@
{{ define "main" }}
<h1 id=site-title>{{ .Site.Title }}</h1>
{{ range .Paginator.Pages }}
{{ .Render "li" }}
{{ end }}
{{ template "_internal/pagination.html" . }}
{{ end }}

+ 17
- 0
layouts/partials/data/title 查看文件

@@ -0,0 +1,17 @@
{{- $title := .Title -}}
{{- $siteTitle := .Site.Title -}}
{{- $authorName := .Site.Author.name -}}
{{- $sep := ( .Site.Params.SEO.titleSeparator | default "•" ) -}}
{{- if .IsHome -}}
{{ $siteTitle }}
{{- else if eq .Kind "taxonomy" -}}
{{ title .Data.Singular }}: {{ $title }} {{ $sep }} {{ $siteTitle }}
{{- else if ( or .IsNode ( eq .Section "page" ) ) -}}
{{ $title }} {{ $sep }} {{ $siteTitle }}
{{- else -}}
{{- with $authorName -}}
{{ $title }} {{ $sep }} {{ . }}
{{- else -}}
{{ $title }} {{ $sep }} {{ $siteTitle }}
{{- end -}}
{{- end -}}

+ 3
- 0
layouts/partials/footer.html 查看文件

@@ -0,0 +1,3 @@
{{ template "_internal/google_analytics.html" . }}
</body>
</html>

+ 35
- 0
layouts/partials/header.html 查看文件

@@ -0,0 +1,35 @@
<!DOCTYPE html>
<html>
<head>
<title>{{- partial "data/title" . -}}</title>
{{ .Hugo.Generator }}
{{ "<!-- Tumble theme for Hugo: https://github.com/adrianshort/tumble -->" | safeHTML }}
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta charset="utf-8">
<link rel="stylesheet" href="{{ relURL "/css/main.css?4" }}">
<link rel="alternate" type="application/rss+xml" title="{{ partial "data/title" . }}"
href="{{ .RSSLink }}">
{{- template "_internal/opengraph.html" . -}}
{{ with .Params.image }}
<meta name="og:image" content="{{ "/images/" | absURL }}{{ .}}">
{{ end }}
{{- with .Site.Params.twitter -}}
<meta name="twitter:site" content="@{{ . }}">
{{- end -}}
{{ if not .Page.Params.via }}
<meta name="twitter:creator" content="@{{ .Site.Params.twitter }}">
{{ end }}
{{- template "_internal/twitter_cards.html" -}}
</head>
<body>
<header>
<!-- <h1 id="site-title"><a href="{{ relURL "/" }}">{{ .Site.Title }}</a></h1> -->

<div id="site-social">
{{ range .Site.Params.social}}
<a href="{{ .url }}" title="{{ .title }}">
<i class="fa {{ .fa_icon }}"></i>
</a>
{{ end }}
</div>
</header>

+ 5
- 0
layouts/partials/tags.html 查看文件

@@ -0,0 +1,5 @@
<ul class="tags">
{{ range sort .Params.tags }}
<li><a href="{{ relURL "/tags/" }}{{ . | urlize }}/">{{ . }}</a></li>
{{ end }}
</ul>

+ 265
- 0
static/css/main.css 查看文件

@@ -0,0 +1,265 @@
body {
background-color: #fff;
color: #000;
width: 700px;
margin: 70px auto;
font-family: "Helvetica", "Helvetica Neue", Arial, serif;
line-height: 1.0rem;
font-size: 1.3em;
}

a {
color: #333;
text-decoration: none;
}

a:hover {
text-decoration: underline;
}

a:visited {
color: #777;
}

#site-social {
font-size: 1.3rem;
}

.quote {
font-family: monospace;
border: 0px #777 solid;
/*background-color: #eee;*/
font-size: 1.8rem;
line-height: 2.0rem;
/*padding: 20px;*/
margin: 30px 0;
}

.quote-credit {
/*font-style: italic;*/
text-align: right;
font-size: 1.0rem;
}

.list-item {
display: block;
border: 0px #777 solid;
padding: 0;
margin: 60px 0;
border-radius: 10px;
line-height: 1.8rem;
}

.list-date {
font-size: 1.0rem;
}

.list-item h2 {
line-height: 2.5rem;
margin: 0 0 15px 0;
}

.list-item img {
margin: 0px 0 20px 0;
}

.list-quote {
background-color: #444;
color: white;
}

.list-video {
background-color: #000;
color: white;
}



.postmeta, .listmeta {
font-weight: 300;
text-transform: uppercase;
font-size: 0.9rem;
margin: 0;
}

.aside-list {
font-family: Georgia, "Times New Roman", serif;
font-size: 2.7rem;
line-height: 3.5rem;
}

#aside-single {
margin: 10rem 0;
color: white;
font-family: Georgia, "Times New Roman", serif;
font-size: 4.0rem;
line-height: 4.5rem;
}

img {
width: 100%;
}

figure {
margin: 20px 0;
padding: 0;
}

figcaption, figcaption h4 {
text-align: right;
font-size: 1.0rem;
font-weight: normal;
}

article {
font-size: 1.2rem;
line-height: 1.9rem;
color: #222;
}

article a {
text-decoration: underline;
text-decoration-style: dotted;
color: #000;
}

article a:visited {
text-decoration: underline;
text-decoration-style: dotted;
color: #aaa;
}

article a:hover {
color: #fff;
text-decoration: none;
background-color: #333;
}

article figcaption {
text-transform: none;
letter-spacing: 0.0rem;
text-align: right;
font-size: 0.8rem;
}


h1 {
color: #eee;
font-size: 1.0rem;
}

article h1 {
font-size: 2.5rem;
line-height: 3.2rem;
margin: 0 0 25px 0;
color: cornflowerblue;
}

article p {
margin: 0 0 30px 0;
}

#site-title {
margin: 0 0 0 0;
font-size: 3.5rem;
line-height: 4.0rem;
color: cornflowerblue;
}

#site-title a, #site-title a:visited {
/* font-size: 1.0rem; */
text-decoration: none;
text-transform: uppercase;
font-weight: normal;
}

.post-title {
text-transform: none;
}

ul.tags {
margin: 0;
padding: 0;
background-color: ;
}

.tags li {
display: inline;
list-style-type: none;
margin: 0 15px 0 0;
font-size: 0.8rem;
/* text-transform: lowercase; */
}

.tags li a, .tags li a:hover, .tags li a:visited {
color: #777;
text-decoration: none;
}

ul.pagination {
margin: 0;
padding: 0;
}

ul.pagination li {
display: inline;
margin: 0 30px 0 0;
}

ul.pagination a {
width: 20px;
height: 20px;
font-size: 1.7rem;
text-decoration: none;
}

ul.pagination li.active a {
background-color: white;
padding: 5px 10px;
}

ul.pagination li.disabled {
color: #333;
}

ul.tag-cloud {
margin: 30px 0;
padding: 0;
}

ul.tag-cloud li {
display: inline;
margin: 0;
padding: 10px 20px 10px 0;
line-height: 2rem;
}

ul.tag-cloud li a, ul.tag-cloud li a:visited {
color: white;
text-decoration: none;
}

.fa {
margin: 0 15px 0 0;
color: white;
}

header {
margin: 0px 0;
}

@media screen and (max-width: 699px) {
body {
width: 90%;
margin: 20px auto;
}
img {
width: 100%;
}
}

blockquote {
border-left: 2px solid #ddd;
padding-left: 25px;
}

+ 21
- 0
theme.toml 查看文件

@@ -0,0 +1,21 @@
# theme.toml template for a Hugo theme
# See https://github.com/gohugoio/hugoThemes#themetoml for an example

name = "Author"
license = "MIT"
licenselink = "https://github.com/yourname/yourtheme/blob/master/LICENSE.md"
description = ""
homepage = "https://github.com/adrianshort/author/"
tags = []
features = []
min_version = "0.38"

[author]
name = "Adrian Short"
homepage = "https://www.adrianshort.org/"

# If porting an existing theme
[original]
name = ""
homepage = ""
repo = ""

Loading…
取消
儲存