Browse Source

initial commit

kolk-cc
7ma7X 1 month ago
commit
75c97e730a
No known key found for this signature in database GPG Key ID: DB77240577E1FDA7
29 changed files with 1095 additions and 0 deletions
  1. +20
    -0
      LICENSE
  2. +1
    -0
      README.md
  3. +2
    -0
      archetypes/default.md
  4. +52
    -0
      exampleSite/config.toml
  5. +4
    -0
      exampleSite/content/_index.md
  6. +28
    -0
      exampleSite/content/about.md
  7. +6
    -0
      exampleSite/content/post/_index.md
  8. +47
    -0
      exampleSite/content/post/emoji-support.md
  9. +151
    -0
      exampleSite/content/post/markdown-syntax.md
  10. +47
    -0
      exampleSite/content/post/math-typesetting.md
  11. +58
    -0
      exampleSite/content/post/placeholder-text.md
  12. +42
    -0
      exampleSite/content/post/rich-content.md
  13. +11
    -0
      layouts/_default/baseof.html
  14. +29
    -0
      layouts/_default/list.html
  15. +25
    -0
      layouts/_default/single.html
  16. +16
    -0
      layouts/_default/terms.html
  17. +12
    -0
      layouts/partials/footer.html
  18. +14
    -0
      layouts/partials/head.html
  19. +42
    -0
      layouts/partials/header.html
  20. +22
    -0
      layouts/partials/nav.html
  21. +9
    -0
      layouts/partials/postmeta.html
  22. +14
    -0
      layouts/partials/preview.html
  23. +18
    -0
      layouts/partials/toc.html
  24. BIN
      static/css/fonts/LM-bold.woff2
  25. BIN
      static/css/fonts/LM-italic.woff2
  26. BIN
      static/css/fonts/LM-regular.woff2
  27. +383
    -0
      static/css/latex.css
  28. +27
    -0
      static/css/main.css
  29. +15
    -0
      theme.toml

+ 20
- 0
LICENSE View File

@@ -0,0 +1,20 @@
The MIT License (MIT)

Copyright (c) 2020 Kaito Sugimoto

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

+ 1
- 0
README.md View File

@@ -0,0 +1 @@
# WIP

+ 2
- 0
archetypes/default.md View File

@@ -0,0 +1,2 @@
+++
+++

+ 52
- 0
exampleSite/config.toml View File

@@ -0,0 +1,52 @@
baseURL = "https://gohugo.io"
title = "HugoTeX"
paginate = 3
languageCode = "en"
DefaultContentLanguage = "en"
enableInlineShortcodes = true
footnoteReturnLinkContents = "^"

[author]
name = "Kaito Sugimoto"
abstract = "I'm a software engineer and a coffee enthusiast in Japan. My primary interest lies in the area of natural language processing."

[menu]

[[menu.main]]
identifier = "about"
name = "About"
url = "/about/"
weight = 10

[taxonomies]
category = "categories"
tag = "tags"
series = "series"

[privacy]

[privacy.vimeo]
disabled = false
simple = true

[privacy.twitter]
disabled = false
enableDNT = true
simple = true

[privacy.instagram]
disabled = false
simple = true

[privacy.youtube]
disabled = false
privacyEnhanced = true

[services]

[services.instagram]
disableInlineCSS = true

[services.twitter]
disableInlineCSS = true


+ 4
- 0
exampleSite/content/_index.md View File

@@ -0,0 +1,4 @@
+++
author = "Hugo Authors"
+++


+ 28
- 0
exampleSite/content/about.md View File

@@ -0,0 +1,28 @@
+++
title = "About"
description = "Hugo, the world’s fastest framework for building websites"
date = "2019-02-28"
aliases = ["about-us","about-hugo","contact"]
author = "Hugo Authors"
+++

