From cecd171fac7e5f1a9da1969f0ab34a0518db18a9 Mon Sep 17 00:00:00 2001 From: imzeuk Date: Sat, 27 Apr 2019 20:53:28 +0800 Subject: update theme --- README-zh.md | 8 ++++++++ README.md | 8 ++++++++ layouts/shortcodes/img.html | 8 ++++---- static/css/zozo.css | 8 ++++++-- static/css/zozo.scss | 6 +++++- static/js/zozo.js | 13 ------------- 6 files changed, 31 insertions(+), 20 deletions(-) diff --git a/README-zh.md b/README-zh.md index fbdfa9d..ed05046 100644 --- a/README-zh.md +++ b/README-zh.md @@ -44,6 +44,14 @@ $ git clone https://github.com/imzeuk/hugo-theme-zozo themes/zozo 关于页面就是这么实现的。 +## Shortcodes + +主题提供了 `img` shortcode. + +```markdown +{{< img src="path/to/xxx.png" title="xxx" >}} +``` + ## Math 公式 本主题支持 MathJax 数学公式,默认为关闭状态,如需使用,需要在 [`config.toml`](./exampleSite/config.toml) 中进行设置。 diff --git a/README.md b/README.md index 732f6d2..54b2cdd 100644 --- a/README.md +++ b/README.md @@ -48,6 +48,14 @@ In order to customize the logo and favicon, you need to place all the following Pages can be hidden and don't appear in the post list on the homepage if you add the variable `hidden = true` to the frontmatter. This allows you to link from elsewhere, i.e. just the menu. +## Shortcodes + +This theme provides `img` shortcodes. + +```markdown +{{< img src="path/to/xxx.png" title="xxx" >}} +``` + ## MathJax This theme supports MathJax, which are turned off by default. If you want to use them, you need to set them in `config.toml`. diff --git a/layouts/shortcodes/img.html b/layouts/shortcodes/img.html index c575cb9..5c60d27 100644 --- a/layouts/shortcodes/img.html +++ b/layouts/shortcodes/img.html @@ -1,7 +1,7 @@ {{ $path := .Get "src" }} -{{ $caption := .Get "caption" }} +{{ $caption := .Get "title" }}
- - - + + +
diff --git a/static/css/zozo.css b/static/css/zozo.css index 45442df..840b5ae 100644 --- a/static/css/zozo.css +++ b/static/css/zozo.css @@ -7,7 +7,7 @@ html { body { color: #333333; - font-family: 'source-han-sans-simplified-c', 'Source Sans Pro', 'Helvetica Neue', Arial, sans-serif; + font-family: 'source-han-sans-simplified-c', 'Source Sans Pro', 'Helvetica Neue', Arial, sans-serif; font-size: 16px; width: 100%; background-color: #f7f7f7; @@ -45,6 +45,10 @@ h6 { text-rendering: optimizeLegibility; } +hr { + border: 1px solid #f3f3f3; +} + /*basic styles ends*/ .main { background: #ffffff; @@ -454,7 +458,7 @@ h6 { .markdown code { font-family: 'Roboto Mono', Menlo, Monaco, courier, monospace; font-size: 0.9em; - background: #f8f8f8; + background: #f8f8f8 !important; border: none; } diff --git a/static/css/zozo.scss b/static/css/zozo.scss index 0d18343..a781dfd 100644 --- a/static/css/zozo.scss +++ b/static/css/zozo.scss @@ -52,6 +52,10 @@ h6 { text-rendering: optimizeLegibility; } +hr { + border: 1px solid #f3f3f3; +} + /*basic styles ends*/ .main { @@ -462,7 +466,7 @@ h6 { code { font-family: 'Roboto Mono', Menlo, Monaco, courier, monospace; font-size: 0.9em; - background: #f8f8f8; + background: #f8f8f8 !important; border: none; } diff --git a/static/js/zozo.js b/static/js/zozo.js index a7f8b2f..e9b4093 100644 --- a/static/js/zozo.js +++ b/static/js/zozo.js @@ -36,16 +36,3 @@ $(document).ready((function (_this) { }) } })(this)) - -// fancybox -$(document).ready((function (_this) { - return function() { - if ($.fancybox) { - $('.post_content').each(function() { - $(this).find('img').each(function() { - $(this).wrap(`
`); - }); - }); - } - }; -})(this)) -- cgit v1.2.3