Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/varkai/hugo-theme-zozo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorimzeuk <imzeuk@gmail.com>2019-04-27 15:53:28 +0300
committerimzeuk <imzeuk@gmail.com>2019-04-27 15:53:28 +0300
commitcecd171fac7e5f1a9da1969f0ab34a0518db18a9 (patch)
tree34a2389f33bd6e122eb559729e05330c1b9a9ee2
parent121374541dda725615c817db3b455d092d3c8bfc (diff)
update theme
-rw-r--r--README-zh.md8
-rw-r--r--README.md8
-rw-r--r--layouts/shortcodes/img.html8
-rw-r--r--static/css/zozo.css8
-rw-r--r--static/css/zozo.scss6
-rw-r--r--static/js/zozo.js13
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" }}
<div class="fancybox">
-<a data-fancybox="gallery" href="{{ $path }}" data-caption="{{ $caption }}">
- <img src="{{ $path }}"/>
-</a>
+ <a data-fancybox="gallery" href="{{ $path | absURL }}" data-caption="{{ $caption }}">
+ <img src="{{ $path | absURL }}" />
+ </a>
</div>
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(`<div class="fancybox"><a href="${this.src}" data-fancybox="gallery" data-caption="${this.title}"></a></div>`);
- });
- });
- }
- };
-})(this))