Written in Go, Hugo is an open source static site generator available under the [Apache Licence 2.0.](https://github.com/gohugoio/hugo/blob/master/LICENSE) Hugo supports TOML, YAML and JSON data file types, Markdown and HTML content files and uses shortcodes to add rich content. Other notable features are taxonomies, multilingual mode, image processing, custom output formats, HTML/CSS/JS minification and support for Sass SCSS workflows.

Hugo makes use of a variety of open source projects including:

* https://github.com/yuin/goldmark
* https://github.com/alecthomas/chroma
* https://github.com/muesli/smartcrop
* https://github.com/spf13/cobra
* https://github.com/spf13/viper

Hugo is ideal for blogs, corporate websites, creative portfolios, online magazines, single page applications or even a website with thousands of pages.

Hugo is for people who want to hand code their own website without worrying about setting up complicated runtimes, dependencies and databases.

Websites built with Hugo are extremelly fast, secure and can be deployed anywhere including, AWS, GitHub Pages, Heroku, Netlify and any other hosting provider.

Learn more and contribute on [GitHub](https://github.com/gohugoio).




+ 6
- 0
exampleSite/content/post/_index.md View File

@@ -0,0 +1,6 @@
+++
aliases = ["posts","articles","blog","showcase","docs"]
title = "Posts"
author = "Hugo Authors"
tags = ["index"]
+++

+ 47
- 0
exampleSite/content/post/emoji-support.md View File

@@ -0,0 +1,47 @@
+++
author = "Hugo Authors"
title = "Emoji Support"
date = "2019-03-05"
description = "Guide to emoji usage in Hugo"
tags = [
"emoji",
]
+++

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 >}}

+ 151
- 0
exampleSite/content/post/markdown-syntax.md View File

@@ -0,0 +1,151 @@
+++
author = "Hugo Authors"
title = "Markdown Syntax Guide"
date = "2019-03-11"
description = "Sample article showcasing basic Markdown syntax and formatting for HTML elements."
tags = [
"markdown",
"css",
"html",
"themes",
]
categories = [
"themes",
"syntax",
]
series = ["Themes Guide"]
aliases = ["migrate-from-jekyl"]
+++

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.</p>
> — <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

