Add post: 暗黑能天使
This commit is contained in:
3
.gitmodules
vendored
Normal file
3
.gitmodules
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
[submodule "themes/eureka"]
|
||||
path = themes/eureka
|
||||
url = https://github.com/wangchucheng/hugo-eureka.git
|
||||
19
archetypes/authors/_index.md
Normal file
19
archetypes/authors/_index.md
Normal file
@@ -0,0 +1,19 @@
|
||||
---
|
||||
# Name
|
||||
title: {{ replace .Name "-" " " | title }}
|
||||
role:
|
||||
bio:
|
||||
avatar:
|
||||
|
||||
organization:
|
||||
name:
|
||||
url:
|
||||
|
||||
# Check the available icons on https://fontawesome.com/.
|
||||
# You can get similar results like this <i class="fab fa-github"></i> after searching.
|
||||
# Then icon is github and iconPack is fab for this case.
|
||||
social:
|
||||
- icon:
|
||||
iconPack:
|
||||
url:
|
||||
---
|
||||
@@ -1,6 +1,14 @@
|
||||
---
|
||||
title: "{{ replace .Name "-" " " | title }}"
|
||||
title: {{ replace .Name "-" " " | title }}
|
||||
description:
|
||||
toc: true
|
||||
authors: []
|
||||
tags: []
|
||||
categories: []
|
||||
series: []
|
||||
date: {{ .Date }}
|
||||
draft: true
|
||||
---
|
||||
|
||||
lastmod: {{ .Date }}
|
||||
featuredVideo:
|
||||
featuredImage:
|
||||
draft: false
|
||||
---
|
||||
10
archetypes/docs.md
Normal file
10
archetypes/docs.md
Normal file
@@ -0,0 +1,10 @@
|
||||
---
|
||||
title: {{ replace .Name "-" " " | title }}
|
||||
description:
|
||||
toc: true
|
||||
authors: []
|
||||
date: {{ .Date }}
|
||||
lastmod: {{ .Date }}
|
||||
draft: false
|
||||
weight: 1
|
||||
---
|
||||
4
archetypes/docs/_index.md
Normal file
4
archetypes/docs/_index.md
Normal file
@@ -0,0 +1,4 @@
|
||||
---
|
||||
title: Docs
|
||||
layout: doc-list #Do not modify
|
||||
---
|
||||
3
archetypes/homepage/index.md
Normal file
3
archetypes/homepage/index.md
Normal file
@@ -0,0 +1,3 @@
|
||||
---
|
||||
headless: true
|
||||
---
|
||||
38
archetypes/widgets/about.md
Normal file
38
archetypes/widgets/about.md
Normal file
@@ -0,0 +1,38 @@
|
||||
---
|
||||
title: {{ replace .Name "-" " " | title }}
|
||||
draft: false
|
||||
role:
|
||||
avatar:
|
||||
bio:
|
||||
organization:
|
||||
name:
|
||||
url:
|
||||
social:
|
||||
- icon:
|
||||
iconPack:
|
||||
url:
|
||||
|
||||
weight:
|
||||
widget:
|
||||
handler: about
|
||||
|
||||
# Options: sm, md, lg and xl. Default is md.
|
||||
width:
|
||||
|
||||
sidebar:
|
||||
# Options: left and right. Leave blank to hide.
|
||||
position:
|
||||
# Options: sm, md, lg and xl. Default is md.
|
||||
scale:
|
||||
|
||||
background:
|
||||
# Options: primary, secondary, tertiary or any valid color value. Default is primary.
|
||||
color: secondary
|
||||
image:
|
||||
# Options: auto, cover and contain. Default is auto.
|
||||
size:
|
||||
# Options: center, top, right, bottom, left.
|
||||
position:
|
||||
# Options: fixed, local, scroll.
|
||||
attachment:
|
||||
---
|
||||
28
archetypes/widgets/blank.html
Normal file
28
archetypes/widgets/blank.html
Normal file
@@ -0,0 +1,28 @@
|
||||
---
|
||||
title: {{ replace .Name "-" " " | title }}
|
||||
draft: false
|
||||
|
||||
weight:
|
||||
widget:
|
||||
handler: blank
|
||||
|
||||
# Options: sm, md, lg and xl. Default is md.
|
||||
width:
|
||||
|
||||
sidebar:
|
||||
# Options: left and right. Leave blank to hide.
|
||||
position:
|
||||
# Options: sm, md, lg and xl. Default is md.
|
||||
scale:
|
||||
|
||||
background:
|
||||
# Options: primary, secondary, tertiary or any valid color value. Default is primary.
|
||||
color:
|
||||
image:
|
||||
# Options: auto, cover and contain. Default is auto.
|
||||
size:
|
||||
# Options: center, top, right, bottom, left.
|
||||
position:
|
||||
# Options: fixed, local, scroll.
|
||||
attachment:
|
||||
---
|
||||
36
archetypes/widgets/experiences.md
Normal file
36
archetypes/widgets/experiences.md
Normal file
@@ -0,0 +1,36 @@
|
||||
---
|
||||
title: {{ replace .Name "-" " " | title }}
|
||||
draft: false
|
||||
experiences:
|
||||
- title:
|
||||
organization:
|
||||
name:
|
||||
url:
|
||||
dates:
|
||||
location:
|
||||
writeup:
|
||||
|
||||
weight:
|
||||
widget:
|
||||
handler: experiences
|
||||
|
||||
# Options: sm, md, lg and xl. Default is md.
|
||||
width: lg
|
||||
|
||||
sidebar:
|
||||
# Options: left and right. Leave blank to hide.
|
||||
position: left
|
||||
# Options: sm, md, lg and xl. Default is md.
|
||||
scale: md
|
||||
|
||||
background:
|
||||
# Options: primary, secondary, tertiary or any valid color value. Default is primary.
|
||||
color:
|
||||
image:
|
||||
# Options: auto, cover and contain. Default is auto.
|
||||
size:
|
||||
# Options: center, top, right, bottom, left.
|
||||
position:
|
||||
# Options: fixed, local, scroll.
|
||||
attachment:
|
||||
---
|
||||
34
archetypes/widgets/pages.md
Normal file
34
archetypes/widgets/pages.md
Normal file
@@ -0,0 +1,34 @@
|
||||
---
|
||||
title: {{ replace .Name "-" " " | title }}
|
||||
draft: false
|
||||
# Section you want to display
|
||||
section:
|
||||
# Pages count
|
||||
count:
|
||||
# Options: card, plain and masonry.
|
||||
style:
|
||||
|
||||
weight:
|
||||
widget:
|
||||
handler: pages
|
||||
|
||||
# Options: sm, md, lg and xl. Default is md.
|
||||
width:
|
||||
|
||||
sidebar:
|
||||
# Options: left and right. Leave blank to hide.
|
||||
position:
|
||||
# Options: sm, md, lg and xl. Default is md.
|
||||
scale:
|
||||
|
||||
background:
|
||||
# Options: primary, secondary, tertiary or any valid color value. Default is primary.
|
||||
color:
|
||||
image:
|
||||
# Options: auto, cover and contain. Default is auto.
|
||||
size:
|
||||
# Options: center, top, right, bottom, left.
|
||||
position:
|
||||
# Options: fixed, local, scroll.
|
||||
attachment:
|
||||
---
|
||||
31
archetypes/widgets/vintage.md
Normal file
31
archetypes/widgets/vintage.md
Normal file
@@ -0,0 +1,31 @@
|
||||
---
|
||||
title: {{ replace .Name "-" " " | title }}
|
||||
draft: false
|
||||
slogan:
|
||||
imgLeft:
|
||||
imgRight:
|
||||
|
||||
weight:
|
||||
widget:
|
||||
handler: vintage
|
||||
|
||||
# Options: sm, md, lg and xl. Default is md.
|
||||
width:
|
||||
|
||||
sidebar:
|
||||
# Options: left and right. Leave blank to hide.
|
||||
position:
|
||||
# Options: sm, md, lg and xl. Default is md.
|
||||
scale:
|
||||
|
||||
background:
|
||||
# Options: primary, secondary, tertiary or any valid color value. Default is primary.
|
||||
color:
|
||||
image:
|
||||
# Options: auto, cover and contain. Default is auto.
|
||||
size:
|
||||
# Options: center, top, right, bottom, left.
|
||||
position:
|
||||
# Options: fixed, local, scroll.
|
||||
attachment:
|
||||
---
|
||||
@@ -1,3 +0,0 @@
|
||||
baseURL: http://example.org/
|
||||
languageCode: en-us
|
||||
title: My New Hugo Site
|
||||
45
config/_default/config.yaml
Normal file
45
config/_default/config.yaml
Normal file
@@ -0,0 +1,45 @@
|
||||
baseURL: /
|
||||
title: Eureka Demo
|
||||
|
||||
# Uncomment when not installing with Hugo Modules
|
||||
# theme: eureka
|
||||
# Comment when not installing with Hugo Modules
|
||||
theme: wangchucheng.com/hugo-eureka
|
||||
# If you cannot access the Github mirror, you can also use the Gitee mirror: gitee.com/wangchucheng/hugo-eureka
|
||||
|
||||
paginate: 3
|
||||
copyright: >
|
||||
© 2021 <a href="https://www.wangchucheng.com/">WANG Chucheng</a> and <a
|
||||
href="https://www.ruiqima.com/">MA Ruiqi</a>
|
||||
enableEmoji: true
|
||||
enableGitInfo: false
|
||||
summaryLength: 75
|
||||
|
||||
defaultContentLanguage: en
|
||||
hasCJKLanguage: false # Set `true` for Chinese/Japanese/Korean.
|
||||
defaultContentLanguageInSubdir: false
|
||||
|
||||
# Uncomment for google analytics
|
||||
# googleAnalytics: UA-123-45
|
||||
|
||||
markup:
|
||||
# Do not modify markup.highlight
|
||||
highlight:
|
||||
codeFences: false
|
||||
noClasses: false
|
||||
tableOfContents:
|
||||
startLevel: 2
|
||||
endLevel: 6
|
||||
ordered: false
|
||||
goldmark:
|
||||
renderer:
|
||||
unsafe: true
|
||||
|
||||
taxonomies:
|
||||
category: categories
|
||||
tag: tags
|
||||
series: series
|
||||
author: authors
|
||||
|
||||
build:
|
||||
useResourceCacheWhen: always
|
||||
12
config/_default/languages.yaml
Normal file
12
config/_default/languages.yaml
Normal file
@@ -0,0 +1,12 @@
|
||||
en:
|
||||
languageCode: en
|
||||
languageName: English
|
||||
# Uncomment for multilingual sites, and move the default content into corresponding sub-folder.
|
||||
# contentDir: content/en
|
||||
|
||||
# Uncomment for multilingual sites, and customize the following config.
|
||||
# zh:
|
||||
# languageCode: zh
|
||||
# languageName: 简体中文
|
||||
# contentDir: content/zh
|
||||
# title: 中文标题
|
||||
10
config/_default/menus.yaml
Normal file
10
config/_default/menus.yaml
Normal file
@@ -0,0 +1,10 @@
|
||||
main:
|
||||
- name: About
|
||||
url: '#about'
|
||||
weight: 1
|
||||
- name: Posts
|
||||
url: /posts/
|
||||
weight: 2
|
||||
- name: Docs
|
||||
url: /docs/
|
||||
weight: 3
|
||||
81
config/_default/params.yaml
Normal file
81
config/_default/params.yaml
Normal file
@@ -0,0 +1,81 @@
|
||||
mainSections:
|
||||
- posts
|
||||
description: Eureka is a elegant and powerful theme for Hugo.
|
||||
|
||||
repoEditURL:
|
||||
|
||||
dateFormat:
|
||||
|
||||
titleSeparator:
|
||||
|
||||
# Options: auto, light and dark. Default is auto.
|
||||
colorScheme:
|
||||
|
||||
# Colors and fonts. Default style is data/styles/default.yaml/
|
||||
style:
|
||||
|
||||
# E.g. Person, Organization, LocalBusiness, Project, EducationalOrganization
|
||||
siteType: Person
|
||||
icon: images/icon.png
|
||||
publisherName: WANG Chucheng
|
||||
publisherLogo:
|
||||
|
||||
highlight:
|
||||
handler: highlightjs
|
||||
|
||||
highlightjs:
|
||||
# highlight.js doesn't bundle every language. So please specify additional languages you want here.
|
||||
# See https://github.com/highlightjs/cdn-release/tree/main/build/languages for available languages.
|
||||
languages:
|
||||
- dart
|
||||
# See https://github.com/highlightjs/cdn-release/tree/main/build/styles for available styles.
|
||||
style: base16/solarized-light
|
||||
|
||||
math:
|
||||
handler: katex
|
||||
|
||||
# katex:
|
||||
# # Browse https://katex.org/docs/options.html to see the options available.
|
||||
# # KaTeX's Auto-render ignores `displayMode` property of the options, so this property will not work.
|
||||
# # You can list the key and value you want as below.
|
||||
# # Because Hugo's config params are case-insensitive, you need to add `-` or `_` before the uppercase letters.
|
||||
# # For example, `throwOnError` should be written as `throw-On-Error` or other acceptable formats.
|
||||
# leqno:
|
||||
|
||||
comment:
|
||||
# Options: disqus, commento, valine and utterances.
|
||||
handler:
|
||||
|
||||
# disqus:
|
||||
# shortname:
|
||||
|
||||
# utterances:
|
||||
# # Browse https://utteranc.es/ to see the options available.
|
||||
# # If you want the color scheme of utterances to follow eureka's, you can set `theme: eureka`.
|
||||
# repo:
|
||||
# issue-term:
|
||||
# theme:
|
||||
|
||||
# commento:
|
||||
# # If self-hosting, please enter the url (e.g. https://commento.example.com) here. Otherwise leave empty.
|
||||
# url:
|
||||
|
||||
# valine:
|
||||
# # Browse https://valine.js.org/en/configuration.html to see the options available.
|
||||
# # You can list the key and value you want as below.
|
||||
# # Because Hugo's config params are case-insensitive, you need to add `-` or `_` before the uppercase letters.
|
||||
# # For example, `appId` should be written as `app-Id` or other acceptable formats.
|
||||
# app-Id:
|
||||
# app-Key:
|
||||
|
||||
diagram:
|
||||
handler: mermaid
|
||||
|
||||
# mermaid:
|
||||
# # Browse https://mermaid-js.github.io/mermaid/#/Setup to see the options available.
|
||||
# # You can list the key and value you want as below.
|
||||
# # Because Hugo's config params are case-insensitive, you need to add `-` or `_` before the uppercase letters.
|
||||
# # For example, `diagramPadding` should be written as `diagram-Padding` or other acceptable formats.
|
||||
# theme:
|
||||
# flowchart:
|
||||
# diagram-padding:
|
||||
38
content/authors/example-author/_index.md
Normal file
38
content/authors/example-author/_index.md
Normal file
@@ -0,0 +1,38 @@
|
||||
---
|
||||
title: Example Author
|
||||
role: Example Role
|
||||
avatar: images/icon.png
|
||||
bio: Aenean vel bibendum quam. Aliquam at mollis quam. Proin efficitur.
|
||||
organization:
|
||||
name: Example Organization
|
||||
url: https://example.com/
|
||||
social:
|
||||
- icon: envelope
|
||||
iconPack: fas
|
||||
url: mailto:example@example.com
|
||||
- icon: twitter
|
||||
iconPack: fab
|
||||
url: https://example.com/
|
||||
- icon: github
|
||||
iconPack: fab
|
||||
url: https://example.com/
|
||||
---
|
||||
|
||||
## Self Introduction
|
||||
|
||||
Cras ex dui, tristique a libero eget, consectetur semper ligula. Nunc augue arcu, malesuada a nisi et, molestie finibus metus. Sed lacus odio, ultricies a nisl vitae, sollicitudin tempor ipsum. Vivamus quis feugiat arcu. Sed mi nunc, efficitur quis tellus vitae, posuere mattis metus. Phasellus in mattis dui. Nullam blandit, augue non ullamcorper dapibus, lacus dui molestie massa, in iaculis purus lectus eu lectus. Duis hendrerit lacinia tellus, sit amet feugiat dolor placerat id. Aenean ac velit massa. Vivamus feugiat dui at magna viverra, ut dictum nunc rutrum. Duis eget sapien finibus, lobortis orci id, vestibulum tellus. Maecenas lobortis urna libero, quis fermentum lectus lobortis nec. Nullam laoreet volutpat libero, ac mattis magna ullamcorper quis. Duis eget ipsum eu nisi mattis cursus et vitae turpis.
|
||||
|
||||
Aliquam pretium diam eget leo feugiat finibus. Donec malesuada commodo ipsum. Aenean a massa in lacus venenatis vestibulum. Duis vel sem quis elit iaculis consectetur et quis dolor. Morbi eu ipsum hendrerit, malesuada ante sed, dapibus est. Suspendisse feugiat nulla ut gravida convallis. Phasellus id massa posuere, rhoncus justo ut, porttitor dolor. Nulla ultrices malesuada egestas. Nunc fermentum tincidunt sem ac vulputate. Donec mollis sollicitudin justo eget varius. Donec ornare velit et felis blandit, id molestie sapien lobortis. Morbi eget tristique justo. Mauris posuere, nibh eu laoreet ultricies, ligula erat iaculis sapien, vel dapibus lacus libero ut diam. Etiam viverra ante felis, et scelerisque nunc pellentesque vitae. Praesent feugiat dictum molestie.
|
||||
|
||||
## Details
|
||||
|
||||
Nunc pellentesque vitae:
|
||||
- Morbi accumsan nibh efficitur diam molestie, non dignissim diam facilisis.
|
||||
- Donec dignissim leo in mollis faucibus.
|
||||
- Donec blandit lacus a pellentesque fermentum.
|
||||
|
||||
Donec mollis sollicitudin:
|
||||
- Nunc dictum purus ornare purus consectetur, eu pellentesque massa ullamcorper.
|
||||
- Aliquam eu leo vitae justo aliquam tincidunt.
|
||||
- Fusce non massa id augue interdum feugiat sed et nulla.
|
||||
- Vivamus molestie augue in tristique laoreet.
|
||||
40
content/authors/hugo-authors/_index.md
Normal file
40
content/authors/hugo-authors/_index.md
Normal file
@@ -0,0 +1,40 @@
|
||||
---
|
||||
title: Hugo Authors
|
||||
role: Example Role
|
||||
bio: Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos.
|
||||
organization:
|
||||
name: Example Organization
|
||||
url: https://example.com/
|
||||
social:
|
||||
- icon: envelope
|
||||
iconPack: fas
|
||||
url: mailto:example@example.com
|
||||
- icon: twitter
|
||||
iconPack: fab
|
||||
url: https://example.com/
|
||||
- icon: github
|
||||
iconPack: fab
|
||||
url: https://example.com/
|
||||
---
|
||||
|
||||
## Vestibulum vel arcu
|
||||
|
||||
Donec interdum justo sed posuere imperdiet. Quisque nec mauris eu erat mattis egestas in vitae nisl. Sed nisl augue, congue sed quam quis, tempor tempus nibh. Pellentesque accumsan in quam a interdum. Morbi iaculis venenatis lacinia. Mauris quis nisl vitae nisi mollis placerat id vel ligula. Integer vitae arcu ac leo iaculis rhoncus id vitae dolor. Fusce quis nisl tincidunt, vulputate dolor quis, mollis massa. Donec congue velit at risus cursus, eu auctor dolor rhoncus. In porta at dolor at eleifend. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Pellentesque vehicula mi at dapibus sodales. Morbi accumsan dictum maximus. In eget leo in purus commodo vestibulum. Duis et velit ex.
|
||||
|
||||
Nam turpis ligula, commodo eu nunc eget, rutrum convallis dui. Integer posuere massa nibh, sit amet hendrerit lectus facilisis sed. Pellentesque ut auctor urna. Vestibulum cursus varius enim in ullamcorper. Sed sed risus ac lorem porttitor rhoncus commodo ut nulla. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Sed eu urna auctor, scelerisque enim nec, eleifend nisl. Vestibulum nec mauris commodo, egestas justo id, consequat leo. Mauris diam justo, sagittis vel posuere a, imperdiet vel sem. Curabitur eget arcu euismod, consectetur arcu non, posuere neque. Integer commodo dolor volutpat, gravida nunc in, tempus mauris. Suspendisse iaculis purus ut vehicula facilisis. Suspendisse vitae diam ipsum. In consequat vitae dui vitae tincidunt.
|
||||
|
||||
Nullam eleifend fringilla quam. Sed faucibus efficitur metus at rhoncus. Sed non nunc mollis, cursus ipsum suscipit, blandit mi. Morbi ac interdum massa, non congue ligula. Suspendisse porta condimentum finibus. Donec lobortis eget nisl posuere vehicula. Aenean in mi mollis nisl fermentum lobortis non at lacus. Suspendisse sagittis dolor vitae vehicula gravida. Mauris in dui eu arcu viverra eleifend. Vestibulum nibh sapien, elementum et viverra a, laoreet sit amet felis. Lorem ipsum dolor sit amet, consectetur adipiscing elit.
|
||||
|
||||
## Nunc magna est
|
||||
|
||||
Donec porta:
|
||||
- Aenean aliquam sapien id fermentum hendrerit.
|
||||
- Nullam quis augue id ante tempor suscipit sodales sed velit.
|
||||
- Sed at nulla consectetur, sodales nisl sed, luctus velit.
|
||||
- Morbi ornare purus at porttitor tristique.
|
||||
|
||||
Gravida urna in:
|
||||
- Maecenas blandit diam at massa hendrerit maximus.
|
||||
- Sed lacinia purus ac cursus tincidunt.
|
||||
- Maecenas posuere ante sed elit tempus porttitor.
|
||||
- Sed vel justo quis diam convallis hendrerit ac non mi.
|
||||
4
content/docs/_index.md
Normal file
4
content/docs/_index.md
Normal file
@@ -0,0 +1,4 @@
|
||||
---
|
||||
title: Docs
|
||||
layout: doc-list
|
||||
---
|
||||
34
content/docs/example-doc/_index.md
Normal file
34
content/docs/example-doc/_index.md
Normal file
@@ -0,0 +1,34 @@
|
||||
---
|
||||
title: Example Doc
|
||||
description: This is an example doc layout of Eureka theme
|
||||
toc: true
|
||||
authors:
|
||||
tags:
|
||||
categories:
|
||||
series:
|
||||
date: '2020-10-16'
|
||||
lastmod: '2020-10-16'
|
||||
draft: false
|
||||
---
|
||||
|
||||
This is the root of example doc.
|
||||
|
||||
## Duis vel leo nec mi convallis sodales
|
||||
|
||||
Sed efficitur nibh sed euismod dictum. Donec posuere, nisl a egestas dignissim, risus magna placerat tortor, quis tincidunt ipsum erat at nunc. Cras consectetur ex eget tortor fermentum mattis. Nullam sodales sed purus eget ornare. Vestibulum aliquam cursus odio vitae placerat. Etiam vel pharetra diam. Morbi molestie varius tincidunt. Morbi molestie tortor vitae metus venenatis, ut fermentum nisl luctus. Aenean at condimentum lorem, rhoncus dapibus nibh. Donec et dui consequat ipsum ultrices tristique vitae vitae est.
|
||||
|
||||
## Sed efficitur ante a tortor euismod
|
||||
|
||||
In ornare ultricies sapien in tincidunt. Integer malesuada tellus sed nibh dictum facilisis non sit amet nibh. Vestibulum sed tincidunt ante, nec tincidunt lectus. Pellentesque id dolor ipsum. Sed efficitur tristique mauris eu tristique. Aliquam nec volutpat dolor. Praesent vitae feugiat nibh. Curabitur mollis placerat sem, ut eleifend mi. Sed sed nisl elit. Pellentesque eget elit nec arcu imperdiet imperdiet. Aliquam dictum arcu ac pharetra rutrum.
|
||||
|
||||
### Cras ac diam efficitur
|
||||
|
||||
Donec iaculis bibendum suscipit. Ut egestas ligula vel orci posuere scelerisque. Nam vel elementum nibh, congue tempus sapien. Aliquam luctus ante sit amet urna vehicula hendrerit. Morbi at ante nisl. Sed euismod vel dolor in iaculis. Aliquam lacinia lorem sit amet vestibulum finibus. Nulla facilisi. Vivamus lacinia consectetur hendrerit. Integer commodo a nibh nec rhoncus. Nulla non aliquet erat. Cras vel orci a urna malesuada viverra vel quis nisi. Donec pharetra laoreet ante, vulputate volutpat ante consequat eget. Donec efficitur consequat nisi vitae volutpat. Vestibulum volutpat, odio nec sodales cursus, ligula nulla pellentesque erat, ut iaculis magna lorem non purus. Curabitur efficitur tortor et elit sodales, in lobortis risus feugiat.
|
||||
|
||||
### Cras hendrerit nibh non pulvinar consectetur
|
||||
|
||||
Donec justo diam, auctor et rhoncus a, feugiat in felis. Etiam lectus est, tincidunt iaculis mi et, feugiat rutrum tellus. Ut sit amet tellus vitae nisi faucibus pulvinar non a augue. Etiam auctor porttitor mi, vitae posuere lacus pretium ac. Pellentesque sed ante magna. Proin tempor faucibus risus, vitae tincidunt arcu ultrices egestas. Aenean rutrum purus vel vulputate lobortis. Aenean auctor ipsum quam, eu molestie magna ultricies quis. Phasellus vitae diam erat. Nam at facilisis massa. Nam vulputate nec quam vel iaculis. Maecenas mauris felis, semper vel ultricies eu, interdum condimentum lacus. Mauris quis tincidunt erat, quis efficitur dolor.
|
||||
|
||||
## Quisque vehicula tellus eget nunc molestie
|
||||
|
||||
Phasellus ligula tortor, sodales ac ipsum vel, lobortis lacinia eros. Maecenas et viverra enim, sit amet bibendum risus. Duis a est pulvinar, suscipit diam id, sagittis lectus. Sed vulputate est sed ipsum faucibus tempus. Morbi non varius nibh. Vestibulum vel tincidunt neque. Vestibulum pellentesque sed metus eu gravida. Donec rhoncus, quam in dictum bibendum, diam libero pretium lacus, vitae suscipit diam neque eget arcu. Pellentesque id hendrerit lorem. Curabitur fermentum purus orci, nec ullamcorper dolor consequat at. Suspendisse lectus dolor, efficitur non mollis eget, suscipit ut nisl. Quisque id ex metus. Sed lobortis venenatis lacinia. Sed at lorem leo.
|
||||
33
content/docs/example-doc/chapter-1.md
Normal file
33
content/docs/example-doc/chapter-1.md
Normal file
@@ -0,0 +1,33 @@
|
||||
---
|
||||
title: Chapter 1
|
||||
description: Chapter 1 of example doc
|
||||
toc: true
|
||||
authors:
|
||||
tags:
|
||||
categories:
|
||||
series:
|
||||
date: '2020-10-16'
|
||||
lastmod: '2020-10-16'
|
||||
draft: false
|
||||
---
|
||||
|
||||
This is chapter 1 of example doc.
|
||||
|
||||
<!--more-->
|
||||
|
||||
## Proin pretium lorem a justo euismod condimentum
|
||||
|
||||
Donec tortor nunc, feugiat non porttitor tristique, dictum vitae nibh. Integer vel mollis ante. Cras sed elementum nulla, vel placerat lectus. Cras ligula diam, blandit sed vehicula eu, aliquet vel leo. Curabitur sagittis nunc vel nulla tempor sagittis. Phasellus elementum mi malesuada libero vehicula sodales eget id augue. Duis consequat egestas tortor, vitae volutpat nibh gravida ultricies. Morbi maximus sed felis posuere luctus. Cras ultrices condimentum purus, eget iaculis nulla. Cras vulputate est in justo sodales varius. Maecenas auctor velit vel urna sodales, et sodales enim maximus. Proin tempus, metus sit amet ultrices luctus, justo eros finibus nibh, a volutpat ipsum lectus in leo. Pellentesque at dictum metus.
|
||||
|
||||
### Vivamus dapibus nunc ac fringilla pellentesque
|
||||
|
||||
|
||||
Pellentesque porttitor a tortor et egestas. Phasellus aliquet mattis velit in elementum. Suspendisse viverra turpis in risus tincidunt, et malesuada elit eleifend. Sed eu elit arcu. Cras tincidunt mauris purus, vehicula aliquam elit tincidunt eget. Nunc at justo quis augue sagittis auctor sed eu magna. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Nunc non nibh mattis, tempus tortor sed, iaculis metus. Morbi quis leo dignissim, viverra massa sit amet, faucibus ex. In hac habitasse platea dictumst. Vivamus tristique sem ac tortor venenatis, vel auctor metus vulputate. Maecenas facilisis odio et enim euismod, et ullamcorper enim congue. Nullam ut dolor eget urna aliquet bibendum sit amet a odio. Aenean vitae diam vel metus imperdiet ullamcorper consectetur ac mauris. Maecenas sed lorem vitae nibh porta venenatis.
|
||||
|
||||
## In eu nisl ac ante finibus accumsan vitae vitae eros
|
||||
|
||||
Mauris odio nulla, porta in lacinia vel, faucibus quis turpis. Nunc congue faucibus nisi eget feugiat. Integer nec magna purus. Mauris at elit in risus mollis pretium. Morbi at elementum elit, eu condimentum quam. Maecenas maximus eget turpis ac tristique. Nunc scelerisque mi ex, eu pulvinar ante accumsan vitae.
|
||||
|
||||
## Aliquam vitae augue egestas
|
||||
|
||||
Vivamus eget orci ac magna efficitur tincidunt et non urna. Cras mattis molestie nibh, ac posuere lectus bibendum a. Praesent consectetur vulputate dolor eget porta. Fusce ultrices ipsum in tortor consectetur, finibus maximus odio aliquet. Nunc dui odio, fringilla eget quam sed, gravida pretium lorem. Curabitur felis libero, commodo eget pharetra eu, blandit eu lectus. Nunc laoreet nisi purus, in dignissim nibh elementum ut. Nunc sit amet elementum urna. Pellentesque auctor imperdiet lorem, ut egestas arcu. Donec sed magna nec neque molestie aliquet non nec lorem. Phasellus sed libero tortor.
|
||||
38
content/docs/example-doc/chapter-2.md
Normal file
38
content/docs/example-doc/chapter-2.md
Normal file
@@ -0,0 +1,38 @@
|
||||
---
|
||||
title: Chapter 2
|
||||
description: Chapter 2 of example doc
|
||||
toc: true
|
||||
authors:
|
||||
tags:
|
||||
categories:
|
||||
series:
|
||||
date: '2020-10-16'
|
||||
lastmod: '2020-10-16'
|
||||
draft: false
|
||||
---
|
||||
|
||||
This is chapter 2 of example doc.
|
||||
|
||||
<!--more-->
|
||||
|
||||
## Integer nec dolor pharetra
|
||||
|
||||
Integer eget arcu velit. Suspendisse tristique magna nec turpis accumsan ultricies. Duis congue urna non nisl eleifend suscipit. Mauris commodo diam quis nunc dignissim volutpat. Morbi vitae aliquet neque, ut semper arcu. Vivamus ac nunc in velit vehicula auctor. Cras eget congue augue. Vestibulum ipsum ante, consectetur id ligula vitae, iaculis finibus libero. Phasellus elementum libero eget nisi imperdiet consectetur. Sed vitae dui non augue tristique mollis sed aliquet enim. Duis nunc ligula, volutpat a luctus non, fringilla eu mi. Nam pulvinar, dolor a scelerisque tristique, erat nisi interdum mi, et posuere dui odio sed lacus. Nulla facilisi. Mauris auctor erat urna, ut tempus eros rutrum ac. Proin luctus ultricies massa ac finibus.
|
||||
|
||||
### Suspendisse in enim ut purus ullamcorper pellentesque
|
||||
|
||||
|
||||
Morbi ullamcorper sit amet magna eu congue. Sed id lectus risus. Quisque porta feugiat ex, id volutpat tortor molestie sed. Suspendisse consequat pellentesque iaculis. Etiam venenatis ac nunc iaculis placerat. Duis vitae commodo ipsum. Cras fermentum pharetra sapien, vestibulum faucibus erat luctus ac. Phasellus at tellus convallis, feugiat ipsum vitae, dignissim arcu. Suspendisse accumsan tortor ac iaculis tempor. Pellentesque dignissim vehicula nisi, auctor vulputate lectus fringilla ut. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Duis et lorem odio. Cras arcu ipsum, pellentesque nec purus at, lobortis placerat lacus.
|
||||
|
||||
## Aenean consequat ante vel interdum fermentum
|
||||
|
||||
Morbi nisl neque, rutrum quis tristique ac, accumsan eget diam. Vestibulum iaculis neque justo, vel hendrerit diam dictum ac. Maecenas pretium blandit quam in hendrerit. Quisque consectetur, velit vel eleifend scelerisque, orci arcu efficitur neque, quis suscipit ex augue sit amet ex. Morbi fermentum tellus arcu, quis porta sem mollis eget. Praesent sit amet dictum odio, sed aliquam orci. Duis ac purus eget odio dictum aliquet. Proin finibus, sem non commodo venenatis, ex nunc tempor justo, sit amet pulvinar purus leo egestas est. Curabitur molestie arcu eget sem tristique congue. Praesent congue sollicitudin felis viverra interdum. Proin at odio dapibus, sodales mauris ut, elementum tortor. Fusce sed luctus velit. Vestibulum scelerisque, lectus ac aliquet pretium, ligula turpis lobortis elit, ut dictum urna nunc in orci. Etiam scelerisque augue varius felis luctus molestie. Nunc interdum leo quis faucibus ultricies.
|
||||
|
||||
### Integer volutpat tortor ut vulputate venenatis
|
||||
|
||||
|
||||
Nullam finibus mollis vestibulum. Quisque eu venenatis purus, facilisis pulvinar sapien. Praesent ultrices eros sit amet pellentesque vulputate. In non malesuada ex, quis sagittis sem. Phasellus dapibus massa scelerisque libero venenatis, ut vulputate felis rutrum. Nam efficitur porttitor sem, sed ullamcorper turpis mattis a. Pellentesque quis est neque. Integer elit metus, auctor in tempor accumsan, egestas vitae arcu.
|
||||
|
||||
### Vestibulum fermentum massa
|
||||
|
||||
Maecenas molestie egestas purus a gravida. Aliquam erat volutpat. Aenean varius turpis id purus accumsan, quis pellentesque turpis fringilla. Duis quis lacus a nisi rhoncus ullamcorper eget id augue. Praesent dapibus vel lectus ac consequat. Sed nec vehicula magna. Aenean viverra convallis dolor dignissim auctor. Ut semper, quam et sodales vehicula, tellus sapien consequat magna, feugiat vehicula libero nulla eget lorem. Proin libero purus, condimentum eu viverra id, placerat et nibh. Donec feugiat nunc quis erat congue tristique. Sed ut mauris quis eros malesuada placerat. Pellentesque imperdiet dui vitae dui pellentesque, sit amet rutrum risus pretium.
|
||||
34
content/docs/example-doc/nested-chapter/_index.md
Normal file
34
content/docs/example-doc/nested-chapter/_index.md
Normal file
@@ -0,0 +1,34 @@
|
||||
---
|
||||
title: Nested Chapter
|
||||
description: Nested chapter of example doc
|
||||
toc: true
|
||||
authors:
|
||||
tags:
|
||||
categories:
|
||||
series:
|
||||
date: '2020-10-16'
|
||||
lastmod: '2020-10-16'
|
||||
draft: false
|
||||
---
|
||||
|
||||
This is the root of nested chapter.
|
||||
|
||||
<!--more-->
|
||||
|
||||
## Quisque sit amet velit ac
|
||||
|
||||
Mauris consectetur, felis et tempor egestas, nisi metus commodo quam, in tincidunt dui augue ornare tortor. In porttitor ullamcorper tristique. Sed at quam ut enim fringilla iaculis. Vivamus vitae odio ac neque ultricies volutpat non sed risus. Cras eu gravida lacus. Sed convallis interdum accumsan. Proin accumsan neque justo, ut imperdiet enim placerat eu. Duis sollicitudin dignissim maximus. Proin sed efficitur tortor, porttitor porttitor sapien. Integer dapibus aliquam fermentum. Etiam sed mauris accumsan, consectetur sapien volutpat, imperdiet odio. Sed in nisi nulla. Aliquam velit quam, viverra eget eros hendrerit, fermentum auctor purus.
|
||||
|
||||
### Vestibulum nec eros consequat
|
||||
|
||||
Vestibulum in facilisis diam. Phasellus accumsan ullamcorper faucibus. Integer sagittis ut odio quis maximus. Nulla metus dolor, congue pellentesque lacus ac, lobortis rhoncus urna. Pellentesque neque turpis, vehicula id placerat facilisis, semper in lectus. Sed varius ante mollis nibh rutrum interdum. Mauris vehicula velit ut ligula efficitur, sit amet luctus turpis interdum. Duis diam mauris, ullamcorper id accumsan in, hendrerit vel nibh. Fusce ac tellus dui. Nullam lacinia orci quis quam varius aliquet. Morbi arcu magna, malesuada sit amet porta at, suscipit sit amet tellus. Nam eget ex vitae felis viverra bibendum ac et dolor. Morbi auctor facilisis nisl.
|
||||
|
||||
Donec vulputate egestas risus ultrices placerat. Phasellus at sem orci. Proin ut dolor nisi. Sed interdum erat et nulla tristique rhoncus. Suspendisse potenti. Suspendisse nec orci ut sapien suscipit semper. Sed ut euismod tortor. Vivamus eget odio quis lectus ultrices pretium in ac sem. Vivamus lacinia egestas leo, egestas sollicitudin nulla vulputate id. Vestibulum at lorem et dui elementum euismod at vel neque. Morbi convallis dignissim justo, non sollicitudin massa aliquam non. Vivamus tristique vel massa sed rutrum. Morbi odio nunc, bibendum non tellus eget, interdum porta massa. Suspendisse sit amet eros ut lorem suscipit viverra vel sed purus.
|
||||
|
||||
## Pellentesque sed augue quis erat
|
||||
|
||||
Etiam ut tempus nunc. Donec vel ornare eros, quis viverra sem. In arcu erat, elementum vitae eros molestie, porta interdum arcu. Donec eleifend eget augue eu aliquam. Duis sed ex in nibh dictum pretium at vitae massa. Praesent a elementum orci, id dictum orci. Donec tempor malesuada est. Aenean maximus, sem tristique porta pellentesque, massa ex euismod sapien, nec consectetur augue odio a mauris. Aliquam pulvinar leo id commodo commodo. Vestibulum congue pellentesque nibh, vitae scelerisque felis dignissim et. Phasellus in finibus ipsum. Suspendisse ultrices nisl augue, ut aliquet enim commodo vitae. Pellentesque eu neque et massa tincidunt pretium eu eu lorem. Suspendisse urna turpis, accumsan posuere leo eu, porta imperdiet quam. Fusce vel mi at lectus sodales eleifend id sit amet orci.
|
||||
|
||||
## Sed sed sapien vitae mauris pellentesque
|
||||
|
||||
Donec eget dui euismod, mattis tortor a, suscipit nisi. Quisque id ullamcorper mi, vulputate tristique lacus. Nulla nulla felis, convallis sit amet nibh vitae, luctus viverra velit. Orci varius natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Curabitur consectetur, felis eget sagittis faucibus, sapien mauris dignissim justo, vel suscipit velit leo placerat dolor. Mauris accumsan ligula ipsum, et aliquam nunc congue a. Aliquam faucibus non mauris at commodo. Maecenas laoreet elit aliquet consectetur rhoncus. Etiam dictum mi augue, venenatis dignissim lacus pharetra et. Proin sit amet lectus id mauris accumsan venenatis ut sit amet lorem. Etiam auctor commodo elit, molestie vestibulum quam auctor ac. Vestibulum rhoncus leo malesuada mauris faucibus, pulvinar venenatis odio rutrum. Sed sit amet consectetur velit. Cras facilisis ligula vel ligula sodales, id luctus sapien suscipit.
|
||||
36
content/docs/example-doc/nested-chapter/chapter-1.md
Normal file
36
content/docs/example-doc/nested-chapter/chapter-1.md
Normal file
@@ -0,0 +1,36 @@
|
||||
---
|
||||
title: Chapter 1
|
||||
description: Chapter 1 of example doc
|
||||
toc: true
|
||||
authors:
|
||||
tags:
|
||||
categories:
|
||||
series:
|
||||
date: '2020-10-16'
|
||||
lastmod: '2020-10-16'
|
||||
draft: false
|
||||
---
|
||||
|
||||
This is chapter 1 of nested chapter.
|
||||
|
||||
<!--more-->
|
||||
|
||||
## Ut aliquam dui convallis purus interdum
|
||||
|
||||
In nec aliquet nisi. Vestibulum varius dui eu ante tempor maximus. Pellentesque at ipsum libero. Sed non augue enim. Sed accumsan arcu sed aliquam maximus. Donec fringilla sem at cursus placerat. Nulla commodo enim nunc, at luctus libero facilisis ut. Quisque id leo at velit pharetra imperdiet vel et felis. Nunc eu tincidunt nulla. Nunc consectetur ligula ut hendrerit malesuada. Sed commodo aliquam elit, at dapibus tellus pellentesque non. Sed vel massa pulvinar, sollicitudin justo sit amet, porta lacus. Quisque eleifend placerat placerat. Phasellus nisl eros, consectetur sit amet mi eget, fringilla luctus purus.
|
||||
|
||||
### Morbi eu mi convallis
|
||||
|
||||
Sed sed est nulla. Etiam fermentum sed lectus ac molestie. Vestibulum elementum lectus quis interdum semper. Nam id tempus nisl. Nullam in tempor sapien. Integer volutpat nibh vel libero ornare hendrerit. Vestibulum non condimentum nulla. Nulla vel finibus mi. Cras consequat ligula augue, ac vulputate est tincidunt eu. Maecenas nec nibh consequat, egestas nisl non, iaculis nunc. Maecenas eu dolor tortor. Cras in bibendum diam. Vivamus mattis ultricies diam, in dignissim ante scelerisque vel. In euismod dictum ligula, sed scelerisque ipsum volutpat at. Nam lacus elit, porttitor et orci quis, malesuada sagittis risus.
|
||||
|
||||
## Aenean sit amet lorem sit amet
|
||||
|
||||
Sed eget erat faucibus, malesuada risus at, mollis est. Suspendisse et fringilla nisl, vel placerat ipsum. Proin ut est ornare, molestie ligula et, pretium orci. Aliquam id justo in eros vulputate volutpat. Vivamus sed tellus id quam laoreet fermentum nec ut dui. Ut neque nibh, facilisis dapibus tempor at, egestas non urna. Lorem ipsum dolor sit amet, consectetur adipiscing elit. In maximus, mauris id tempor dapibus, ligula velit pharetra justo, vel molestie sem mauris nec nulla. Suspendisse purus magna, pretium sodales pretium id, consectetur et arcu. Fusce commodo vel nibh quis efficitur. Duis feugiat felis ac mi semper, at sollicitudin tellus ullamcorper. Morbi eget efficitur dui. Nam erat diam, ultrices non mollis in, vestibulum ut lectus. Nunc at dui sed metus vestibulum fringilla. Curabitur vitae mauris vitae neque efficitur molestie eget at nisi. Morbi vel vehicula libero, nec tincidunt augue.
|
||||
|
||||
### Maecenas faucibus est ac orci fermentum cursus
|
||||
|
||||
Proin vestibulum pellentesque ipsum, non lobortis arcu volutpat at. Integer neque diam, luctus a turpis non, posuere elementum ex. Donec eget sagittis purus. Maecenas non laoreet quam. Quisque luctus porta pellentesque. Vestibulum auctor commodo tortor non imperdiet. Fusce sed tincidunt nunc. Aenean diam diam, mattis a enim nec, suscipit dignissim neque. Quisque at est quis tortor lobortis vehicula vitae vitae quam. Nam maximus rutrum felis, non feugiat nisl vestibulum quis.
|
||||
|
||||
### Suspendisse suscipit tellus at nibh tincidunt
|
||||
|
||||
Nulla pellentesque, leo eget interdum interdum, sem felis consequat massa, id aliquet eros leo sit amet urna. Phasellus quis odio ut odio porttitor consequat quis a velit. Quisque purus velit, faucibus vel efficitur in, sagittis quis neque. Morbi pretium suscipit odio, vel tincidunt nunc dictum aliquam. Quisque non arcu at urna scelerisque semper ac et tortor. Aliquam a dapibus justo. Vestibulum tempus nunc eu condimentum ultrices. Aenean nec egestas nulla, ut congue libero. Aliquam ut mattis urna, in sollicitudin odio. Aenean ac tristique felis, a consequat erat. Aliquam luctus eros ut porttitor efficitur. Nam cursus elit id arcu semper, at sodales velit vulputate. Suspendisse potenti.
|
||||
36
content/docs/example-doc/nested-chapter/chapter-2.md
Normal file
36
content/docs/example-doc/nested-chapter/chapter-2.md
Normal file
@@ -0,0 +1,36 @@
|
||||
---
|
||||
title: Chapter 2
|
||||
description: Chapter 2 of example doc
|
||||
toc: true
|
||||
authors:
|
||||
tags:
|
||||
categories:
|
||||
series:
|
||||
date: '2020-10-16'
|
||||
lastmod: '2020-10-16'
|
||||
draft: false
|
||||
---
|
||||
|
||||
This is chapter 2 of nested chapter.
|
||||
|
||||
<!--more-->
|
||||
|
||||
## Vivamus facilisis risus ac eros porttitor
|
||||
|
||||
Proin quis sapien porta, dictum magna eget, sodales erat. Nunc eu nisl at elit molestie placerat. Nulla nec massa non lectus malesuada vehicula. Suspendisse quis arcu elit. Praesent est ipsum, pharetra ac malesuada a, ultricies vel sem. Aenean arcu neque, bibendum a tincidunt eget, efficitur ac sapien. Vestibulum eu suscipit massa. Aenean non libero molestie, tristique purus eget, bibendum tellus. Donec id nisl laoreet elit sodales viverra nec et risus. Nullam tortor dolor, auctor convallis vulputate porta, egestas cursus lacus. Sed rhoncus ipsum accumsan magna cursus, sit amet fringilla sapien feugiat. Aliquam facilisis viverra risus, eget varius erat convallis quis.
|
||||
|
||||
## Integer feugiat orci a diam cursus tincidunt id a urna
|
||||
|
||||
Suspendisse tristique sem erat, vitae fringilla purus euismod vel. Nam magna dui, scelerisque at nibh et, faucibus dapibus nibh. Nulla facilisi. Quisque a diam sed mauris pretium volutpat. Nam nec mollis dolor, in ultrices arcu. Suspendisse ut placerat ex, dictum fringilla libero. Quisque mollis aliquet tellus in congue.
|
||||
|
||||
## Maecenas eu ipsum at lectus commodo eleifend nec vel ante
|
||||
|
||||
Nulla sit amet dolor sed elit semper accumsan. Nunc suscipit sapien eget nulla imperdiet gravida. Pellentesque dignissim metus eget felis tempor, at elementum ipsum vulputate. In pretium accumsan neque ut pulvinar. Donec rhoncus at elit id vulputate. Maecenas massa libero, porttitor et lacus eget, gravida auctor tellus. Cras lacus urna, hendrerit et tincidunt efficitur, rutrum id nisi. Nunc quis accumsan ex, eget rutrum sem. Vivamus vel dui eget leo luctus consectetur. Sed tellus elit, aliquet quis commodo in, fermentum sit amet ante. Curabitur nec ornare tortor. Sed et tempus mi. Pellentesque sollicitudin porttitor mi eget hendrerit. Maecenas lobortis turpis ut quam placerat pharetra.
|
||||
|
||||
## Maecenas a lorem in sem feugiat ultricies
|
||||
|
||||
Donec tincidunt interdum magna quis dictum. Integer non sollicitudin justo, id volutpat leo. Donec quis enim porttitor, hendrerit nisi non, accumsan orci. Nulla consectetur porta mauris, et pharetra nunc efficitur eu. Pellentesque eu consectetur tellus. In ac nunc ac turpis fermentum tempor vel vel nisl. Aenean convallis turpis ac ipsum mollis, eget venenatis lacus eleifend. Vestibulum sapien mauris, rutrum sit amet mi ut, volutpat mollis nunc. Praesent lobortis, orci efficitur molestie tempor, metus ante dignissim felis, ut interdum elit leo vitae lectus. Curabitur ex nunc, ornare at mi eu, eleifend molestie lectus. Duis pretium sapien in mauris pulvinar, ut auctor turpis tempus. Maecenas gravida nec dolor vel interdum. Ut posuere aliquam arcu et congue. Morbi scelerisque, leo vel luctus facilisis, est erat ultrices mauris, eget facilisis nisl libero a ligula. Mauris sit amet hendrerit sem. Etiam imperdiet, dolor id fermentum finibus, arcu est malesuada dui, at hendrerit nisi nibh ut mi.
|
||||
|
||||
## Quisque convallis sem sit amet magna aliquam interdum
|
||||
|
||||
Vestibulum a odio vitae sapien tempor sollicitudin. In eu mi ex. Phasellus sollicitudin, augue vitae congue vestibulum, sem mi ullamcorper nibh, sagittis tincidunt ligula turpis vitae arcu. Phasellus orci felis, tristique id scelerisque eu, ornare vel mauris. Curabitur suscipit venenatis facilisis. Phasellus et est et purus posuere accumsan et ut quam. Donec in odio eu enim facilisis scelerisque. Sed eget condimentum elit, quis pretium ipsum. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Suspendisse sit amet tortor ligula. Mauris lectus odio, cursus a diam a, ultricies posuere justo. Sed ultrices tempor mi, semper commodo quam lobortis at. Donec consectetur pretium nisl, eget dapibus nibh maximus scelerisque.
|
||||
63
content/homepage/about.md
Normal file
63
content/homepage/about.md
Normal file
@@ -0,0 +1,63 @@
|
||||
---
|
||||
title: Example Author
|
||||
draft: false
|
||||
role: Example Role
|
||||
avatar: images/icon.png
|
||||
bio: Aenean vel bibendum quam. Aliquam at mollis quam. Proin efficitur.
|
||||
organization:
|
||||
name: Example Organization
|
||||
url: https://example.com/
|
||||
social:
|
||||
- icon: envelope
|
||||
iconPack: fas
|
||||
url: mailto:example@example.com
|
||||
- icon: twitter
|
||||
iconPack: fab
|
||||
url: https://example.com/
|
||||
- icon: github
|
||||
iconPack: fab
|
||||
url: https://example.com/
|
||||
|
||||
weight: 1
|
||||
widget:
|
||||
handler: about
|
||||
|
||||
# Options: sm, md, lg and xl. Default is md.
|
||||
width:
|
||||
|
||||
sidebar:
|
||||
# Options: left and right. Leave blank to hide.
|
||||
position:
|
||||
# Options: sm, md, lg and xl. Default is md.
|
||||
scale:
|
||||
|
||||
background:
|
||||
# Options: primary, secondary, tertiary or any valid color value. Default is primary.
|
||||
color: secondary
|
||||
image:
|
||||
# Options: auto, cover and contain. Default is auto.
|
||||
size:
|
||||
# Options: center, top, right, bottom, left.
|
||||
position:
|
||||
# Options: fixed, local, scroll.
|
||||
attachment:
|
||||
---
|
||||
|
||||
## Self Introduction
|
||||
|
||||
Cras ex dui, tristique a libero eget, consectetur semper ligula. Nunc augue arcu, malesuada a nisi et, molestie finibus metus. Sed lacus odio, ultricies a nisl vitae, sollicitudin tempor ipsum. Vivamus quis feugiat arcu. Sed mi nunc, efficitur quis tellus vitae, posuere mattis metus. Phasellus in mattis dui. Nullam blandit, augue non ullamcorper dapibus, lacus dui molestie massa, in iaculis purus lectus eu lectus. Duis hendrerit lacinia tellus, sit amet feugiat dolor placerat id. Aenean ac velit massa. Vivamus feugiat dui at magna viverra, ut dictum nunc rutrum. Duis eget sapien finibus, lobortis orci id, vestibulum tellus. Maecenas lobortis urna libero, quis fermentum lectus lobortis nec. Nullam laoreet volutpat libero, ac mattis magna ullamcorper quis. Duis eget ipsum eu nisi mattis cursus et vitae turpis.
|
||||
|
||||
Aliquam pretium diam eget leo feugiat finibus. Donec malesuada commodo ipsum. Aenean a massa in lacus venenatis vestibulum. Duis vel sem quis elit iaculis consectetur et quis dolor. Morbi eu ipsum hendrerit, malesuada ante sed, dapibus est. Suspendisse feugiat nulla ut gravida convallis. Phasellus id massa posuere, rhoncus justo ut, porttitor dolor. Nulla ultrices malesuada egestas. Nunc fermentum tincidunt sem ac vulputate. Donec mollis sollicitudin justo eget varius. Donec ornare velit et felis blandit, id molestie sapien lobortis. Morbi eget tristique justo. Mauris posuere, nibh eu laoreet ultricies, ligula erat iaculis sapien, vel dapibus lacus libero ut diam. Etiam viverra ante felis, et scelerisque nunc pellentesque vitae. Praesent feugiat dictum molestie.
|
||||
|
||||
## Details
|
||||
|
||||
Nunc pellentesque vitae:
|
||||
- Morbi accumsan nibh efficitur diam molestie, non dignissim diam facilisis.
|
||||
- Donec dignissim leo in mollis faucibus.
|
||||
- Donec blandit lacus a pellentesque fermentum.
|
||||
|
||||
Donec mollis sollicitudin:
|
||||
- Nunc dictum purus ornare purus consectetur, eu pellentesque massa ullamcorper.
|
||||
- Aliquam eu leo vitae justo aliquam tincidunt.
|
||||
- Fusce non massa id augue interdum feugiat sed et nulla.
|
||||
- Vivamus molestie augue in tristique laoreet.
|
||||
32
content/homepage/blank.html
Normal file
32
content/homepage/blank.html
Normal file
@@ -0,0 +1,32 @@
|
||||
---
|
||||
title: Blank
|
||||
draft: false
|
||||
|
||||
weight: 5
|
||||
widget:
|
||||
handler: blank
|
||||
|
||||
# Options: sm, md, lg and xl. Default is md.
|
||||
width:
|
||||
|
||||
sidebar:
|
||||
# Options: left and right. Leave blank to hide.
|
||||
position:
|
||||
# Options: sm, md, lg and xl. Default is md.
|
||||
scale:
|
||||
|
||||
background:
|
||||
# Options: primary, secondary, tertiary or any valid color value. Default is primary.
|
||||
color:
|
||||
image: images/hero-left.jpg
|
||||
# Options: auto, cover and contain. Default is auto.
|
||||
size: cover
|
||||
# Options: center, top, right, bottom, left.
|
||||
position:
|
||||
# Options: fixed, local, scroll.
|
||||
attachment:
|
||||
---
|
||||
|
||||
<div style="text-align:center">
|
||||
<p>Write anything you like here!</p>
|
||||
</div>
|
||||
52
content/homepage/experience.md
Normal file
52
content/homepage/experience.md
Normal file
@@ -0,0 +1,52 @@
|
||||
---
|
||||
title: Experience
|
||||
draft: false
|
||||
experiences:
|
||||
- title: Example Role 1
|
||||
organization:
|
||||
name: Example Organization 1
|
||||
url: https://example.org
|
||||
dates: "2019 - Present"
|
||||
location: Country
|
||||
writeup: >
|
||||
Donec scelerisque egestas augue at tempor. Fusce faucibus magna in.
|
||||
|
||||
- Suspendisse lacinia mauris a laoreet vehicula.
|
||||
|
||||
- Aenean tincidunt enim vitae ante blandit tempor.
|
||||
|
||||
- Nam tincidunt diam quis lorem rutrum ullamcorper.
|
||||
|
||||
- title: Example Role 2
|
||||
organization:
|
||||
name: Example Organization 2
|
||||
url: https://example.org
|
||||
dates: "2017 - 2019"
|
||||
location: Country
|
||||
writeup: >
|
||||
**Aliquam** at **rutrum** ante. In sed quam faucibus.
|
||||
|
||||
weight: 3
|
||||
widget:
|
||||
handler: experience
|
||||
|
||||
# Options: sm, md, lg and xl. Default is md.
|
||||
width: lg
|
||||
|
||||
sidebar:
|
||||
# Options: left and right. Leave blank to hide.
|
||||
position: left
|
||||
# Options: sm, md, lg and xl. Default is md.
|
||||
scale:
|
||||
|
||||
background:
|
||||
# Options: primary, secondary, tertiary or any valid color value. Default is primary.
|
||||
color:
|
||||
image:
|
||||
# Options: auto, cover and contain. Default is auto.
|
||||
size:
|
||||
# Options: center, top, right, bottom, left.
|
||||
position:
|
||||
# Options: fixed, local, scroll.
|
||||
attachment:
|
||||
---
|
||||
3
content/homepage/index.md
Normal file
3
content/homepage/index.md
Normal file
@@ -0,0 +1,3 @@
|
||||
---
|
||||
headless: true
|
||||
---
|
||||
34
content/homepage/pages.md
Normal file
34
content/homepage/pages.md
Normal file
@@ -0,0 +1,34 @@
|
||||
---
|
||||
title: Pages
|
||||
draft: false
|
||||
# Section you want to display
|
||||
section: posts
|
||||
# Pages count
|
||||
count: 5
|
||||
# Options: card, plain and masonry.
|
||||
style: plain
|
||||
|
||||
weight: 2
|
||||
widget:
|
||||
handler: pages
|
||||
|
||||
# Options: sm, md, lg and xl. Default is md.
|
||||
width:
|
||||
|
||||
sidebar:
|
||||
# Options: left and right. Leave blank to hide.
|
||||
position:
|
||||
# Options: sm, md, lg and xl. Default is md.
|
||||
scale:
|
||||
|
||||
background:
|
||||
# Options: primary, secondary, tertiary or any valid color value. Default is primary.
|
||||
color:
|
||||
image:
|
||||
# Options: auto, cover and contain. Default is auto.
|
||||
size:
|
||||
# Options: center, top, right, bottom, left.
|
||||
position:
|
||||
# Options: fixed, local, scroll.
|
||||
attachment:
|
||||
---
|
||||
31
content/homepage/vintage.md
Normal file
31
content/homepage/vintage.md
Normal file
@@ -0,0 +1,31 @@
|
||||
---
|
||||
title: Vintage
|
||||
draft: false
|
||||
slogan: We are all in the gutter, but some of us are looking at the stars.
|
||||
imgLeft: images/hero-left.jpg
|
||||
imgRight: images/hero-right.jpg
|
||||
|
||||
weight: 4
|
||||
widget:
|
||||
handler: vintage
|
||||
|
||||
# Options: sm, md, lg and xl. Default is md.
|
||||
width:
|
||||
|
||||
sidebar:
|
||||
# Options: left and right. Leave blank to hide.
|
||||
position:
|
||||
# Options: sm, md, lg and xl. Default is md.
|
||||
scale:
|
||||
|
||||
background:
|
||||
# Options: primary, secondary, tertiary or any valid color value. Default is primary.
|
||||
color: secondary
|
||||
image:
|
||||
# Options: auto, cover and contain. Default is auto.
|
||||
size:
|
||||
# Options: center, top, right, bottom, left.
|
||||
position:
|
||||
# Options: fixed, local, scroll.
|
||||
attachment:
|
||||
---
|
||||
3
content/posts/_index.md
Normal file
3
content/posts/_index.md
Normal file
@@ -0,0 +1,3 @@
|
||||
---
|
||||
title: Posts
|
||||
---
|
||||
41
content/posts/diagram-support.md
Normal file
41
content/posts/diagram-support.md
Normal file
@@ -0,0 +1,41 @@
|
||||
---
|
||||
title: Diagram Support
|
||||
description:
|
||||
toc: true
|
||||
authors:
|
||||
- example-author
|
||||
tags:
|
||||
categories:
|
||||
series:
|
||||
date: '2021-03-31T13:11:22+08:00'
|
||||
lastmod: '2021-03-31T13:11:22+08:00'
|
||||
featuredImage:
|
||||
draft: false
|
||||
---
|
||||
|
||||
Eureka supports the rendering of diagrams by using Mermaid.
|
||||
|
||||
<!--more-->
|
||||
|
||||
|
||||
Please include the Mermaid diagram as below. Every mermaid chart/graph/diagram definition, has to have separate `<div>` tags.
|
||||
|
||||
In order to render the HTML code in the Markdown file correctly, please make sure that `markup.goldmark.renderer.unsafe` in `config.yaml` is true.
|
||||
|
||||
Here is one mermaid diagram:
|
||||
|
||||
<div class="mermaid">
|
||||
graph TD
|
||||
A[Client] --> B[Load Balancer]
|
||||
B --> C[Server1]
|
||||
B --> D[Server2]
|
||||
</div>
|
||||
|
||||
And here is another:
|
||||
|
||||
<div class="mermaid">
|
||||
graph TD
|
||||
A[Client] -->|tcp_123| B(Load Balancer)
|
||||
B -->|tcp_456| C[Server1]
|
||||
B -->|tcp_456| D[Server2]
|
||||
</div>
|
||||
51
content/posts/emoji-support.md
Normal file
51
content/posts/emoji-support.md
Normal file
@@ -0,0 +1,51 @@
|
||||
---
|
||||
title: Emoji Support
|
||||
description: Guide to emoji usage in Hugo
|
||||
toc: true
|
||||
authors:
|
||||
- Hugo Authors
|
||||
tags:
|
||||
- emoji
|
||||
categories:
|
||||
series:
|
||||
date: '2019-03-05'
|
||||
lastmod: '2019-03-05'
|
||||
draft: false
|
||||
---
|
||||
|
||||
Emoji can be enabled in a Hugo project in a number of ways.
|
||||
<!--more-->
|
||||
The [`emojify`](https://gohugo.io/functions/emojify/) function can be called directly in templates or [Inline Shortcodes](https://gohugo.io/templates/shortcode-templates/#inline-shortcodes).
|
||||
|
||||
To enable emoji globally, set `enableEmoji` to `true` in your site's [configuration](https://gohugo.io/getting-started/configuration/) and then you can type emoji shorthand codes directly in content files; e.g.
|
||||
|
||||
<p><span class="nowrap"><span class="emojify">🙈</span> <code>:see_no_evil:</code></span> <span class="nowrap"><span class="emojify">🙉</span> <code>:hear_no_evil:</code></span> <span class="nowrap"><span class="emojify">🙊</span> <code>:speak_no_evil:</code></span></p>
|
||||
<br>
|
||||
|
||||
The [Emoji cheat sheet](http://www.emoji-cheat-sheet.com/) is a useful reference for emoji shorthand codes.
|
||||
|
||||
***
|
||||
|
||||
**N.B.** The above steps enable Unicode Standard emoji characters and sequences in Hugo, however the rendering of these glyphs depends on the browser and the platform. To style the emoji you can either use a third party emoji font or a font stack; e.g.
|
||||
|
||||
{{< highlight html >}}
|
||||
.emoji {
|
||||
font-family: Apple Color Emoji, Segoe UI Emoji, NotoColorEmoji, Segoe UI Symbol, Android Emoji, EmojiSymbols;
|
||||
}
|
||||
{{< /highlight >}}
|
||||
|
||||
{{< css.inline >}}
|
||||
<style>
|
||||
.emojify {
|
||||
font-family: Apple Color Emoji, Segoe UI Emoji, NotoColorEmoji, Segoe UI Symbol, Android Emoji, EmojiSymbols;
|
||||
font-size: 2rem;
|
||||
vertical-align: middle;
|
||||
}
|
||||
@media screen and (max-width:650px) {
|
||||
.nowrap {
|
||||
display: block;
|
||||
margin: 25px 0;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
{{< /css.inline >}}
|
||||
35
content/posts/featured-image.md
Normal file
35
content/posts/featured-image.md
Normal file
@@ -0,0 +1,35 @@
|
||||
---
|
||||
title: Featured Image
|
||||
description: Post with featured image.
|
||||
toc: true
|
||||
authors:
|
||||
- Example Author
|
||||
tags:
|
||||
- image
|
||||
categories:
|
||||
- themes
|
||||
series:
|
||||
- Themes Guide
|
||||
date: '2020-05-26'
|
||||
lastmod: '2020-05-26'
|
||||
featuredImage: images/hero-right.jpg
|
||||
draft: false
|
||||
---
|
||||
|
||||
Maecenas maximus, elit in ornare porttitor, nisi eros hendrerit nisl, sed fermentum nulla urna blandit tellus.
|
||||
|
||||
<!--more-->
|
||||
|
||||
## Nullam tempor lectus quis
|
||||
|
||||
Aenean vehicula non elit id varius. Mauris condimentum lacinia mollis. Nullam quis cursus metus, eget mattis erat. Aliquam nec ante lacus. In tellus augue, iaculis vitae sollicitudin quis, tempor nec urna. Aenean ut fermentum erat, vel gravida ligula. Etiam sed ex aliquet, egestas nibh eu, iaculis mi. Nunc sit amet fermentum ex. Sed convallis ac arcu tristique rhoncus. Suspendisse potenti.
|
||||
|
||||
Proin justo purus, porttitor et semper ut, commodo et nibh. Nam malesuada id arcu in tempus. Ut ornare vestibulum ultrices. Nullam tempor lectus quis ornare viverra. Vestibulum fringilla turpis ac leo fermentum, et dictum nisi consectetur. Integer ullamcorper fringilla mi, non volutpat sapien ultrices vel. Phasellus at blandit neque, pulvinar rutrum ante.
|
||||
|
||||
Etiam auctor, elit vel pretium consequat, orci magna aliquet dolor, quis varius felis purus ut elit. Sed ultrices feugiat blandit. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia curae; Ut accumsan pulvinar purus et ornare. Vestibulum et tortor eget lacus hendrerit porttitor. Cras dapibus ac est posuere mattis. Pellentesque eu ligula ultricies, interdum nulla vel, sollicitudin ligula. Suspendisse sit amet massa sed dui placerat pharetra. Vestibulum massa sem, congue in vehicula vitae, aliquam eu mi. Suspendisse eget laoreet velit. Cras felis enim, molestie in enim nec, mollis venenatis lectus. Donec tincidunt, mi vel interdum varius, urna metus aliquet velit, ut venenatis nulla orci nec lectus. Nam id tortor imperdiet, tempor massa eget, congue nisl. Suspendisse venenatis facilisis orci, non scelerisque risus volutpat sit amet.
|
||||
|
||||
## Vestibulum et tortor eget
|
||||
|
||||
Aliquam posuere diam non ligula tristique congue. Donec dignissim eu justo sed dictum. Praesent at massa erat. Praesent mollis viverra velit. Aliquam maximus pharetra massa a efficitur. Sed tempus egestas purus sit amet tempor. Donec porttitor varius nisi, eu venenatis risus gravida id. Pellentesque blandit nunc non urna consectetur commodo. Sed at feugiat felis, sit amet malesuada nunc. Curabitur in tempor nisl. Pellentesque accumsan est orci, in commodo felis accumsan facilisis. Nulla maximus suscipit posuere. Nulla et consequat mauris, fermentum ultricies tellus.
|
||||
|
||||
Maecenas consectetur ac libero vitae congue. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer nec tortor eu lectus placerat varius. Mauris a nisi consectetur, ornare dolor ut, rutrum ligula. Sed enim nisl, fermentum a dictum vel, vestibulum ut odio. Suspendisse laoreet quis urna eu vestibulum. Maecenas commodo augue ex, eu egestas nulla aliquet ut. Cras aliquam dui ipsum, nec sodales erat convallis sit amet. Donec porttitor posuere hendrerit. Sed imperdiet at purus eget tempus. In ac est urna.
|
||||
151
content/posts/markdown-syntax.md
Normal file
151
content/posts/markdown-syntax.md
Normal file
@@ -0,0 +1,151 @@
|
||||
---
|
||||
title: Markdown Syntax Guide
|
||||
description: Sample article showcasing basic Markdown syntax and formatting for HTML elements.
|
||||
toc: true
|
||||
authors:
|
||||
- Hugo Authors
|
||||
tags:
|
||||
- markdown
|
||||
- css
|
||||
- html
|
||||
- themes
|
||||
categories:
|
||||
- themes
|
||||
- syntax
|
||||
series:
|
||||
- Themes Guide
|
||||
date: '2019-03-11'
|
||||
lastmod: '2019-03-11'
|
||||
draft: false
|
||||
---
|
||||
|
||||
This article offers a sample of basic Markdown syntax that can be used in Hugo content files, also it shows whether basic HTML elements are decorated with CSS in a Hugo theme.
|
||||
<!--more-->
|
||||
|
||||
## Headings
|
||||
|
||||
The following HTML `<h1>`—`<h6>` elements represent six levels of section headings. `<h1>` is the highest section level while `<h6>` is the lowest.
|
||||
|
||||
# H1
|
||||
## H2
|
||||
### H3
|
||||
#### H4
|
||||
##### H5
|
||||
###### H6
|
||||
|
||||
## Paragraph
|
||||
|
||||
Xerum, quo qui aut unt expliquam qui dolut labo. Aque venitatiusda cum, voluptionse latur sitiae dolessi aut parist aut dollo enim qui voluptate ma dolestendit peritin re plis aut quas inctum laceat est volestemque commosa as cus endigna tectur, offic to cor sequas etum rerum idem sintibus eiur? Quianimin porecus evelectur, cum que nis nust voloribus ratem aut omnimi, sitatur? Quiatem. Nam, omnis sum am facea corem alique molestrunt et eos evelece arcillit ut aut eos eos nus, sin conecerem erum fuga. Ri oditatquam, ad quibus unda veliamenimin cusam et facea ipsamus es exerum sitate dolores editium rerore eost, temped molorro ratiae volorro te reribus dolorer sperchicium faceata tiustia prat.
|
||||
|
||||
Itatur? Quiatae cullecum rem ent aut odis in re eossequodi nonsequ idebis ne sapicia is sinveli squiatum, core et que aut hariosam ex eat.
|
||||
|
||||
## Blockquotes
|
||||
|
||||
The blockquote element represents content that is quoted from another source, optionally with a citation which must be within a `footer` or `cite` element, and optionally with in-line changes such as annotations and abbreviations.
|
||||
|
||||
#### Blockquote without attribution
|
||||
|
||||
> Tiam, ad mint andaepu dandae nostion secatur sequo quae.
|
||||
> **Note** that you can use *Markdown syntax* within a blockquote.
|
||||
|
||||
#### Blockquote with attribution
|
||||
|
||||
> Don't communicate by sharing memory, share memory by communicating.<br>
|
||||
> — <cite>Rob Pike[^1]</cite>
|
||||
|
||||
[^1]: The above quote is excerpted from Rob Pike's [talk](https://www.youtube.com/watch?v=PAAkCSZUG1c) during Gopherfest, November 18, 2015.
|
||||
|
||||
## Tables
|
||||
|
||||
Tables aren't part of the core Markdown spec, but Hugo supports supports them out-of-the-box.
|
||||
|
||||
Name | Age
|
||||
--------|------
|
||||
Bob | 27
|
||||
Alice | 23
|
||||
|
||||
#### Inline Markdown within tables
|
||||
|
||||
| Italics | Bold | Code |
|
||||
| -------- | -------- | ------ |
|
||||
| *italics* | **bold** | `code` |
|
||||
|
||||
## Code Blocks
|
||||
|
||||
#### Code block with backticks
|
||||
|
||||
```html
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Example HTML5 Document</title>
|
||||
</head>
|
||||
<body>
|
||||
<p>Test</p>
|
||||
</body>
|
||||
</html>
|
||||
```
|
||||
|
||||
#### Code block indented with four spaces
|
||||
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Example HTML5 Document</title>
|
||||
</head>
|
||||
<body>
|
||||
<p>Test</p>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
#### Code block with Hugo's internal highlight shortcode
|
||||
{{< highlight html >}}
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Example HTML5 Document</title>
|
||||
</head>
|
||||
<body>
|
||||
<p>Test</p>
|
||||
</body>
|
||||
</html>
|
||||
{{< /highlight >}}
|
||||
|
||||
## List Types
|
||||
|
||||
#### Ordered List
|
||||
|
||||
1. First item
|
||||
2. Second item
|
||||
3. Third item
|
||||
|
||||
#### Unordered List
|
||||
|
||||
* List item
|
||||
* Another item
|
||||
* And another item
|
||||
|
||||
#### Nested list
|
||||
|
||||
* Fruit
|
||||
* Apple
|
||||
* Orange
|
||||
* Banana
|
||||
* Dairy
|
||||
* Milk
|
||||
* Cheese
|
||||
|
||||
## Other Elements — abbr, sub, sup, kbd, mark
|
||||
|
||||
<abbr title="Graphics Interchange Format">GIF</abbr> is a bitmap image format.
|
||||
|
||||
H<sub>2</sub>O
|
||||
|
||||
X<sup>n</sup> + Y<sup>n</sup> = Z<sup>n</sup>
|
||||
|
||||
Press <kbd><kbd>CTRL</kbd>+<kbd>ALT</kbd>+<kbd>Delete</kbd></kbd> to end the session.
|
||||
|
||||
Most <mark>salamanders</mark> are nocturnal, and hunt for insects, worms, and other small creatures.
|
||||
48
content/posts/math-support.md
Normal file
48
content/posts/math-support.md
Normal file
@@ -0,0 +1,48 @@
|
||||
---
|
||||
title: Math Support
|
||||
description:
|
||||
toc: true
|
||||
authors:
|
||||
- example-author
|
||||
tags:
|
||||
categories:
|
||||
series:
|
||||
date: '2020-11-20T22:52:56+08:00'
|
||||
lastmod: '2020-11-20T22:52:56+08:00'
|
||||
featuredImage:
|
||||
draft: false
|
||||
---
|
||||
|
||||
Eureka supports the rendering of mathematical formulas by using KaTeX.
|
||||
|
||||
<!--more-->
|
||||
|
||||
|
||||
You can type inline equation like $E=mc^2$.
|
||||
|
||||
And also displayed equation like:
|
||||
|
||||
<div>
|
||||
\[ \int u \frac{dv}{dx}\, dx=uv-\int \frac{du}{dx}v\,dx \]
|
||||
</div>
|
||||
|
||||
|
||||
Matrix:
|
||||
|
||||
<div>
|
||||
\[ \begin{pmatrix} a&b\\c&d \end{pmatrix} \quad
|
||||
\begin{bmatrix} a&b\\c&d \end{bmatrix} \quad
|
||||
\begin{Bmatrix} a&b\\c&d \end{Bmatrix} \quad
|
||||
\begin{vmatrix} a&b\\c&d \end{vmatrix} \]
|
||||
</div>
|
||||
|
||||
Aligned equation:
|
||||
|
||||
<div>
|
||||
\[\begin{aligned}
|
||||
x ={}& a+b+c+{} \\
|
||||
&d+e+f+g
|
||||
\end{aligned}\]
|
||||
</div>
|
||||
|
||||
And many other kinds of formulas.
|
||||
52
content/posts/placeholder-text.md
Normal file
52
content/posts/placeholder-text.md
Normal file
@@ -0,0 +1,52 @@
|
||||
---
|
||||
title: Placeholder Text
|
||||
description: Lorem Ipsum Dolor Si Amet
|
||||
toc: true
|
||||
authors:
|
||||
- Hugo Authors
|
||||
- Example Author
|
||||
tags:
|
||||
- markdown
|
||||
- text
|
||||
categories:
|
||||
series:
|
||||
- Themes Guide
|
||||
date: '2019-03-09'
|
||||
lastmod: '2019-03-09'
|
||||
draft: false
|
||||
---
|
||||
|
||||
Lorem est tota propiore conpellat pectoribus de pectora summo. <!--more-->Redit teque digerit hominumque toris verebor lumina non cervice subde tollit usus habet Arctonque, furores quas nec ferunt. Quoque montibus nunc caluere tempus inhospita parcite confusaque translucet patri vestro qui optatis lumine cognoscere flos nubis! Fronde ipsamque patulos Dryopen deorum.
|
||||
|
||||
1. Exierant elisi ambit vivere dedere
|
||||
2. Duce pollice
|
||||
3. Eris modo
|
||||
4. Spargitque ferrea quos palude
|
||||
|
||||
Rursus nulli murmur; hastile inridet ut ab gravi sententia! Nomine potitus silentia flumen, sustinet placuit petis in dilapsa erat sunt. Atria tractus malis.
|
||||
|
||||
1. Comas hunc haec pietate fetum procerum dixit
|
||||
2. Post torum vates letum Tiresia
|
||||
3. Flumen querellas
|
||||
4. Arcanaque montibus omnes
|
||||
5. Quidem et
|
||||
|
||||
# Vagus elidunt
|
||||
|
||||
<svg class="canon" xmlns="http://www.w3.org/2000/svg" overflow="visible" viewBox="0 0 496 373" height="373" width="496"><g fill="none"><path stroke="#000" stroke-width=".75" d="M.599 372.348L495.263 1.206M.312.633l494.95 370.853M.312 372.633L247.643.92M248.502.92l246.76 370.566M330.828 123.869V1.134M330.396 1.134L165.104 124.515"></path><path stroke="#ED1C24" stroke-width=".75" d="M275.73 41.616h166.224v249.05H275.73zM54.478 41.616h166.225v249.052H54.478z"></path><path stroke="#000" stroke-width=".75" d="M.479.375h495v372h-495zM247.979.875v372"></path><ellipse cx="498.729" cy="177.625" rx=".75" ry="1.25"></ellipse><ellipse cx="247.229" cy="377.375" rx=".75" ry="1.25"></ellipse></g></svg>
|
||||
|
||||
[The Van de Graaf Canon](https://en.wikipedia.org/wiki/Canons_of_page_construction#Van_de_Graaf_canon)
|
||||
|
||||
## Mane refeci capiebant unda mulcebat
|
||||
|
||||
Victa caducifer, malo vulnere contra dicere aurato, ludit regale, voca! Retorsit colit est profanae esse virescere furit nec; iaculi matertera et visa est, viribus. Divesque creatis, tecta novat collumque vulnus est, parvas. **Faces illo pepulere** tempus adest. Tendit flamma, ab opes virum sustinet, sidus sequendo urbis.
|
||||
|
||||
Iubar proles corpore raptos vero auctor imperium; sed et huic: manus caeli Lelegas tu lux. Verbis obstitit intus oblectamina fixis linguisque ausus sperare Echionides cornuaque tenent clausit possit. Omnia putatur. Praeteritae refert ausus; ferebant e primus lora nutat, vici quae mea ipse. Et iter nil spectatae vulnus haerentia iuste et exercebat, sui et.
|
||||
|
||||
Eurytus Hector, materna ipsumque ut Politen, nec, nate, ignari, vernum cohaesit sequitur. Vel **mitis temploque** vocatus, inque alis, *oculos nomen* non silvis corpore coniunx ne displicet illa. Crescunt non unus, vidit visa quantum inmiti flumina mortis facto sic: undique a alios vincula sunt iactata abdita! Suspenderat ego fuit tendit: luna, ante urbem Propoetides **parte**.
|
||||
|
||||
{{< css.inline >}}
|
||||
<style>
|
||||
.canon { background: white; width: 100%; height: auto; }
|
||||
</style>
|
||||
{{< /css.inline >}}
|
||||
BIN
content/posts/暗黑能天使/images/DSC_2778.jpg
Normal file
BIN
content/posts/暗黑能天使/images/DSC_2778.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 9.4 MiB |
BIN
content/posts/暗黑能天使/images/DSC_2780.jpg
Normal file
BIN
content/posts/暗黑能天使/images/DSC_2780.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 8.7 MiB |
17
content/posts/暗黑能天使/index.md
Normal file
17
content/posts/暗黑能天使/index.md
Normal file
@@ -0,0 +1,17 @@
|
||||
---
|
||||
title: 暗黑能天使
|
||||
description:
|
||||
toc: True
|
||||
authors: []
|
||||
tags: []
|
||||
categories: []
|
||||
series: []
|
||||
date: 2017-02-05T00:00:00
|
||||
lastmod: 2017-02-05T00:00:00
|
||||
featuredVideo:
|
||||
featuredImage:
|
||||
draft: False
|
||||
---
|
||||
|
||||

|
||||

|
||||
6
deploy.sh
Normal file
6
deploy.sh
Normal file
@@ -0,0 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
../../bin/0.98/hugo.exe
|
||||
ssh -t root@192.168.1.30 "rm -rf /var/www/html/*"
|
||||
scp -r ./public/* root@192.168.1.30:/var/www/html/
|
||||
ssh -t root@192.168.1.30 "systemctl restart apache2"
|
||||
5
layouts/404.html
Normal file
5
layouts/404.html
Normal file
@@ -0,0 +1,5 @@
|
||||
{{ define "main" }}
|
||||
<div class="bg-secondary-bg rounded overflow-hidden mt-12 px-4 py-32 text-center">
|
||||
<span class="text-3xl">404 - Page not found</span>
|
||||
</div>
|
||||
{{ end }}
|
||||
35
layouts/_default/baseof.html
Normal file
35
layouts/_default/baseof.html
Normal file
@@ -0,0 +1,35 @@
|
||||
<!DOCTYPE html>
|
||||
<html
|
||||
lang="{{ .Site.LanguageCode }}"
|
||||
dir="{{ .Site.Language.LanguageDirection | default "ltr" }}"
|
||||
{{ if eq .Site.Params.colorScheme "dark" }}class="dark"{{ end }}
|
||||
>
|
||||
{{- partial "head" . }}
|
||||
|
||||
|
||||
<body class="flex min-h-screen flex-col">
|
||||
<header
|
||||
class="min-h-16 pl-scrollbar bg-secondary-bg fixed z-50 flex w-full items-center shadow-sm"
|
||||
>
|
||||
<div class="mx-auto w-full max-w-screen-xl">
|
||||
{{- partial "header" . -}}
|
||||
</div>
|
||||
</header>
|
||||
<main class="grow pt-16">
|
||||
{{- if or .IsHome (and (eq .Type "authors") (eq .Kind "term")) }}
|
||||
{{- block "main" . }}{{- end }}
|
||||
{{- else }}
|
||||
<div class="pl-scrollbar">
|
||||
<div class="mx-auto w-full max-w-screen-xl lg:px-4 xl:px-8">
|
||||
{{- block "main" . }}{{- end }}
|
||||
</div>
|
||||
</div>
|
||||
{{ end }}
|
||||
</main>
|
||||
<footer class="pl-scrollbar">
|
||||
<div class="mx-auto w-full max-w-screen-xl">
|
||||
{{- partial "footer" . -}}
|
||||
</div>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
7
layouts/_default/list.html
Normal file
7
layouts/_default/list.html
Normal file
@@ -0,0 +1,7 @@
|
||||
{{ define "main" }}
|
||||
{{ partial "components/list-article" . }}
|
||||
<div class="bg-secondary-bg rounded px-6">
|
||||
{{ partial "components/summary-list-plain" .Paginator.Pages }}
|
||||
</div>
|
||||
{{ template "_internal/pagination.html" . }}
|
||||
{{ end }}
|
||||
60
layouts/_default/single.html
Normal file
60
layouts/_default/single.html
Normal file
@@ -0,0 +1,60 @@
|
||||
{{ define "main" }}
|
||||
{{ $hasToc := and (in .TableOfContents "<li>" ) (.Params.toc) }}
|
||||
{{ $hasSidebar := or ($hasToc) (.Params.series) }}
|
||||
<div class="grid grid-cols-2 gap-4 lg:grid-cols-8 lg:pt-12">
|
||||
<div
|
||||
class="{{ if not $hasSidebar }}
|
||||
{{- print "lg:col-start-2" -}}
|
||||
{{ end }} bg-secondary-bg col-span-2 rounded px-6 py-8 lg:col-span-6"
|
||||
>
|
||||
{{ partial "components/post-article" . }}
|
||||
|
||||
{{ with .GetTerms "tags" }}
|
||||
{{ partial "components/post-tags" . }}
|
||||
{{ end }}
|
||||
|
||||
{{ partial "components/post-edit" . }}
|
||||
|
||||
{{ with .GetTerms "authors" }}
|
||||
{{ partial "components/post-author" . }}
|
||||
{{ end }}
|
||||
|
||||
{{ partial "components/post-footer" . }}
|
||||
{{ partial "comment.html" . }}
|
||||
</div>
|
||||
{{ if $hasSidebar }}
|
||||
<div class="col-span-2">
|
||||
{{ if .GetTerms "series" }}
|
||||
{{ partial "components/post-series" . }}
|
||||
{{ end }}
|
||||
{{ if $hasToc }}
|
||||
{{ partial "components/post-toc" . }}
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
{{ $related := .Site.RegularPages.Related . | first 6 }}
|
||||
{{ with $related }}
|
||||
<div
|
||||
class="{{ if not $hasSidebar }}
|
||||
{{- print "lg:col-start-2" -}}
|
||||
{{ end }} bg-secondary-bg prose col-span-2 rounded p-6 lg:col-span-6"
|
||||
>
|
||||
<h3>{{ i18n "seeAlso" }}</h3>
|
||||
{{ range . }}
|
||||
<a href="{{ .Permalink }}" class="no-underline">{{ .LinkTitle }}</a>
|
||||
<br />
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
||||
</div>
|
||||
|
||||
{{/* highlight.js */}}
|
||||
{{- if eq .Site.Params.highlight.handler "highlightjs" }}
|
||||
<script>
|
||||
document.addEventListener("DOMContentLoaded", () => {
|
||||
hljs.highlightAll();
|
||||
});
|
||||
</script>
|
||||
{{- end }}
|
||||
{{ end }}
|
||||
12
layouts/_default/terms.html
Normal file
12
layouts/_default/terms.html
Normal file
@@ -0,0 +1,12 @@
|
||||
{{ define "main" }}
|
||||
{{ partial "components/list-article" . }}
|
||||
<div class="bg-secondary-bg rounded px-6 py-8">
|
||||
{{ range .Pages }}
|
||||
<h2 class="text-primary-text my-2 text-lg">
|
||||
<a href="{{ .Permalink }}" class="text-eureka hover:underline"
|
||||
>{{ .LinkTitle }}</a
|
||||
>
|
||||
</h2>
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
||||
16
layouts/authors/list.html
Normal file
16
layouts/authors/list.html
Normal file
@@ -0,0 +1,16 @@
|
||||
{{ define "main" }}
|
||||
<div class="pl-scrollbar bg-secondary-bg">
|
||||
<div class="mx-auto max-w-screen-xl">
|
||||
<div class="mx-auto px-6 py-12 md:px-8 lg:w-3/4 xl:px-12">
|
||||
{{ partial "widgets/about" . }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="pl-scrollbar bg-primary-bg">
|
||||
<div class="mx-auto max-w-screen-xl">
|
||||
<div class="mx-auto px-6 py-12 md:px-8 lg:w-3/4 xl:px-12">
|
||||
{{ partial "components/summary-list-plain" .Pages }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{ end }}
|
||||
12
layouts/authors/terms.html
Normal file
12
layouts/authors/terms.html
Normal file
@@ -0,0 +1,12 @@
|
||||
{{ define "main" }}
|
||||
{{ partial "components/list-article" . }}
|
||||
<div class="bg-secondary-bg rounded px-6 py-8">
|
||||
{{ range .Pages }}
|
||||
<h2 class="text-primary-text my-2 text-lg">
|
||||
<a href="{{ .Permalink }}" class="text-eureka hover:underline"
|
||||
>{{ .LinkTitle }}</a
|
||||
>
|
||||
</h2>
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
||||
3
layouts/docs/doc-list.html
Normal file
3
layouts/docs/doc-list.html
Normal file
@@ -0,0 +1,3 @@
|
||||
{{ define "main" }}
|
||||
{{ partial "components/doc-list" . }}
|
||||
{{ end }}
|
||||
6
layouts/docs/doc_list.html
Normal file
6
layouts/docs/doc_list.html
Normal file
@@ -0,0 +1,6 @@
|
||||
{{/* Deprecation warning(v1.0.0) starts */}}
|
||||
{{ define "main" }}
|
||||
{{ warnf "Value 'doc_list' of layout param in %q is deprecated and will be removed in Eureka v1.0.0. Please use 'doc-list' instead." .File.Path }}
|
||||
{{ partial "components/doc-list" . }}
|
||||
{{ end }}
|
||||
{{/* Deprecation warning(v1.0.0) ends */}}
|
||||
3
layouts/docs/list.html
Normal file
3
layouts/docs/list.html
Normal file
@@ -0,0 +1,3 @@
|
||||
{{ define "main" }}
|
||||
{{ partial "components/doc-layout" . }}
|
||||
{{ end }}
|
||||
3
layouts/docs/single.html
Normal file
3
layouts/docs/single.html
Normal file
@@ -0,0 +1,3 @@
|
||||
{{ define "main" }}
|
||||
{{ partial "components/doc-layout" . }}
|
||||
{{ end }}
|
||||
237
layouts/index.html
Normal file
237
layouts/index.html
Normal file
@@ -0,0 +1,237 @@
|
||||
{{- define "main" }}
|
||||
{{ $homepage := .Site.GetPage "homepage" }}
|
||||
{{ $widgets := $homepage.Resources }}
|
||||
{{ range $widgets }}
|
||||
{{ if .Params.widget.handler }}
|
||||
{{ partial "widgets/load" . }}
|
||||
{{ else }}
|
||||
{{ errorf "Failed to find widget param in %q" .Path }}
|
||||
{{ end }}
|
||||
|
||||
{{/* Deprecation warning(v1.0.0) starts */}}
|
||||
{{ else }}
|
||||
{{ warnf "Param 'hero' in params.toml is deprecated and will be removed in Eureka v1.0.0. See https://www.wangchucheng.com/en/docs/hugo-eureka/homepage-configuration/" }}
|
||||
<div class="bg-secondary-bg pl-scrollbar">
|
||||
<div class="mx-auto max-w-screen-xl">
|
||||
<div class="h-(screen-16) grid grid-cols-9 grid-rows-5">
|
||||
{{- $imgLeft := partial "utils/get-image" (dict "context" . "url" .Site.Params.hero.imgLeft) }}
|
||||
{{- with $imgLeft }}
|
||||
<div
|
||||
class="z-10 col-span-4 col-start-2 row-span-2 row-start-3 bg-cover bg-local shadow-2xl"
|
||||
style="background-image: url({{ . }});"
|
||||
></div>
|
||||
{{- end }}
|
||||
|
||||
|
||||
<div class="z-20 col-span-5 col-start-3 row-span-3 row-start-2">
|
||||
<div class="flex min-h-full flex-col items-center justify-center">
|
||||
<div class="-m-12 bg-white bg-opacity-75 p-12 shadow-2xl">
|
||||
<span
|
||||
class="text-2xl font-bold text-black text-opacity-75 md:text-3xl"
|
||||
>{{ .Site.Params.hero.slogan }}</span
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{- $imgRight := partial "utils/get-image" (dict "context" . "url" .Site.Params.hero.imgRight) }}
|
||||
{{- with $imgRight }}
|
||||
<div
|
||||
class="col-span-4 col-start-5 row-span-2 row-start-2 bg-cover bg-local shadow-2xl"
|
||||
style="background-image: url({{ . }});"
|
||||
></div>
|
||||
{{- end }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="pl-scrollbar">
|
||||
<div class="mx-auto max-w-screen-xl">
|
||||
<div class="pt-12 md:px-4 xl:px-8">
|
||||
{{- $pages := where site.RegularPages "Type" "in" site.Params.mainSections }}
|
||||
{{- partial "components/masonry" $pages }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{/* Deprecation warning(v1.0.0) ends */}}
|
||||
|
||||
{{ end }}
|
||||
{{- end }}
|
||||
|
||||
{{ define "partials/widgets/load" }}
|
||||
{{ $widget := .Params.widget }}
|
||||
|
||||
{{ $fullScreenWidgets := slice "vintage" }}
|
||||
|
||||
{{/* background config */}}
|
||||
{{ $backgroundClass := "" }}
|
||||
{{ $backgroundStyle := "" }}
|
||||
|
||||
{{ if $widget.background.image }}
|
||||
{{ $image := partial "utils/get-image.html" (dict "context" . "url" $widget.background.image) }}
|
||||
{{ $backgroundStyle = print $backgroundStyle "background-image: url(" $image ");" }}
|
||||
{{/* background size */}}
|
||||
{{ $size := $widget.background.size }}
|
||||
{{ $sizeOptions := dict "auto" "bg-auto" "cover" "bg-cover" "contain" "bg-contain" }}
|
||||
{{ if $size }}
|
||||
{{ $size = index $sizeOptions $size }}
|
||||
{{ if $size }}
|
||||
{{ $backgroundClass = print $backgroundClass " " $size }}
|
||||
{{ else }}
|
||||
{{/* TODO error */}}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{/* background position */}}
|
||||
{{ $position := $widget.background.position }}
|
||||
{{ $positionOptions := dict "center" "bg-center" "top" "bg-top" "right" "bg-right" "bottom" "bg-bottom" "left" "bg-left" }}
|
||||
{{ if $position }}
|
||||
{{ $position = index $positionOptions $position }}
|
||||
{{ if $position }}
|
||||
{{ $backgroundClass = print $backgroundClass " " $position }}
|
||||
{{ else }}
|
||||
{{/* TODO error */}}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{/* background position */}}
|
||||
{{ $attachment := $widget.background.attachment }}
|
||||
{{ $attachmentOptions := dict "fixed" "bg-fixed" "local" "bg-local" "scroll" "bg-scroll" }}
|
||||
{{ if $attachment }}
|
||||
{{ $attachment = index $attachmentOptions $attachment }}
|
||||
{{ if $attachment }}
|
||||
{{ $backgroundClass = print $backgroundClass " " $attachment }}
|
||||
{{ else }}
|
||||
{{/* TODO error */}}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{ else }}
|
||||
{{/* background color */}}
|
||||
{{ $color := $widget.background.color }}
|
||||
{{ $colorOptions := dict "primary" "bg-primary-bg" "secondary" "bg-secondary-bg" "tertiary" "bg-tertiary-bg" }}
|
||||
{{ if $color }}
|
||||
{{ $colorClass := index $colorOptions $color }}
|
||||
{{ if $colorClass }}
|
||||
{{ $backgroundClass = print $backgroundClass " " $colorClass }}
|
||||
{{ else }}
|
||||
{{ $backgroundStyle = print $backgroundStyle "background-color: " $color ";" }}
|
||||
{{ end }}
|
||||
{{ else }}
|
||||
{{ $colorClass := index $colorOptions "primary" }}
|
||||
{{ $backgroundClass = print $backgroundClass " " $colorClass }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{/* widget config */}}
|
||||
{{ $widgetClass := "" }}
|
||||
|
||||
{{ if not (in $fullScreenWidgets $widget.handler) }}
|
||||
{{/* widget width */}}
|
||||
{{ $width := $widget.width }}
|
||||
{{ $widthOptions := dict "sm" "lg:w-2/3" "md" "lg:w-3/4" "lg" "lg:w-4/5" "xl" "w-full" }}
|
||||
{{ if $width }}
|
||||
{{ $widthClass := index $widthOptions $width }}
|
||||
{{ if $widthClass }}
|
||||
{{ $widgetClass = print $widgetClass " " $widthClass }}
|
||||
{{ end }}
|
||||
{{ else }}
|
||||
{{ $widthClass := index $widthOptions "md" }}
|
||||
{{ $widgetClass = print $widgetClass " " $widthClass }}
|
||||
{{ end }}
|
||||
|
||||
{{/* widget height */}}
|
||||
{{ $height := $widget.height }}
|
||||
{{ $heightOptions := dict "sm" "h-64" "md" "h-96" "lg" "h-128" "xl" "h-160" "screen" "h-(screen-16)" }}
|
||||
{{ if $height }}
|
||||
{{ $heightClass := index $heightOptions $height }}
|
||||
{{ if $heightClass }}
|
||||
{{ $widgetClass = print $widgetClass " " $heightClass }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ $widgetClass = print $widgetClass " mx-auto px-6 md:px-8 xl:px-12 py-12" }}
|
||||
{{ end }}
|
||||
|
||||
|
||||
<div
|
||||
class="pl-scrollbar {{ with $backgroundClass -}}
|
||||
{{ partial "utils/standardize-classes" . }}
|
||||
{{- end }}"
|
||||
{{ with $backgroundStyle }}style="{{ . | safeCSS }}"{{ end }}
|
||||
>
|
||||
<div class="mx-auto max-w-screen-xl">
|
||||
<div
|
||||
id="{{ .File.BaseFileName }}"
|
||||
class="{{ with $widgetClass -}}
|
||||
{{ partial "utils/standardize-classes" . }}
|
||||
{{- end }}"
|
||||
>
|
||||
{{ partial "widgets/load-sidebar" . }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
{{ define "partials/widgets/load-sidebar" }}
|
||||
{{ $sidebar := .Params.widget.sidebar }}
|
||||
|
||||
{{ if $sidebar.position }}
|
||||
|
||||
{{ $scaleClass := "" }}
|
||||
{{/* widget width */}}
|
||||
{{ $scale := $sidebar.scale }}
|
||||
{{ $scaleOptions := dict "sm" "lg:w-1/5" "md" "lg:w-1/4" "lg" "lg:w-1/3" "xl" "lg:w-1/2" }}
|
||||
{{ if $scale }}
|
||||
{{ $scaleClass = index $scaleOptions $scale }}
|
||||
{{ else }}
|
||||
{{ $scaleClass = index $scaleOptions "md" }}
|
||||
{{ end }}
|
||||
<div
|
||||
class="{{ if eq $sidebar.position "right" -}}
|
||||
lg:flex-row-reverse
|
||||
{{- else -}}
|
||||
lg:flex-row
|
||||
{{- end }} flex flex-col"
|
||||
>
|
||||
<div
|
||||
class="{{ with $scaleClass -}}
|
||||
{{ partial "utils/standardize-classes" . }}
|
||||
{{- end }} {{ if eq $sidebar.position "left" -}}
|
||||
lg:me-4
|
||||
{{- else -}}
|
||||
lg:ms-4
|
||||
{{- end }} flex-none"
|
||||
>
|
||||
<h2 class="my-4 text-3xl font-bold">{{ .Params.Title }}</h2>
|
||||
</div>
|
||||
<div
|
||||
class="{{ if eq $sidebar.position "right" -}}
|
||||
lg:me-4
|
||||
{{- else -}}
|
||||
lg:ms-4
|
||||
{{- end }} grow"
|
||||
>
|
||||
{{/* Deprecation warning(v1.0.0) starts */}}
|
||||
{{- if eq .Params.widget.handler "experiences" }}
|
||||
{{- warnf "Value `experiences` for `widget.handler` in %s is deprecated and will be removed in Eureka v1.0.0. Please use `experience` instead." .File.Path }}
|
||||
{{ partial (printf "widgets/%s" "experience") . }}
|
||||
{{- else }}
|
||||
{{/* Deprecation warning(v1.0.0) ends */}}
|
||||
{{ partial (printf "widgets/%s" .Params.widget.handler) . }}
|
||||
{{/* Deprecation warning(v1.0.0) starts */}}
|
||||
{{- end }}
|
||||
{{/* Deprecation warning(v1.0.0) ends */}}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
{{ else }}
|
||||
{{/* Deprecation warning(v1.0.0) starts */}}
|
||||
{{- if eq .Params.widget.handler "experiences" }}
|
||||
{{- warnf "Value `experiences` for `widget.handler` in %s is deprecated and will be removed in Eureka v1.0.0. Please use `experience` instead." .File.Path }}
|
||||
{{ partial (printf "widgets/%s" "experience") . }}
|
||||
{{- else }}
|
||||
{{/* Deprecation warning(v1.0.0) ends */}}
|
||||
{{ partial (printf "widgets/%s" .Params.widget.handler) . }}
|
||||
{{/* Deprecation warning(v1.0.0) starts */}}
|
||||
{{- end }}
|
||||
{{/* Deprecation warning(v1.0.0) ends */}}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
22
layouts/partials/comment.html
Normal file
22
layouts/partials/comment.html
Normal file
@@ -0,0 +1,22 @@
|
||||
{{/* Deprecation warning(v1.0.0) starts */}}
|
||||
{{- if .Site.Params.comment.platform }}
|
||||
{{- warnf "Param `comment.platform` in params.yaml is deprecated and will be removed in Eureka v1.0.0. Please use `comment.handler` instead." }}
|
||||
{{- end }}
|
||||
{{- $commentHandler := .Site.Params.comment.handler | default .Site.Params.comment.platform }}
|
||||
{{/* Deprecation warning(v1.0.0) ends */}}
|
||||
|
||||
{{- $enableComment := false }}
|
||||
|
||||
{{- if $commentHandler }}
|
||||
{{- $bundles := partial "utils/get-bundles" . }}
|
||||
{{- $enableComment = true }}
|
||||
{{- range $bundles.Reverse }}
|
||||
{{- if and (ne .Params.enableComment nil) (ne .Params.enableComment "") }}
|
||||
{{- $enableComment = .Params.enableComment }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{ if $enableComment }}
|
||||
{{ partial (printf "comment/%s" $commentHandler) . }}
|
||||
{{ end }}
|
||||
5
layouts/partials/comment/commento.html
Normal file
5
layouts/partials/comment/commento.html
Normal file
@@ -0,0 +1,5 @@
|
||||
<div id="commento"></div>
|
||||
<script defer
|
||||
src="{{ .Site.Params.comment.commento.url | default "https://cdn.commento.io"}}/js/commento.js">
|
||||
</script>
|
||||
<noscript>Please enable JavaScript to load the comments.</noscript>
|
||||
22
layouts/partials/comment/disqus.html
Normal file
22
layouts/partials/comment/disqus.html
Normal file
@@ -0,0 +1,22 @@
|
||||
{{ if .Site.Params.comment.disqus.shortname }}
|
||||
<div id="disqus_thread"></div>
|
||||
<script>
|
||||
var disqus_config = function () {
|
||||
{{ with .Site.Params.comment.disqus.identifier }}this.page.identifier = '{{ . }}';{{ end }}
|
||||
{{ with .Site.Params.comment.disqus.title }}this.page.title = '{{ . }}';{{ end }}
|
||||
{{ with .Site.Params.comment.disqus.url }}this.page.url = '{{ . | html }}';{{ end }}
|
||||
};
|
||||
(function() {
|
||||
if (["localhost", "127.0.0.1"].indexOf(window.location.hostname) != -1) {
|
||||
document.getElementById('disqus_thread').innerHTML = 'Disqus comments not available by default when the website is previewed locally.';
|
||||
return;
|
||||
}
|
||||
var d = document, s = d.createElement('script'); s.async = true;
|
||||
s.src = '//' + {{ .Site.Params.comment.disqus.shortname }} + '.disqus.com/embed.js';
|
||||
s.setAttribute('data-timestamp', +new Date());
|
||||
(d.head || d.body).appendChild(s);
|
||||
})();
|
||||
</script>
|
||||
<noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
|
||||
<a href="https://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
|
||||
{{ end }}
|
||||
38
layouts/partials/comment/utterances.html
Normal file
38
layouts/partials/comment/utterances.html
Normal file
@@ -0,0 +1,38 @@
|
||||
<script id="utterances" src="https://utteranc.es/client.js"
|
||||
{{- range $key, $value := .Site.Params.comment.utterances }}
|
||||
{{- if and (eq $key "theme") (eq $value "eureka") }}
|
||||
{{- if eq $.Site.Params.colorScheme "light" }}
|
||||
{{ printf "%s=%v" $key "github-light" | safeHTMLAttr }}
|
||||
{{- else if eq $.Site.Params.colorScheme "dark" }}
|
||||
{{ printf "%s=%v" $key "github-dark" | safeHTMLAttr }}
|
||||
{{- else }}
|
||||
{{ printf "%s=%v" $key "preferred-color-scheme" | safeHTMLAttr }}
|
||||
{{- end }}
|
||||
{{- else if or $value (eq $value false) }}
|
||||
{{ printf "%s=%v" $key $value | safeHTMLAttr }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
crossorigin="anonymous"
|
||||
async>
|
||||
</script>
|
||||
<script>
|
||||
{{- if eq .Site.Params.colorScheme "light" }}
|
||||
if (storageColorScheme == "Auto") {
|
||||
document.getElementById('utterances').setAttribute('theme', 'preferred-color-scheme')
|
||||
} else if (storageColorScheme == "Dark") {
|
||||
document.getElementById('utterances').setAttribute('theme', 'github-dark')
|
||||
}
|
||||
{{- else if eq .Site.Params.colorScheme "dark" }}
|
||||
if (storageColorScheme == "Auto") {
|
||||
document.getElementById('utterances').setAttribute('theme', 'preferred-color-scheme')
|
||||
} else if (storageColorScheme == "Light") {
|
||||
document.getElementById('utterances').setAttribute('theme', 'github-light')
|
||||
}
|
||||
{{- else }}
|
||||
if (storageColorScheme == "Light") {
|
||||
document.getElementById('utterances').setAttribute('theme', 'github-light')
|
||||
} else if (storageColorScheme == "Dark") {
|
||||
document.getElementById('utterances').setAttribute('theme', 'github-dark')
|
||||
}
|
||||
{{- end }}
|
||||
</script>
|
||||
14
layouts/partials/comment/valine.html
Normal file
14
layouts/partials/comment/valine.html
Normal file
@@ -0,0 +1,14 @@
|
||||
<div id="valine-comments" class="mt-4"></div>
|
||||
{{- $assets := .Site.Data.assets }}
|
||||
<script defer src="{{ printf $assets.valine.js.url $assets.valine.version }}" {{ with $assets.valine.js.sri }}
|
||||
integrity="{{ . }}" {{ end }} crossorigin></script>
|
||||
{{- with .Site.Params.comment.valine }}
|
||||
<script>
|
||||
document.addEventListener("DOMContentLoaded", function () {
|
||||
new Valine({
|
||||
el: "#valine-comments",
|
||||
{{- partial "utils/get-js-configs" . | safeJS }}
|
||||
})
|
||||
});
|
||||
</script>
|
||||
{{- end }}
|
||||
159
layouts/partials/components/doc-layout.html
Normal file
159
layouts/partials/components/doc-layout.html
Normal file
@@ -0,0 +1,159 @@
|
||||
{{ $hasToc := and (in .TableOfContents "<li>" ) (.Params.toc) }}
|
||||
{{ $hasSidebar := or ($hasToc) (.Params.series) }}
|
||||
<div class="lg:pt-12">
|
||||
<div class="flex flex-col md:flex-row bg-secondary-bg rounded">
|
||||
<div class="md:w-1/4 lg:w-1/5 border-e">
|
||||
<div class="sticky top-16 pt-6">
|
||||
{{ template "doc-sidebar" (dict "context" . "permalink" .Permalink) }}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="w-full md:w-3/4 lg:w-4/5 pb-8 pt-2 md:pt-8">
|
||||
<div class="flex">
|
||||
<div class="w-full lg:w-3/4 px-6">
|
||||
{{ partial "components/post-article" . }}
|
||||
|
||||
{{ with .GetTerms "tags" }}
|
||||
{{ partial "components/post-tags" . }}
|
||||
{{ end }}
|
||||
{{ with .GetTerms "authors" }}
|
||||
{{ partial "components/post-author" . }}
|
||||
{{ end }}
|
||||
|
||||
{{ partial "components/post-edit" . }}
|
||||
|
||||
{{ partial "components/post-footer" . }}
|
||||
{{ partial "comment" . }}
|
||||
</div>
|
||||
{{ if $hasSidebar}}
|
||||
<div class="hidden lg:block lg:w-1/4">
|
||||
{{ if ne $hasToc false }}
|
||||
{{ partial "components/post-toc" . }}
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
document.addEventListener('DOMContentLoaded', () => {
|
||||
{{/* highlight.js */}}
|
||||
{{- if eq .Site.Params.highlight.handler "highlightjs" }}
|
||||
hljs.highlightAll();
|
||||
{{- end }}
|
||||
changeSidebarHeight();
|
||||
switchDocToc();
|
||||
})
|
||||
</script>
|
||||
|
||||
{{ define "doc-sidebar" }}
|
||||
{{/* Deprecation warning(v1.0.0) starts */}}
|
||||
{{ $parentLayout := partial "utils/hyphenate" (.context.Parent.Layout | default .context.Parent.Type) }}
|
||||
{{/* Deprecation warning(v1.0.0) ends */}}
|
||||
{{ if eq $parentLayout "doc-list" }}
|
||||
{{ template "list-pages" (dict "context" .context "permalink" .permalink) }}
|
||||
{{ else if (findRE "v?(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?/$" .context.Permalink) }}
|
||||
{{ template "list-pages" (dict "context" .context "permalink" .permalink) }}
|
||||
{{ else }}
|
||||
{{ template "doc-sidebar" (dict "context" .context.Parent "permalink" .permalink) }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{ define "list-pages" }}
|
||||
<div id="sidebar-title" class="md:hidden mx-4 px-2 pt-4 pb-2 md:border-b text-tertiary-text md:text-primary-text">
|
||||
<span class="font-semibold">{{ i18n "toc" }}</span>
|
||||
<i class='fas {{ cond (eq .Site.Language.LanguageDirection "rtl") "fa-caret-left" "fa-caret-right" }} ms-1'></i>
|
||||
</div>
|
||||
|
||||
<div id="sidebar-toc"
|
||||
class="hidden md:block overflow-y-auto mx-6 md:mx-0 pe-6 pt-2 md:max-h-doc-sidebar bg-primary-bg md:bg-transparent">
|
||||
<div class="flex flex-wrap ms-4 -me-2 p-2 bg-secondary-bg md:bg-primary-bg rounded">
|
||||
<a class="{{ if eq .context.Permalink .permalink }}text-eureka{{ end }} hover:text-eureka"
|
||||
href="{{ .context.Permalink }}">{{ .context.LinkTitle }}</a>
|
||||
|
||||
{{ $versions := partial "get-versions" (dict "context" .context) }}
|
||||
{{ if $versions }}
|
||||
<div class="relative ms-2 cursor-pointer">
|
||||
<div id="doc-version" class="flex items-center bg-primary-bg md:bg-secondary-bg">
|
||||
{{ $version := findRE "v?(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?" .context.Permalink }}
|
||||
<span class="ms-2 me-1">{{ cond (gt (len $version) 0) (index $version 0) "latest" }}</span>
|
||||
<i class='fas {{ cond (eq .Site.Language.LanguageDirection "rtl") "fa-caret-left" "fa-caret-right" }} w-4 h-4 me-1'></i>
|
||||
</div>
|
||||
<div id="version-options" class="hidden absolute start-0 bg-secondary-bg rounded z-40">
|
||||
{{ range $index, $value := $versions }}
|
||||
{{ if eq $index 0 }}
|
||||
<div class="ms-2 me-8 my-1">
|
||||
<a class="" href="{{ $.context.Parent.Permalink }}">latest</a>
|
||||
</div>
|
||||
{{ end }}
|
||||
{{ $version := findRE "v?(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?" . }}
|
||||
<div class="ms-2 me-8 my-1">
|
||||
<a class="" href="{{ . }}">{{ index $version 0 }}</a>
|
||||
</div>
|
||||
{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="fixed hidden inset-0 opacity-0 h-full w-full cursor-default z-0" id="switch-canvas">
|
||||
</div>
|
||||
<script>
|
||||
document.addEventListener('DOMContentLoaded', () => {
|
||||
switchDocVersion();
|
||||
})
|
||||
</script>
|
||||
{{ end }}
|
||||
|
||||
|
||||
</div>
|
||||
{{ template "list-items" (dict "context" .context "permalink" .permalink) }}
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
{{ define "list-items"}}
|
||||
<ul class="ps-6">
|
||||
{{ range .context.Pages }}
|
||||
{{ $version := findRE "v?(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?/$" .Permalink }}
|
||||
{{ if eq (len $version) 0 }}
|
||||
<li class="py-2">
|
||||
<div class="{{ if .IsSection }} pb-2 {{ end }}">
|
||||
<a class="{{ if eq .Permalink $.permalink }} text-eureka {{ end }} hover:text-eureka"
|
||||
href="{{ .Permalink }}">{{ .LinkTitle }}</a>
|
||||
</div>
|
||||
{{ if .IsSection }}
|
||||
{{ template "list-items" (dict "context" . "permalink" $.permalink) }}
|
||||
{{ end }}
|
||||
</li>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</ul>
|
||||
{{ end }}
|
||||
|
||||
{{ define "partials/get-versions" }}
|
||||
{{/* Deprecation warning(v1.0.0) starts */}}
|
||||
{{ $parentLayout := partial "utils/hyphenate" (.context.Parent.Layout | default .context.Parent.Type) }}
|
||||
{{/* Deprecation warning(v1.0.0) ends */}}
|
||||
{{ if eq $parentLayout "doc-list" }}
|
||||
{{ range .context.Pages.Reverse }}
|
||||
{{ $hasVersion := findRE "v?(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?/$" .Permalink }}
|
||||
{{ if $hasVersion}}
|
||||
{{ $version := slice .Permalink }}
|
||||
{{ $.context.Scratch.Add "versions" $version }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ else }}
|
||||
{{ range .context.Parent.Pages.Reverse }}
|
||||
{{ $hasVersion := findRE "v?(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?/$" .Permalink }}
|
||||
{{ if $hasVersion }}
|
||||
{{ $version := slice .Permalink }}
|
||||
{{ $.context.Scratch.Add "versions" $version }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ $versions := .context.Scratch.Get "versions" }}
|
||||
{{ .context.Scratch.Delete "versions" }}
|
||||
{{ return $versions }}
|
||||
{{ end }}
|
||||
5
layouts/partials/components/doc-list.html
Normal file
5
layouts/partials/components/doc-list.html
Normal file
@@ -0,0 +1,5 @@
|
||||
{{ partial "components/list-article" . }}
|
||||
<div class="bg-secondary-bg rounded px-6">
|
||||
{{ partial "components/summary-list-plain" .Paginator.Pages }}
|
||||
</div>
|
||||
{{ template "_internal/pagination.html" . }}
|
||||
6
layouts/partials/components/list-article.html
Normal file
6
layouts/partials/components/list-article.html
Normal file
@@ -0,0 +1,6 @@
|
||||
<article class="prose mx-6 my-8">
|
||||
<h1>{{ .Title }}</h1>
|
||||
{{ with .Content }}
|
||||
{{ . }}
|
||||
{{ end }}
|
||||
</article>
|
||||
21
layouts/partials/components/masonry.html
Normal file
21
layouts/partials/components/masonry.html
Normal file
@@ -0,0 +1,21 @@
|
||||
{{ with . }}
|
||||
<div class="mx-4 xl:mx-16">
|
||||
<div class="flex flex-row items-center justify-between">
|
||||
<h2 class=" font-bold text-3xl my-4">{{ i18n "recent" }}</h2>
|
||||
</div>
|
||||
<div class="masonry grid grid-cols-1 md:grid-cols-2 xl:grid-cols-3 gap-8">
|
||||
{{ range first 10 . }}
|
||||
<div class="item">
|
||||
<div class="grid-content">
|
||||
{{ partial "components/summary-masonry" . }}
|
||||
</div>
|
||||
</div>
|
||||
{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
document.addEventListener('DOMContentLoaded', ()=>{
|
||||
enableMasonry()
|
||||
})
|
||||
</script>
|
||||
{{ end }}
|
||||
80
layouts/partials/components/opengraph.html
Normal file
80
layouts/partials/components/opengraph.html
Normal file
@@ -0,0 +1,80 @@
|
||||
<meta property="og:title" content="{{ partial "get-title" . }}" />
|
||||
<meta property="og:type" content="{{ if .IsPage }}article{{ else }}website{{ end }}" />
|
||||
{{ $icon := partial "utils/get-image" (dict "context" . "url" .Site.Params.icon) }}
|
||||
{{ with $icon }}
|
||||
<meta property="og:image" content="{{ . }}">
|
||||
{{ end }}
|
||||
|
||||
<meta property="og:url" content="{{ .Permalink }}" />
|
||||
|
||||
{{ with .Params.audio }}
|
||||
<meta property="og:audio" content="{{ . | absURL }}" />
|
||||
{{ end }}
|
||||
{{ with .Description }}
|
||||
<meta property="og:description" content="{{ . }}" />
|
||||
{{ else }}
|
||||
{{if .IsPage}}
|
||||
<meta property="og:description" content="{{ .Summary }}" />
|
||||
{{ else }}
|
||||
{{ with .Site.Params.Description }}
|
||||
<meta property="og:description" content="{{ . }}" />
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{ with .Site.LanguageCode }}
|
||||
<meta property="og:locale" content="{{ . }}" />
|
||||
{{ end }}
|
||||
{{ if .IsTranslated }}
|
||||
{{ range .Translations }}
|
||||
<meta property="og:locale:alternate" content="{{ .Lang }}" />
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{ with .Site.Title }}
|
||||
<meta property="og:site_name" content="{{ . }}" />
|
||||
{{ end }}
|
||||
|
||||
{{ with .Params.videos }}
|
||||
{{ range . }}
|
||||
<meta property="og:video" content="{{ . | absURL }}" />
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{ if .IsPage }}
|
||||
{{ if not .PublishDate.IsZero }}
|
||||
<meta property="article:published_time" content="{{ .PublishDate.Format "2006-01-02T15:04:05-07:00" | safeHTML }}" />
|
||||
{{ else if not .Date.IsZero }}
|
||||
<meta property="article:published_time" content="{{ .Date.Format "2006-01-02T15:04:05-07:00" | safeHTML }}" />
|
||||
{{ end }}
|
||||
{{ if not .Lastmod.IsZero }}
|
||||
<meta property="article:modified_time" content="{{ .Lastmod.Format "2006-01-02T15:04:05-07:00" | safeHTML }}" />
|
||||
{{ end }}
|
||||
{{ else }}
|
||||
{{ if not .Date.IsZero }}
|
||||
<meta property="og:updated_time" content="{{ .Date.Format "2006-01-02T15:04:05-07:00" | safeHTML }}" />
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
<meta property="article:section" content="{{ .Section }}" />
|
||||
{{ with .Params.tags }}
|
||||
{{ range first 6 . }}
|
||||
<meta property="article:tag" content="{{ . }}" />
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{ if .GetTerms "series" }}
|
||||
{{ $pageLink := .Permalink }}
|
||||
{{ $series := .Site.Taxonomies.series}}
|
||||
{{ range (.GetTerms "series") }}
|
||||
{{ range .Pages }}
|
||||
{{ if ne .Page.Permalink $pageLink }}
|
||||
<meta property="og:see_also" content="{{ .Page.Permalink }}" />
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ else if (.Site.RegularPages.Related .) }}
|
||||
{{ range (.Site.RegularPages.Related . | first 6) }}
|
||||
<meta property="og:see_also" content="{{ .Page.Permalink }}" />
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
12
layouts/partials/components/post-article.html
Normal file
12
layouts/partials/components/post-article.html
Normal file
@@ -0,0 +1,12 @@
|
||||
<article class="prose">
|
||||
<h1 class="mb-4">{{ .Title }}</h1>
|
||||
|
||||
{{ partial "components/post-metadata" . }}
|
||||
|
||||
{{ $featured := partial "utils/get-featured" . }}
|
||||
{{ with $featured }}
|
||||
{{ . }}
|
||||
{{ end }}
|
||||
|
||||
{{ .Content }}
|
||||
</article>
|
||||
36
layouts/partials/components/post-author.html
Normal file
36
layouts/partials/components/post-author.html
Normal file
@@ -0,0 +1,36 @@
|
||||
<div class="py-2">
|
||||
{{ range . }}
|
||||
<div class="my-8 flex flex-col items-center md:flex-row">
|
||||
<a href="{{ .Permalink }}" class="md:me-4 text-primary-text h-24 w-24">
|
||||
{{ $img := partial "utils/get-image" (dict "context" . "url" .Params.avatar "keyword" "*avatar*") }}
|
||||
{{ with $img }}
|
||||
<img
|
||||
src="{{ . }}"
|
||||
class="bg-primary-bg w-full rounded-full"
|
||||
alt="Avatar"
|
||||
/>
|
||||
{{ else }}
|
||||
<i class="fas fa-user-circle fa-6x"></i>
|
||||
{{ end }}
|
||||
</a>
|
||||
<div class="mt-4 w-full md:mt-0 md:w-auto">
|
||||
<a
|
||||
href="{{ .Permalink }}"
|
||||
class="mb-2 block border-b pb-1 text-lg font-bold"
|
||||
>
|
||||
<h3>{{ .LinkTitle }}</h3>
|
||||
</a>
|
||||
<span class="block pb-2">{{ .Params.bio }}</span>
|
||||
{{ range .Params.social }}
|
||||
{{/* Deprecation warning(v1.0.0) starts */}}
|
||||
{{ $iconPack := .iconPack | default .icon_pack }}
|
||||
{{/* Deprecation warning(v1.0.0) ends */}}
|
||||
{{ $src := print $iconPack " fa-" .icon }}
|
||||
<a href="{{ .url }}" class="me-2">
|
||||
<i class="{{ print $src }}"></i>
|
||||
</a>
|
||||
{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
{{ end }}
|
||||
</div>
|
||||
51
layouts/partials/components/post-edit.html
Normal file
51
layouts/partials/components/post-edit.html
Normal file
@@ -0,0 +1,51 @@
|
||||
{{- $editMap := partial "get-edit-url" . }}
|
||||
{{- if or .Site.Params.repoEditURL $editMap.repoEditURL }}
|
||||
<div class="flex md:justify-end my-4">
|
||||
{{- $contentDir := cond .Site.IsMultiLingual .Site.Params.contentDir "/content/" }}
|
||||
{{- $filePath := ""}}
|
||||
{{- if $editMap.fileDir }}
|
||||
{{- $filePath = strings.TrimPrefix $editMap.fileDir .File.Path }}
|
||||
{{- else }}
|
||||
{{- $filePath = path.Join $contentDir .File.Path }}
|
||||
{{- end }}
|
||||
|
||||
{{- $repoEditURL := cond (ne $editMap.repoEditURL "") $editMap.repoEditURL .Site.Params.repoEditURL }}
|
||||
{{- $path := path.Join $repoEditURL $filePath }}
|
||||
{{- $path = replace $path "http:/" "http://" 1 }}
|
||||
{{- $path = replace $path "https:/" "https://" 1 }}
|
||||
|
||||
<a href="{{ $path }}" title="Edit this page">
|
||||
<i class="fas fa-edit me-1"></i>
|
||||
<span>{{ i18n "editThisPage" }}</span>
|
||||
</a>
|
||||
</div>
|
||||
{{/* Deprecation warning(v1.0.0) starts */}}
|
||||
{{- else if .Site.Params.repoURL }}
|
||||
{{ warnf "Param 'repoURL' in params.yaml is deprecated and will be removed in Eureka v1.0.0. See https://www.wangchucheng.com/en/docs/hugo-eureka/customization/#params-config-file" }}
|
||||
<div class="flex md:justify-end my-4">
|
||||
{{- $repoEditURL := path.Join .Site.Params.repoURL "/blob/master/" }}
|
||||
{{ $contentDir := cond .Site.IsMultiLingual .Site.Params.contentDir "/content/" }}
|
||||
{{ $path := path.Join $repoEditURL $contentDir .File.Path }}
|
||||
{{ $path = replace $path "http:/" "http://" 1 }}
|
||||
{{ $path = replace $path "https:/" "https://" 1 }}
|
||||
|
||||
<a href="{{ $path }}" title="Edit this page">
|
||||
<i class="fas fa-edit me-1"></i>
|
||||
<span>{{ i18n "editThisPage" }}</span>
|
||||
</a>
|
||||
</div>
|
||||
{{/* Deprecation warning(v1.0.0) ends */}}
|
||||
{{- end }}
|
||||
|
||||
{{ define "partials/get-edit-url" }}
|
||||
{{ $repoEditURL := "" }}
|
||||
{{ $fileDir := "" }}
|
||||
{{ $bundles := partial "utils/get-bundles" . }}
|
||||
{{ range $bundles.Reverse }}
|
||||
{{ if .Params.repoEditURL }}
|
||||
{{ $repoEditURL = .Params.repoEditURL }}
|
||||
{{ $fileDir = .File.Dir }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ return (dict "repoEditURL" $repoEditURL "fileDir" $fileDir) }}
|
||||
{{ end }}
|
||||
20
layouts/partials/components/post-footer.html
Normal file
20
layouts/partials/components/post-footer.html
Normal file
@@ -0,0 +1,20 @@
|
||||
{{ if or .PrevInSection .NextInSection }}
|
||||
<div
|
||||
class="-mx-2 mt-4 flex flex-col border-t px-2 pt-4 md:flex-row md:justify-between"
|
||||
>
|
||||
<div>
|
||||
{{ with .NextInSection }}
|
||||
<span class="text-primary-text block font-bold"
|
||||
>{{ i18n "previous" }}</span
|
||||
>
|
||||
<a href="{{ .Permalink }}" class="block">{{ .LinkTitle }}</a>
|
||||
{{ end }}
|
||||
</div>
|
||||
<div class="mt-4 md:mt-0 md:text-right">
|
||||
{{ with .PrevInSection }}
|
||||
<span class="text-primary-text block font-bold">{{ i18n "next" }}</span>
|
||||
<a href="{{ .Permalink }}" class="block">{{ .LinkTitle }}</a>
|
||||
{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
{{ end }}
|
||||
42
layouts/partials/components/post-metadata.html
Normal file
42
layouts/partials/components/post-metadata.html
Normal file
@@ -0,0 +1,42 @@
|
||||
<div
|
||||
class="text-tertiary-text not-prose mt-2 flex flex-row flex-wrap items-center"
|
||||
>
|
||||
<div class="me-6 my-2">
|
||||
<i class="fas fa-calendar me-1"></i>
|
||||
<span
|
||||
>{{ .Date.Format (.Site.Params.dateFormat | default "2006-01-02") }}</span
|
||||
>
|
||||
</div>
|
||||
<div class="me-6 my-2">
|
||||
<i class="fas fa-clock me-1"></i>
|
||||
<span>{{ i18n "readingTime" .ReadingTime }}</span>
|
||||
</div>
|
||||
|
||||
{{ with .GetTerms "categories" }}
|
||||
<div class="me-6 my-2">
|
||||
<i class="fas fa-folder me-1"></i>
|
||||
{{ range $index, $value := . }}
|
||||
{{ if gt $index 0 }}
|
||||
<span>, </span>
|
||||
{{ end -}}
|
||||
<a href="{{ .Permalink }}" class="hover:text-eureka"
|
||||
>{{ .LinkTitle }}</a
|
||||
>
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
{{ with .GetTerms "series" }}
|
||||
<div class="me-6 my-2">
|
||||
<i class="fas fa-th-list me-1"></i>
|
||||
{{ range $index, $value := . }}
|
||||
{{ if gt $index 0 }}
|
||||
<span>, </span>
|
||||
{{ end -}}
|
||||
<a href="{{ .Permalink }}" class="hover:text-eureka"
|
||||
>{{ .LinkTitle }}</a
|
||||
>
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
||||
</div>
|
||||
10
layouts/partials/components/post-series.html
Normal file
10
layouts/partials/components/post-series.html
Normal file
@@ -0,0 +1,10 @@
|
||||
{{ $series := .Site.Taxonomies.series }}
|
||||
<div class="bg-secondary-bg prose max-w-none rounded p-6">
|
||||
<h3>{{ i18n "seriesOfPosts" }}</h3>
|
||||
{{ range (.GetTerms "series") }}
|
||||
{{ range .Pages }}
|
||||
<a href="{{ .Permalink }}" class="no-underline">{{ .LinkTitle }}</a>
|
||||
<br />
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</div>
|
||||
5
layouts/partials/components/post-tags.html
Normal file
5
layouts/partials/components/post-tags.html
Normal file
@@ -0,0 +1,5 @@
|
||||
<div class="my-4">
|
||||
{{ range $index, $value := . }}
|
||||
<a href="{{ .Permalink }}" class="inline-block bg-tertiary-bg text-sm rounded px-3 py-1 my-1 me-2 hover:text-eureka">#{{ .LinkTitle }}</a>
|
||||
{{ end }}
|
||||
</div>
|
||||
21
layouts/partials/components/post-toc.html
Normal file
21
layouts/partials/components/post-toc.html
Normal file
@@ -0,0 +1,21 @@
|
||||
<div
|
||||
class="{{ if eq .Type "docs" }}
|
||||
bg-secondary-bg
|
||||
{{ else }}
|
||||
bg-primary-bg
|
||||
{{ end }} prose sticky top-16 z-10 hidden px-6 py-4 lg:block"
|
||||
>
|
||||
<h3>{{ i18n "onThisPage" }}</h3>
|
||||
</div>
|
||||
<div
|
||||
class="sticky-toc {{ if eq .Type "docs" }}
|
||||
border-s
|
||||
{{ end }} hidden px-6 pb-6 lg:block"
|
||||
>
|
||||
{{ .TableOfContents }}
|
||||
</div>
|
||||
<script>
|
||||
window.addEventListener("DOMContentLoaded", () => {
|
||||
enableStickyToc();
|
||||
});
|
||||
</script>
|
||||
29
layouts/partials/components/schema-node.html
Normal file
29
layouts/partials/components/schema-node.html
Normal file
@@ -0,0 +1,29 @@
|
||||
{{- $paginator := .Paginate .Pages }}
|
||||
{{- $pages := .Paginator.Pages }}
|
||||
{{- if eq .Type "authors" }}
|
||||
{{- $pages = .Pages }}
|
||||
{{- end }}
|
||||
{{- with $pages }}
|
||||
<script type="application/ld+json">
|
||||
{
|
||||
"@context":"https://schema.org",
|
||||
"@type":"ItemList",
|
||||
"itemListElement":[
|
||||
{{- range $index, $value := . -}}
|
||||
{{- if gt $index 0 -}},{{- end -}}
|
||||
{
|
||||
"@type":"ListItem",
|
||||
"position": {{ add $index 1 }},
|
||||
"name": {{ .Title }},
|
||||
"description": {{ if .Description }}{{ .Description }}{{ else if .Summary }}{{ .Summary }}{{ else if .Site.Params.Description }}{{ .Site.Params.Description }}{{ end }},
|
||||
{{- $img := partial "utils/get-image" (dict "context" . "url" .Params.featuredImage "keyword" "*featured*") }}
|
||||
{{- with $img }}
|
||||
"image": {{ . }},
|
||||
{{- end }}
|
||||
"url": {{ .Permalink }}
|
||||
}
|
||||
{{- end }}
|
||||
]
|
||||
}
|
||||
</script>
|
||||
{{- end }}
|
||||
62
layouts/partials/components/schema-page.html
Normal file
62
layouts/partials/components/schema-page.html
Normal file
@@ -0,0 +1,62 @@
|
||||
<script type="application/ld+json">
|
||||
{
|
||||
"@context": "https://schema.org",
|
||||
"@type": "Article",
|
||||
"mainEntityOfPage": {
|
||||
"@type": "WebPage",
|
||||
"@id": {{ .Permalink }}
|
||||
},
|
||||
"headline": "{{ partial "get-title" . }}",
|
||||
{{- $img := partial "utils/get-image" (dict "context" . "url" .Params.featuredImage "keyword" "*featured*") }}
|
||||
{{- with $img }}
|
||||
"image": {{ . }},
|
||||
{{ end -}}
|
||||
|
||||
{{ if .IsPage -}}
|
||||
{{ if not .PublishDate.IsZero -}}
|
||||
"datePublished": {{ .PublishDate.Format "2006-01-02T15:04:05-07:00" }},
|
||||
{{ else if not .Date.IsZero -}}
|
||||
"datePublished": {{ .Date.Format "2006-01-02T15:04:05-07:00" }},
|
||||
{{ end -}}
|
||||
{{ if not .Lastmod.IsZero -}}
|
||||
"dateModified": {{ .Lastmod.Format "2006-01-02T15:04:05-07:00" }},
|
||||
{{ end -}}
|
||||
{{ end -}}
|
||||
|
||||
{{ with .WordCount -}}
|
||||
"wordCount": {{ . }},
|
||||
{{ end -}}
|
||||
{{ with .Params.authors -}}
|
||||
"author": {
|
||||
"@type": "Person",
|
||||
"name": {{ . }}
|
||||
},
|
||||
{{ end -}}
|
||||
"publisher": {
|
||||
{{ with .Site.Params.siteType -}}
|
||||
"@type": {{ . }},
|
||||
{{ else -}}
|
||||
"@type": "Person",
|
||||
{{ end -}}
|
||||
{{ with .Site.Params.publisherName -}}
|
||||
"name": {{ . }},
|
||||
{{ else -}}
|
||||
"name": {{ .Site.Title }},
|
||||
{{ end -}}
|
||||
{{ $publisherLogo := partial "utils/get-image" (dict "context" . "url" .Site.Params.publisherLogo) -}}
|
||||
{{ $icon := partial "utils/get-image" (dict "context" . "url" .Site.Params.icon) -}}
|
||||
{{ if $publisherLogo -}}
|
||||
"logo": {
|
||||
"@type": "ImageObject",
|
||||
"url": {{ $publisherLogo }}
|
||||
}
|
||||
{{ else if $icon -}}
|
||||
"logo": {
|
||||
"@type": "ImageObject",
|
||||
"url": {{ $icon }}
|
||||
}
|
||||
{{ end -}}
|
||||
},
|
||||
"description": "{{ if .Description }}{{ .Description }}{{ else if .Summary }}{{ .Summary }}{{ else if .Site.Params.Description }}{{ .Site.Params.Description }}{{ end }}"
|
||||
}
|
||||
</script>
|
||||
34
layouts/partials/components/schema.html
Normal file
34
layouts/partials/components/schema.html
Normal file
@@ -0,0 +1,34 @@
|
||||
<meta name="description"
|
||||
content="{{ if .Description }}{{ .Description }}{{ else if .Summary }}{{ .Summary }}{{ else if .Site.Params.Description }}{{ .Site.Params.Description }}{{ end }}">
|
||||
|
||||
{{- $bundles := partial "utils/get-bundles" . }}
|
||||
{{- if gt (len $bundles) 1 }}
|
||||
<script type="application/ld+json">
|
||||
{
|
||||
"@context": "https://schema.org",
|
||||
"@type": "BreadcrumbList",
|
||||
"itemListElement": [
|
||||
{{- range $index, $value := $bundles.Reverse -}}
|
||||
{{- if gt $index 0 -}},{{- end -}}
|
||||
{
|
||||
"@type": "ListItem",
|
||||
"position": {{- add $index 1 -}},
|
||||
"name": {{- .LinkTitle -}},
|
||||
"item": {{- .Permalink -}}
|
||||
}
|
||||
{{- end -}}
|
||||
]
|
||||
}
|
||||
</script>
|
||||
{{- end }}
|
||||
|
||||
{{/* Deprecation warning(v1.0.0) starts */}}
|
||||
{{ $layout := partial "utils/hyphenate" (.Layout | default .Type) }}
|
||||
{{/* Deprecation warning(v1.0.0) ends */}}
|
||||
{{- if and (eq .Type "docs") (ne $layout "doc-list") }}
|
||||
{{- partial "components/schema-page" . }}
|
||||
{{- else if or (eq .Kind "section") (eq .Kind "term") }}
|
||||
{{- partial "components/schema-node" . }}
|
||||
{{- else if .IsPage }}
|
||||
{{- partial "components/schema-page" . }}
|
||||
{{- end }}
|
||||
3
layouts/partials/components/summary-card.html
Normal file
3
layouts/partials/components/summary-card.html
Normal file
@@ -0,0 +1,3 @@
|
||||
<div class="bg-secondary-bg rounded border hover:shadow-lg transition ease-in-out duration-200 px-6 pt-6 pb-4">
|
||||
{{ partial "components/summary-plain" . }}
|
||||
</div>
|
||||
5
layouts/partials/components/summary-list-card.html
Normal file
5
layouts/partials/components/summary-list-card.html
Normal file
@@ -0,0 +1,5 @@
|
||||
{{ range . }}
|
||||
<div class="mb-6">
|
||||
{{ partial "components/summary-card" . }}
|
||||
</div>
|
||||
{{ end }}
|
||||
15
layouts/partials/components/summary-list-masonry.html
Normal file
15
layouts/partials/components/summary-list-masonry.html
Normal file
@@ -0,0 +1,15 @@
|
||||
<div class="masonry grid grid-cols-1 md:grid-cols-2 xl:grid-cols-3 gap-8">
|
||||
{{ range . }}
|
||||
<div class="item">
|
||||
<div class="grid-content">
|
||||
{{ partial "components/summary-masonry" . }}
|
||||
</div>
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
</div>
|
||||
<script>
|
||||
document.addEventListener('DOMContentLoaded', () => {
|
||||
enableMasonry()
|
||||
})
|
||||
</script>
|
||||
8
layouts/partials/components/summary-list-plain.html
Normal file
8
layouts/partials/components/summary-list-plain.html
Normal file
@@ -0,0 +1,8 @@
|
||||
<div class="overflow-hidden divide-y">
|
||||
{{ range . }}
|
||||
<div class="py-6">
|
||||
{{ partial "components/summary-plain" . }}
|
||||
</div>
|
||||
{{ end }}
|
||||
</div>
|
||||
|
||||
19
layouts/partials/components/summary-masonry.html
Normal file
19
layouts/partials/components/summary-masonry.html
Normal file
@@ -0,0 +1,19 @@
|
||||
<div
|
||||
class="bg-secondary-bg dark:border-tertiary-bg overflow-hidden rounded border transition duration-200 ease-in-out hover:shadow-lg"
|
||||
>
|
||||
{{ $featured := partial "utils/get-featured" . }}
|
||||
{{ with $featured }}
|
||||
{{ . }}
|
||||
{{ end }}
|
||||
<div class="prose px-6 pt-6 pb-4">
|
||||
<a href="{{ .Permalink }}" class="no-underline">
|
||||
<h3 class="mt-0">{{ .LinkTitle }}</h3>
|
||||
</a>
|
||||
{{ if .Description }}
|
||||
{{ .Description | plainify | htmlUnescape }}
|
||||
{{ else if .Summary }}
|
||||
{{ .Summary | plainify | htmlUnescape }}
|
||||
{{ end }}
|
||||
{{ partial "components/post-metadata" . }}
|
||||
</div>
|
||||
</div>
|
||||
12
layouts/partials/components/summary-plain.html
Normal file
12
layouts/partials/components/summary-plain.html
Normal file
@@ -0,0 +1,12 @@
|
||||
<div class="flex flex-col-reverse lg:flex-row justify-between">
|
||||
{{ $featured := partial "utils/get-featured" . }}
|
||||
<div class="w-full {{ with $featured }}lg:w-2/3{{ end }}">
|
||||
{{ partial "utils/get-summary" . }}
|
||||
</div>
|
||||
|
||||
{{ with $featured }}
|
||||
<div class="w-full lg:w-1/3 mb-4 lg:mb-0 lg:ms-8">
|
||||
{{ . }}
|
||||
</div>
|
||||
{{ end }}
|
||||
</div>
|
||||
1
layouts/partials/custom-head.html
Normal file
1
layouts/partials/custom-head.html
Normal file
@@ -0,0 +1 @@
|
||||
{{/* Do not modify this file! */}}
|
||||
3
layouts/partials/footer.html
Normal file
3
layouts/partials/footer.html
Normal file
@@ -0,0 +1,3 @@
|
||||
<div class="text-center p-6 pin-b">
|
||||
<p class="text-sm text-tertiary-text">{{ with .Site.Copyright }}{{ replace . "{year}" now.Year | safeHTML }} · {{ end }} Powered by the <a href="https://github.com/wangchucheng/hugo-eureka" class="hover:text-eureka">Eureka</a> theme for <a href="https://gohugo.io" class="hover:text-eureka">Hugo</a></p>
|
||||
</div>
|
||||
186
layouts/partials/head.html
Normal file
186
layouts/partials/head.html
Normal file
@@ -0,0 +1,186 @@
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
||||
{{ define "partials/get-title" }}
|
||||
{{ $separator := .Site.Params.titleSeparator | default "|" }}
|
||||
{{ $primarySep := $separator }}
|
||||
{{ $secondarySep := $separator }}
|
||||
{{ if reflect.IsSlice $separator }}
|
||||
{{ $primarySep = index $separator 0 }}
|
||||
{{ $secondarySep = index $separator 1 | default (index $separator 0) }}
|
||||
{{ end }}
|
||||
{{ $title := .Site.Title }}
|
||||
{{/* Generate prefix */}}
|
||||
{{ $prefix := "" }}
|
||||
{{ if .Params.Title }}
|
||||
{{ $prefix = .Params.Title }}
|
||||
{{/* Deprecation warning(v1.0.0) starts */}}
|
||||
{{ $layout := partial "utils/hyphenate" (.Layout | default .Type) }}
|
||||
{{/* Deprecation warning(v1.0.0) ends */}}
|
||||
{{ if and (eq .Type "docs") (ne $layout "doc-list") }}
|
||||
{{ $docTitle := "" }}
|
||||
{{ $bundles := partial "utils/get-bundles" . }}
|
||||
{{ range $bundles.Reverse }}
|
||||
{{ $version := findRE "v?(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?" (path.Base .Permalink) }}
|
||||
{{/* Deprecation warning(v1.0.0) starts */}}
|
||||
{{ $parentLayout := partial "utils/hyphenate" (.Parent.Layout | default .Parent.Type) }}
|
||||
{{ $layout := partial "utils/hyphenate" (.Layout | default .Type) }}
|
||||
{{/* Deprecation warning(v1.0.0) ends */}}
|
||||
{{ if and (eq $parentLayout "doc-list") (ne $layout "doc-list") }}
|
||||
{{ $docTitle = .Title }}
|
||||
{{ else if $version }}
|
||||
{{ $docTitle = .Title }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{/* Doc title */}}
|
||||
{{ $version := findRE "v?(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?" (path.Base .Permalink) }}
|
||||
{{/* Deprecation warning(v1.0.0) starts */}}
|
||||
{{ $parentLayout := partial "utils/hyphenate" (.Parent.Layout | default .Parent.Type) }}
|
||||
{{/* Deprecation warning(v1.0.0) ends */}}
|
||||
{{ if or (eq $parentLayout "doc-list") $version }}
|
||||
{{ $prefix = $docTitle }}
|
||||
{{ else }}
|
||||
{{ $prefix = print $prefix " " $secondarySep " " $docTitle }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{/* Add prefix */}}
|
||||
{{ with $prefix }}
|
||||
{{ $title = print . " " $primarySep " " $title }}
|
||||
{{ end }}
|
||||
{{ return $title }}
|
||||
{{ end }}
|
||||
<title>{{ partial "get-title" . }}</title>
|
||||
|
||||
<meta name="generator" content="Hugo Eureka {{ .Site.Data.eureka.version }}" />
|
||||
|
||||
{{- $eurekaCSS := resources.Get "css/eureka.css" | postCSS (dict "config" "./assets/css/postcss.config.js" "inlineImports" true) | resources.ExecuteAsTemplate "css/eureka.css" . | minify | fingerprint "sha384" }}
|
||||
<link rel="stylesheet" href="{{ $eurekaCSS.Permalink }}">
|
||||
|
||||
{{- $eurekaJS := resources.Get "js/eureka.js" | resources.ExecuteAsTemplate "js/eureka.js" . | minify | fingerprint "sha384" }}
|
||||
<script defer src="{{ $eurekaJS.Permalink }}"></script>
|
||||
|
||||
{{ $googleFonts := "" }}
|
||||
{{ range $index, $value := partial "utils/get-style-fonts" (dict "context" . "param" "googleFonts") }}
|
||||
{{ with $value }}
|
||||
{{ $googleFonts = print $googleFonts "family=" . "&" }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{ with $googleFonts }}
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||
<link rel="preload"
|
||||
href="{{ printf "https://fonts.googleapis.com/css2?%sdisplay=swap" . }}"
|
||||
as="style" onload="this.onload=null;this.rel='stylesheet'">
|
||||
{{ end }}
|
||||
|
||||
{{- $assets := .Site.Data.assets }}
|
||||
|
||||
{{/* highlight */}}
|
||||
{{- if eq .Site.Params.highlight.handler "chroma" }}
|
||||
{{- $highlightCSS := resources.Get "css/syntax.css" | minify | fingerprint "sha384" }}
|
||||
<link rel="stylesheet" href="{{ $highlightCSS.Permalink }}" media="print" onload="this.media='all';this.onload=null">
|
||||
{{- else if eq .Site.Params.highlight.handler "highlightjs" }}
|
||||
{{- $highlightjsStyle := .Site.Params.highlight.highlightjs.style | default "base16/solarized-light" }}
|
||||
<link rel="stylesheet" href="{{ printf $assets.highlightjs.css.url $assets.highlightjs.version $highlightjsStyle }}"
|
||||
{{ with $assets.highlightjs.css.sri }} integrity="{{ . }}" {{ end }} media="print"
|
||||
onload="this.media='all';this.onload=null" crossorigin>
|
||||
<script defer src="{{ printf $assets.highlightjs.js.url $assets.highlightjs.version }}"
|
||||
{{ with $assets.highlightjs.js.sri }} integrity="{{ . }}" {{ end }} crossorigin></script>
|
||||
{{- range .Site.Params.highlight.highlightjs.languages }}
|
||||
<script defer src="{{ printf $assets.highlightjs.languages.url $assets.highlightjs.version . }}"
|
||||
{{ with $assets.highlightjs.languages.sri }} integrity="{{ . }}" {{ end }} crossorigin></script>
|
||||
{{- end }}
|
||||
{{- $highlightjsCSS := resources.Get "css/highlightjs.css" | minify | fingerprint "sha384" }}
|
||||
<link rel="stylesheet" href="{{ $highlightjsCSS.Permalink }}" media="print" onload="this.media='all';this.onload=null">
|
||||
{{- end }}
|
||||
|
||||
{{ $fontawesomeJS := resources.Get "js/fontawesome.js" | resources.ExecuteAsTemplate "js/fontawesome.js" . | js.Build (dict "minify" true) | minify | fingerprint "sha384" }}
|
||||
<script defer type="text/javascript" src="{{ $fontawesomeJS.Permalink }}"></script>
|
||||
|
||||
|
||||
{{- $enableMath := false }}
|
||||
{{- if .Site.Params.math.handler }}
|
||||
{{- $bundles := partial "utils/get-bundles" . }}
|
||||
{{- $enableMath = true }}
|
||||
{{- range $bundles.Reverse }}
|
||||
{{- if and (ne .Params.enableMath nil) (ne .Params.enableMath "") }}
|
||||
{{- $enableMath = .Params.enableMath }}
|
||||
{{/* Deprecation warning(v1.0.0) starts */}}
|
||||
{{- else if and (ne .Params.math nil) (ne .Params.math "") }}
|
||||
{{ warnf "Param 'math' in %q is deprecated and will be removed in Eureka v1.0.0. Please use 'enableMath' instead." .File.Path }}
|
||||
{{- $enableMath = .Params.math }}
|
||||
{{/* Deprecation warning(v1.0.0) ends */}}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{/* KaTeX */}}
|
||||
{{- if and (eq .Site.Params.math.handler "katex") $enableMath }}
|
||||
<link rel="stylesheet" href="{{ printf $assets.katex.css.url $assets.katex.version }}"
|
||||
{{ with $assets.katex.css.sri }} integrity="{{ . }}" {{ end }} media="print"
|
||||
onload="this.media='all';this.onload=null" crossorigin>
|
||||
<script defer src="{{ printf $assets.katex.js.url $assets.katex.version }}" {{ with $assets.katex.js.sri }}
|
||||
integrity="{{ . }}" {{ end }} crossorigin></script>
|
||||
<script defer src="{{ printf $assets.katex.autoRender.url $assets.katex.version }}"
|
||||
{{ with $assets.katex.autoRender.sri }} integrity="{{ . }}" {{ end }} crossorigin></script>
|
||||
<script>
|
||||
document.addEventListener("DOMContentLoaded", function () {
|
||||
renderMathInElement(document.body, {
|
||||
delimiters: [
|
||||
{ left: "$$", right: "$$", display: true },
|
||||
{ left: "$", right: "$", display: false },
|
||||
{ left: "\\(", right: "\\)", display: false },
|
||||
{ left: "\\[", right: "\\]", display: true }
|
||||
],
|
||||
{{- partial "utils/get-js-configs" .Site.Params.math.katex | safeJS }}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
{{- end }}
|
||||
|
||||
{{/* Mermaid */}}
|
||||
{{- if eq .Site.Params.diagram.handler "mermaid" }}
|
||||
<script defer src="{{ printf $assets.mermaid.js.url $assets.mermaid.version }}" {{ with $assets.mermaid.js.sri }}
|
||||
integrity="{{ . }}" {{ end }} crossorigin></script>
|
||||
{{- with .Site.Params.diagram.mermaid }}
|
||||
<script>
|
||||
document.addEventListener("DOMContentLoaded", function () {
|
||||
mermaid.initialize({
|
||||
{{- partial "utils/get-js-configs" . | safeJS }}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{- if and .Site.GoogleAnalytics hugo.IsProduction }}
|
||||
<link rel="preconnect" href="https://www.google-analytics.com" crossorigin>
|
||||
<script async src="https://www.googletagmanager.com/gtag/js?id={{ .Site.GoogleAnalytics }}"></script>
|
||||
<script>
|
||||
window.dataLayer = window.dataLayer || [];
|
||||
function gtag() { dataLayer.push(arguments); }
|
||||
gtag('js', new Date());
|
||||
gtag('config', '{{ .Site.GoogleAnalytics }}');
|
||||
</script>
|
||||
{{- end }}
|
||||
|
||||
{{ partial "custom-head" . }}
|
||||
|
||||
{{- with .Site.Params.icon }}
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="{{ (partial "get-icon" (dict "icon" . "size" 32)).Permalink }}">
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="{{ (partial "get-icon" (dict "icon" . "size" 180)).Permalink }}">
|
||||
{{- end }}
|
||||
|
||||
{{ define "partials/get-icon" }}
|
||||
{{ $icon := resources.GetMatch .icon }}
|
||||
{{ $iconResized := $icon.Fill (printf "%sx%s Center" (string .size) (string .size)) }}
|
||||
{{ return $iconResized }}
|
||||
{{ end }}
|
||||
|
||||
{{- partial "components/schema" . }}
|
||||
{{- partial "components/opengraph" . }}
|
||||
{{- range .AlternativeOutputFormats }}
|
||||
{{- printf `<link rel="%s" type="%s" href="%s" title="%s" />` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }}
|
||||
{{- end }}
|
||||
130
layouts/partials/header.html
Normal file
130
layouts/partials/header.html
Normal file
@@ -0,0 +1,130 @@
|
||||
<script>
|
||||
let storageColorScheme = localStorage.getItem("lightDarkMode")
|
||||
{{- if eq .Site.Params.colorScheme "light" }}
|
||||
if ((storageColorScheme == 'Auto' && window.matchMedia("(prefers-color-scheme: dark)").matches) || storageColorScheme == "Dark") {
|
||||
document.getElementsByTagName('html')[0].classList.add('dark')
|
||||
}
|
||||
{{- else if eq .Site.Params.colorScheme "dark" }}
|
||||
if ((storageColorScheme == 'Auto' && window.matchMedia("(prefers-color-scheme: light)").matches) || storageColorScheme == "Light") {
|
||||
document.getElementsByTagName('html')[0].classList.remove('dark')
|
||||
}
|
||||
{{- else }}
|
||||
if (((storageColorScheme == 'Auto' || storageColorScheme == null) && window.matchMedia("(prefers-color-scheme: dark)").matches) || storageColorScheme == "Dark") {
|
||||
document.getElementsByTagName('html')[0].classList.add('dark')
|
||||
}
|
||||
{{- end }}
|
||||
</script>
|
||||
<nav class="flex items-center justify-between flex-wrap px-4 py-4 md:py-0">
|
||||
<a href="{{ "/" | relLangURL }}" class="me-6 text-primary-text text-xl font-bold">{{ .Site.Title }}</a>
|
||||
<button id="navbar-btn" class="md:hidden flex items-center px-3 py-2" aria-label="Open Navbar">
|
||||
<i class="fas fa-bars"></i>
|
||||
</button>
|
||||
|
||||
<div id="target"
|
||||
class="hidden block md:flex md:grow md:justify-between md:items-center w-full md:w-auto text-primary-text z-20">
|
||||
<div class="md:flex md:h-16 text-sm md:grow pb-4 md:pb-0 border-b md:border-b-0">
|
||||
{{- $relPermalink := .RelPermalink }}
|
||||
{{- range .Site.Menus.main }}
|
||||
{{- $url := .URL | relLangURL }}
|
||||
<a href="{{ $url }}" class="block mt-4 md:inline-block md:mt-0 md:h-(16-4px) md:leading-(16-4px) box-border md:border-t-2 md:border-b-2 {{ if hasPrefix $relPermalink $url }} selected-menu-item {{ else }} border-transparent {{ end }} me-4">{{ .Name }}</a>
|
||||
{{- end }}
|
||||
</div>
|
||||
|
||||
<div class="flex">
|
||||
<div class="relative pt-4 md:pt-0">
|
||||
<div class="cursor-pointer hover:text-eureka" id="lightDarkMode">
|
||||
{{- if eq .Site.Params.colorScheme "dark" }}
|
||||
<i class="fas fa-moon"></i>
|
||||
{{- else if eq .Site.Params.colorScheme "light" }}
|
||||
<i class="fas fa-sun"></i>
|
||||
{{- else }}
|
||||
<i class="fas fa-adjust"></i>
|
||||
{{- end }}
|
||||
</div>
|
||||
<div class="fixed hidden inset-0 opacity-0 h-full w-full cursor-default z-30" id="is-open">
|
||||
</div>
|
||||
<div class="absolute flex flex-col start-0 md:start-auto end-auto md:end-0 hidden bg-secondary-bg w-48 rounded py-2 border border-tertiary-bg cursor-pointer z-40"
|
||||
id='lightDarkOptions'>
|
||||
<span class="px-4 py-1 hover:text-eureka" name="Light">{{i18n "light"}}</span>
|
||||
<span class="px-4 py-1 hover:text-eureka" name="Dark">{{i18n "dark"}}</span>
|
||||
<span class="px-4 py-1 hover:text-eureka" name="Auto">{{i18n "auto"}}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{- if .IsTranslated }}
|
||||
<div class="relative pt-4 ps-4 md:pt-0">
|
||||
<div class="cursor-pointer hover:text-eureka" id="languageMode">
|
||||
<i class="fas fa-globe"></i>
|
||||
<span class="ps-1">{{ .Language.LanguageName }}</span>
|
||||
</div>
|
||||
<div class="fixed hidden inset-0 opacity-0 h-full w-full cursor-default z-30" id="is-open-lang">
|
||||
</div>
|
||||
<div class="absolute flex flex-col start-0 md:start-auto end-auto md:end-0 hidden bg-secondary-bg w-48 rounded py-2 border border-tertiary-bg cursor-pointer z-40"
|
||||
id='languageOptions'>
|
||||
<a class="px-4 py-1 hover:text-eureka" href="{{ .Permalink }}">{{ .Language.LanguageName }}</a>
|
||||
{{- range .Translations }}
|
||||
<a class="px-4 py-1 hover:text-eureka" href="{{ .Permalink }}">{{ .Language.LanguageName }}</a>
|
||||
{{- end }}
|
||||
</div>
|
||||
</div>
|
||||
{{- end }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="fixed hidden inset-0 opacity-0 h-full w-full cursor-default z-0" id="is-open-mobile">
|
||||
</div>
|
||||
|
||||
</nav>
|
||||
<script>
|
||||
// change icon and add listener if auto
|
||||
let element = document.getElementById('lightDarkMode')
|
||||
{{- if eq .Site.Params.colorScheme "light" }}
|
||||
if (storageColorScheme == 'Auto') {
|
||||
element.firstElementChild.classList.remove('fa-sun')
|
||||
element.firstElementChild.setAttribute("data-icon", 'adjust')
|
||||
element.firstElementChild.classList.add('fa-adjust')
|
||||
document.addEventListener('DOMContentLoaded', () => {
|
||||
window.matchMedia("(prefers-color-scheme: dark)").addEventListener('change', switchDarkMode)
|
||||
})
|
||||
} else if (storageColorScheme == "Dark") {
|
||||
element.firstElementChild.classList.remove('fa-sun')
|
||||
element.firstElementChild.setAttribute("data-icon", 'moon')
|
||||
element.firstElementChild.classList.add('fa-moon')
|
||||
}
|
||||
{{- else if eq .Site.Params.colorScheme "dark" }}
|
||||
if (storageColorScheme == 'Auto') {
|
||||
element.firstElementChild.classList.remove('fa-moon')
|
||||
element.firstElementChild.setAttribute("data-icon", 'adjust')
|
||||
element.firstElementChild.classList.add('fa-adjust')
|
||||
document.addEventListener('DOMContentLoaded', () => {
|
||||
window.matchMedia("(prefers-color-scheme: dark)").addEventListener('change', switchDarkMode)
|
||||
})
|
||||
} else if (storageColorScheme == "Light") {
|
||||
element.firstElementChild.classList.remove('fa-moon')
|
||||
element.firstElementChild.setAttribute("data-icon", 'sun')
|
||||
element.firstElementChild.classList.add('fa-sun')
|
||||
}
|
||||
{{- else }}
|
||||
if (storageColorScheme == null || storageColorScheme == 'Auto') {
|
||||
document.addEventListener('DOMContentLoaded', () => {
|
||||
window.matchMedia("(prefers-color-scheme: dark)").addEventListener('change', switchDarkMode)
|
||||
})
|
||||
} else if (storageColorScheme == "Light") {
|
||||
element.firstElementChild.classList.remove('fa-adjust')
|
||||
element.firstElementChild.setAttribute("data-icon", 'sun')
|
||||
element.firstElementChild.classList.add('fa-sun')
|
||||
} else if (storageColorScheme == "Dark") {
|
||||
element.firstElementChild.classList.remove('fa-adjust')
|
||||
element.firstElementChild.setAttribute("data-icon", 'moon')
|
||||
element.firstElementChild.classList.add('fa-moon')
|
||||
}
|
||||
{{- end }}
|
||||
|
||||
document.addEventListener('DOMContentLoaded', () => {
|
||||
getcolorscheme();
|
||||
switchBurger();
|
||||
{{- if .IsTranslated }}
|
||||
switchLanguage()
|
||||
{{- end }}
|
||||
});
|
||||
</script>
|
||||
8
layouts/partials/utils/camelize.html
Normal file
8
layouts/partials/utils/camelize.html
Normal file
@@ -0,0 +1,8 @@
|
||||
{{ $input := . }}
|
||||
{{ $regexp := "(-|_)([a-z])" }}
|
||||
{{ $matches := findRE $regexp $input }}
|
||||
{{ range $matches }}
|
||||
{{ $input = $input | replaceRE . (upper .) }}
|
||||
{{ end }}
|
||||
{{ $input = $input | replaceRE "(-|_)" "" }}
|
||||
{{ return $input }}
|
||||
7
layouts/partials/utils/get-bundles.html
Normal file
7
layouts/partials/utils/get-bundles.html
Normal file
@@ -0,0 +1,7 @@
|
||||
{{ $currentPage := . }}
|
||||
{{ $bundles := slice $currentPage }}
|
||||
{{ if and (ne $currentPage.Kind "taxonomy") (or (ne $currentPage $currentPage.FirstSection) (eq $currentPage.Kind "term")) }}
|
||||
{{ $currentBundles := partial "utils/get-bundles" $currentPage.Parent }}
|
||||
{{ $bundles = $bundles | append $currentBundles }}
|
||||
{{ end }}
|
||||
{{ return $bundles }}
|
||||
9
layouts/partials/utils/get-featured.html
Normal file
9
layouts/partials/utils/get-featured.html
Normal file
@@ -0,0 +1,9 @@
|
||||
{{ $video := partial "utils/get-video" (dict "context" . "url" .Params.featuredVideo "keyword" "*featured*") }}
|
||||
{{ $image := partial "utils/get-image" (dict "context" . "url" .Params.featuredImage "keyword" "*featured*") }}
|
||||
{{ $featured := ""}}
|
||||
{{ if $video }}
|
||||
{{ $featured = $video }}
|
||||
{{ else if $image }}
|
||||
{{ $featured = print "<img src=\"" $image "\" class=\"w-full\" alt=\"Featured Image\">" | safeHTML }}
|
||||
{{ end }}
|
||||
{{ return $featured }}
|
||||
56
layouts/partials/utils/get-fontawesome-icons.html
Normal file
56
layouts/partials/utils/get-fontawesome-icons.html
Normal file
@@ -0,0 +1,56 @@
|
||||
{{ $fasIcons := slice }}
|
||||
{{ $fabIcons := slice }}
|
||||
{{ $farIcons := slice }}
|
||||
|
||||
{{/* eureka */}}
|
||||
{{ $fasIcons = $fasIcons | append (partial "utils/camelize" "fa-adjust") }}
|
||||
{{ $fasIcons = $fasIcons | append (partial "utils/camelize" "fa-bars") }}
|
||||
{{ $fasIcons = $fasIcons | append (partial "utils/camelize" "fa-calendar") }}
|
||||
{{ $fasIcons = $fasIcons | append (partial "utils/camelize" "fa-caret-down") }}
|
||||
{{ $fasIcons = $fasIcons | append (partial "utils/camelize" "fa-caret-left") }}
|
||||
{{ $fasIcons = $fasIcons | append (partial "utils/camelize" "fa-caret-right") }}
|
||||
{{ $fasIcons = $fasIcons | append (partial "utils/camelize" "fa-clock") }}
|
||||
{{ $fasIcons = $fasIcons | append (partial "utils/camelize" "fa-edit") }}
|
||||
{{ $fasIcons = $fasIcons | append (partial "utils/camelize" "fa-folder") }}
|
||||
{{ $fasIcons = $fasIcons | append (partial "utils/camelize" "fa-globe") }}
|
||||
{{ $fasIcons = $fasIcons | append (partial "utils/camelize" "fa-moon") }}
|
||||
{{ $fasIcons = $fasIcons | append (partial "utils/camelize" "fa-sun") }}
|
||||
{{ $fasIcons = $fasIcons | append (partial "utils/camelize" "fa-th-list") }}
|
||||
{{ $fasIcons = $fasIcons | append (partial "utils/camelize" "fa-user") }}
|
||||
{{ $fasIcons = $fasIcons | append (partial "utils/camelize" "fa-user-circle") }}
|
||||
|
||||
{{/* authors */}}
|
||||
{{ range (.Site.GetPage "taxonomyTerm" "authors").Pages }}
|
||||
{{ range .Params.social }}
|
||||
{{ $icon := partial "utils/camelize" (print "fa-" .icon) }}
|
||||
{{ if and (eq .iconPack "fas") (not (in $fasIcons $icon)) }}
|
||||
{{ $fasIcons = $fasIcons | append $icon }}
|
||||
{{ else if and (eq .iconPack "fab") (not (in $fabIcons $icon)) }}
|
||||
{{ $fabIcons = $fabIcons | append $icon }}
|
||||
{{ else if and (eq .iconPack "far") (not (in $farIcons $icon)) }}
|
||||
{{ $farIcons = $farIcons | append $icon }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{/* homepage.about */}}
|
||||
{{ $homepage := .Site.GetPage "homepage" }}
|
||||
{{ $widgets := $homepage.Resources }}
|
||||
{{ range $widgets }}
|
||||
{{ if eq .Params.widget.handler "about" }}
|
||||
{{ range .Params.social }}
|
||||
{{ $icon := partial "utils/camelize" (print "fa-" .icon) }}
|
||||
{{ if and (eq .iconPack "fas") (not (in $fasIcons $icon)) }}
|
||||
{{ $fasIcons = $fasIcons | append $icon }}
|
||||
{{ else if and (eq .iconPack "fab") (not (in $fabIcons $icon)) }}
|
||||
{{ $fabIcons = $fabIcons | append $icon }}
|
||||
{{ else if and (eq .iconPack "far") (not (in $farIcons $icon)) }}
|
||||
{{ $farIcons = $farIcons | append $icon }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{ $icons := dict "fas" $fasIcons "fab" $fabIcons "far" $farIcons }}
|
||||
|
||||
{{ return $icons }}
|
||||
17
layouts/partials/utils/get-image.html
Normal file
17
layouts/partials/utils/get-image.html
Normal file
@@ -0,0 +1,17 @@
|
||||
{{- $img := "" }}
|
||||
{{- $validKeyword := false }}
|
||||
{{- if .keyword }}
|
||||
{{- if (.context.Resources.ByType "image").GetMatch .keyword }}
|
||||
{{- $validKeyword = true}}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if $validKeyword }}
|
||||
{{- $img = ((.context.Resources.ByType "image").GetMatch .keyword).Permalink }}
|
||||
{{- else if or (hasPrefix .url "//") (or (hasPrefix .url "http://") (hasPrefix .url "https://")) }}
|
||||
{{- $img = (.url | absURL) }}
|
||||
{{- else if resources.GetMatch .url }}
|
||||
{{- $img = (resources.GetMatch .url).Permalink }}
|
||||
{{- else if .url }}
|
||||
{{- $img = (.url | absURL) }}
|
||||
{{- end }}
|
||||
{{- return $img }}
|
||||
13
layouts/partials/utils/get-js-configs.html
Normal file
13
layouts/partials/utils/get-js-configs.html
Normal file
@@ -0,0 +1,13 @@
|
||||
{{- range $key, $value := . }}
|
||||
{{- if or $value (eq $value false) }}
|
||||
{{- $key = partial "utils/camelize" $key }}
|
||||
{{- $key }}:
|
||||
{{- if reflect.IsMap $value }}
|
||||
{
|
||||
{{ partial "utils/get-js-configs" . }}
|
||||
},
|
||||
{{- else -}}
|
||||
"{{ $value }}",
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
18
layouts/partials/utils/get-style-color.html
Normal file
18
layouts/partials/utils/get-style-color.html
Normal file
@@ -0,0 +1,18 @@
|
||||
{{ $style := (index .context.Site.Data.styles (.context.Site.Params.style | default "default")) }}
|
||||
{{ $result := $style.colors }}
|
||||
{{ if $result }}
|
||||
{{ range .path }}
|
||||
{{ if $result }}
|
||||
{{ $result = index $result . }}
|
||||
{{ else }}
|
||||
{{ errorf "Param %s is undefined in style %s" (delimit $.path ".") $.context.Site.Params.style }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ if $result }}
|
||||
{{ return $result }}
|
||||
{{ else }}
|
||||
{{ errorf "Param %s is undefined in style %s" (delimit $.path ".") $.context.Site.Params.style }}
|
||||
{{ end }}
|
||||
{{ else }}
|
||||
{{ errorf "Could not find colors section in style %s." .context.Site.Params.style }}
|
||||
{{ end }}
|
||||
12
layouts/partials/utils/get-style-fonts.html
Normal file
12
layouts/partials/utils/get-style-fonts.html
Normal file
@@ -0,0 +1,12 @@
|
||||
{{ $style := (index .context.Site.Data.styles (.context.Site.Params.style | default "default")) }}
|
||||
{{ $result := slice }}
|
||||
{{ range $style.fonts }}
|
||||
{{ $item := index . $.param }}
|
||||
{{ if $item }}
|
||||
{{ $result = $result | append $item }}
|
||||
{{ end }}
|
||||
{{ else }}
|
||||
{{/* TODO: use realtime location */}}
|
||||
{{ errorf "Could not find fonts section in style %s." .context.Site.Params.style }}
|
||||
{{ end }}
|
||||
{{ return $result }}
|
||||
38
layouts/partials/utils/get-summary.html
Normal file
38
layouts/partials/utils/get-summary.html
Normal file
@@ -0,0 +1,38 @@
|
||||
<div class="prose">
|
||||
<a href="{{ .Permalink }}" class="no-underline">
|
||||
<h3 class="mt-0">{{ .LinkTitle }}</h3>
|
||||
</a>
|
||||
{{ if .Description }}
|
||||
{{ .Description | plainify | htmlUnescape }}
|
||||
{{ else if .Summary }}
|
||||
{{ .Summary | plainify | htmlUnescape }}
|
||||
{{ end }}
|
||||
|
||||
{{ if eq .Type "docs" }}
|
||||
<div class="mx-6">
|
||||
{{ range $index, $value := first 3 .Pages }}
|
||||
{{ if gt $index 0 }}
|
||||
<div class="-mx-4 my-4 border-t"></div>
|
||||
{{ end -}}
|
||||
<a href="{{ .Permalink }}" class="no-underline">
|
||||
<h4>{{ .LinkTitle }}</h4>
|
||||
</a>
|
||||
{{ if .Description }}
|
||||
{{ .Description | plainify | htmlUnescape }}
|
||||
{{ else if .Summary }}
|
||||
{{ .Summary | plainify | htmlUnescape }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
<a href="{{ .Permalink }}" class="no-underline">
|
||||
<h4>
|
||||
{{ i18n "readMore" }}
|
||||
<i
|
||||
class="fas {{ cond (eq .Site.Language.LanguageDirection "rtl") "fa-caret-left" "fa-caret-right" }} ms-1"
|
||||
></i>
|
||||
</h4>
|
||||
</a>
|
||||
</div>
|
||||
{{ else }}
|
||||
{{ partial "components/post-metadata" . }}
|
||||
{{ end }}
|
||||
</div>
|
||||
7
layouts/partials/utils/get-video.html
Normal file
7
layouts/partials/utils/get-video.html
Normal file
@@ -0,0 +1,7 @@
|
||||
{{ if or (hasPrefix .url "//") (or (hasPrefix .url "http://") (hasPrefix .url "https://")) }}
|
||||
<div style="position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden;">
|
||||
<iframe src="{{ .url }}" style="position: absolute; top: 0; left: 0; width: 100%; height: 100%; border:0;" frameborder="0" allowfullscreen></iframe>
|
||||
</div>
|
||||
{{ else if .url }}
|
||||
<video class="w-full" src="{{ .url | absURL }}" controls></video>
|
||||
{{ end }}
|
||||
1
layouts/partials/utils/hyphenate.html
Normal file
1
layouts/partials/utils/hyphenate.html
Normal file
@@ -0,0 +1 @@
|
||||
{{ return replace . "_" "-" }}
|
||||
4
layouts/partials/utils/standardize-classes.html
Normal file
4
layouts/partials/utils/standardize-classes.html
Normal file
@@ -0,0 +1,4 @@
|
||||
{{ $classes := replaceRE " +" " " . }}
|
||||
{{ $classes = strings.TrimLeft " " $classes }}
|
||||
{{ $classes = strings.TrimRight " " $classes }}
|
||||
{{ return $classes }}
|
||||
51
layouts/partials/widgets/about.html
Normal file
51
layouts/partials/widgets/about.html
Normal file
@@ -0,0 +1,51 @@
|
||||
<div class="mb-12 flex flex-col items-center justify-center md:flex-row">
|
||||
{{ $img := partial "utils/get-image" (dict "context" . "url" .Params.avatar "keyword" "*avatar*") }}
|
||||
{{ with $img }}
|
||||
<div class="md:ms-0 md:me-8 md:pe-8 md:border-e mx-auto w-48 flex-none">
|
||||
<img src="{{ . }}" class="rounded-full" alt="Avatar" />
|
||||
</div>
|
||||
{{ end }}
|
||||
<div class="mt-4 w-full grow md:mt-0">
|
||||
<h1 class="py-4 text-3xl">{{ .Title }}</h1>
|
||||
<div class="w-3/12 border-b xl:w-2/12"></div>
|
||||
|
||||
<div class="flex items-center pt-4">
|
||||
{{ with or (.Params.role) (.Params.organizations) }}
|
||||
<i class="fas fa-user"></i>
|
||||
{{ end }}
|
||||
<div class="flex flex-wrap">
|
||||
{{ with .Params.role }}
|
||||
<span class="ps-4">{{ . | markdownify }}</span>
|
||||
{{ end }}
|
||||
|
||||
{{ with .Params.organization }}
|
||||
<a href="{{ .url }}" class="ps-4">{{ .name | markdownify }}</a>
|
||||
{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{ with .Params.bio }}
|
||||
<div class="py-8 text-lg leading-normal">
|
||||
{{ . | markdownify }}
|
||||
</div>
|
||||
{{ end }}
|
||||
</div>
|
||||
<div class="md:ms-8 flex items-end justify-center md:flex-col">
|
||||
{{ $brand := $.Param "social" }}
|
||||
{{ range $brand }}
|
||||
{{/* Deprecation warning(v1.0.0) starts */}}
|
||||
{{ if .icon_pack }}
|
||||
{{ warnf "Param 'icon_pack' in %q is deprecated and will be removed in Eureka v1.0.0. Please use 'iconPack' instead." $.File.Path }}
|
||||
{{ end }}
|
||||
{{ $iconPack := .iconPack | default .icon_pack }}
|
||||
{{/* Deprecation warning(v1.0.0) ends */}}
|
||||
{{ $src := print $iconPack " fa-" .icon }}
|
||||
<div class="mx-2 mb-2 mt-4 md:mx-0 md:mt-2">
|
||||
<a href="{{ .url }}"><i class="{{ print $src }}"></i></a>
|
||||
</div>
|
||||
{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="prose">
|
||||
{{ .Content }}
|
||||
</div>
|
||||
1
layouts/partials/widgets/blank.html
Normal file
1
layouts/partials/widgets/blank.html
Normal file
@@ -0,0 +1 @@
|
||||
{{ .Content }}
|
||||
30
layouts/partials/widgets/experience.html
Normal file
30
layouts/partials/widgets/experience.html
Normal file
@@ -0,0 +1,30 @@
|
||||
{{ range .Params.experiences }}
|
||||
<div class="mb-6">
|
||||
<div
|
||||
class="bg-secondary-bg prose dark:border-tertiary-bg rounded border p-6 transition duration-200 ease-in-out hover:shadow-lg"
|
||||
>
|
||||
<h3 class="">{{ .title }}</h3>
|
||||
<div class="flex flex-col md:flex-row md:justify-between">
|
||||
<div>
|
||||
{{ if .organization.url }}
|
||||
<a href="{{ .organization.url }}" class="no-underline">
|
||||
{{ .organization.name | markdownify }}
|
||||
</a>
|
||||
{{ else }}
|
||||
<span>{{ .organization.name | markdownify }}</span>
|
||||
{{ end }}
|
||||
|
||||
{{ if and .organization.name .location }}
|
||||
<span class="ms-2 me-2">·</span>
|
||||
{{ end }}
|
||||
|
||||
|
||||
<span>{{ .location | markdownify }} </span>
|
||||
</div>
|
||||
<div class="shrink-0">{{ .dates | markdownify }}</div>
|
||||
</div>
|
||||
|
||||
<div class="mt-5">{{ .writeup | markdownify }}</div>
|
||||
</div>
|
||||
</div>
|
||||
{{ end }}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user