29 Commits

Author SHA1 Message Date
289f55dc19 Throw error in include shortcode if file not found 2023-10-16 20:35:05 -05:00
0ddf0bdf42 Improve print compatiblity with navbar redesign 2023-10-15 20:54:11 -05:00
03d826f1c4 Fix wrong highlight color on navbar 2023-10-15 19:40:45 -05:00
f94307cdbf Redesign navbar to be full width 2023-10-15 19:33:10 -05:00
fde24f7438 Fix navbar highlighting on section page itself 2023-10-15 17:49:56 -05:00
c0426f191a Revert ":3"
This reverts 50a207b8ee
2023-10-15 00:42:45 -05:00
e8a34ae4a4 Add gap before page-list when there's no text description 2023-04-10 15:08:33 -05:00
18731498e8 Minor W3C validation fixes
Hopefully more to come soon, there's a lot of errors and warnings
2023-04-06 00:25:08 -05:00
ad5c40b02b Use CSS to set footer font size instead of <small> 2023-04-06 00:18:18 -05:00
e6b5997dff Move @media specializations section instead of previous commit
Reverts 960d1d24be
2023-04-06 00:12:43 -05:00
960d1d24be Fix table of contents on print 2023-04-06 00:11:12 -05:00
17047babc0 Improve date element in page metadata 2023-04-06 00:08:28 -05:00
7bc8a4cb57 Clean up CSS
- Add vim folds to make organized sections
- Rename a lot of classes from post- to page-
- Generalize series CSS classes better
- Clean up navbar div structure
- Remove langpicker and most of multilingual support
- many other minor tweaks
2023-03-24 08:49:02 -05:00
d34b2a56d7 Remove series position indicator -- racy and buggy 2023-03-18 21:11:07 -05:00
50a207b8ee :3 2023-03-18 20:23:49 -05:00
6f140f096b Organize summary template files
Also a small CSS patch to fix margin around post-title
2023-02-28 18:24:19 -06:00
316c62ebe8 Remove unnecessary credit.html partial 2023-02-28 17:54:22 -06:00
1caa7acdc9 Prevent page breaking in some elements when printing 2023-01-27 16:39:04 -06:00
f2f9e78559 Use RenderString instead of markdownify in some places 2023-01-27 16:14:23 -06:00
dd65d55389 Make sure link-1 has enough contrast 2023-01-26 16:54:17 -06:00
c7acf8ce38 Add link-1 color to light theme too 2023-01-26 16:47:39 -06:00
d7647a0b6f Fix table borders between th and td in same line 2023-01-26 16:43:46 -06:00
ebaa1de00b Add aria labels to share buttons 2023-01-26 16:36:03 -06:00
0744af717d Fix code block text sizing on mobile safari 2023-01-24 01:54:27 -06:00
23f86d5982 Use relative URL for fonts
Makes it work when the website isn't on root (such as demo)
2023-01-24 01:34:23 -06:00
b854ae48e6 Specify table.markdown instead of just .markdown for table styling 2023-01-23 18:11:00 -06:00
36a19a48b7 Add more borders in table for clarity 2023-01-23 18:10:11 -06:00
1f8a82228e Add include shortcode 2023-01-23 17:39:20 -06:00
60ed1c0264 Serve fonts (Open Sans and JetBrains Mono) rather than use system 2023-01-22 20:46:18 -06:00
64 changed files with 1079 additions and 1110 deletions

File diff suppressed because it is too large Load Diff

View File

@ -1,12 +0,0 @@
1: "enero"
2: "febrero"
3: "marzo"
4: "abril"
5: "mayo"
6: "julio"
7: "junio"
8: "agosto"
9: "septiembre"
10: "octubre"
11: "noviembre"
12: "diciembre"

View File

@ -61,10 +61,3 @@ languages:
languageName: English
title: Example Website
weight: 1
es:
languageName: Español
title: Sitio web ejemplo
weight: 2
params:
description: Sitio web ejemplo para bobatheme

View File

@ -19,9 +19,6 @@ copy_to_clipboard:
# Meta items
long_date:
other: "{{ .Date.Format `January 2, 2006` }}"
wordcount:
one: "{{ . }} word"
other: "{{ . }} words"
@ -58,8 +55,8 @@ newer_post:
# ARIA labels
aria_header_link:
other: "header link"
aria_heading_link:
other: "heading link"
aria_back_to_top_button:
other: "back to top button"
@ -70,9 +67,6 @@ aria_rss_link:
aria_post_meta_edit_history:
other: "link to page edit history"
aria_post_meta_translations:
other: "translations"
aria_post_meta_categories:
other: "categories"
@ -121,11 +115,23 @@ aria_series_metadata:
aria_navbar:
other: "navigation bar"
aria_langpicker:
other: "language picker"
aria_langpicker_list:
other: "language list"
aria_table_of_contents:
other: "table of contents"
aria_share_twitter:
other: "share to twitter button"
aria_share_facebook:
other: "share to facebook button"
aria_share_linkedin:
other: "share to linkedin button"
aria_share_reddit:
other: "share to reddit button"
aria_share_telegram:
other: "share to telegram button"
aria_share_print:
other: "print article button"

View File