| Inline&nbsp;&nbsp;&nbsp; | Markdown&nbsp;&nbsp;&nbsp; | In&nbsp;&nbsp;&nbsp; | Table |
| ---------- | --------- | ----------------- | ---------- |
| *italics* | **bold** | ~~strikethrough~~&nbsp;&nbsp;&nbsp; | `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.


+ 47
- 0
exampleSite/content/post/math-typesetting.md View File

@@ -0,0 +1,47 @@
---
author: Hugo Authors
title: Math Typesetting
date: 2019-03-08
description: A brief guide to setup KaTeX
math: true
---

Mathematical notation in a Hugo project can be enabled by using third party JavaScript libraries.
<!--more-->

In this example we will be using [KaTeX](https://katex.org/)

- Create a partial under `/layouts/partials/math.html`
- Within this partial reference the [Auto-render Extension](https://katex.org/docs/autorender.html) or host these scripts locally.
- Include the partial in your templates like so:

```
{{ if or .Params.math .Site.Params.math }}
{{ partial "math.html" . }}
{{ end }}
```
- To enable KaTex globally set the parameter `math` to `true` in a project's configuration
- To enable KaTex on a per page basis include the parameter `math: true` in content files.

**Note:** Use the online reference of [Supported TeX Functions](https://katex.org/docs/supported.html)
{{< math.inline >}}
{{ if or .Page.Params.math .Site.Params.math }}
<!-- KaTeX -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.11.1/dist/katex.min.css" integrity="sha384-zB1R0rpPzHqg7Kpt0Aljp8JPLqbXI3bhnPWROx27a9N0Ll6ZP/+DiW/UqRcLbRjq" crossorigin="anonymous">
<script defer src="https://cdn.jsdelivr.net/npm/katex@0.11.1/dist/katex.min.js" integrity="sha384-y23I5Q6l+B6vatafAwxRu/0oK/79VlbSz7Q9aiSZUvyWYIYsd+qj+o24G5ZU2zJz" crossorigin="anonymous"></script>
<script defer src="https://cdn.jsdelivr.net/npm/katex@0.11.1/dist/contrib/auto-render.min.js" integrity="sha384-kWPLUVMOks5AQFrykwIup5lo0m3iMkkHrD0uJ4H5cjeGihAutqP0yW0J6dpFiVkI" crossorigin="anonymous" onload="renderMathInElement(document.body);"></script>
{{ end }}
{{</ math.inline >}}

### Examples
{{< math.inline >}}
<p>
Inline math: \(\varphi = \dfrac{1+\sqrt5}{2}= 1.6180339887…\)
</p>
{{</ math.inline >}}

Block math:
$$
\varphi = 1+\frac{1} {1+\frac{1} {1+\frac{1} {1+\cdots} } }
$$


+ 58
- 0
exampleSite/content/post/placeholder-text.md View File

@@ -0,0 +1,58 @@
+++
author = "Hugo Authors"
title = "Placeholder Text"
date = "2019-03-09"
description = "Lorem Ipsum Dolor Si Amet"
tags = [
"markdown",
"text",
]
+++

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 >}}

+ 42
- 0
exampleSite/content/post/rich-content.md View File

@@ -0,0 +1,42 @@
+++
author = "Hugo Authors"
title = "Rich Content"
date = "2019-03-10"
description = "A brief description of Hugo Shortcodes"
tags = [
"shortcodes",
"privacy",
]
+++

Hugo ships with several [Built-in Shortcodes](https://gohugo.io/content-management/shortcodes/#use-hugo-s-built-in-shortcodes) for rich content, along with a [Privacy Config](https://gohugo.io/about/hugo-and-gdpr/) and a set of Simple Shortcodes that enable static and no-JS versions of various social media embeds.
<!--more-->
---

## Instagram Simple Shortcode

{{< instagram_simple BGvuInzyFAe hidecaption >}}

<br>

---

## YouTube Privacy Enhanced Shortcode

{{< youtube ZJthWmvUzzc >}}

<br>

---

## Twitter Simple Shortcode

{{< twitter_simple 1085870671291310081 >}}

<br>

---

## Vimeo Simple Shortcode

{{< vimeo_simple 48912912 >}}

+ 11
- 0
layouts/_default/baseof.html View File

@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="{{ .Site.LanguageCode }}">
{{- partial "head.html" . -}}
<body>
{{- partial "header.html" . -}}
<div id="content">
{{- block "main" . }}{{- end }}
</div>
{{- partial "footer.html" . -}}
</body>
</html>

+ 29
- 0
layouts/_default/list.html View File

@@ -0,0 +1,29 @@
{{ define "main" }}
<div class="container" role="main">
<div class="posts-list">
{{ if .IsHome }}
{{ $pag := .Paginate (where site.RegularPages "Type" "in" site.Params.mainSections) }}
{{ else }}
{{ $pag := .Paginator.Pages }}
{{ end }}

{{ range .Paginator.Pages }}
{{ partial "preview.html" . }}
{{ end }}
</div>
{{ if or (.Paginator.HasPrev) (.Paginator.HasNext) }}
<ul class="pager">
{{ if .Paginator.HasPrev }}
<li class="previous">
<a href="{{ .Permalink }}page/{{ .Paginator.Prev.PageNumber }}/">&larr; Newer</a>
</li>
{{ end }}
{{ if .Paginator.HasNext }}
<li class="next">
<a href="{{ .Permalink }}page/{{ .Paginator.Next.PageNumber }}/">Older &rarr;</a>
</li>
{{ end }}
</ul>
{{ end }}
</div>
{{ end }}

+ 25
- 0
layouts/_default/single.html View File

@@ -0,0 +1,25 @@
{{ define "main" }}
<div class="container" role="main">
<article class="article" class="blog-post">
<div class="postmeta">
{{ partial "postmeta.html" . }}
</div>
<br>
{{ partial "toc.html" . }}

{{ if .Params.tags }}
<div class="blog-tags">
{{ range .Params.tags }}
<a href="{{ $.Site.BaseURL }}/tags/{{ . | urlize }}/">{{ . }}</a>&nbsp;
{{ end }}
</div>
{{ end }}
</article>
{{ if and (gt .WordCount 400) (.Param "backtotop") }}
{{ partial "backtotop.html" . }}
<button onclick="topFunction()" id="backtotopButton">
<i class="fa fa-angle-up"></i>
</button>
{{ end }}
</div>
{{ end }}

+ 16
- 0
layouts/_default/terms.html View File

@@ -0,0 +1,16 @@
{{ define "main" }}

<div class="container" role="main">
<article class="post-preview">
{{ range .Data.Terms.Alphabetical }}
<div class="terms">
<h4 class="term-name" >
<a href="{{ .Page.Permalink }}">{{ .Page.Title }}</a>
<span class="badge">{{ .Count }}</span>
</h4>
</div>
{{ end }}
</article>
</div>

{{ end }}

+ 12
- 0
layouts/partials/footer.html View File

@@ -0,0 +1,12 @@
<footer>
<div class="container">
<p class="credits copyright">
<p class="credits theme-by">
Powered By <a href="https://gohugo.io">Hugo</a>&nbsp;/&nbsp;Theme&nbsp;<a href="https://github.com/7ma7X/HugoTeX">HugoTeX</a>
<br>
<a href="{{ .Site.BaseURL }}about">{{ .Site.Author.name }}</a>
&copy;
{{ .Site.LastChange.Format "2006" }}
</p>
</div>
</footer>

+ 14
- 0
layouts/partials/head.html View File

@@ -0,0 +1,14 @@
<meta charset="utf-8" />
<title>{{ .Title }}</title>
{{ with .Site.Params.description }}
<meta name="description" content="{{ . }}" />
{{ end }}
{{- with .Site.Author.Name }}
<meta name="author" content="{{ . }}"/>
{{- end }}
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" href="{{ .Site.BaseURL }}css/latex.css" />
<link rel="stylesheet" href="{{ .Site.BaseURL }}css/main.css" />
<script id="MathJax-script" async src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"></script>
{{ hugo.Generator -}}

+ 42
- 0
layouts/partials/header.html View File

@@ -0,0 +1,42 @@

{{ if .IsHome }}
{{ if .Site.Params.homeTitle }}
{{ $.Scratch.Set "title" .Site.Params.homeTitle }}
{{ else }}
{{ $.Scratch.Set "title" .Site.Title }}
{{ end }}
{{ else }}
{{ $.Scratch.Set "title" .Title }}
{{ end }}

{{ $title := $.Scratch.Get "title" }}
{{ if $title }}
<header>
{{ partial "nav.html" . }}
<div class="intro-header">
<div class="container">
<div class="{{ .Type }}-heading">
{{ if eq .Type "list" }}
<h1>{{ if .Data.Singular }}#{{ end }}{{ .Title }}</h1>
{{ else }}
<h1>{{ with $title }}{{.}}{{ else }}<br/>{{ end }}</h1>
{{ if .IsHome }}
<p class="author">{{ with .Site.Author.name }}{{.}}{{ else }}<br/>{{ end }}</p>

{{ if .Site.Author.abstract }}
<div class="abstract">
<h5>Abstract</h5>
<p>
{{ .Site.Author.abstract }}
</p>
</div>
{{ end }}
{{ end }}
{{ end }}
</div>
</div>
</div>
</header>
{{ else }}
<div class="intro-header"></div>
{{ end }}

+ 22
- 0
layouts/partials/nav.html View File

@@ -0,0 +1,22 @@
<nav class="navbar">
<div class="nav">
{{ if .Site.Params.logo }}
<a href="{{ .Site.BaseURL }}" class="nav-logo">
<img src="{{ .Site.BaseURL }}images/{{ .Site.Params.logo.url }}"
width="{{ .Site.Params.logo.width }}"
height="{{ .Site.Params.logo.height }}"
alt="{{ .Site.Params.logo.alt }}">
</a>
{{ end }}

<ul class="nav-links">
{{ range .Site.Params.nav }}
{{ if .icon }}
<li><a href="{{ .url | relLangURL }}" name="{{ .name }}"><i class="{{ .icon }}"></i></a></li>
{{ else }}
<li><a href="{{ .url | relLangURL }}" name="{{ .name }}">{{ .name }}</a></li>
{{ end }}
{{ end }}
</ul>
</div>
</nav>

+ 9
- 0
layouts/partials/postmeta.html View File

@@ -0,0 +1,9 @@
<span class="meta-post">
<i class="fa fa-calendar-alt"></i>{{ .Lastmod.Format ( .Site.Params.dateformat | default "Jan 2, 2006") }}
{{ if .Params.categories }}
<br><i class="fa fa-folder-open"></i>
{{ range .Params.categories }}
<a href="{{ $.Site.BaseURL }}/categories/{{ . | urlize }}/">{{ . }}</a>&nbsp;
{{ end }}
{{ end }}
</span>

+ 14
- 0
layouts/partials/preview.html View File

@@ -0,0 +1,14 @@
<article class="post-preview">
<a href="{{ .Permalink }}">
<h2 class="post-title">{{ .Title }}</h2>
</a>
<div class="postmeta">
{{ partial "postmeta.html" . }}
</div>
<div class="post-entry">
{{ if .Truncated }}
<p>{{ .Summary }}</p>
<a href="{{ .Permalink }}" class="post-read-more">Read More</a>
{{ end }}
</div>
</article>

+ 18
- 0
layouts/partials/toc.html View File

@@ -0,0 +1,18 @@
{{ if and (gt .WordCount 400) (.Param "toc") }}
{{- /* 正規表現でh[1-6]を探す */ -}}
{{- $header := (findRE "<h2.*?>(?:.|\n)*?</h2>" .Content) -}}
{{- /* 最初に出現するh[1-6]を取得 */ -}}
{{- $firstH := index $header 0 -}}

{{- if ne $firstH nil -}}
{{- /* ヘッダーの前にToCを結合した「新しいヘッダー」を作成 */ -}}
{{- $newH := printf `%s%s` .TableOfContents $firstH -}}
{{- /* 古いヘッダーを新しいヘッダーに置換して出力 */ -}}
{{- replace .Content $firstH $newH | safeHTML -}}
{{- else -}}
{{- /* そもそもヘッダーがない時は普通に出力 */ -}}
{{- .Content -}}
{{- end -}}
{{ else }}
{{ .Content }}
{{ end }}

BIN
static/css/fonts/LM-bold.woff2 View File


BIN
static/css/fonts/LM-italic.woff2 View File


BIN
static/css/fonts/LM-regular.woff2 View File


+ 383
- 0
static/css/latex.css View File

@@ -0,0 +1,383 @@
/*!
* LaTeX.css (https://latex.now.sh/)
*
* Source: https://github.com/vincentdoerig/latex-css
* Licensed under MIT (https://github.com/vincentdoerig/latex-css/blob/master/LICENSE)
*/

@font-face {
font-family: 'Latin Modern';
font-style: normal;
font-weight: normal;
font-display: swap;
src: url('./fonts/LM-regular.woff2') format('woff2'),
url('./fonts/LM-regular.woff') format('woff'),
url('./fonts/LM-regular.ttf') format('truetype');
}

@font-face {
font-family: 'Latin Modern';
font-style: italic;
font-weight: normal;
font-display: swap;
src: url('./fonts/LM-italic.woff2') format('woff2'),
url('./fonts/LM-italic.woff') format('woff'),
url('./fonts/LM-italic.ttf') format('truetype');
}

@font-face {
font-family: 'Latin Modern';
font-style: normal;
font-weight: bold;
font-display: swap;
src: url('./fonts/LM-bold.woff2') format('woff2'),
url('./fonts/LM-bold.woff') format('woff'),
url('./fonts/LM-bold.ttf') format('truetype');
}

@font-face {
font-family: 'Latin Modern';
font-style: italic;
font-weight: bold;
font-display: swap;
src: url('./fonts/LM-bold-italic.woff2') format('woff2'),
url('./fonts/LM-bold-italic.woff') format('woff'),
url('./fonts/LM-bold-italic.ttf') format('truetype');
}

/* Box sizing rules */
*,
*::before,
*::after {
box-sizing: border-box;
}

/* Remove default margin */
body,
h1,
h2,
h3,
h4,
p,
ul[class],
ol[class],
li,
figure,
figcaption,
dl,
dd {
margin: 0;
}

/* Make default font-size 1rem and add smooth scrolling to anchors */
html {
font-size: 1rem;
scroll-behavior: smooth;
}

body {
font-family: 'Latin Modern', Georgia, Cambria, 'Times New Roman', Times, serif;
line-height: 1.8;

max-width: 80ch;
min-height: 100vh;
overflow-x: hidden;
margin: 0 auto;
padding: 2rem 1.25rem;

counter-reset: theorem;
counter-reset: definition;

color: hsl(0, 5%, 10%);
background-color: hsl(210, 20%, 98%);

text-rendering: optimizeLegibility;
}

/* Justify and hyphenate all paragraphs */
p {
text-align: justify;
hyphens: auto;
-webkit-hyphens: auto;
-moz-hyphens: auto;
margin-top: 1rem;
}

/* A elements that don't have a class get default styles */
a:not([class]) {
text-decoration-skip-ink: auto;
}

/* Make links red */
a,
a:visited {
color: #a00;
}

a:focus {
outline-offset: 2px;
outline: 2px solid hsl(220, 90%, 52%);
}

/* Make images easier to work with */
img {
max-width: 100%;
display: block;
}

/* Inherit fonts for inputs and buttons */
input,
button,
textarea,
select {
font: inherit;
}

/* Prevent textarea from overflowing */
textarea {
width: 100%;
}

/* Natural flow and rhythm in articles by default */
article > * + * {
margin-top: 1em;
}

/* Styles for inline code or code snippets */
code,
pre,
kbd {
font-family: Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New',
monospace;
font-size: 85%;
}
pre {
padding: 1rem 1.4rem;
max-width: 100%;
overflow: auto;
border-radius: 4px;
background: hsl(210, 28%, 93%);
}
pre code {
font-size: 95%;
position: relative;
}
kbd {
background: hsl(210, 5%, 100%);
border: 1px solid hsl(210, 5%, 70%);
border-radius: 2px;
padding: 2px 4px;
font-size: 75%;
}

/* Make table 100% width, add borders between rows */
table {
border-collapse: collapse;
border-spacing: 0;
width: 100%;
max-width: 100%;
}
th,
td {
text-align: left;
padding: 0.5rem;
}
td {
border-bottom: 1px solid hsl(0, 0%, 85%);
}
thead th {
border-bottom: 2px solid hsl(0, 0%, 70%);
}
tfoot th {
border-top: 2px solid hsl(0, 0%, 70%);
}

/* Center align the title */
h1:first-child {
text-align: center;
}

/* Nested ordered list for ToC */
nav ol {
counter-reset: item;
padding-left: 2rem;
}
nav li {
display: block;
}
nav li:before {
content: counters(item, '.') ' ';
counter-increment: item;
padding-right: 0.85rem;
}

/* Center definitions (most useful for display equations) */
dl dd {
text-align: center;
}

/* Theorem */
.theorem {
counter-increment: theorem;
display: block;
margin: 12px 0;
font-style: italic;
}
.theorem::before {
content: 'Theorem ' counter(theorem) '. ';
font-weight: bold;
font-style: normal;
}

/* Lemma */
.lemma {
counter-increment: theorem;
display: block;
margin: 12px 0;
font-style: italic;
}
.lemma::before {
content: 'Lemma ' counter(theorem) '. ';
font-weight: bold;
font-style: normal;
}

/* Proof */
.proof {
display: block;
margin: 12px 0;
font-style: normal;
position: relative;
}
.proof::before {
content: 'Proof. ' attr(title);
font-style: italic;
}
.proof:after {
content: '◾️';
position: absolute;
right: -12px;
bottom: -2px;
}

/* Definition */
.definition {
counter-increment: definition;
display: block;
margin: 12px 0;
font-style: normal;
}
.definition::before {
content: 'Definition ' counter(definition) '. ';
font-weight: bold;
font-style: normal;
}

/* Center align author name, use small caps and add vertical spacing */
.author {
margin: 0.85rem 0;
font-variant-caps: small-caps;
text-align: center;
}

/* Make footnote text smaller and left align it (looks bad with long URLs) */
.footnotes p {
text-align: left;
line-height: 1.5;
font-size: 85%;
margin-bottom: 0.4rem;
}
.footnotes {
border-top: 1px solid hsl(0, 0%, 39%);
}

/* Center title and paragraph */
.abstract,
.abstract p {
text-align: center;
}
.abstract {
margin: 2.25rem 0;
}

/* Format the LaTeX symbol correctly (a higher up, e lower) */
.latex span:nth-child(1) {
text-transform: uppercase;
font-size: 0.75em;
vertical-align: 0.28em;
margin-left: -0.48em;
margin-right: -0.15em;
line-height: 1ex;
}

.latex span:nth-child(2) {
text-transform: uppercase;
vertical-align: -0.5ex;
margin-left: -0.1667em;
margin-right: -0.125em;
line-height: 1ex;
}

/* Heading typography */
h1 {
font-size: 2.5rem;
line-height: 3.25rem;
margin-bottom: 1.625rem;
}

h2 {
font-size: 1.7rem;
line-height: 2rem;
margin-top: 3rem;
}

h3 {
font-size: 1.4rem;
margin-top: 2.5rem;
}

h4 {
font-size: 1.2rem;
margin-top: 2rem;
}

h5 {
font-size: 1rem;
margin-top: 1.8rem;
}

h6 {
font-size: 1rem;
font-style: italic;
font-weight: normal;
margin-top: 2.5rem;
}

h3,
h4,
h5,
h6 {
line-height: 1.625rem;
}

h1 + h2 {
margin-top: 1.625rem;
}

h2 + h3,
h3 + h4,
h4 + h5 {
margin-top: 0.8rem;
}

h5 + h6 {
margin-top: -0.8rem;
}

h2,
h3,
h4,
h5,
h6 {
margin-bottom: 0.8rem;
}

+ 27
- 0
static/css/main.css View File

@@ -0,0 +1,27 @@
footer .theme-by {
text-align: center;
margin: 100px 0 0;
}

.pager {
list-style: none;
text-align: center;
margin: 20px 0 0;
padding-left: 0;
}

.pager ul {
display: block;
}

.pager .previous > a {
margin: 20px 0 0;
float: left;
display: block;
}

.pager .next > a {
margin: 20px 0 0;
float: right;
display: block;
}

+ 15
- 0
theme.toml View File

@@ -0,0 +1,15 @@
# theme.toml template for a Hugo theme
# See https://github.com/gohugoio/hugoThemes#themetoml for an example

name = "HugoTeX"
license = "MIT"
licenselink = "https://github.com/7ma7X/HugoTeX"
description = "LaTeX style hugo theme"
homepage = "http://example.com/"
tags = ["blog", "minimal", "simple", "LaTeX"]
features = ["minimal", "simple", "responsive", "syntax highlight", "LaTeX"]
min_version = "0.59.1"

[author]
name = "HelloRusk"
homepage = "https://hellorusk.net"

Loading…
Cancel
Save