diff options
-rw-r--r-- | README.md | 6 | ||||
-rw-r--r-- | layouts/index.html | 17 | ||||
-rw-r--r-- | layouts/pages/signle.html | 0 | ||||
-rw-r--r-- | layouts/partials/head.html | 3 | ||||
-rw-r--r-- | layouts/partials/header.html | 4 | ||||
-rw-r--r-- | static/css/slim.css | 20 |
6 files changed, 47 insertions, 3 deletions
@@ -25,6 +25,9 @@ You could add `params` into your site's `config.toml` file: GithubID = "Your Github ID" TwitterID = "Your Twitter ID" AnalyticsID = "Your Google Analytics tracking code" + Summary = true # takes true or false + Content = false # takes true or false + # if both are set to true, summary is shown. ``` if you use `config.yaml`, it could look like: @@ -35,6 +38,9 @@ params: GithubID: "Your Github ID" TwitterID: "Your Twitter ID" AnalyticsID: "Your Google Analytics tracking code" + Summary: true # takes true or false + Content: false # takes true or false + # if both are set to true, summary is shown ``` ## Build your site diff --git a/layouts/index.html b/layouts/index.html index da5754c..83cd23f 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -14,6 +14,23 @@ <div class="post"> <h2 class="post-title"><a href="{{ .Permalink }}">{{ .Title }}</a></h2> <span class="post-date">{{ .Date.Format "Jan 2, 2006" }}</span> + {{ if .Params.tags }} + <span class="post-tags"> + {{ range .Params.tags }} + #<a href="/tags/{{ . | urlize }}">{{ . }}</a> + {{ end }} + </span> + {{ end }} + {{ if .Site.Params.Summary }} + <div class="summary"> + {{ .Summary }} + <a class="read-more" href="{{.RelPermalink}}">…</a> + </div> + {{ else if .Site.Params.Content }} + <div class="content"> + {{ .Content }} + </div> + {{ end }} </div> {{ end }} </div> diff --git a/layouts/pages/signle.html b/layouts/pages/signle.html new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/layouts/pages/signle.html diff --git a/layouts/partials/head.html b/layouts/partials/head.html index ff8c638..ffbb74c 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -5,8 +5,7 @@ <!-- CSS --> <link rel="stylesheet" href="{{ .Site.BaseUrl }}/css/slim.css"> <link rel="stylesheet" href="{{ .Site.BaseUrl }}/css/highlight.min.css"> -<link href='http://fonts.useso.com/css?family=Open+Sans:400,700&subset=latin,latin-ext' rel='stylesheet' type='text/css'> - +<link href='http://fonts.googleapis.com/css?family=Open+Sans:300,400,600&subset=latin,latin-ext' rel='stylesheet'> <!-- Icons --> <link rel="apple-touch-icon-precomposed" sizes="144x144" href="/apple-touch-icon-144-precomposed.png"> <link rel="shortcut icon" href="/favicon.ico"> diff --git a/layouts/partials/header.html b/layouts/partials/header.html index 57204a7..9ee2d33 100644 --- a/layouts/partials/header.html +++ b/layouts/partials/header.html @@ -8,7 +8,9 @@ <ul class="nav-list"> {{ range .Site.Menus.main }} <li><a href="{{ .Url }}">{{ .Name }}</a></li> - {{end}} {{ with .Site.Params.GithubID }} + {{end}} + <li class="spacer">∾</li> +{{ with .Site.Params.GithubID }} <li><a href="https://github.com/{{.}}">Github</a></li>{{ end }} {{ with .Site.Params.TwitterID }} <li><a href="https://twitter.com/{{.}}">Twitter</a></li>{{ end }} {{ with .Site.Params.LinkedInID }} <li><a href="http://linkedin.com/in/{{.}}">LinkedIn</a></li>{{ end }} diff --git a/static/css/slim.css b/static/css/slim.css index 1e28750..0b0a463 100644 --- a/static/css/slim.css +++ b/static/css/slim.css @@ -212,6 +212,10 @@ button, -webkit-transition: all 0.2s; transition: all 0.2s; } +.nav-list .spacer { + text-align: center; +} + .ci { display: inline-block; font-size: inherit; @@ -338,3 +342,19 @@ button, .post-content { margin: 2rem 0; } + +/* styling for tags on homepage */ + +.post-tags { + color: #ccc; + font-size: 14px; + position: absolute; + right: 25px; + top: 45px; + text-align: right; +} + +.post-tags a { + color: #ccc; +} + |