@ -1,131 +0,0 @@
# Misc
credit_comment:
other: "<!-- bobatheme está disponible en GitHub basado en la licensia MIT: https://github.com/BBaoVanC/bobatheme. -->"
table_of_contents:
other: "Índice"
browser_no_video_support:
other: "Tu navegador de internet no admite video."
latest_posts:
other: "Artículos recientes"
see_also:
other: "Véase también:"
copy_to_clipboard:
other: "Copiar"
# Meta items
long_date:
other: "{{ .Date.Day }} de {{ index .Data.meses (printf `%d` .Date.Month) }} de {{ .Date.Year }}"
wordcount:
one: "{{ . }} palabra"
other: "{{ . }} palabras"
readingtime:
one: "{{ . }} min"
other: "{{ . }} mins"
edit_history:
other: "Historial de cambios"
# Post count
no_posts:
other: "¡No hay contenido para mostrar!"
post_count:
one: "{{ . }} publicación"
other: "{{ . }} publicaciones"
# Navigation
read_more:
other: "Leer más"
related_posts:
other: "Publicaciones similares"
older_post:
other: "Más antiguo"
newer_post:
other: "Más nuevo"
# ARIA labels
# aria_header_link:
# other: "header link"
# aria_back_to_top_button:
# other: "back to top button"
# aria_rss_link:
# other: "RSS feed link"
# aria_post_meta_edit_history:
# other: "link to page edit history"
# aria_post_meta_translations:
# other: "translations"
# aria_post_meta_categories:
# other: "categories"
# aria_post_meta_tags:
# other: "tags"
# aria_post_meta_reading_time:
# other: "reading time"
# aria_post_meta_authors:
# other: "authors"
# aria_post_meta_series:
# other: "series"
# aria_breadcrumbnav:
# other: "breadcrumb navigation bar"
# aria_post_metadata:
# other: "post metadata"
# aria_author_metadata:
# other: "author metadata"
# aria_taxonomy_metadata:
# other: "taxonomy metadata"
# aria_post_meta_date:
# other: "date"
# aria_post_meta_modified_date:
# other: "last modified date"
# aria_author_post_count:
# other: "post count"
# aria_author_word_count:
# other: "word count"
# aria_taxonomy_post_count:
# other: "post count"
# aria_series_metadata:
# other: "series metadata"
# aria_navbar:
# other: "navigation bar"
# aria_langpicker:
# other: "language picker"
# aria_langpicker_list:
# other: "language list"
# aria_table_of_contents:
# other: "table of contents"

View File

@ -1,7 +1,7 @@
<h{{ .Level }} id="{{ .Anchor | safeURL }}" class="section-header">
<h{{ .Level }} id="{{ .Anchor | safeURL }}" class="section-heading">
{{ .Text | safeHTML }}
<a href="#{{ .Anchor | safeURL }}">
<span class="section-header-link" aria-label="{{ i18n "aria_header_link" }}">
<a class="heading-link" href="#{{ .Anchor | safeURL }}">
<span aria-label="{{ i18n "aria_heading_link" }}">
{{ partial "icon.html" "link" }}
</span>
</a>

View File

@ -1,28 +1,27 @@
{{ partial "credit.html" }}
{{ i18n "credit_comment" | safeHTML }}
<!DOCTYPE html>
<html lang="{{ .Language.Lang }}">
{{ partial "head.html" . }}
<body>
<a id="top" name="top" aria-hidden="true"></a>
<a id="top" aria-hidden="true"></a>
<div class="top">
{{ partial "top.html" . }}
</div>
{{ partial "top.html" . }}
{{ if not .IsHome }}
{{ partial "breadcrumb.html" . }}
{{ end }}
<div class="center-body">
<main>
{{ block "main" . }}
THIS TEXT SHOULD NOT SHOW. YUZSIQGHE (that string is so I can grep for it)
{{ if not .IsHome }}
{{ partial "breadcrumb.html" . }}
{{ end }}
</main>
{{ if or .Site.Copyright .Site.Params.footer }}
<footer>
<small>
<main>
{{ block "main" . }}
THIS TEXT SHOULD NOT SHOW. YUZSIQGHE (that string is so I can grep for it)
{{ end }}
</main>
{{ if or .Site.Copyright .Site.Params.footer }}
<footer>
{{ with .Site.Copyright }}
<p>{{ . | safeHTML }}</p>
{{ end }}
@ -30,20 +29,21 @@
{{ with .Site.Params.footer }}
{{ . | $.RenderString (dict "display" "block") }}
{{ end }}
</small>
</footer>
{{ end }}
</footer>
{{ end }}
<a id="back-to-top" href="#top" aria-label="{{ i18n "aria_back_to_top_button" }}">
{{ partial "icon.html" "chevron-up" }}
</a>
<noscript>
<style>
#back-to-top {
display: block;
}
</style>
</noscript>
<a id="back-to-top" href="#top" aria-label="{{ i18n "aria_back_to_top_button" }}">
{{ partial "icon.html" "chevron-up" }}
</a>
<noscript>
<style>
#back-to-top {
display: block;
}
</style>
</noscript>
</div>
</body>
</html>

View File

@ -9,11 +9,11 @@
{{ . }}
{{ end }}
<div class="list-page-content">
<div class="list-page-container">
{{ with .Sections }}
<div class="sections">
{{ range . }}
{{ .Render "summary/section" }}
{{ .Render "summary" }}
{{ end }}
</div>
{{ end }}

View File

@ -1,12 +1,12 @@
{{ define "main" }}
<div class="post-title">
<div class="page-title">
<h1>
{{ .Title | markdownify }}
{{ if .Draft }}{{ partial "icon.html" "write" }}{{ end }}
</h1>
</div>
{{ partial "post-metadata/full.html" . }}
{{ partial "page-metadata/post-full.html" . }}
{{ partial "series-box.html" . }}
{{ if .Params.Toc }}

View File

