Skip to content

Commit

Permalink
feat: sticky post icon. Close #65
Browse files Browse the repository at this point in the history
  • Loading branch information
xianmin committed Dec 10, 2018
1 parent 76132fb commit f9ee7b1
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 6 deletions.
7 changes: 7 additions & 0 deletions assets/sass/_partial/_post/_header.scss
Expand Up @@ -9,6 +9,13 @@
font-size: $post-title-font-size;
font-weight: $post-title-font-weight;
font-family: $global-serif-font-family;

.post-pinned svg {
vertical-align: middle;
width: 24px;
height: 24px;
fill: $theme-color;
}
}

.post-link {
Expand Down
6 changes: 4 additions & 2 deletions exampleSite/content/post/jane-theme-preview.md
@@ -1,12 +1,14 @@
---
title: "Jane Theme Preview"
date: 2018-03-06T16:01:23+08:00
date: 2018-01-01T16:01:23+08:00
lastmod: 2018-03-07T16:01:23+08:00
draft: false
tags: ["preview", "shortcodes", "tag-6"]
categories: ["docs", "shortcodes", "index"]
author: "Typora"

weight: 1

# You can also close(false) or open(true) something for this content.
# P.S. comment can only be closed
# comment: false
Expand Down Expand Up @@ -61,7 +63,7 @@ Markdown uses email-style > characters for block quoting. They are presented as:
> This is another blockquote with one paragraph. There is three empty line to seperate two blockquote.
>
> 这是一段中文测试。
>
>

In typora, just input ‘>’ followed by quote contents a block quote is generated. Typora will insert proper ‘>’ or line break for you. Block quote inside anther block quote is allowed by adding additional levels of ‘>’.
Expand Down
4 changes: 3 additions & 1 deletion exampleSite/content/post/jane-theme-preview.zh-cn.md
Expand Up @@ -7,6 +7,8 @@ tags: ["preview", "shortcodes", "tag-6"]
categories: ["shortcodes", "index"]
author: "Typora"

weight: 1

# You can also close(false) or open(true) something for this content.
# P.S. comment can only be closed
# comment: false
Expand All @@ -18,4 +20,4 @@ contentCopyright: '<a href="https://github.com/gohugoio/hugoBasicExample" rel="n
mathjax: true
---

主题预览,内容有待填充。
主题预览,内容有待填充。
4 changes: 4 additions & 0 deletions layouts/partials/svg/pinned.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 8 additions & 1 deletion layouts/post/summary.html
@@ -1,6 +1,13 @@
<article class="post bg-white">
<header class="post-header">
<h1 class="post-title"><a class="post-link" href="{{ .URL }}">{{ .Title }}</a></h1>
<h1 class="post-title">
{{ if .Params.weight }}
<span class="post-pinned">
{{ partial "svg/pinned.svg" }}
</span>
{{ end }}
<a class="post-link" href="{{ .URL }}">{{ .Title }}</a>
</h1>
{{ partial "post/i18nlist.html" . }}
<div class="post-meta">
<time datetime="{{ .Date.Format "2006-01-02" }}" class="post-time">
Expand Down

Large diffs are not rendered by default.

@@ -1 +1 @@
{"Target":"sass/jane.min.aaf3394fc81ccb6f6fe3fe458d1f5b61c39f151e44df83baaf1d7b3775a8b98d.css","MediaType":"text/css","Data":{"Integrity":"sha256-qvM5T8gcy29v4/5FjR9bYcOfFR5E34O6rx17N3WouY0="}}
{"Target":"sass/jane.min.c8c1ff75dee09b44060a6c38f41b9036bac2512ccdb22d7f296cec12dc786375.css","MediaType":"text/css","Data":{"Integrity":"sha256-yMH/dd7gm0QGCmw49BuQNrrCUSzNsi1/KWzsEtx4Y3U="}}

0 comments on commit f9ee7b1

Please sign in to comment.