@ -1,10 +1,10 @@
<h2 class="post-title">
<h2 class="page-title">
{{ with .Parent.Params.icon }}{{ partial "icon.html" . }}{{ end }}
<a href="{{ .Permalink }}">{{ .Title | markdownify }}</a>
<a class="heading-link" href="{{ .Permalink }}">{{ .Title | markdownify }}</a>
{{ if .Draft }}{{ partial "icon.html" "write" }}{{ end }}
</h2>
{{ partial "post-metadata/short.html" . }}
{{ partial "page-metadata/post-short.html" . }}
{{ with .Resources.GetMatch "feature" }}
<div class="post-media">
@ -12,7 +12,7 @@
</div>
{{ end }}
<div class="post-description">
<div class="page-description">
{{ partial "description-or-summary.html" . }}
</div>

View File

@ -1,16 +0,0 @@
<div class="author">
<h2 class="author-name">
<a href="{{ .Permalink }}">{{ .Title | markdownify }}</a>
{{ if .Draft }}{{ partial "icon.html" "write" }}{{ end }}
</h2>
{{ partial "post-metadata/author.html" . }}
<div class="author-description">
{{ partial "description-or-summary.html" . }}
</div>
<div class="readmore">
<a href="{{ .Permalink }}">{{ i18n "read_more" }} &rarr;</a>
</div>
</div>

View File

@ -1,24 +0,0 @@
<h2 class="post-title">
{{ with .Parent.Params.icon }}{{ partial "icon.html" . }}{{ end }}
<a href="{{ .Permalink }}">{{ .Title | markdownify }}</a>
{{ if .Draft }}{{ partial "icon.html" "write" }}{{ end }}
</h2>
{{ partial "post-metadata/series.html" . }}
<div class="post-description">
{{ partial "description-or-summary.html" . }}
</div>
<div class="series-page-list">
{{ $i := 0 }}
{{ $total := len .Data.Pages }}
{{ range .Data.Pages.Reverse }}
{{ $i = add 1 $i }}
{{ .Scratch.Set "series_position" $i }}
{{ .Scratch.Set "series_total" $total }}
<article class="post">
{{ .Render "summary/series_post" }}
</article>
{{ end }}
</div>

View File

@ -1,27 +0,0 @@
<div class="post-series-position">
{{ if .Scratch.Get "series_position" }}
({{ .Scratch.Get "series_position" }}/{{ .Scratch.Get "series_total" }})
{{ end }}
</div>
<h2 class="post-title">
{{ with .Parent.Params.icon }}{{ partial "icon.html" . }}{{ end }}
<a href="{{ .Permalink }}">{{ .Title | markdownify }}</a>
{{ if .Draft }}{{ partial "icon.html" "write" }}{{ end }}
</h2>
{{ partial "post-metadata/short.html" . }}
{{ with .Resources.GetMatch "feature" }}
<div class="post-media">
{{ partial "figure.html" (dict "src" .) }}
</div>
{{ end }}
<div class="post-description">
{{ partial "description-or-summary.html" . }}
</div>
<div class="readmore">
<a href="{{ .Permalink }}">{{ i18n "read_more" }} &rarr;</a>
</div>

View File

@ -11,8 +11,8 @@
<div class="page-list">
{{ with .Paginator.Pages }}
{{ range . }}
<article class="post">
{{ .Render "summary/author" }}
<article class="page">
{{ .Render "summary" }}
</article>
{{ end }}
{{ else }}

View File

@ -0,0 +1,14 @@
<h2 class="page-title">
<a class="heading-link" href="{{ .Permalink }}">{{ .Title | markdownify }}</a>
{{ if .Draft }}{{ partial "icon.html" "write" }}{{ end }}
</h2>
{{ partial "page-metadata/author.html" . }}
<div class="page-description">
{{ partial "description-or-summary.html" . }}
</div>
<div class="readmore">
<a href="{{ .Permalink }}">{{ i18n "read_more" }} &rarr;</a>
</div>

View File

@ -1,5 +1,5 @@
{{ define "main" }}
<div class="author-name">
<div class="page-title">
<h1>
{{ partial "icon.html" "user-circle" }}
{{ .Title | markdownify }}
@ -7,7 +7,7 @@
</h1>
</div>
{{ partial "post-metadata/author.html" . }}
{{ partial "page-metadata/author.html" . }}
{{ with .Content }}
{{ . }}

View File

@ -1 +0,0 @@
{{ i18n "credit_comment" | safeHTML }}

View File

@ -14,10 +14,10 @@
{{ end }}
{{ with resources.Get "js/bobatheme.js" | fingerprint "sha512" }}
<script defer src="{{ .Permalink }}" type="text/javascript" integrity="{{ .Data.Integrity }}" crossorigin="anonymous"></script>
<script defer src="{{ .Permalink }}" integrity="{{ .Data.Integrity }}" crossorigin="anonymous"></script>
{{ end }}
{{ with resources.Get "js/share-event.js" | fingerprint "sha512" }}
<script defer src="{{ .Permalink }}" type="text/javascript" integrity="{{ .Data.Integrity }}" crossorigin="anonymous"></script>
<script defer src="{{ .Permalink }}" integrity="{{ .Data.Integrity }}" crossorigin="anonymous"></script>
{{ end }}
{{ with .Site.Params.faviconSVG }}

View File

@ -1,8 +1,8 @@
<div class="page-list">
{{ with . }}
{{ range . }}
<article class="post">
{{ .Render "summary/post" }}
<article class="page">
{{ .Render "summary" }}
</article>
{{ end }}
{{ else }}

View File

@ -1,16 +1,16 @@
<div class="author-metadata" aria-label="{{ i18n "aria_author_metadata" }}">
<div class="page-metadata" aria-label="{{ i18n "aria_author_metadata" }}">
{{/* Calculate the total word count */}}
{{ $total_words := 0 }}
{{ range .Data.Pages }}
{{ $total_words = add $total_words .WordCount }}
{{ end }}
<span class="author-meta-item" aria-label="{{ i18n "aria_author_post_count" }}">
<span class="page-metadata-item" aria-label="{{ i18n "aria_author_post_count" }}">
{{ partial "icon.html" "newspaper" }}
{{ i18n "post_count" (len .Data.Pages) }}
</span>
<span class="author-meta-item" aria-label="{{ i18n "aria_author_word_count" }}">
<span class="page-metadata-item" aria-label="{{ i18n "aria_author_word_count" }}">
{{ partial "icon.html" "align-left" }}
{{ i18n "wordcount" $total_words }}
</span>

View File

@ -1,5 +1,5 @@
{{ with .Params.authors }}
<span class="post-meta-item" aria-label="{{ i18n "aria_post_meta_authors" }}">
<span class="page-metadata-item" aria-label="{{ i18n "aria_post_meta_authors" }}">
{{ partial "icon.html" "user-circle" }}
{{ if index $.Site.Taxonomies "authors" }}

View File

@ -4,7 +4,7 @@
{{ $categories = $categories | append (printf `<a href="%s">%s</a>` .Permalink .LinkTitle) }}
{{ end }}
<div class="categories" aria-label="{{ i18n "aria_post_meta_categories" }}">
<div class="page-metadata-section categories" aria-label="{{ i18n "aria_post_meta_categories" }}">
{{ partial "icon.html" "folder" }}
{{ delimit $categories ", " }}
</div>

View File

@ -1,5 +1,5 @@
{{ if and .Site.Params.gitHistoryURL .File.Path }}
<span class="post-meta-item post-meta-edit-history" aria-label="{{ i18n "aria_post_meta_edit_history" }}">
<span class="page-metadata-item post-meta-edit-history" aria-label="{{ i18n "aria_post_meta_edit_history" }}">
{{ partial "icon.html" "history" }}
<a href="{{ printf "%s/content/%s" .Site.Params.gitHistoryURL .File.Path }}" target="_blank" rel="noopener">
{{- i18n "edit_history" -}}

View File

@ -1,5 +1,5 @@
{{ if ne .Site.Params.readingtime false }}
<span class="post-meta-item" aria-label="{{ i18n "aria_post_meta_reading_time" }}">
<span class="page-metadata-item" aria-label="{{ i18n "aria_post_meta_reading_time" }}">
{{ partial "icon.html" "clock" }}
{{ i18n "readingtime" .ReadingTime }}
</span>

View File

@ -4,7 +4,7 @@
{{ $series = $series | append (printf `<a href="%s">%s</a>` .Permalink .LinkTitle) }}
{{ end }}
<div class="series" aria-label="{{ i18n "aria_post_meta_series" }}">
<div class="page-metadata-section series" aria-label="{{ i18n "aria_post_meta_series" }}">
{{ partial "icon.html" "files" }}
{{ delimit $series ", " }}
</div>

View File

@ -4,7 +4,7 @@
{{ $tags = $tags | append (printf `<a href="%s">%s</a>` .Permalink .LinkTitle) }}
{{ end }}
<div class="tags" aria-label="{{ i18n "aria_post_meta_tags" }}">
<div class="page-metadata-section tags" aria-label="{{ i18n "aria_post_meta_tags" }}">
{{ partial "icon.html" "tag" }}
{{ delimit $tags ", " }}
</div>

View File

@ -0,0 +1,26 @@
{{ if or .Date .Params.authors .Site.Params.readingtime .Site.Params.gitFileURL }}
<div class="page-metadata" aria-label="{{ i18n "aria_post_metadata" }}">
{{ if .Date }}
<span class="page-metadata-item" aria-label="{{ i18n "aria_post_meta_date" }}">
{{ partial "icon.html" "calendar" }}
{{ partial "time-element.html" .Date }}
</span>
{{/* TODO: make this be a tooltip */}}
{{/* DISABLED
{{ if ne (time.Format "2006-01-02" .Lastmod) (time.Format "2006-01-02" .Date) }}
<span class="page-metadata-item" aria-label="{{ i18n "aria_post_meta_modified_date" }}">
{{ partial "icon.html" "pencil" }}
{{ partial "time-element.html" .Lastmod }}
{{ end }}
</span>
*/}}
{{ end }}
{{ partial "page-metadata/item/authors.html" . }}
{{ partial "page-metadata/item/readingtime.html" . }}
{{ partial "page-metadata/item/edithistory.html" . }}
{{ partial "page-metadata/item/categories.html" . }}
{{ partial "page-metadata/item/tags.html" . }}
</div>
{{ end }}

View File

@ -0,0 +1,16 @@
{{ if or .Date .Params.authors .Site.Params.readingtime }}
<div class="page-metadata" aria-label="{{ i18n "aria_post_metadata" }}">
{{ if .Date }}
<span class="page-metadata-item" aria-label="date">
{{ partial "icon.html" "calendar" }}
{{ partial "time-element.html" .Date }}
</span>
{{ end }}
{{ partial "page-metadata/item/authors.html" . }}
{{ partial "page-metadata/item/readingtime.html" . }}
{{ partial "page-metadata/item/series.html" . }}
{{ partial "page-metadata/item/categories.html" . }}
{{ partial "page-metadata/item/tags.html" . }}
</div>
{{ end }}

View File

@ -1,11 +1,11 @@
<div class="post-metadata" aria-label="{{ i18n "aria_series_metadata" }}">
<span class="post-meta-item">
<div class="page-metadata" aria-label="{{ i18n "aria_series_metadata" }}">
<span class="page-metadata-item">
{{ partial "icon.html" "newspaper" }}
{{ i18n "post_count" (len .Data.Pages) }}
</span>
{{ if ne .Site.Params.readingtime false }}
<span class="post-meta-item">
<span class="page-metadata-item">
{{ partial "icon.html" "clock" }}
{{ $readingtime := 0 }}
{{ range .Data.Pages }}
@ -14,6 +14,4 @@
{{ i18n "readingtime" $readingtime }}
</span>
{{ end }}
{{ partial "post-meta-item/translations.html" . }}
</div>

View File

@ -1,8 +0,0 @@
{{ if .IsTranslated }}
<span class="post-meta-item" aria-label="{{ i18n "aria_post_meta_translations" }}">
{{ partial "icon.html" "world" }}
{{ range .Translations }}
<a href="{{ .Permalink }}">{{ .Language }}</a>
{{ end }}
</span>
{{ end }}

View File

@ -1,31 +0,0 @@
{{ if or .Date .Params.authors .IsTranslated .Site.Params.readingtime .Site.Params.gitFileURL }}
<div class="post-metadata" aria-label="{{ i18n "aria_post_metadata" }}">
{{ if .Date }}
<span class="post-meta-item" aria-label="{{ i18n "aria_post_meta_date" }}">
{{ partial "icon.html" "calendar" }}
<time datetime="{{ .Date.Format "2006-01-02" }}" pubdate>
{{ i18n "long_date" (dict "Date" .Date "Data" .Site.Data) }}
</time>
</span>
{{/* TODO: make this be a tooltip */}}
{{/* DISABLED
{{ if ne (time.Format "2006-01-02" .Lastmod) (time.Format "2006-01-02" .Date) }}
<span class="post-meta-item" aria-label="{{ i18n "aria_post_meta_modified_date" }}">
{{ partial "icon.html" "pencil" }}
<time datetime="{{ .Lastmod.Format "2006-01-02" }}" pubdate>
{{ i18n "long_date" (dict "Date" .Lastmod "Data" .Site.Data) }}
</time>
{{ end }}
</span>
*/}}
{{ end }}
{{ partial "post-meta-item/authors.html" . }}
{{ partial "post-meta-item/translations.html" . }}
{{ partial "post-meta-item/readingtime.html" . }}
{{ partial "post-meta-item/edithistory.html" . }}
{{ partial "post-meta-item/categories.html" . }}
{{ partial "post-meta-item/tags.html" . }}
</div>
{{ end }}

View File

@ -1,19 +0,0 @@
{{ if or .Date .Params.authors .IsTranslated .Site.Params.readingtime }}
<div class="post-metadata" aria-label="{{ i18n "aria_post_metadata" }}">
{{ if .Date }}
<span class="post-meta-item" aria-label="date">
{{ partial "icon.html" "calendar" }}
<time datetime="{{ .Date.Format "2006-01-02" }}" pubdate>
{{ i18n "long_date" (dict "Date" .Date "Data" .Site.Data) }}
</time>
</span>
{{ end }}
{{ partial "post-meta-item/authors.html" . }}
{{ partial "post-meta-item/translations.html" . }}
{{ partial "post-meta-item/readingtime.html" . }}
{{ partial "post-meta-item/series.html" . }}
{{ partial "post-meta-item/categories.html" . }}
{{ partial "post-meta-item/tags.html" . }}
</div>
{{ end }}

View File

@ -3,6 +3,7 @@
<a class="twitter-share"
target="_blank"
rel="noopener"
aria-label="{{ i18n "aria_share_twitter" }}"
onclick="share_event('Twitter');"
href="https://twitter.com/intent/tweet?url={{ .Permalink }}&text={{ .Title }}&via=bbaovanc">
{{- partial "icon.html" "twitter" -}}
@ -13,6 +14,7 @@
<a class="facebook-share"
target="_blank"
rel="noopener"
aria-label="{{ i18n "aria_share_facebook" }}"
onclick="share_event('Facebook');"
href="https://www.facebook.com/sharer.php?u={{ .Permalink }}">
{{- partial "icon.html" "facebook" -}}
@ -23,6 +25,7 @@
<a class="linkedin-share"
target="_blank"
rel="noopener"
aria-label="{{ i18n "aria_share_linkedin" }}"
onclick="share_event('LinkedIn');"
href="https://www.linkedin.com/sharing/share-offsite/?url={{ .Permalink }}">
{{- partial "icon.html" "linkedin" -}}
@ -33,6 +36,7 @@
<a class="reddit-share"
target="_blank"
rel="noopener"
aria-label="{{ i18n "aria_share_reddit" }}"
onclick="share_event('Reddit');"
href="https://reddit.com/submit?url={{ .Permalink }}&title={{ .Title }}">
{{- partial "icon.html" "reddit" -}}
@ -46,6 +50,7 @@
<a class="telegram-share"
target="_blank"
rel="noopener"
aria-label="{{ i18n "aria_share_telegram" }}"
onclick="share_event('Telegram');"
href="https://t.me/share/url?url={{ .Permalink }}&text={{ .Title }}">
{{- partial "icon.html" "telegram" -}}
@ -55,6 +60,7 @@
{{ if .Site.Params.shareButtons.print }}
<a class="print-share"
aria-label="{{ i18n "aria_share_print" }}"
href="javascript:void(0)"
onclick="window.print(); share_event('Print');">
{{- partial "icon.html" "printer" -}}

View File

@ -0,0 +1,3 @@
<time datetime="{{ .Format "2006-01-02T15:04:05Z07:00" }}" title="{{ . }}">
{{ .Format "January 2, 2006" }}
</time>

View File

@ -1,10 +1,10 @@
<header class="header">
<a href="{{ .Site.Home.Permalink | absLangURL }}">
{{ .Site.Title | markdownify }}
</a>
</header>
<div class="top">
<header class="header">
<a class="heading-link" href="{{ .Site.Home.Permalink | absLangURL }}">
{{ .Site.Title | markdownify }}
</a>
</header>
<div class="topbar">
<nav class="navbar" aria-label="{{ i18n "aria_navbar" }}">
{{ with .Site.Home }}
<a class="navbar-item{{ if $.IsHome }} active{{ end }}" href="{{ .Permalink | absLangURL }}">{{ .Title | markdownify }}</a>
@ -12,7 +12,8 @@
{{ range .Site.Menus.main }}
{{ $isActive := false }}
{{ if or ($.HasMenuCurrent .Menu .) ($.IsMenuCurrent .Menu .) }}
{{/* https://discourse.gohugo.io/t/ismenucurrent-not-working-with-using-sectionpagesmenu/46687/2?u=bbaovanc */}}
{{ if or ($.HasMenuCurrent .Menu .) (eq .Page $) }}
{{ $isActive = true }}
{{ end }}
<a class="navbar-item{{ if $isActive }} active{{ end }}"
@ -20,35 +21,4 @@
href="{{ .URL }}">{{ .Name }}</a>
{{ end }}
</nav>
{{ if .Site.IsMultiLingual }}
<details class="langpicker" aria-label="{{ i18n "aria_langpicker" }}">
<summary>
{{- partial "icon.html" "world" -}}
</summary>
<ul class="languages" aria-label="{{ i18n "aria_langpicker_list" }}">
{{ range .AllTranslations }}
<li>
<a class="langpicker-item{{ if eq .Language $.Site.Language }} active{{ end }}" href="{{ .Permalink }}">{{ .Language.LanguageName }}</a>
</li>
{{ end }}
{{ $site_translations := slice }}
{{ range .Site.Languages }}
{{ $site_translations = $site_translations | append .LanguageName }}
{{ end }}
{{ $translation_codes := slice }}
{{ range .AllTranslations }}
{{ $translation_codes = $translation_codes | append .Language }}
{{ end }}
{{ range (.Site.Languages | complement $translation_codes) }}
<li>
<a class="langpicker-item unavailable" aria-disabled="true">{{ .LanguageName }}</a>
</li>
{{ end }}
</ul>
</details>
{{ end }}
</div>

View File

@ -8,12 +8,12 @@
{{ . }}
{{ end }}
<div class="series-taxonomy-list">
{{ with .Pages }}
<div class="page-list series">
{{ with .Paginator.Pages }}
{{ range . }}
<article class="series-taxonomy">
{{ .Render "summary/series" }}
</article>
<div class="page series">
{{ .Render "summary" }}
</div>
{{ end }}
{{ else }}
<div>

View File

@ -0,0 +1,19 @@
<h2 class="page-title">
{{ with .Parent.Params.icon }}{{ partial "icon.html" . }}{{ end }}
<a class="heading-link" href="{{ .Permalink }}">{{ .Title | markdownify }}</a>
{{ if .Draft }}{{ partial "icon.html" "write" }}{{ end }}
</h2>
{{ partial "page-metadata/series.html" . }}
<div class="page-description">
{{ partial "description-or-summary.html" . }}
</div>
<div class="page-list series-inner">
{{ range .Data.Pages.Reverse }}
<article class="page">
{{ .Render "summary" }}
</article>
{{ end }}
</div>

View File

@ -5,7 +5,7 @@
{{ partial "rss-link.html" . }}
</h1>
{{ partial "post-metadata/series.html" . }}
{{ partial "page-metadata/series.html" . }}
{{ with .Content }}
{{ . }}

View File

@ -0,0 +1,20 @@
{{ $path := "" }}
{{ $markdown := false }}
{{ if .IsNamedParams }}
{{ $path = .Get "path" }}
{{ with .Get "markdown" }}
{{ $markdown = . }}
{{ end }}
{{ else }}
{{ $path = .Get 0 }}
{{ end }}
{{ with ($path | readFile) }}
{{ if $markdown }}
{{ $path | readFile | $.Page.RenderString (dict "display" "block") }}
{{ else }}
{{ $path | readFile }}
{{ end }}
{{ else }}
{{ errorf "file not found: %s" $path }}
{{ end }}

View File

@ -5,6 +5,6 @@
{{ $class = delimit (slice $class .) " " }}
{{ end }}
{{ $htmlTable := .Inner | markdownify }}
{{ $htmlTable := .Inner | .Page.RenderString (dict "display" "block") }}
{{ $new := printf `<table class="%s">` $class }}
{{ (replace $htmlTable "<table>" $new) | safeHTML }}

View File

@ -1,5 +1,5 @@
{{ define "main" }}
<div class="post-title">
<div class="page-title">
<h1>
{{ if eq .Data.Singular "tag" }}
{{ partial "icon.html" "tag" }}
@ -26,7 +26,7 @@
<a href="{{ .Permalink }}">
<p>{{ .Title | markdownify }}</p>
</a>
{{ partial "post-metadata/taxonomy.html" . }}
{{ partial "page-metadata/taxonomy.html" . }}
</div>
{{ partial "description-or-summary.html" . }}
</article>

View File

@ -1,5 +1,5 @@
{{ define "main" }}
<div class="post-title">
<div class="page-title">
<h1>
{{ if eq .Data.Singular "tag" }}
{{ partial "icon.html" "tag" }}
@ -14,7 +14,7 @@
</h1>
</div>
{{ partial "post-metadata/taxonomy.html" . }}
{{ partial "page-metadata/taxonomy.html" . }}
{{ with .Content }}
{{ . }}

View File

@ -0,0 +1,10 @@
# This is the official list of project authors for copyright purposes.
# This file is distinct from the CONTRIBUTORS.txt file.
# See the latter for an explanation.
#
# Names should be added to this file as:
# Name or Organization <email address>
JetBrains <>
Philipp Nurullin <philipp.nurullin@jetbrains.com>
Konstantin Bulenkov <kb@jetbrains.com>

View File

@ -0,0 +1,93 @@
Copyright 2020 The JetBrains Mono Project Authors (https://github.com/JetBrains/JetBrainsMono)
This Font Software is licensed under the SIL Open Font License, Version 1.1.
This license is copied below, and is also available with a FAQ at:
https://scripts.sil.org/OFL
-----------------------------------------------------------
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
-----------------------------------------------------------
PREAMBLE
The goals of the Open Font License (OFL) are to stimulate worldwide
development of collaborative font projects, to support the font creation
efforts of academic and linguistic communities, and to provide a free and
open framework in which fonts may be shared and improved in partnership
with others.
The OFL allows the licensed fonts to be used, studied, modified and
redistributed freely as long as they are not sold by themselves. The
fonts, including any derivative works, can be bundled, embedded,
redistributed and/or sold with any software provided that any reserved
names are not used by derivative works. The fonts and derivatives,
however, cannot be released under any other type of license. The
requirement for fonts to remain under this license does not apply
to any document created using the fonts or their derivatives.
DEFINITIONS
"Font Software" refers to the set of files released by the Copyright
Holder(s) under this license and clearly marked as such. This may
include source files, build scripts and documentation.
"Reserved Font Name" refers to any names specified as such after the
copyright statement(s).
"Original Version" refers to the collection of Font Software components as
distributed by the Copyright Holder(s).
"Modified Version" refers to any derivative made by adding to, deleting,
or substituting -- in part or in whole -- any of the components of the
Original Version, by changing formats or by porting the Font Software to a
new environment.
"Author" refers to any designer, engineer, programmer, technical
writer or other person who contributed to the Font Software.
PERMISSION & CONDITIONS
Permission is hereby granted, free of charge, to any person obtaining
a copy of the Font Software, to use, study, copy, merge, embed, modify,
redistribute, and sell modified and unmodified copies of the Font
Software, subject to the following conditions:
1) Neither the Font Software nor any of its individual components,
in Original or Modified Versions, may be sold by itself.
2) Original or Modified Versions of the Font Software may be bundled,
redistributed and/or sold with any software, provided that each copy
contains the above copyright notice and this license. These can be
included either as stand-alone text files, human-readable headers or
in the appropriate machine-readable metadata fields within text or
binary files as long as those fields can be easily viewed by the user.
3) No Modified Version of the Font Software may use the Reserved Font
Name(s) unless explicit written permission is granted by the corresponding
Copyright Holder. This restriction only applies to the primary font name as
presented to the users.
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
Software shall not be used to promote, endorse or advertise any
Modified Version, except to acknowledge the contribution(s) of the
Copyright Holder(s) and the Author(s) or with their explicit written
permission.
5) The Font Software, modified or unmodified, in part or in whole,
must be distributed entirely under this license, and must not be
distributed under any other license. The requirement for fonts to
remain under this license does not apply to any document created
using the Font Software.
TERMINATION
This license becomes null and void if any of the above conditions are
not met.
DISCLAIMER
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
OTHER DEALINGS IN THE FONT SOFTWARE.

View File

@ -0,0 +1,93 @@
Copyright 2020 The Open Sans Project Authors (https://github.com/googlefonts/opensans)
This Font Software is licensed under the SIL Open Font License, Version 1.1.
This license is copied below, and is also available with a FAQ at:
http://scripts.sil.org/OFL
-----------------------------------------------------------
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
-----------------------------------------------------------
PREAMBLE
The goals of the Open Font License (OFL) are to stimulate worldwide
development of collaborative font projects, to support the font creation
efforts of academic and linguistic communities, and to provide a free and
open framework in which fonts may be shared and improved in partnership
with others.
The OFL allows the licensed fonts to be used, studied, modified and
redistributed freely as long as they are not sold by themselves. The
fonts, including any derivative works, can be bundled, embedded,
redistributed and/or sold with any software provided that any reserved
names are not used by derivative works. The fonts and derivatives,
however, cannot be released under any other type of license. The
requirement for fonts to remain under this license does not apply
to any document created using the fonts or their derivatives.
DEFINITIONS
"Font Software" refers to the set of files released by the Copyright
Holder(s) under this license and clearly marked as such. This may
include source files, build scripts and documentation.
"Reserved Font Name" refers to any names specified as such after the
copyright statement(s).
"Original Version" refers to the collection of Font Software components as
distributed by the Copyright Holder(s).
"Modified Version" refers to any derivative made by adding to, deleting,
or substituting -- in part or in whole -- any of the components of the
Original Version, by changing formats or by porting the Font Software to a
new environment.
"Author" refers to any designer, engineer, programmer, technical
writer or other person who contributed to the Font Software.
PERMISSION & CONDITIONS
Permission is hereby granted, free of charge, to any person obtaining
a copy of the Font Software, to use, study, copy, merge, embed, modify,
redistribute, and sell modified and unmodified copies of the Font
Software, subject to the following conditions:
1) Neither the Font Software nor any of its individual components,
in Original or Modified Versions, may be sold by itself.
2) Original or Modified Versions of the Font Software may be bundled,
redistributed and/or sold with any software, provided that each copy
contains the above copyright notice and this license. These can be
included either as stand-alone text files, human-readable headers or
in the appropriate machine-readable metadata fields within text or
binary files as long as those fields can be easily viewed by the user.
3) No Modified Version of the Font Software may use the Reserved Font
Name(s) unless explicit written permission is granted by the corresponding
Copyright Holder. This restriction only applies to the primary font name as
presented to the users.
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
Software shall not be used to promote, endorse or advertise any
Modified Version, except to acknowledge the contribution(s) of the
Copyright Holder(s) and the Author(s) or with their explicit written
permission.
5) The Font Software, modified or unmodified, in part or in whole,
must be distributed entirely under this license, and must not be
distributed under any other license. The requirement for fonts to
remain under this license does not apply to any document created
using the Font Software.
TERMINATION
This license becomes null and void if any of the above conditions are
not met.
DISCLAIMER
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
OTHER DEALINGS IN THE FONT SOFTWARE.

View File

@ -0,0 +1,100 @@
Open Sans Variable Font
=======================
This download contains Open Sans as both variable fonts and static fonts.
Open Sans is a variable font with these axes:
wdth
wght
This means all the styles are contained in these files:
OpenSans-VariableFont_wdth,wght.ttf
OpenSans-Italic-VariableFont_wdth,wght.ttf
If your app fully supports variable fonts, you can now pick intermediate styles
that arent available as static fonts. Not all apps support variable fonts, and
in those cases you can use the static font files for Open Sans:
static/OpenSans_Condensed/OpenSans_Condensed-Light.ttf
static/OpenSans_Condensed/OpenSans_Condensed-Regular.ttf
static/OpenSans_Condensed/OpenSans_Condensed-Medium.ttf
static/OpenSans_Condensed/OpenSans_Condensed-SemiBold.ttf
static/OpenSans_Condensed/OpenSans_Condensed-Bold.ttf
static/OpenSans_Condensed/OpenSans_Condensed-ExtraBold.ttf
static/OpenSans_SemiCondensed/OpenSans_SemiCondensed-Light.ttf
static/OpenSans_SemiCondensed/OpenSans_SemiCondensed-Regular.ttf
static/OpenSans_SemiCondensed/OpenSans_SemiCondensed-Medium.ttf
static/OpenSans_SemiCondensed/OpenSans_SemiCondensed-SemiBold.ttf
static/OpenSans_SemiCondensed/OpenSans_SemiCondensed-Bold.ttf
static/OpenSans_SemiCondensed/OpenSans_SemiCondensed-ExtraBold.ttf
static/OpenSans/OpenSans-Light.ttf
static/OpenSans/OpenSans-Regular.ttf
static/OpenSans/OpenSans-Medium.ttf
static/OpenSans/OpenSans-SemiBold.ttf
static/OpenSans/OpenSans-Bold.ttf
static/OpenSans/OpenSans-ExtraBold.ttf
static/OpenSans_Condensed/OpenSans_Condensed-LightItalic.ttf
static/OpenSans_Condensed/OpenSans_Condensed-Italic.ttf
static/OpenSans_Condensed/OpenSans_Condensed-MediumItalic.ttf
static/OpenSans_Condensed/OpenSans_Condensed-SemiBoldItalic.ttf
static/OpenSans_Condensed/OpenSans_Condensed-BoldItalic.ttf
static/OpenSans_Condensed/OpenSans_Condensed-ExtraBoldItalic.ttf
static/OpenSans_SemiCondensed/OpenSans_SemiCondensed-LightItalic.ttf
static/OpenSans_SemiCondensed/OpenSans_SemiCondensed-Italic.ttf
static/OpenSans_SemiCondensed/OpenSans_SemiCondensed-MediumItalic.ttf
static/OpenSans_SemiCondensed/OpenSans_SemiCondensed-SemiBoldItalic.ttf
static/OpenSans_SemiCondensed/OpenSans_SemiCondensed-BoldItalic.ttf
static/OpenSans_SemiCondensed/OpenSans_SemiCondensed-ExtraBoldItalic.ttf
static/OpenSans/OpenSans-LightItalic.ttf
static/OpenSans/OpenSans-Italic.ttf
static/OpenSans/OpenSans-MediumItalic.ttf
static/OpenSans/OpenSans-SemiBoldItalic.ttf
static/OpenSans/OpenSans-BoldItalic.ttf
static/OpenSans/OpenSans-ExtraBoldItalic.ttf
Get started
-----------
1. Install the font files you want to use
2. Use your app's font picker to view the font family and all the
available styles
Learn more about variable fonts
-------------------------------
https://developers.google.com/web/fundamentals/design-and-ux/typography/variable-fonts
https://variablefonts.typenetwork.com
https://medium.com/variable-fonts
In desktop apps
https://theblog.adobe.com/can-variable-fonts-illustrator-cc
https://helpx.adobe.com/nz/photoshop/using/fonts.html#variable_fonts
Online
https://developers.google.com/fonts/docs/getting_started
https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Fonts/Variable_Fonts_Guide
https://developer.microsoft.com/en-us/microsoft-edge/testdrive/demos/variable-fonts
Installing fonts
MacOS: https://support.apple.com/en-us/HT201749
Linux: https://www.google.com/search?q=how+to+install+a+font+on+gnu%2Blinux
Windows: https://support.microsoft.com/en-us/help/314960/how-to-install-or-remove-a-font-in-windows
Android Apps
https://developers.google.com/fonts/docs/android
https://developer.android.com/guide/topics/ui/look-and-feel/downloadable-fonts
License
-------
Please read the full license text (OFL.txt) to understand the permissions,
restrictions and requirements for usage, redistribution, and modification.
You can use them in your products & projects print or digital,
commercial or otherwise.
This isn't legal advice, please consider consulting a lawyer and see the full
license for all details.