Initialisation du site avec intégration de binario

This commit is contained in:
Stéphan Peccini 2025-06-18 09:36:28 +02:00
commit daf161c878
Signed by: stephan
GPG Key ID: 3A9774E9CCBF3501
105 changed files with 9872 additions and 0 deletions

4
.gitignore vendored Normal file
View File

@ -0,0 +1,4 @@
public/
resources/
archetypes/
.hugo_build.lock

6
.gitmodules vendored Normal file
View File

@ -0,0 +1,6 @@
[submodule "themes/ananke"]
path = themes/ananke
url = https://github.com/budparr/gohugo-theme-ananke
[submodule "themes/notepad"]
path = themes/notepad
url = https://github.com/cntrump/hugo-notepadium.git

1
config.toml Normal file
View File

@ -0,0 +1 @@

5
content/_index.md Normal file
View File

@ -0,0 +1,5 @@
---
title: "Accueil"
---
Ce blog a pour objectif d'accompagner l'application [Fabnum](https://fabnum.peccini.fr) sur l'identification et l'analyse des risques de la chaîne de fabrication du numérique.

27
content/about.md Normal file
View File

@ -0,0 +1,27 @@
+++
date = '2025-06-17'
modified = "2025-06-18"
draft = false
title = 'À propos'
#menu = { main = { weight = 10, name = "À propos" } }
tags = ["fabnum"]
categories = ['pages']
+++
## Qui suis-je ?
Autoentrepreneur dans le Conseil Numérique Responsable depuis début 2021, jai passé auparavant plus de trente ans dans des ESN importantes pour accompagner les DSI de grands groupes dans leur transformation digitale ou la conduite du changement. Jy ai alors acquis une forte expérience sur tout le cycle de vie dune affaire depuis la création dune offre jusquà la fin dune prestation.
Jai souhaité faire correspondre mes aspirations pour un meilleur équilibre personnel - professionnel et pour que mes réalisations puissent aider à rendre le monde plus agréable.
Depuis maintenant un an, avec le constat que les convictions ou les récits désirables ne sont pas suffisants pour faire passer le numérique responsable à un niveau supérieur, j'ai décidé de changer ma manière d'aborder le sujet avec deux axes principaux.
## Quels sont ces deux axes ?
Le premier concerne les risques ; très peu de personnes connaissent réellement les risques que le numérique engendre sur les métiers et nos usages. La chaîne de fabrication du numérique est d'une forte complexité avec de nombreuses vulnérabilités : concentration géographique et industrielle dans des pays modérément ou fortement instables, utilise des minerais qui sont critiques dans la fabrication par manque de substitut, minerais qui sont très souvent en forte concurrence avec d'autres secteurs ; la fabrication du numérique est aussi une très importante consommatrice d'eau et d'énergie entraînant de la concurrence avec les usages du quotidien par exemple.
Le deuxième concerne l'IA, au sens large. L'IA étant en développement très fort pour ne pas dire exponentiel, à combiner avec les risques précédents, il m'a semblé nécessaire, non pas de la rejeter complètement, mais de l'accompagner grâce à un travail conjoint avec l'[Agence Lucie](https://www.linkedin.com/company/agence-lucie-rse/). J'ai d'abord co-écrit le [Manifeste pour un usage moral de l'IA](https://framagit.org/biens-communs/charte-ia-ethique/-/raw/main/Livrables/Manifeste_pour_un_usage_moral_de_l_IA.pdf) avec [Mikaël Mesnil Duprat](https://www.linkedin.com/in/mmesnil/) pour expliquer les raisons et décrire les conditions. Avec l'Agence Lucie, nous définissons une certification de conformité au manifeste pour la création d'un service d'IA.
## Accompagnement
Vous souhaitez du conseil ou de la formation autour du numérique responsable, des risques ou de la certification ? [Contactez-moi](mailto:stephan-pro@peccini.fr) et nous trouverons ensemble la solution adaptée à votre besoin.

Binary file not shown.

After

Width:  |  Height:  |  Size: 85 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 129 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 708 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 102 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 102 KiB

View File

@ -0,0 +1,30 @@
+++
date = '2025-06-17'
draft = false
title = 'Lancement du blog, FabNum'
summary = "FabNum est une application que j'ai conçue pour identifier et analyser les vulnérabilités de la chaîne de fabrication du numérique. Vous êtes sur le blog qui présentera l'application et les vulnérabilités."
tags = ["fabnum","risques"]
categories = ["posts"]
+++
## Pourquoi ce site ?
La chaîne de fabrication du numérique, qui s'étend de l'extraction des matières premières à l'assemblage final, joue un rôle central dans les activités économiques et sociétales.
Pourtant, cette chaîne reste insuffisamment étudiée dans son entièreté. De nombreuses analyses existantes portant sur la « criticité » des minerais ne vont pas au-delà d'une approche macroéconomique, souvent focalisée sur la seule rareté d'un métal ou sur le degré de concentration de sa production.
![Figure 1. Impacts et rétroactions sur la chaîne de fabrication](/posts/images/lancement_du_blog/Impacts_et_retroactions.png)
Or, dans le contexte actuel de « polycrise globale », marqué par des tensions géopolitiques, des aléas climatiques et une croissance rapide de la demande hors numérique (transition énergétique, défense, etc.), voir schéma ci-dessus, ces approches généralistes révèlent leurs limites.
En effet, elles ont du mal à évaluer l'incidence concrète sur les divers éléments du domaine numérique, tout comme à prendre en compte la possibilité de la concurrence potentielle que d'autres secteurs génèrent pour une même ressource.
Dans le secteur électronique, certains métaux deviennent stratégiques non pas uniquement parce qu'ils sont rares, mais parce qu'ils sont difficiles à substituer dans tel ou tel élément, ou parce que d'autres industries, particulièrement dynamiques, peuvent en capter la majeure partie avant même que l'électronique n'y ait accès.
Par ailleurs, l'accent est souvent mis sur l'extraction et le raffinage, alors que la concentration peut être tout aussi problématique dans les étapes de fabrication de composants (fondeurs, par exemple) ou d'assemblage final (assembleurs majeurs).
Cette diversité de maillons et de risques justifie de mettre en place une approche plus fine, tenant compte à la fois des dynamiques industrielles, de la concurrence intersectorielle et de la substituabilité effective des ressources dans un composant précis.
L'application [Fabnum](https://fabnum.peccini.fr) et ce blog apportent des réponses à cette problématique.
## Que va-t-on y trouver ?
Des nouvelles sur l'application FabNum en plein développement et des informations sur les signaux qui pourraient déclencher des risques.

View File

@ -0,0 +1,109 @@
+++
date = '2025-06-18T07:50:15+02:00'
draft = false
title = 'Minerais critiques en rupture'
summary = 'Pékin décide de restreindre les exportations de certains minerais critiques. Quelles sont les conséquences ?'
tags = ['fabnum','dysprosium','terbium','samarium','scandium','gadolinium','yttrium']
categories = ['posts','minerais critiques']
+++
## Partons d'un cas réel
Ce cas a été décrit dans cet article de Not Like The Others, [Métaux critiques : Pékin ferme les vannes, les chaînes de production menacées](https://www.nlto.fr/metaux-critiques-pekin-ferme-les-vannes-les-chaines-de-production-menacees/).
Que dit cet article ?
> Les terres rares, groupe de 17 éléments chimiques, sont présentes dans des composants essentiels à une large gamme déquipements : moteurs électriques, disques durs, capteurs optiques, générateurs déoliennes, batteries de véhicules électriques, ou encore dispositifs médicaux. Or, 90 % du raffinage mondial de ces éléments est contrôlé par la Chine, qui fournit directement ou indirectement une part dominante de lapprovisionnement global.
>
> Parmi les métaux désormais sous restriction :
>
> * Dysprosium et terbium : stabilisateurs magnétiques pour moteurs de haute performance.
> * Samarium et gadolinium : composants daimants et déquipements médicaux.
> * Scandium et yttrium : alliages pour laéronautique, lasers industriels.
>
> Le blocage de ces matériaux entraîne un ralentissement immédiat des flux logistiques pour les industriels américains et européens.
---
## Que découvre-t-on ?
La concurrence entre secteurs apparaît immédiatement. Les terres rares, minerais essentiels au numérique, sont indispensables pour des secteurs industriels majeurs et en plein essor, comme les batteries pour les voitures ou les éoliennes.
Deuxième point important, la concentration de l'extraction et du raffinage est extrême, présentant ainsi une vulnérabilité comme le montre bien NLTO.
La question qui se pose alors est de de connaître l'impact de cette rupture sur la chaîne de fabrication du numérique. Et FabNum va vous aider à le comprendre.
---
## Comment utiliser FabNum ?
[FabNum](https://fabnum.peccini.fr) propose deux options selon votre degré d'aisance dans son utilisation et le résultat que vous souhaitez obtenir.
---
### Onglet Analyse
Il permet de faire des sélections fines sur tous les chemins qui vont des pays au produits finaux. Si vous n'êtes pas encore familier avec l'application, je vous invite à lire l'onglet Instructions qui vous donnera toutes les clés.
Toutefois, il est nécessaire de bien connaître l'application et la structure des données pour faire l'interprétation des graphes.
Reprenons le cas d'usage précédent et considérons une entreprise (banque en ligne) pour laquelle le smartphone est vital ; elle souhaite savoir quel serait l'impact d'une rupture dans l'approvisionnement des 6 minerais. Rien de plus simple avec FabNum.
Il suffit d'introduire le scénario dans la zone de sélection :
![Figure 1. Filtre du scénario](/posts/images/premier_cas_d_usage/Filtre_du_scenario.png)
Et on obtient le graphe suivant :
![Figure 2. Graphe du scénario](/posts/images/premier_cas_d_usage/Graphe_du_scenario.png)
L'analyse du graphe nous donne les informations suivantes :
* Tous les minerais sont difficilement susbstituables sauf le samarium pour la connectivité
* Le dysprosium, le samarium et le scandium sont en très forte concurrence avec d'autres secteurs
* Les opérations d'extraction et de traitement de l'ensemble des minerais présentent une très forte concentration géographique, voire industrielle
* La Chine est modérement instable
En conclusion, une rupture longue de ces minerais mettrait en réelle difficulté la filière du smartphone.
---
### Onglet Plan d'action
Vous souhaitez aller plus loin dans l'analyse, ou vous n'êtes pas encore au point avec l'application, vous pouvez utiliser cet onglet.
La sélection pour introduire le scénario est plus simple et directe :
![Figure 3. Filtre du plan d'action](/posts/images/premier_cas_d_usage/Filtre_du_plan_d_action.png)
Le résultat se présente alors en plusieurs sections :
![Figure 4. Plan d'action - section 1](/posts/images/premier_cas_d_usage/Plan_d_action_section_1.png)
En haut à droite se trouve la zone de sélection avec sur sa droite la liste du top 5 étendu des chemins critiques qui permettent aussi de faire des sélections rapides.
En dessous, se trouve les synthèses des criticités. Pour bien comprendre ces graphes, je vous invite à lire les instructions avec la description des indices.
![Figure 5. Plan d'action - vue d'ensemble des criticités](/posts/images/premier_cas_d_usage/Vue_d_ensemble_des_criticites.png)
**Comment interpréter ces graphes**
Prenons l'exemple de l'opération d'extraction du dysprosium, la pastille verte du graphe de gauche. On voir que la concentration (IHH) est quasiment monpolistique (proche de 100) et avec une stabilité moyenne pondérée modérée. Une rupture de l'approvisionnement du dysprosium par la Chine est un quasi-arrêt de la chaîne qui en dépend.
En dessous se trouve la décomposition des graphes pour mieux les comprendre.
La section qui suit est celle qui va permettre d'anticiper les risques et elle présente à la fois un plan d'action adapté au niveau de criticité avec des actions faciles, modérées ou difficiles à mettre en œuvre et des indicateurs selon le même principe.
> En fonction de l'activité de l'entreprise, elle les mettra en œuvre ou demandera à ses fournisseurs de le faire. La figure donne l'exemple de l'opération d'assemblage du smartphone.
![Figure 6. Plan d'action - actions et indicateurs](/posts/images/premier_cas_d_usage/Actions_et_indicateurs.png)
Et finalement, si vous souhaitez avoir encore plus détails, vous pouvez lire le détail des opérations en bas de page.
La conclusion est la même que précédemment, mais avec des actions à mettre en place et des indicateurs à suivre pour anticiper les aléas.
---
## Point d'attention
FabNum est encore en cours de développement. N'hésitez pas à me remonter vos commentaires, suggestions, bugs ; cela permettra de rendre FabNum encore plus pertinente.

50
hugo.toml Normal file
View File

@ -0,0 +1,50 @@
baseURL = 'http://localhost:1313/'
defaultContentLanguage = "fr"
languageCode = "fr-fr"
title = 'FabNum, le blog'
theme = "binario"
[taxonomies]
category = "categories"
tag = "tags"
[Params]
description = "FabNum, le blog des vulnérabilités de la fabrication du numérique"
author = "Stéphan Peccini"
colorTheme = "dark-green"
mainMenuAlignment = "right"
dateFormat = "02 January 2006"
authorbox = true # Show authorbox at bottom of single pages if true
comments = true # Enable comments for all site pages
related = true # Enable Related content for single pages
relatedMax = 5
[Params.Entry]
meta = ["date", "tags", "categories", "readingtime"]
toc = true # Enable Table of Contents
tocOpen = true
[Params.Social]
email = "stephan-pro@peccini.fr"
linkedin = "stéphan-peccini"
[Params.Share]
linkedin = true
[Params.Manifest]
name = "FabNum, le blog"
shortName = "FabNum"
display = "browser"
startUrl = "/"
backgroundColor = "#2a2a2a"
themeColor = "#1b1b1b"
description = "FabNum, le blog des vulnérabilités de la fabrication du numérique"
orientation = "portrait"
scope = "/"
[[menu.main]]
identifier = "about"
name = "À propos"
url = "/about/"
weight = 10
[[menu.main]]
name = "RSS"
url = "/index.xml"
weight = 20

View File

@ -0,0 +1,19 @@
# editorconfig.org
root = true
[*]
charset = utf-8
indent_style = tab
end_of_line = lf
trim_trailing_whitespace = true
insert_final_newline = true
[*.md]
trim_trailing_whitespace = false
[*.{json,yaml,yml,toml,md,babelrc,eslintrc,stylelintrc}]
indent_style = space
indent_size = 2
[layouts/**.{html,svg}]
insert_final_newline = false

19
themes/binario/.gitignore vendored Normal file
View File

@ -0,0 +1,19 @@
# Node/npm
node_modules/
npm-debug.log
# IDE
.idea
*.sublime-project
*.sublime-workspace
.vscode/*
# OS
._*
Thumbs.db
.DS_Store
.Trashes
.Spotlight-V100
.AppleDouble
.LSOverride
Desktop.ini

319
themes/binario/.stylelintrc Normal file
View File

@ -0,0 +1,319 @@
{
"plugins": [
"stylelint-order"
],
"rules": {
"at-rule-empty-line-before": [
"always",
{
"except": [
"blockless-after-same-name-blockless",
"first-nested"
],
"ignore": [
"after-comment"
]
}
],
"at-rule-name-case": "lower",
"at-rule-name-space-after": "always-single-line",
"at-rule-semicolon-newline-after": "always",
"block-closing-brace-newline-after": "always",
"block-closing-brace-empty-line-before": "never",
"block-no-empty": true,
"block-opening-brace-newline-after": "always-multi-line",
"color-hex-case": "lower",
"color-hex-length": "short",
"color-no-invalid-hex": true,
"comment-no-empty": true,
"declaration-bang-space-after": "never",
"declaration-bang-space-before": "always",
"declaration-block-no-duplicate-properties": [
true,
{
"ignore": [
"consecutive-duplicates-with-different-values"
]
}
],
"declaration-block-no-shorthand-property-overrides": true,
"declaration-block-semicolon-newline-after": "always-multi-line",
"declaration-block-semicolon-space-after": "always-single-line",
"declaration-block-semicolon-space-before": "never",
"declaration-block-single-line-max-declarations": 1,
"declaration-block-trailing-semicolon": "always",
"declaration-colon-newline-after": "always-multi-line",
"declaration-colon-space-after": "always-single-line",
"declaration-colon-space-before": "never",
"font-family-no-duplicate-names": true,
"function-calc-no-unspaced-operator": true,
"function-comma-newline-after": "always-multi-line",
"function-comma-space-after": "always-single-line",
"function-comma-space-before": "never",
"function-linear-gradient-no-nonstandard-direction": true,
"function-max-empty-lines": 0,
"function-name-case": "lower",
"function-parentheses-newline-inside": "always-multi-line",
"function-parentheses-space-inside": "never-single-line",
"function-whitespace-after": "always",
"indentation": "tab",
"keyframe-declaration-no-important": true,
"length-zero-no-unit": true,
"max-empty-lines": 1,
"media-feature-colon-space-after": "always",
"media-feature-colon-space-before": "never",
"media-feature-name-case": "lower",
"media-feature-name-no-unknown": true,
"media-feature-parentheses-space-inside": "never",
"media-feature-range-operator-space-after": "always",
"media-feature-range-operator-space-before": "always",
"media-query-list-comma-newline-after": "always-multi-line",
"media-query-list-comma-space-after": "always-single-line",
"media-query-list-comma-space-before": "never",
"no-empty-source": true,
"no-eol-whitespace": true,
"no-extra-semicolons": true,
"no-invalid-double-slash-comments": true,
"no-missing-end-of-source-newline": true,
"number-no-trailing-zeros": true,
"property-case": "lower",
"property-no-unknown": true,
"selector-attribute-brackets-space-inside": "never",
"selector-attribute-operator-space-after": "never",
"selector-attribute-operator-space-before": "never",
"selector-combinator-space-after": "always",
"selector-combinator-space-before": "always",
"selector-descendant-combinator-no-non-space": true,
"selector-list-comma-newline-after": "always",
"selector-list-comma-space-before": "never",
"selector-pseudo-class-case": "lower",
"selector-pseudo-class-no-unknown": true,
"selector-pseudo-class-parentheses-space-inside": "never",
"selector-pseudo-element-case": "lower",
"selector-pseudo-element-colon-notation": "double",
"selector-pseudo-element-no-unknown": true,
"selector-type-case": "lower",
"selector-type-no-unknown": true,
"shorthand-property-no-redundant-values": true,
"string-no-newline": true,
"unit-case": "lower",
"unit-no-unknown": true,
"value-list-comma-newline-after": "always-multi-line",
"value-list-comma-space-after": "always-single-line",
"value-list-comma-space-before": "never",
"value-list-max-empty-lines": 0,
"order/properties-order": [
"position",
"top",
"right",
"bottom",
"left",
"z-index",
"box-sizing",
"display",
"flex",
"flex-align",
"flex-basis",
"flex-direction",
"flex-wrap",
"flex-flow",
"flex-shrink",
"flex-grow",
"flex-wrap",
"align-content",
"align-items",
"align-self",
"justify-content",
"order",
"float",
"width",
"min-width",
"max-width",
"height",
"min-height",
"max-height",
"padding",
"padding-top",
"padding-right",
"padding-bottom",
"padding-left",
"margin",
"margin-top",
"margin-right",
"margin-bottom",
"margin-left",
"overflow",
"overflow-x",
"overflow-y",
"-webkit-overflow-scrolling",
"-ms-overflow-x",
"-ms-overflow-y",
"-ms-overflow-style",
"columns",
"column-count",
"column-fill",
"column-gap",
"column-rule",
"column-rule-width",
"column-rule-style",
"column-rule-color",
"column-span",
"column-width",
"orphans",
"widows",
"clip",
"clear",
"font",
"font-family",
"font-size",
"font-style",
"font-weight",
"font-variant",
"font-size-adjust",
"font-stretch",
"font-effect",
"font-emphasize",
"font-emphasize-position",
"font-emphasize-style",
"font-smooth",
"src",
"hyphens",
"line-height",
"color",
"text-align",
"text-align-last",
"text-emphasis",
"text-emphasis-color",
"text-emphasis-style",
"text-emphasis-position",
"text-decoration",
"text-indent",
"text-justify",
"text-outline",
"-ms-text-overflow",
"text-overflow",
"text-overflow-ellipsis",
"text-overflow-mode",
"text-shadow",
"text-transform",
"text-wrap",
"-webkit-text-size-adjust",
"-ms-text-size-adjust",
"letter-spacing",
"-ms-word-break",
"word-break",
"word-spacing",
"-ms-word-wrap",
"word-wrap",
"overflow-wrap",
"tab-size",
"white-space",
"vertical-align",
"direction",
"unicode-bidi",
"list-style",
"list-style-position",
"list-style-type",
"list-style-image",
"pointer-events",
"-ms-touch-action",
"touch-action",
"cursor",
"visibility",
"zoom",
"table-layout",
"empty-cells",
"caption-side",
"border-spacing",
"border-collapse",
"content",
"quotes",
"counter-reset",
"counter-increment",
"resize",
"user-select",
"nav-index",
"nav-up",
"nav-right",
"nav-down",
"nav-left",
"background",
"background-color",
"background-image",
"filter",
"background-repeat",
"background-attachment",
"background-position",
"background-position-x",
"background-position-y",
"background-clip",
"background-origin",
"background-size",
"border",
"border-color",
"border-style",
"border-width",
"border-top",
"border-top-color",
"border-top-style",
"border-top-width",
"border-right",
"border-right-color",
"border-right-style",
"border-right-width",
"border-bottom",
"border-bottom-color",
"border-bottom-style",
"border-bottom-width",
"border-left",
"border-left-color",
"border-left-style",
"border-left-width",
"border-radius",
"border-top-left-radius",
"border-top-right-radius",
"border-bottom-right-radius",
"border-bottom-left-radius",
"border-image",
"border-image-source",
"border-image-slice",
"border-image-width",
"border-image-outset",
"border-image-repeat",
"outline",
"outline-width",
"outline-style",
"outline-color",
"outline-offset",
"box-shadow",
"opacity",
"-ms-interpolation-mode",
"page-break-after",
"page-break-before",
"page-break-inside",
"transition",
"transition-delay",
"transition-timing-function",
"transition-duration",
"transition-property",
"transform",
"transform-origin",
"perspective",
"appearance",
"animation",
"animation-name",
"animation-duration",
"animation-play-state",
"animation-timing-function",
"animation-delay",
"animation-iteration-count",
"animation-direction",
"animation-fill-mode",
"quotes",
"will-change",
"fill",
"fill-rule",
"stroke"
]
}
}

View File

@ -0,0 +1,132 @@
# Contributing to Binario
**Binario** welcomes contributions and corrections. Before contributing, please make sure you have read the guidelines
below. If you're a newcomer to open source and you haven't contributed to other projects or used
[Git](https://git-scm.com/) before, you should make yourself familiar before proceeding.
## Issues
The [issue tracker](https://github.com/vimux/binario/issues) is the preferred channel for bug reports and features
requests, but please respect the following restrictions:
### General requirements
* Issue must be written in English.
* Please **do not** combine a few problems or feature requests in one issue. Create separate issues if needed.
* Please **do not** create an issue that contains only title. Write a clear title and useful description.
* Please **do not** use the issue tracker for personal support requests.
* Please **do not** post comments consisting solely of "+1" or emoji. The project maintainer reserve the right to delete
such comments. Use
[GitHub's reactions feature](https://github.com/blog/2119-add-reactions-to-pull-requests-issues-and-comments) instead.
* Search first before filing a new issue. Please check existing open or recently closed issues to make sure somebody
else hasn't already reported the issue.
### Reporting bugs
When creating a new bug issue make sure to include the following information:
* Your environment e.g. OS version, Hugo version, theme is up to date? Anything unusual about your environment or
deployment.
* Specify the exact steps to reproduce the bug in as many details as possible with code examples. Include links to files
or demo projects, or copy/pasteable snippets, which you use in those examples.
* Any message or error you get from Hugo, if you do.
* A screenshot of any visual bug.
Please, take in consideration the next template to report your bug:
> **Hugo version**\
> _Run `hugo version` and paste output here._
>
> **Theme is up to date?**\
> _No | Yes_
>
> **Expected behavior**\
> _A short and expressive description of what behavior you're expecting._
>
> **Current behavior**\
> _A short sentence explaining what's actually happening, possibly containing screenshots._
>
> **Steps to reproduce / Code to reproduce**\
> _A step by step description of how to trigger this bug. / Provide link to a demo project which reproduces this bug._
>
> **Additional info**\
> _Anything unusual about your environment or deployment process? Anything else do we need to know? Optional._
**Note:** If you find a **Closed** issue that seems like it is the same bug that you're experiencing, open a new issue
and include a link to the original issue in the body of your new one.
### Proposing features
* Explain the proposed feature, what it should do, why it is useful, and alternatives considered if possible. Please
note that the project maintainer may close this issue or ask you to create a Pull Request if this is not something that
the project maintainer sees as a sufficiently high priority.
Following these guidelines helps maintainer and the community understand your suggestion and find related suggestions.
## Pull Requests (PR)
**Please ask first** before embarking on any significant pull request (e.g. implementing features or refactoring code),
otherwise, you risk spending a lot of time working on something that the project maintainer might not want to merge into
the project.
Please respect our Pull Request Acceptance Criteria. For larger changes, you will likely receive multiple rounds of
comments and it may take some time to complete.
### Pull Request Acceptance Criteria
* Keep the change in a single PR as small as possible
* 1 PR = 1 FIX or FEATURE (do not combine things, send separate PR if needed)
* PR with irrelevant changes won't be merged. If you do want to fix formatting or style, do that in a separate PR
* Use a clear and descriptive branch name (e.g. **NOT** "patch-1" or "update")
* Don't create a Pull Request from master branch
* Provide a reasonable PR title and description
* PR must be written in English
* If the PR changes the UI it should include before-and-after screenshots or a link to a video
* Keep PR up to date with upstream/master
* Pay attention to any automated CI failures reported in the Pull Request
* PR solves a common use case that several users will need in their real-life projects, not only your specific problems
* Before you start something new or refactor something old, make sure you've read through the codebase and understand
each part's purpose so that you don't break something
* Always try to avoid breaking changes. But if they are needed, then mark each breaking commit with a
"BREAKING CHANGE:" prefix in the commit title and a detailed explanation in the commit description of what happened and
what the user needs to do
* Deprecated params must be maintained for a 6-month transition period
* If something mandates an unclear solution, leave a comment behind for the contributors that come after you
* If you've added or modify SVG, ensure that each SVG file:
* Be less than 2048 bytes
* Be minified to a single line with no formatting
* Not contain any JS or CSS section inside it
* Not contain any additional transformations (matrix, translate, scale) or negative viewBox position values
* Сompatible with [MIT License](LICENSE)
* Maintain clean commit history and use meaningful commit messages. Pull Requests with messy commit history (with
commit messages like "update", "another update", etc) are difficult to review and won't be merged, even if the changes
are good enough
* Be prepared to answer questions and make code changes. The project maintainer expect you to be reasonably responsive
to those feedback, otherwise the PR will be closed after 2-4 weeks of inactivity
### Pull Request Contribution Prerequisites
* You have Node & npm installed
* You have Hugo installed at v0.48.0+
* You are familiar with Git
### Pull Request Process
1. Fork the repository
1. Clone down the repository to your local system
1. Run `npm i` in the repository root
1. Create a new *dedicated branch* with descriptive name from `master`
1. Make your change and commit to the new branch from the previous step
1. Write a clear commit message
1. If you've added code that need documentation, update the README.md
1. Make sure your code lints (`npm test`)
1. Push to your fork
1. Submit a Pull Request (PR) to the upstream
---
**⚠️ IMPORTANT: No guarantees can be made that your pull request will be accepted.**
## License
By contributing to Binario, you agree that your contributions will be licensed under [MIT License](LICENSE).

20
themes/binario/LICENSE Normal file
View File

@ -0,0 +1,20 @@
The MIT License (MIT)
Copyright (c) 2018 Vimux
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.

463
themes/binario/README.md Normal file
View File

@ -0,0 +1,463 @@
# Binario
**Binario** is a responsive card-based & code-light Hugo theme.
**[Demo](https://binario.netlify.app/)**
![Binario theme screenshot](https://raw.githubusercontent.com/vimux/binario/master/images/tn.png)
**Features:**
* Responsive
* Card-based list layout
* Color themes
* Internal Hugo templates (Open Graph, Schema, Twitter Cards, Google Analytics, Disqus comments)
* Table of contents
* Related content
* MathJax
## Table of Contents
- [Installation](#installation)
- [Option A. Git clone](#option-a-git-clone)
- [Option B. Git submodule](#option-b-git-submodule)
- [Option C. Download ZIP and manual install](#option-c-download-zip-and-manual-install)
- [Configuration](#configuration)
- [Config.toml example](#configtoml-example)
- [Front Matter example](#front-matter-example)
- [Configuration options](#configuration-options)
- [Columns](#columns)
- [Custom CSS](#custom-css)
- [Custom JS](#custom-js)
- [Entry Meta](#entry-meta)
- [Related Content](#related-content)
- [Share Buttons](#share-buttons)
- [Featured Image](#featured-image)
- [Breadcrumb](#breadcrumb)
- [Footer Social Icons](#footer-social-icons)
- [Web App Manifest](#web-app-manifest)
- [Contributing](#contributing)
- [License](#license)
## Installation
*First of all, you will need to [install Hugo](https://gohugo.io/getting-started/quick-start/#step-1-install-hugo) and
[create a new site](https://gohugo.io/getting-started/quick-start/#step-2-create-a-new-site). Also, you have git
installed on your machine and you are familiar with basic git usage. After that, you ready to install **Binario**.*
There are three different ways you can install **Binario**. Choose one of the installation methods listed below and
follow the instructions.
- **A**. [Git clone](#option-a-git-clone)
- **B**. [Git submodule](#option-b-git-submodule)
- **C**. [Download ZIP and manual install](#option-c-download-zip-and-manual-install)
*For more information read the "[Install and Use Themes](https://gohugo.io/themes/installing-and-using-themes/)"*.
### Option A. Git clone
In your Hugo site directory, run:
```
git clone https://github.com/vimux/binario themes/binario
```
Next, edit your `config.toml` configuration file and add parameter:
```toml
theme = "binario"
```
### Option B. Git submodule
In your Hugo site directory, run:
```
git submodule add https://github.com/vimux/binario themes/binario
```
Next, edit your `config.toml` configuration file and add parameter:
```toml
theme = "binario"
```
*You can [read the GitHub documentation for submodules](https://github.com/blog/2104-working-with-submodules) or those
found on [Git's website](https://git-scm.com/book/en/v2/Git-Tools-Submodules) for more information*
### Option C. Download ZIP and manual install
**[Download ZIP](https://github.com/vimux/binario/archive/master.zip)** and extract to the `themes/binario` within your
Hugo website.
Next, edit your `config.toml` configuration file and add parameter:
```toml
theme = "binario"
```
***
You can run your site in Hugo server mode:
```
hugo server
```
Now you can go to [localhost:1313](http://localhost:1313) webpage and the Binario theme should be visible.
After you make sure that **Binario** works, you may start customizing the theme if it's needed. You can change
[number of columns](#columns), activate [footer social icons](#footer-social-icons), [share buttons](#share-buttons) and
[much more](#configuration-options).
## Configuration
Hugo uses the `config.toml`, `config.yaml`, or `config.json` (if found in the site root) as the default site config
file. Here is Binario configuration example in TOML with all available theme-specific config params:
### Config.toml example
```toml
baseurl = "/"
title = "Binario"
languageCode = "en-us"
paginate = "10" # Number of elements per page in pagination
theme = "binario"
disqusShortname = "" # DEPRECATED! Use .Services.Disqus.Shortname
googleAnalytics = "" # DEPRECATED! Use .Services.googleAnalytics.ID
[services.disqus]
shortname = "" # Enable Disqus by entering your Disqus shortname
[services.googleAnalytics]
ID = "" # Enable Google Analytics by entering your tracking ID
[Author] # Used in authorbox
name = "John Doe"
bio = "John Doe's true identity is unknown. Maybe he is a successful blogger or writer."
avatar = "img/avatar.png"
[Params]
description = "Responsive card-based & code-light Hugo theme" # Site Description. Used in meta description
copyright = "Binario" # Copyright holder, otherwise will use .Site.Title
opengraph = true # Enable OpenGraph if true
schema = true # Enable Schema
twitter_cards = true # Enable Twitter Cards if true
columns = 2 # Set the number of cards columns. Possible values: 1, 2, 3
mainSections = ["post"] # Set main page sections
dateFormat = "January 02, 2006" # Change the format of dates
colorTheme = "" # dark-green, dark-blue, dark-red, dark-violet
customCSS = ["css/custom.css"] # Include custom CSS files
customJS = ["js/custom.js"] # Include custom JS files
mainMenuAlignment = "right" # Align main menu (desktop version) to the right side
authorbox = true # Show authorbox at bottom of single pages if true
comments = true # Enable comments for all site pages
related = true # Enable Related content for single pages
relatedMax = 5 # Set the maximum number of elements that can be displayed in related block. Optional
mathjax = true # Enable MathJax for all site pages
mathjaxPath = "https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.6/MathJax.js" # Specify MathJax path. Optional
mathjaxConfig = "TeX-AMS-MML_HTMLorMML" # Specify MathJax config. Optional
hideNoPostsWarning = false # Don't show no posts empty state warning in main page, if true
[Params.Entry]
meta = ["date", "categories", "tags"] # Enable meta fields in given order
toc = true # Enable Table of Contents
tocOpen = true # Open Table of Contents block. Optional
[Params.Featured]
previewOnly = false # Show only preview featured image
[Params.Breadcrumb]
enable = true # Enable breadcrumb block globally
homeText = "Binario" # Home node text
[Params.Social]
email = "example@example.com"
facebook = "username"
twitter = "username"
telegram = "username"
instagram = "username"
pinterest = "username"
vk = "username"
linkedin = "username"
github = "username"
gitlab = "username"
stackoverflow = "numberid"
mastodon = "https://some.instance/@username"
medium = "username"
[Params.Share] # Entry Share block
facebook = true
twitter = true
reddit = true
telegram = true
linkedin = true
vk = true
pocket = true
pinterest = true
# Web App Manifest settings
# https://www.w3.org/TR/appmanifest/
# https://developers.google.com/web/fundamentals/web-app-manifest/
[Params.Manifest]
name = "Binario"
shortName = "Binario"
display = "browser"
startUrl = "/"
backgroundColor = "#2a2a2a"
themeColor = "#1b1b1b"
description = "Responsive card-based & code-light Hugo theme"
orientation = "portrait"
scope = "/"
[outputFormats]
[outputFormats.MANIFEST]
mediaType = "application/json"
baseName = "manifest"
isPlainText = true
notAlternative = true
[outputs]
home = ["HTML", "RSS", "MANIFEST"]
```
For more information about Hugo configuration files and all common configuration settings, please read
"[Configure Hugo](https://gohugo.io/getting-started/configuration)" from Hugo official documentation.
### Front Matter example
Hugo supports three formats for front matter: `yaml`, `toml` and `json`. Here is Front Matter example in YAML:
```yaml
---
# Common-Defined params
title: "Example article title"
date: "2017-08-21"
lastmod: "2018-12-21"
description: "Example article description"
categories:
- "Category 1"
- "Category 2"
tags:
- "Tag"
- "Another tag"
menu: main # Add page to a menu. Options: main, footer
# Theme-Defined params
comments: true # Enable/disable Disqus comments for specific page
authorbox: true # Enable/disable Authorbox for specific page
toc: true # Enable/disable Table of Contents for specific page
tocOpen: true # Open Table of Contents block for specific page
mathjax: true # Enable/disable MathJax for specific page
related: true # Enable/disable Related content for specific page
meta:
- date
- categories
- tags
featured:
url: image.jpg # relative path of the image
alt: A scale model of the Eiffel tower # alternate text for the image
caption: Eiffel tower model # image caption
credit: Unknown author # image credit
previewOnly: false # show only preview image (true/false)
---
```
For more information about front matter variables and formats read
"[Hugo Front Matter](https://gohugo.io/content-management/front-matter)" from Hugo official documentation.
### Configuration options
Binario includes some customizable configuration options that may be useful.
#### Columns
By default, Binario works with two columns card layout (if it possible by screen size) for list pages, but you can also
use one or three columns layout. Change `Params.columns`to preferable value (from 1 to 3). You can also change this
option for specific list pages in frontmatter params.
#### Custom CSS
If you want to include custom CSS files, you need to assign an array of references in site config file
(`config.toml` by default) like following:
```toml
[Params]
customCSS = ["css/custom.css"]
```
Of course, you can reference as many CSS files as you want. Their paths need to be relative to the `static` folder of
your Hugo site:
```toml
[Params]
customCSS = ["css/custom.css", "css/another.css"]
```
All custom CSS files will be added in the `head` section of a `baseof.html` right after the built-in CSS file.
#### Custom JS
You can add custom JavaScript files by assigning an array of references in site config file (`config.toml` by default)
like following:
```toml
[Params]
customJS = ["js/custom.js"]
```
And of course, just like with custom CSS, you can reference as many JS files as you want. Their paths need to be
relative to the `static` folder of your Hugo site:
```toml
[Params]
customJS = ["js/custom.js", "js/another.js"]
```
All custom JS files will be added before closing body tag of a `baseof.html` file.
#### Entry Meta
Entry metadata are relevant information about your entry such as published date, last modified date, category, etc. You
may activate meta fields with `meta` parameter under the `[Params.Entry]` config section:
```toml
[Params.Entry]
meta = ["date", "categories", "tags"]
```
#### Related Content
Binario uses default Related Content Hugo feature to provide "See Also"-like section. You can activate "Related Content"
section with `.Site.Params.related` parameter.
More information available at [Hugo Related Content](https://gohugo.io/content-management/front-matter)
#### Share Buttons
To display share buttons, set up `[Params.Share]` specific parameters in your site config file.
Available share buttons: Facebook, Twitter, Reddit, Telegram, LinkedIn, VK, Pocket, Pinterest
#### Featured Image
There are two main different ways to add a featured image for a page.
**Option 1.** Put `featured.*` or `thumbnail.*` image file in the
[page bundle](https://gohugo.io/content-management/page-bundles/).
**Option 2.** Put any image in the page bundle & specify `featured` param in the page's front matter.
You may put any image in the page bundle and specify `featured` param in the page's front matter:
```yaml
featured: image.jpg
```
Or you can add some additional params like `alt`, `caption`, `credit` and `previewOnly`:
```yaml
featured:
url: image.jpg
alt: A scale model of the Eiffel tower standing on a map
caption: Eiffel tower model
credit: Unknown author
previewOnly: false
```
**Note**: `caption` and `credit` appear only on single pages, not summaries.
#### Breadcrumb
Breadcrumb navigation is a hierarchical navigation menu presented as a trail of links. The main purpose of breadcrumb is
to help users navigate in the site hierarchy.
For enabling breadcrumb partial globally (for all single and list pages), use `enable` param under the
`[Params.Breadcrumb]` section of your config.toml file:
```toml
[Params.Breadcrumb]
enable = true
```
The global `.Site.Params.Breadcrumb.enable` param can be overridden for specific pages with `breadcrumb` front matter
param:
```yaml
breadcrumb: false
```
#### Footer Social Icons
With Binario, you have the option to display social icons in the footer. To display them, set up `[Params.Social]`
specific parameters in your site config file.
Available social services: Email, Facebook, Twitter, Telegram, Instagram, Pinterest, VK, LinkedIn, GitHub, GitLab,
Stack Overflow, Mastodon, Medium
#### Web App Manifest
[Web App Manifest](https://developers.google.com/web/fundamentals/web-app-manifest/) is a simple json file with basic
site info like name, description, icons, etc. This file tells the browser about your web application and how it should
behave when "installed" (as PWA) on the users mobile device or desktop.
To activate Web App Manifest, define `MANIFEST` as custom output format and include this for `home` Kind attribute in
your site config file. Here's how to make it.
First of all, you should define `MANIFEST` custom output format [`config.toml`]:
```toml
[outputFormats]
[outputFormats.MANIFEST]
mediaType = "application/json"
baseName = "manifest"
isPlainText = true
notAlternative = true
```
Then, include `MANIFEST` output format for `home` Kind attribute [`config.toml`]:
```toml
[outputs]
home = ["HTML", "RSS", "MANIFEST"]
```
After that, Web App Manifest file will be generated. Still, it's better to specify `[Params.Manifest]` params to make
sure that everything works as expected.
| Web App Manifest Property | `.Site.Params.Manifest` Key | Default Value | Type |
| ------------------------- | --------------------------- | ------------- | ----------- |
| name | name | `.Site.Title` | required |
| short_name | shortName | `.Site.Title` | required |
| display | display | `browser` | required |
| start_url | startUrl | `/` | required |
| background_color | backgroundColor | `#2a2a2a` | recommended |
| theme_color | themeColor | `#1b1b1b` | recommended |
| description | description | | recommended |
| orientation | orientation | | recommended |
| scope | scope | | recommended |
| icons\* | | | required |
\* You can't customize manifest icons through config params, only replacing `icons/192.png` and `icons/512.png` files.
---
*To verify that your manifest file is configured properly and works well, run Hugo server and open
Chrome DevTools (Press F12 in Chrome) → Application → Manifest*
*If you use Apache as a web server, you may have difficulty accessing files in the icons folder within your root dir.
Check [Issue #4](https://github.com/Vimux/Binario/issues/4) for more information.*
## Contributing
Have a bug? [Please open a new issue](https://github.com/vimux/binario/issues/new).
Pull requests are very welcome too, but please make sure they match the existing
[contributing guide](https://github.com/vimux/binario/blob/master/CONTRIBUTING.md).
## License
Binario is licensed under the [MIT License](https://github.com/vimux/binario/blob/master/LICENSE).
* Social media icons based on [SuperTinyIcons](https://github.com/edent/SuperTinyIcons) [MIT]
* CSS Reset based on [Bootstrap Reboot](https://github.com/twbs/bootstrap/blob/v4-dev/dist/css/bootstrap-reboot.css)
[MIT]

View File

@ -0,0 +1,744 @@
body {
max-width: 1200px;
margin: 0 auto;
text-align: left;
word-wrap: break-word;
overflow-wrap: break-word;
-moz-osx-font-smoothing: grayscale;
-webkit-font-smoothing: antialiased;
}
@media screen and (min-width: 480px) {
ol,
ul,
dl {
padding-left: 2.5rem;
}
}
blockquote {
padding: 0 1rem;
border-left: 5px solid #f8ae00;
}
blockquote footer {
text-align: right;
}
pre {
padding: 1.25rem;
background-color: #111;
}
code {
padding: 1px 3px;
background-color: #111;
border-radius: 2px;
}
pre code {
padding: 0;
background-color: inherit;
border-radius: 0;
}
kbd {
font-weight: 700;
}
figure {
display: inline-block;
}
figcaption {
padding: .5rem;
background-color: #111;
}
img {
max-width: 100%;
}
table {
width: 100%;
margin-bottom: 1rem;
border-spacing: 0;
border-top: 1px solid #ddd;
border-left: 1px solid #ddd;
}
td,
th {
padding: .3125rem .625rem;
border-right: 1px solid #ddd;
border-bottom: 1px solid #ddd;
}
th {
font-weight: 700;
}
.mt {
margin-top: 1rem;
}
.mb {
margin-bottom: 1rem;
}
.mla {
margin-left: auto;
}
.tal {
text-align: left;
}
.tar {
text-align: right;
}
.btn {
background-color: #111;
border-radius: 3px;
}
.btn:hover {
color: #fff;
background-color: #000;
}
/* Header */
.header {
margin: 0 0 .3125rem;
overflow: auto;
background-color: #2a2a2a;
border-color: #333;
border-style: solid;
border-width: 0 0 1px;
}
.block {
padding: .875rem;
margin: .1875rem 0;
color: #eee;
background-color: #2a2a2a;
border-color: #333;
border-style: solid;
border-width: 1px 0;
}
@media screen and (min-width: 480px) {
.header {
margin: 0 .3125rem .3125rem;
border-width: 0 1px 1px;
}
.block {
margin: .625rem .3125rem;
border-width: 1px;
}
}
.logo {
display: inline-block;
padding: .625rem .875rem;
font-size: 16px;
font-weight: 700;
}
.logo:hover {
color: #f8ae00;
text-decoration: none;
}
.js .logo {
float: left;
}
/* Menu */
.main-menu {
display: block;
font-size: 0;
font-weight: 700;
}
.no-js .main-nav__btn {
display: none;
}
.main-nav__btn {
display: block;
float: right;
padding: 0;
font-size: 1em;
cursor: pointer;
background-color: #2a2a2a;
border: 0;
border-left: 1px solid #333;
outline: 0;
fill: #f8ae00;
}
.main-nav__btn:focus,
.main-nav__btn:hover {
color: #000;
}
.main-nav__btn-box {
position: relative;
display: inline-flex;
align-items: center;
justify-content: center;
width: 42px;
height: 42px;
}
:focus > .main-nav__btn-box {
box-shadow: inset 0 0 1px 3px #4285f4;
}
button:not(:-moz-focusring):focus > .main-nav__btn-box {
box-shadow: none;
}
.main-nav__btn:focus,
.main-nav__btn-box:focus {
outline: none;
}
.main-nav__btn .icon-menu__burger {
display: inline;
}
.main-nav__btn .icon-menu__x {
display: none;
}
.main-nav__btn--active .icon-menu__burger {
display: none;
}
.main-nav__btn--active .icon-menu__x {
display: inline;
}
.main-nav__list {
font-size: 0;
}
.main-nav__item {
font-size: 1rem;
font-weight: 700;
border-top: 1px solid #333;
}
.main-nav__item:hover {
background-color: #444;
}
.main-nav__item--active {
padding: .625rem .875rem .625rem .625rem;
border-left: 4px solid #888;
}
.main-nav__item--active:hover {
background-color: transparent;
}
.main-nav__link {
display: block;
padding: .625rem .875rem .625rem .625rem;
border-left: 4px solid transparent;
}
.main-nav__link:hover {
text-decoration: none;
border-color: #666;
}
.main-nav__list {
padding: 0;
margin: 0;
list-style: none;
}
.js .main-nav__list {
display: none;
}
.js .main-nav__btn {
display: block;
}
.main-nav__list.main-nav__list--active {
display: block;
width: 100%;
clear: both;
background-color: #2a2a2a;
}
@media (min-width: 920px) {
.header {
display: flex;
}
.logo {
display: inline-block;
}
.js .main-nav__list {
display: block;
}
.js .main-nav__btn {
display: none;
}
.main-nav__btn {
display: none;
}
.main-nav {
display: flex;
}
.main-nav__item {
display: inline-block;
border: 0;
}
.main-nav__item--active {
padding: .625rem .625rem .5rem;
border-bottom: 2px solid #888;
}
.main-nav__link {
padding: .625rem .625rem .5rem;
border-bottom: 2px solid transparent;
border-left: 0;
}
.main-nav--right {
margin-left: auto;
}
.main-nav__list.main-nav__list--active {
position: initial;
border: 0;
}
}
/* Taxonomies */
.page {
margin-bottom: .3125rem;
}
.page__title {
margin-bottom: 0;
}
.page__content {
margin-top: 1rem;
}
.page__content--notitle {
margin: 0;
}
.page__content p:last-child {
margin-bottom: 0;
}
/* Cards UI */
.cards {
display: flex;
flex-wrap: wrap;
}
.card {
display: flex;
width: 100%;
}
.card:first-child {
border-top: 1px solid #333;
}
.card__box {
display: flex;
flex-direction: column;
width: 100%;
margin: 0;
border-width: 0 0 1px;
}
@media screen and (min-width: 480px) {
.card {
padding: .3125rem;
}
.card:first-child {
border: 0;
}
.card__box {
border-width: 1px;
}
}
@media screen and (min-width: 720px) {
.card--2col {
width: 50%;
}
.card--3col {
width: 50%;
}
}
@media screen and (min-width: 860px) {
.card--3col {
width: 33.333%;
}
}
/* Entry */
.title-excerpt {
font-size: 1.25rem;
}
.entry__featured {
width: 100%;
min-height: 1px; /* Workaround for IE11 flexbox img height issue https://github.com/philipwalton/flexbugs/issues/75 */
text-align: center;
background-color: #1f1f1f;
}
.featured__figcaption {
width: 100%;
padding: 1rem;
text-align: left;
background-color: #111;
}
.featured__credit::before {
content: "© ";
}
.featured__credit {
font-size: .875rem;
font-style: normal;
color: #888;
}
.entry__content {
flex: 1 0 auto;
margin: 0;
overflow: auto;
color: #c3c3c3;
}
.entry__content p:last-child {
margin-bottom: 0;
}
.entry__meta {
font-size: .875rem;
color: #999;
}
.entry__meta-published,
.entry__meta-lastmod {
display: block;
}
.entry__tags {
margin-top: 2rem;
}
.entry__tag {
display: inline-block;
padding: .25rem .5rem;
margin: .25rem;
line-height: 1.5;
}
.toc {
padding: .5rem;
margin-bottom: 1rem;
color: #f8ae00;
list-style: none;
background-color: #111;
}
.toc[open] {
color: #fff;
}
.toc__title {
padding: .25rem;
font-weight: 700;
}
.toc nav {
padding: .5rem 0 .5rem .5rem;
}
.toc nav ul {
padding-left: 25px;
}
.toc nav ul li {
list-style: none;
}
.toc nav > ul {
padding: 0;
margin: 0;
}
.entry__footer {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
margin-top: 1.5rem;
}
.entry__tags {
display: flex;
flex-basis: 100%;
flex-wrap: wrap;
margin: 0 -.25rem auto;
}
.entry__share {
display: flex;
flex-basis: 100%;
flex-wrap: wrap;
margin: 0 -.25rem auto;
}
@media screen and (min-width: 720px) {
.entry__tags {
flex: 1 0 65%;
justify-content: flex-start;
}
.entry__share {
flex: 1 0 35%;
justify-content: flex-end;
}
}
.share__link {
margin: .25rem;
font-size: 0;
}
.share__link:hover {
margin: .25rem;
text-decoration: none;
}
.share__icon {
width: 32px;
height: 32px;
fill: #f8ae00;
stroke: #f8ae00;
}
.share__icon:hover {
fill: #fff;
stroke: #fff;
}
.breadcrumb {
padding: .875rem;
margin: .1875rem 0 -.1875rem;
color: #c3c3c3;
border-width: 1px 0 0;
}
.breadcrumb--separated {
margin: .1875rem 0 .3125rem;
border-width: 1px 0;
}
@media screen and (min-width: 480px) {
.breadcrumb {
margin: .625rem .3125rem -.625rem;
border-width: 1px 1px 0;
}
.breadcrumb--separated {
margin: .625rem .3125rem .3125rem;
border-width: 1px;
}
}
.breadcrumb__list {
display: flex;
flex-wrap: wrap;
padding: 0;
margin: 0;
list-style: none;
}
.breadcrumb__item {
display: flex;
}
.breadcrumb__item::after {
display: block;
margin: 0 .3125rem;
content: "";
}
.alignleft {
float: left;
margin: 1rem 1rem 1rem 0;
}
.alignright {
float: right;
margin: 1rem 0 1rem 1rem;
}
.center {
text-align: center;
}
/* Authorbox */
.author {
display: flex;
align-items: flex-start;
}
.author__avatar {
margin-right: .875rem;
margin-bottom: 0;
}
.author__img {
border-radius: 50%;
}
.author__body {
flex: 1;
}
.author__name {
margin-bottom: .625rem;
font-weight: 700;
}
/* Comments */
.comments {
margin-top: .625rem;
margin-bottom: .625rem;
}
/* Related */
.related {
margin-top: .625rem;
}
/* Pagination */
.pagination {
margin: .3125rem 0;
text-align: center;
background-color: #2a2a2a;
}
@media screen and (min-width: 480px) {
.pagination {
margin: .3125rem .3125rem .625rem;
}
}
.pagination__item {
display: inline-block;
padding: .25rem .625rem;
font-weight: 700;
border: 1px solid;
}
.pagination__item--gap {
color: #888;
cursor: default;
border-color: #888;
}
/* 404 */
.page404__title {
font-size: 2.25rem;
font-weight: 700;
}
.page404__lead {
margin-bottom: 2rem;
font-size: 1.5rem;
}
.page404__link {
font-size: 1.5rem;
}
/* Empty state */
.empty__icon {
margin-bottom: 2rem;
font-size: 3.5rem;
}
.empty__tip {
padding: .5rem;
margin: 4rem 0 0;
background-color: #202020;
}
/* Footer */
.footer {
padding: .625rem 0;
margin: .3125rem 0 0;
font-size: .8125rem;
color: #888;
text-align: center;
border-top: 2px solid #333;
}
.footer__social {
display: flex;
flex-wrap: wrap;
justify-content: center;
margin-bottom: .5rem;
}
.social__link {
margin: .25rem;
font-size: 0;
background-color: #2a2a2a;
border: 1px solid #333;
fill: #999;
stroke: #999;
}
.social__link:hover {
fill: #c3c3c3;
stroke: #c3c3c3;
}
.social__icon {
width: 32px;
height: 32px;
}
.footer__links {
margin-bottom: .5rem;
}
@media screen and (min-width: 480px) {
.footer {
margin: .3125rem .3125rem 0;
}
}

View File

@ -0,0 +1,40 @@
/* Print */
@media print {
.entry__content a,
.entry__meta a,
.entry__tag {
color: #000;
text-decoration: underline;
}
.logo,
.block,
.entry__title,
.entry__title-link,
.meta-categories__link,
.entry__meta,
.entry__content {
color: #000;
}
.main-nav,
.comments,
.entry__toc,
.related,
.footer__copyright-credits {
display: none;
}
.header,
.block {
border: 0;
}
mark {
background-color: #25a;
}
blockquote {
border-color: #000;
}
}

View File

@ -0,0 +1,365 @@
/* CSS Reset (based on Bootstrap Reboot v4.3.1 | MIT) */
*,
*::before,
*::after {
box-sizing: border-box;
}
body {
margin: 0;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
font-size: 1rem;
font-weight: 400;
line-height: 1.4;
color: #ddd;
background-color: #1b1b1b;
-webkit-text-size-adjust: 100%;
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}
[tabindex="-1"]:focus:not(:focus-visible) {
outline: 0 !important;
}
hr {
margin: 1.25rem 0;
color: inherit;
background-color: currentColor;
border: 0;
border-top: 1px solid #444;
}
h1,
h2,
h3,
h4,
h5,
h6 {
margin-top: 0;
margin-bottom: 0.5rem;
font-weight: 600;
}
h1 {
font-size: 2rem;
}
h2 {
font-size: 1.75rem;
}
h3 {
font-size: 1.5rem;
}
h4 {
font-size: 1.375rem;
}
h5 {
font-size: 1.25rem;
}
h6 {
font-size: 1.125rem;
}
p {
margin-top: 0;
margin-bottom: 1rem;
}
abbr[title] {
text-decoration: none;
cursor: help;
border-bottom: 1px dotted #c3c3c3;
}
address {
margin-bottom: 1rem;
font-style: normal;
line-height: inherit;
}
ol,
ul {
padding-left: 2rem;
}
ol,
ul,
dl {
margin-top: 0;
margin-bottom: 1rem;
}
ol ol,
ul ul,
ol ul,
ul ol {
margin-bottom: 0;
}
dt {
font-weight: 700;
}
dd {
margin-bottom: .5rem;
margin-left: 0;
}
blockquote {
margin: 0 0 1rem 1rem;
}
b,
strong {
font-weight: bolder;
}
small {
font-size: 0.875em;
}
sub,
sup {
position: relative;
font-size: 0.75em;
line-height: 0;
vertical-align: baseline;
}
sub {
bottom: -.25em;
}
sup {
top: -.5em;
}
a {
color: #f8ae00;
text-decoration: none;
}
a:hover {
color: #fff;
text-decoration: underline;
}
a:not([href]),
a:not([href]):hover {
color: inherit;
text-decoration: none;
}
pre,
code,
kbd,
samp {
font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
font-size: 1em;
}
pre {
display: block;
margin-top: 0;
margin-bottom: 1rem;
overflow: auto;
}
pre code {
font-size: inherit;
color: inherit;
word-break: normal;
}
code {
color: #e44;
word-wrap: break-word;
}
a > code {
color: inherit;
}
kbd {
padding: 0.125rem 0.1875rem;
color: #111;
background-color: #888;
}
kbd kbd {
padding: 0;
font-size: 1em;
}
figure {
margin: 0 0 1rem;
}
img {
vertical-align: middle;
}
svg {
overflow: hidden;
vertical-align: middle;
}
table {
border-collapse: collapse;
}
caption {
padding-top: 0.75rem;
padding-bottom: 0.75rem;
color: #6c757d;
text-align: left;
caption-side: bottom;
}
label {
display: inline-block;
margin-bottom: 0.5rem;
}
button {
border-radius: 0;
}
button:focus {
outline: 1px dotted;
outline: 5px auto -webkit-focus-ring-color;
}
input,
button,
select,
optgroup,
textarea {
margin: 0;
font-family: inherit;
font-size: inherit;
line-height: inherit;
}
button,
input {
overflow: visible;
}
button,
select {
text-transform: none;
}
select {
word-wrap: normal;
}
[list]::-webkit-calendar-picker-indicator {
display: none;
}
button,
[type="button"],
[type="reset"],
[type="submit"] {
-webkit-appearance: button;
}
button:not(:disabled),
[type="button"]:not(:disabled),
[type="reset"]:not(:disabled),
[type="submit"]:not(:disabled) {
cursor: pointer;
}
::-moz-focus-inner {
padding: 0;
border-style: none;
}
input[type="date"],
input[type="time"],
input[type="datetime-local"],
input[type="month"] {
-webkit-appearance: textfield;
}
textarea {
overflow: auto;
resize: vertical;
}
fieldset {
min-width: 0;
padding: 0;
margin: 0;
border: 0;
}
legend {
float: left;
width: 100%;
padding: 0;
margin-bottom: 0.5rem;
font-size: 1.5rem;
line-height: inherit;
color: inherit;
white-space: normal;
}
mark {
background-color: #f8ae00;
}
progress {
vertical-align: baseline;
}
::-webkit-datetime-edit {
overflow: visible;
line-height: 0;
}
[type="search"] {
outline-offset: -2px;
-webkit-appearance: textfield;
}
::-webkit-search-decoration {
-webkit-appearance: none;
}
::-webkit-color-swatch-wrapper {
padding: 0;
}
::-webkit-file-upload-button {
font: inherit;
-webkit-appearance: button;
}
output {
display: inline-block;
}
summary {
display: list-item;
cursor: pointer;
}
template {
display: none;
}
main {
display: block;
}
[hidden] {
display: none !important;
}

View File

@ -0,0 +1,77 @@
[[icons]]
id = "email"
url = "mailto:%s"
icon = "svg/email.svg"
weight = 10
[[icons]]
id = "facebook"
url = "https://www.facebook.com/%s"
icon = "svg/facebook.svg"
weight = 20
[[icons]]
id = "twitter"
url = "https://twitter.com/%s"
icon = "svg/twitter.svg"
weight = 30
[[icons]]
id = "telegram"
url = "https://t.me/%s"
icon = "svg/telegram.svg"
weight = 40
[[icons]]
id = "instagram"
url = "https://www.instagram.com/%s"
icon = "svg/instagram.svg"
weight = 50
[[icons]]
id = "pinterest"
url = "https://www.pinterest.com/%s"
icon = "svg/pinterest.svg"
weight = 60
[[icons]]
id = "vk"
url = "https://vk.com/%s"
icon = "svg/vk.svg"
weight = 70
[[icons]]
id = "linkedin"
url = "https://linkedin.com/in/%s"
icon = "svg/linkedin.svg"
weight = 80
[[icons]]
id = "github"
url = "https://github.com/%s"
icon = "svg/github.svg"
weight = 90
[[icons]]
id = "gitlab"
url = "https://gitlab.com/%s"
icon = "svg/gitlab.svg"
weight = 100
[[icons]]
id = "stackoverflow"
url = "https://stackoverflow.com/users/%s"
icon = "svg/stackoverflow.svg"
weight = 110
[[icons]]
id = "mastodon"
url = "%s"
icon = "svg/mastodon.svg"
weight = 120
[[icons]]
id = "medium"
url = "https://medium.com/@%s"
icon = "svg/medium.svg"
weight = 130

View File

@ -0,0 +1,9 @@
baseURL = "https://example.com/"
title = "Binario"
languageCode = "en-us"
paginate = 10
theme = "binario"
[Params]
description = "Responsive card-based & code-light Hugo theme"
columns = 2

View File

@ -0,0 +1,25 @@
---
title: About Hugo
description: Hugo, the worlds fastest framework for building websites
date: 2019-02-28
author: Hugo Authors
menu: main
---
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/russross/blackfriday
* 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).

View File

@ -0,0 +1,168 @@
---
title: Basic HTML Elements
description: Example test article that contains basic HTML elements for text formatting on the Web.
date: 2019-09-24
categories:
- "Development"
tags:
- "HTML"
- "CSS"
- "Basic Elements"
---
The main purpose of this article is to make sure that all basic HTML Elements are decorated with CSS so as to not miss any possible elements when creating new themes for Hugo.
<!--more-->
## Headings
Let's start with all possible headings. The HTML `<h1>``<h6>` elements represent six levels of section headings. `<h1>` is the highest section level and `<h6>` is the lowest.
# Heading 1
## Heading 2
### Heading 3
#### Heading 4
##### Heading 5
###### Heading 6
***
## Paragraph
According to the [HTML5 specification](https://www.w3.org/TR/html5/dom.html#elements) by [W3C](https://www.w3.org/), **HTML documents consist of a tree of elements and text**. Each element is denoted in the source by a [start tag](https://www.w3.org/TR/html5/syntax.html#syntax-start-tags), such as `<body>`, and an [end tag](https://www.w3.org/TR/html5/syntax.html#syntax-end-tags), such as `</body>`. (*Certain start tags and end tags can in certain cases be omitted and are implied by other tags.*)
Elements can have attributes, which control how the elements work. For example, hyperlink are formed using the `a` element and its `href` attribute.
## List Types
### Ordered List
1. First item
2. Second item
3. Third item
### Unordered List
* List item
* Another item
* And another item
### Nested list
<ul>
<li>First item</li>
<li>Second item
<ul>
<li>Second item First subitem</li>
<li>Second item second subitem
<ul>
<li>Second item Second subitem First sub-subitem</li>
<li>Second item Second subitem Second sub-subitem</li>
<li>Second item Second subitem Third sub-subitem</li>
</ul>
</li>
<li>Second item Third subitem
<ol>
<li>Second item Third subitem First sub-subitem</li>
<li>Second item Third subitem Second sub-subitem</li>
<li>Second item Third subitem Third sub-subitem</li>
</ol>
</ul>
</li>
<li>Third item</li>
</ul>
### Definition List
HTML also supports definition lists.
<dl>
<dt>Blanco tequila</dt>
<dd>The purest form of the blue agave spirit...</dd>
<dt>Reposado tequila</dt>
<dd>Typically aged in wooden barrels for between two and eleven months...</dd>
</dl>
## 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.
> Quoted text.
> This line is part of the same quote.
> Also you can *put* **Markdown** into a blockquote.
Blockquote with a citation.
<blockquote>
<p>My goal wasn't to make a ton of money. It was to build good computers. I only started the company when I realized I could be an engineer forever.</p>
<footer><cite>Steve Wozniak</cite></footer>
</blockquote>
According to Mozilla's website, <q cite="https://www.mozilla.org/en-US/about/history/details/">Firefox 1.0 was released in 2004 and became a big success.</q>
## Tables
Tables aren't part of the core Markdown spec, but Hugo supports them.
| ID | Make | Model | Year |
| --- | --------- | ------- | ---- |
| 1 | Honda | Accord | 2009 |
| 2 | Toyota | Camry | 2012 |
| 3 | Hyundai | Elantra | 2010 |
Colons can be used to align columns.
| Tables | Are | Cool |
|:----------- |:-------------:| ------------:|
| align: left | align: center | align: right |
| align: left | align: center | align: right |
| align: left | align: center | align: right |
You can also use inline Markdown.
| Inline | Markdown | In | Table |
| ---------- | --------- | ----------------- | ---------- |
| *italics* | **bold** | ~~strikethrough~~ | `code` |
## Code
```html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Example HTML5 Document</title>
</head>
<body>
<p>Test</p>
</body>
</html>
```
## Highlighted Code
{{< 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 >}}
## Other stuff — abbr, sub, sup, kbd, etc.
<abbr title="Graphics Interchange Format">GIF</abbr> is a bitmap image format.
H<sub>2</sub>O
C<sub>6</sub>H<sub>12</sub>O<sub>6</sub>
X<sup>n</sup> + Y<sup>n</sup> = Z<sup>n</sup>
Press <kbd>X</kbd> to win. Or press <kbd><kbd>CTRL</kbd>+<kbd>ALT</kbd>+<kbd>F</kbd></kbd> to show FPS counter.
<mark>As a unit of information in information theory, the bit has alternatively been called a shannon</mark>, named after Claude Shannon, the founder of field of information theory.

File diff suppressed because it is too large Load Diff

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

View File

@ -0,0 +1,73 @@
---
title: Featured Images
description: "In this page, we will explain what featured images are and show you some examples how to add a featured \
image for a page."
date: 2019-09-12
---
Featured image is the image that appears on summaries at the list pages and the top of content pages. Every content page
in this theme can have a featured image.
<!--more-->
## How to add a featured image
Content pages in Hugo can have their images or any other files stored under the same directory of the page itself.
In Hugo's terms, it's called **page bundle** and allows us to keep all assets together with a page content file.
This theme uses [page bundles](https://gohugo.io/content-management/organization/#page-bundles) for featured images.
There are two main different ways to add a featured image.
### Option 1. Put `featured.*` or `thumbnail.*` image in the page bundle
This theme considers `featured` or `thumbnail` image in any popular graphic format in the root of the page bundle as
a featured image.
Directory structure of this page:
```
content
└── post
└── featured-images // single page folder (page bundle)
├── featured.png // featured image
└── index.md // page content file
```
### Option 2. Put any image in the page bundle & specify `featured` param
You may put any image in the page bundle and specify `featured` param in the page's front matter:
```yaml
featured: image.jpg
```
- `featured` [`String`]: relative path of the image
Or you can add some additional params like `alt`, `caption`, `credit` and `previewOnly`:
```yaml
featured:
url: image.jpg
alt: A scale model of the Eiffel tower standing on a map
caption: Eiffel tower model
credit: Unknown author
previewOnly: false
```
- `featured` [`Map`]:
- `url` [`String`]: relative path of the image
- `alt` [`String`]: alternate text for the image
- `caption` [`String`]: image caption
- `credit` [`String`]: image credit
- `previewOnly` [`Boolean`]: show only preview image
## FAQ
**Q**: _What will happen if I specify `alt`, `caption`, `credit` params, but miss `url`? Featured image will be shown or
not?_\
**A**: In that case, featured image would appear only if the page bundle contains `featured.*` or `thumbnail.*` image.
Otherwise, you'll get nothing.
**Q**: _Is featured image path case sensitive or insensitive? Featured.png and featured.png are different image relative
paths for Hugo?_\
**A**: The image matching is case-insensitive. In that case, Featured.png and featured.png are identical for Hugo.

View File

@ -0,0 +1,343 @@
---
title: "(Hu)go Template Primer"
date: 2014-04-02
tags:
- "go"
- "golang"
- "templates"
- "themes"
- "development"
categories:
- "Development"
- "golang"
menu: main
---
Hugo uses the excellent [Go][] [html/template][gohtmltemplate] library for
its template engine. It is an extremely lightweight engine that provides a very
small amount of logic. In our experience that it is just the right amount of
logic to be able to create a good static website. If you have used other
template systems from different languages or frameworks you will find a lot of
similarities in Go templates.
<!--more-->
This document is a brief primer on using Go templates. The [Go docs][gohtmltemplate]
provide more details.
## Introduction to Go Templates
Go templates provide an extremely simple template language. It adheres to the
belief that only the most basic of logic belongs in the template or view layer.
One consequence of this simplicity is that Go templates parse very quickly.
A unique characteristic of Go templates is they are content aware. Variables and
content will be sanitized depending on the context of where they are used. More
details can be found in the [Go docs][gohtmltemplate].
## Basic Syntax
Golang templates are HTML files with the addition of variables and
functions.
**Go variables and functions are accessible within {{ }}**
Accessing a predefined variable "foo":
{{ foo }}
**Parameters are separated using spaces**
Calling the add function with input of 1, 2:
{{ add 1 2 }}
**Methods and fields are accessed via dot notation**
Accessing the Page Parameter "bar"
{{ .Params.bar }}
**Parentheses can be used to group items together**
{{ if or (isset .Params "alt") (isset .Params "caption") }} Caption {{ end }}
## Variables
Each Go template has a struct (object) made available to it. In hugo each
template is passed either a page or a node struct depending on which type of
page you are rendering. More details are available on the
[variables](/layout/variables) page.
A variable is accessed by referencing the variable name.
<title>{{ .Title }}</title>
Variables can also be defined and referenced.
{{ $address := "123 Main St."}}
{{ $address }}
## Functions
Go template ship with a few functions which provide basic functionality. The Go
template system also provides a mechanism for applications to extend the
available functions with their own. [Hugo template
functions](/layout/functions) provide some additional functionality we believe
are useful for building websites. Functions are called by using their name
followed by the required parameters separated by spaces. Template
functions cannot be added without recompiling hugo.
**Example:**
{{ add 1 2 }}
## Includes
When including another template you will pass to it the data it will be
able to access. To pass along the current context please remember to
include a trailing dot. The templates location will always be starting at
the /layout/ directory within Hugo.
**Example:**
{{ template "chrome/header.html" . }}
## Logic
Go templates provide the most basic iteration and conditional logic.
### Iteration
Just like in Go, the Go templates make heavy use of range to iterate over
a map, array or slice. The following are different examples of how to use
range.
**Example 1: Using Context**
{{ range array }}
{{ . }}
{{ end }}
**Example 2: Declaring value variable name**
{{range $element := array}}
{{ $element }}
{{ end }}
**Example 2: Declaring key and value variable name**
{{range $index, $element := array}}
{{ $index }}
{{ $element }}
{{ end }}
### Conditionals
If, else, with, or, & and provide the framework for handling conditional
logic in Go Templates. Like range, each statement is closed with `end`.
Go Templates treat the following values as false:
* false
* 0
* any array, slice, map, or string of length zero
**Example 1: If**
{{ if isset .Params "title" }}<h4>{{ index .Params "title" }}</h4>{{ end }}
**Example 2: If -> Else**
{{ if isset .Params "alt" }}
{{ index .Params "alt" }}
{{else}}
{{ index .Params "caption" }}
{{ end }}
**Example 3: And & Or**
{{ if and (or (isset .Params "title") (isset .Params "caption")) (isset .Params "attr")}}
**Example 4: With**
An alternative way of writing "if" and then referencing the same value
is to use "with" instead. With rebinds the context `.` within its scope,
and skips the block if the variable is absent.
The first example above could be simplified as:
{{ with .Params.title }}<h4>{{ . }}</h4>{{ end }}
**Example 5: If -> Else If**
{{ if isset .Params "alt" }}
{{ index .Params "alt" }}
{{ else if isset .Params "caption" }}
{{ index .Params "caption" }}
{{ end }}
## Pipes
One of the most powerful components of Go templates is the ability to
stack actions one after another. This is done by using pipes. Borrowed
from unix pipes, the concept is simple, each pipeline's output becomes the
input of the following pipe.
Because of the very simple syntax of Go templates, the pipe is essential
to being able to chain together function calls. One limitation of the
pipes is that they only can work with a single value and that value
becomes the last parameter of the next pipeline.
A few simple examples should help convey how to use the pipe.
**Example 1 :**
{{ if eq 1 1 }} Same {{ end }}
is the same as
{{ eq 1 1 | if }} Same {{ end }}
It does look odd to place the if at the end, but it does provide a good
illustration of how to use the pipes.
**Example 2 :**
{{ index .Params "disqus_url" | html }}
Access the page parameter called "disqus_url" and escape the HTML.
**Example 3 :**
{{ if or (or (isset .Params "title") (isset .Params "caption")) (isset .Params "attr")}}
Stuff Here
{{ end }}
Could be rewritten as
{{ isset .Params "caption" | or isset .Params "title" | or isset .Params "attr" | if }}
Stuff Here
{{ end }}
## Context (aka. the dot)
The most easily overlooked concept to understand about Go templates is that {{ . }}
always refers to the current context. In the top level of your template this
will be the data set made available to it. Inside of a iteration it will have
the value of the current item. When inside of a loop the context has changed. .
will no longer refer to the data available to the entire page. If you need to
access this from within the loop you will likely want to set it to a variable
instead of depending on the context.
**Example:**
{{ $title := .Site.Title }}
{{ range .Params.tags }}
<li> <a href="{{ $baseurl }}/tags/{{ . | urlize }}">{{ . }}</a> - {{ $title }} </li>
{{ end }}
Notice how once we have entered the loop the value of {{ . }} has changed. We
have defined a variable outside of the loop so we have access to it from within
the loop.
# Hugo Parameters
Hugo provides the option of passing values to the template language
through the site configuration (for sitewide values), or through the meta
data of each specific piece of content. You can define any values of any
type (supported by your front matter/config format) and use them however
you want to inside of your templates.
## Using Content (page) Parameters
In each piece of content you can provide variables to be used by the
templates. This happens in the [front matter](/content/front-matter).
An example of this is used in this documentation site. Most of the pages
benefit from having the table of contents provided. Sometimes the TOC just
doesn't make a lot of sense. We've defined a variable in our front matter
of some pages to turn off the TOC from being displayed.
Here is the example front matter:
```
---
title: "Permalinks"
date: "2013-11-18"
aliases:
- "/doc/permalinks/"
groups: ["extras"]
groups_weight: 30
notoc: true
---
```
Here is the corresponding code inside of the template:
{{ if not .Params.notoc }}
<div id="toc" class="well col-md-4 col-sm-6">
{{ .TableOfContents }}
</div>
{{ end }}
## Using Site (config) Parameters
In your top-level configuration file (eg, `config.yaml`) you can define site
parameters, which are values which will be available to you in chrome.
For instance, you might declare:
```yaml
params:
CopyrightHTML: "Copyright &#xA9; 2013 John Doe. All Rights Reserved."
TwitterUser: "spf13"
SidebarRecentLimit: 5
```
Within a footer layout, you might then declare a `<footer>` which is only
provided if the `CopyrightHTML` parameter is provided, and if it is given,
you would declare it to be HTML-safe, so that the HTML entity is not escaped
again. This would let you easily update just your top-level config file each
January 1st, instead of hunting through your templates.
```
{{if .Site.Params.CopyrightHTML}}<footer>
<div class="text-center">{{.Site.Params.CopyrightHTML | safeHtml}}</div>
</footer>{{end}}
```
An alternative way of writing the "if" and then referencing the same value
is to use "with" instead. With rebinds the context `.` within its scope,
and skips the block if the variable is absent:
```
{{with .Site.Params.TwitterUser}}<span class="twitter">
<a href="https://twitter.com/{{.}}" rel="author">
<img src="/images/twitter.png" width="48" height="48" title="Twitter: {{.}}"
alt="Twitter"></a>
</span>{{end}}
```
Finally, if you want to pull "magic constants" out of your layouts, you can do
so, such as in this example:
```
<nav class="recent">
<h1>Recent Posts</h1>
<ul>{{range first .Site.Params.SidebarRecentLimit .Site.Recent}}
<li><a href="{{.RelPermalink}}">{{.Title}}</a></li>
{{end}}</ul>
</nav>
```
[go]: https://golang.org/
[gohtmltemplate]: https://golang.org/pkg/html/template/

View File

@ -0,0 +1,86 @@
---
title: Getting Started with Hugo
date: 2014-04-02
tags:
- "go"
- "golang"
- "hugo"
- "development"
categories:
- "Development"
- "golang"
menu: main
---
## Step 1. Install Hugo
Go to [Hugo releases](https://github.com/spf13/hugo/releases) and download the
appropriate version for your OS and architecture.
Save it somewhere specific as we will be using it in the next step.
More complete instructions are available at [Install Hugo](https://gohugo.io/getting-started/installing/)
## Step 2. Build the Docs
Hugo has its own example site which happens to also be the documentation site
you are reading right now.
Follow the following steps:
1. Clone the [Hugo repository](https://github.com/spf13/hugo)
2. Go into the repo
3. Run hugo in server mode and build the docs
4. Open your browser to http://localhost:1313
Corresponding pseudo commands:
git clone https://github.com/spf13/hugo
cd hugo
/path/to/where/you/installed/hugo server --source=./docs
> 29 pages created
> 0 tags index created
> in 27 ms
> Web Server is available at http://localhost:1313
> Press ctrl+c to stop
Once you've gotten here, follow along the rest of this page on your local build.
## Step 3. Change the docs site
Stop the Hugo process by hitting Ctrl+C.
Now we are going to run hugo again, but this time with hugo in watch mode.
/path/to/hugo/from/step/1/hugo server --source=./docs --watch
> 29 pages created
> 0 tags index created
> in 27 ms
> Web Server is available at http://localhost:1313
> Watching for changes in /Users/spf13/Code/hugo/docs/content
> Press ctrl+c to stop
Open your [favorite editor](http://vim.spf13.com) and change one of the source
content pages. How about changing this very file to *fix the typo*. How about changing this very file to *fix the typo*.
Content files are found in `docs/content/`. Unless otherwise specified, files
are located at the same relative location as the url, in our case
`docs/content/overview/quickstart.md`.
Change and save this file.. Notice what happened in your terminal.
> Change detected, rebuilding site
> 29 pages created
> 0 tags index created
> in 26 ms
Refresh the browser and observe that the typo is now fixed.
Notice how quick that was. Try to refresh the site before it's finished building. I double dare you.
Having nearly instant feedback enables you to have your creativity flow without waiting for long builds.
## Step 4. Have fun
The best way to learn something is to play with it.

View File

@ -0,0 +1,43 @@
---
title: MathJax
description: Simple MathJax example test article
date: 2019-09-23
mathjax: true
tags:
- "MathJax"
---
MathJax JavaScript library allows you to include mathematics in your web pages for viewing in any modern browser.
<!--more-->
## How to enable MathJax
For enabling MathJax, add this to your content's frontmatter:
```yaml
mathjax: true
```
## MathJax example
**Input**:
```
When \\( a \ne 0 \\), there are two solutions to
$$ ax^2 + bx + c = 0 $$
and they are:
\\[ x = {-b \pm \sqrt{b^2-4ac} \over 2a} \\]
```
**Output**:
When \\( a \ne 0 \\), there are two solutions to
$$ ax^2 + bx + c = 0 $$
and they are:
\\[ x = {-b \pm \sqrt{b^2-4ac} \over 2a} \\]

View File

@ -0,0 +1,50 @@
---
title: Hugo Syntax Highlighting
description: Syntax Highlighting example test article that shows how to creating and highlighting code blocks in Hugo-generated site
date: 2018-04-15
categories:
- "Development"
tags:
- "Chroma"
- "Hugo"
- "Syntax Highlighting"
- "HTML"
- "Markdown"
---
You can have code snippets highlighted so that they are easier to read on your site using Chroma, Hugo's default syntax highlighter. It is built in Go lang and is really, really fast and for the most important parts compatible with Pygments. Chroma takes source code and other structured text and converts it into syntax highlighted HTML, ANSI-coloured text, etc.
<!--more-->
The example below shows a simple HTML code snippet highlighted with the Hugo [highlight](https://gohugo.io/content-management/shortcodes/#highlight) built-in 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 >}}
The following code snippet was used to achieve that result:
```
{{</* 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 */>}}
```
For more information, see "[Hugo Syntax Highlighting](https://gohugo.io/content-management/syntax-highlighting)" from official Hugo docs.

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

View File

@ -0,0 +1,43 @@
---
title: Translation Support
description: With Hugo i18n possibilities, you can easily have a website in your language. This article explains how to translate and change language in Hugo's generated site.
date: 2019-09-22
tags:
- "Translation"
- "i18n"
- "Hugo"
featured:
alt: Translation support
previewOnly: true
---
With Hugo i18n possibilities, you can easily have a website in your language. This Hugo theme is ready to be translated into other languages. You can create a special file that contains translated text to show the visitor instead of English.
<!--more-->
## Translating the Theme
1. Create a folder named `/i18n/` in your Hugo site's root
1. Create a file `<LANG-CODE>.yaml` inside `/i18n` folder. Language files `<LANG-CODE>.yaml` should be named according to RFC 5646 with names such as `en-US.yaml`, `fr.yaml`, `de.yaml`, etc.
1. Copy a reference template to your translation from `<THEME>/i18n/en.yaml` file
1. Translate all available `translation` strings into chosen language
For example, to create German translation, create a file `/i18n/de.yaml` in the folder of your Hugo site, copy reference template from `<THEME>/i18n/en.yaml` file and translate all available `translation` strings.
## Changing Site Language in Hugo
To use the translations, just set a correct value for `defaultContentLanguage` in site config file:
{{< highlight toml >}}
defaultContentLanguage = "en" # de / fr / other lang code...
{{< /highlight >}}
In other words, this field determines which i18n file to use.
## Contributing Translation
If you want to upload your translation in the theme master repository, feel free to create a pull request.
## More Information
* [Hugo Multilingual Mode](https://gohugo.io/content-management/multilingual/)
* [Hugo i18n function](https://gohugo.io/functions/i18n/)

View File

@ -0,0 +1,52 @@
# Entry
- id: entry_toc
translation: "Inhaltsverzeichnis"
# Entry meta
- id: meta_lastmod
translation: "Aktualisiert"
- id: meta_categories
translation: "Kategorien"
- id: meta_tags
translation: "Tags"
# Share
- id: share-caption
translation: "Share on"
- id: save-caption
translation: "Speichere nach"
# Related
- id: related_title
translation: "Ähnlich"
# Footer
- id: footer_credits
translation: "Powered by <a href=\"https://gohugo.io/\" rel=\"nofollow noopener\" target=\"_blank\">Hugo</a> und \
<a href=\"https://github.com/vimux/binario\" rel=\"nofollow noopener\" target=\"_blank\">Binario</a> theme."
# "No posts" empty state
- id: empty_title
translation: "Aktuell noch keine Posts vorhanden!"
- id: empty_text_start
translation: "Sowie Posts in Deinen als <code>mainSections</code> definierten Verzeichnissen hinzugefügt werden"
- id: empty_text_end
translation: "erscheinen sie hier."
- id: empty_tip
translation: "<b>Tip:</b> Du kannst die als <code>mainSections</code> betrachteten Verzeichnisse in der Konfigurationsdatei Deiner Seite ändern."
# 404
- id: page404_title
translation: "404 Seite nicht gefunden"
- id: page404_lead
translation: "Entschuldigung, die Seite die Du besuchen wolltest existiert nicht."
- id: page404_link
translation: "Zurück zur Hauptseite"

View File

@ -0,0 +1,52 @@
# Entry
- id: entry_toc
translation: "Table of Contents"
# Entry meta
- id: meta_lastmod
translation: "Updated"
- id: meta_categories
translation: "Categories"
- id: meta_tags
translation: "Tags"
# Share
- id: share-caption
translation: "Share on"
- id: save-caption
translation: "Save to"
# Related
- id: related_title
translation: "Related"
# Footer
- id: footer_credits
translation: "Powered by <a href=\"https://gohugo.io/\" rel=\"nofollow noopener\" target=\"_blank\">Hugo</a> and \
<a href=\"https://github.com/vimux/binario\" rel=\"nofollow noopener\" target=\"_blank\">Binario</a> theme."
# "No posts" empty state
- id: empty_title
translation: "You don't have any posts yet!"
- id: empty_text_start
translation: "As posts are added in your <code>mainSections</code> folders"
- id: empty_text_end
translation: "they'll appear here"
- id: empty_tip
translation: "<b>Tip:</b> You could change <code>mainSections</code> folders in site config file."
# 404
- id: page404_title
translation: "404 Page not found"
- id: page404_lead
translation: "Sorry, the page you were looking for doesn't exist."
- id: page404_link
translation: "Go back to main page"

View File

@ -0,0 +1,52 @@
# Entry
- id: entry_toc
translation: "Sisältö"
# Entry meta
- id: meta_lastmod
translation: "Päivitetty"
- id: meta_categories
translation: "Aiheet"
- id: meta_tags
translation: "Tunnisteet"
# Share
- id: share-caption
translation: "Jaa"
- id: save-caption
translation: "Talleta"
# Related
- id: related_title
translation: "Liittyvät"
# Footer
- id: footer_credits
translation: "Sivut on luotu <a href=\"https://gohugo.io/\" rel=\"nofollow noopener\" target=\"_blank\">Hugo</a>:lla käyttäen \
<a href=\"https://github.com/vimux/binario\" rel=\"nofollow noopener\" target=\"_blank\">Binario</a> teemaa."
# "No posts" empty state
- id: empty_title
translation: "Et ole vielä tehnyt julkaisuja!"
- id: empty_text_start
translation: "Lisättyäsi postauksia <code>mainSections</code> kansioihin"
- id: empty_text_end
translation: "näkyvät ne täällä"
- id: empty_tip
translation: "<b>Tip:</b> Voit muuttaa <code>mainSections</code> kansiot sivuston konfiguroinnissa."
# 404
- id: page404_title
translation: "404 Sivua ei löydy"
- id: page404_lead
translation: "Valitettavasti etsimäsi sivu ei ole olemassa."
- id: page404_link
translation: "Siirry takaisin pääsivulle"

View File

@ -0,0 +1,52 @@
# Entry
- id: entry_toc
translation: "Table des matières"
# Entry meta
- id: meta_lastmod
translation: "Mis à jour le"
- id: meta_categories
translation: "Catégories"
- id: meta_tags
translation: "Mots-clefs"
# Share
- id: share-caption
translation: "Partager sur"
- id: save-caption
translation: "Sauvegarder Sous"
# Related
- id: related_title
translation: "Voir aussi"
# Footer
- id: footer_credits
translation: "Propulsé par <a href=\"https://gohugo.io/\" rel=\"nofollow noopener\" target=\"_blank\">Hugo</a> et le theme \
<a href=\"https://github.com/vimux/binario\" rel=\"nofollow noopener\" target=\"_blank\">Binario</a>."
# "No posts" empty state
- id: empty_title
translation: "Aucune publication pour le moment"
- id: empty_text_start
translation: "Lorsque vous ajouterez des publication dans vos dossiers <code>mainSections</code>"
- id: empty_text_end
translation: "elles arriveront ici"
- id: empty_tip
translation: "<b>Astuce:</b> Vous pouvez changer les dossiers <code>mainSections</code> dans le fichier de configuration du site."
# 404
- id: page404_title
translation: "404 Page introuvable"
- id: page404_lead
translation: "Désolé, la page que vous cherchez n'existe pas"
- id: page404_link
translation: "Retourner à l'acceuil"

View File

@ -0,0 +1,52 @@
# Entry
- id: entry_toc
translation: "Sommario"
# Entry meta
- id: meta_lastmod
translation: "Ultima modifica"
- id: meta_categories
translation: "Categorie"
- id: meta_tags
translation: "Tag"
# Share
- id: share-caption
translation: "Condividi su"
- id: save-caption
translation: "Salva su"
# Related
- id: related_title
translation: "Correlati"
# Footer
- id: footer_credits
translation: "Offerto da <a href=\"https://gohugo.io/\" rel=\"nofollow noopener\" target=\"_blank\">Hugo</a> e \
il tema <a href=\"https://github.com/vimux/binario\" rel=\"nofollow noopener\" target=\"_blank\">Binario</a>."
# "No posts" empty state
- id: empty_title
translation: "Non hai ancora nessun post!"
- id: empty_text_start
translation: "Man mano che i post vengono aggiunti nelle tue cartelle <code>mainSections</code>"
- id: empty_text_end
translation: "appariranno qui"
- id: empty_tip
translation: "<b>Suggerimento:</b> puoi cambiare le cartelle <code>mainSections</code> dal file di configurazione del sito."
# 404
- id: page404_title
translation: "404 Pagina non trovata"
- id: page404_lead
translation: "Siamo spiacenti, la pagina che stavi cercando non esiste."
- id: page404_link
translation: "Torna alla pagina principale"

View File

@ -0,0 +1,52 @@
# Entry
- id: entry_toc
translation: "Conteúdo da página"
# Entry meta
- id: meta_lastmod
translation: "Última modificação"
- id: meta_categories
translation: "Categorias"
- id: meta_tags
translation: "Tags"
# Share
- id: share-caption
translation: "Campartilhar no"
- id: save-caption
translation: "Salvar no"
# Related
- id: related_title
translation: "Relacionado"
# Footer
- id: footer_credits
translation: "Powered by <a href=\"https://gohugo.io/\" rel=\"nofollow noopener\" target=\"_blank\">Hugo</a> and \
<a href=\"https://github.com/vimux/binario\" rel=\"nofollow noopener\" target=\"_blank\">Binario</a> theme."
# "No posts" empty state
- id: empty_title
translation: "Você ainda não tem postagens!"
- id: empty_text_start
translation: "Conforme as postagens são adicionadas no diretório <code>mainSections</code>"
- id: empty_text_end
translation: "Eles vão aparecendo aqui"
- id: empty_tip
translation: "<b>Dica:</b> Você pode alterar o diretório <code>mainSections</code> no site config file."
# 404
- id: page404_title
translation: "404 Página não encontrada"
- id: page404_lead
translation: "Desculpe, a página que você estava procurando não existe."
- id: page404_link
translation: "Voltar para a página principal"

View File

@ -0,0 +1,52 @@
# Entry
- id: entry_toc
translation: "Conteúdo da página"
# Entry meta
- id: meta_lastmod
translation: "Última modificação"
- id: meta_categories
translation: "Categorias"
- id: meta_tags
translation: "Tags"
# Share
- id: share-caption
translation: "Campartilhar"
- id: save-caption
translation: "Salvar"
# Related
- id: related_title
translation: "Relacionado"
# Footer
- id: footer_credits
translation: "Powered by <a href=\"https://gohugo.io/\" rel=\"nofollow noopener\" target=\"_blank\">Hugo</a> and \
<a href=\"https://github.com/vimux/binario\" rel=\"nofollow noopener\" target=\"_blank\">Binario</a> theme."
# "No posts" empty state
- id: empty_title
translation: "Você ainda não tem postagens!"
- id: empty_text_start
translation: "Conforme as postagens são adicionadas no diretório <code>mainSections</code>"
- id: empty_text_end
translation: "Eles vão aparecendo aqui"
- id: empty_tip
translation: "<b>Dica:</b> Você pode alterar o diretório <code>mainSections</code> no site config file."
# 404
- id: page404_title
translation: "404 Página não encontrada"
- id: page404_lead
translation: "Desculpe, a página que você estava procurando não existe."
- id: page404_link
translation: "Voltar para a página principal"

Binary file not shown.

After

Width:  |  Height:  |  Size: 339 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 220 KiB

View File

@ -0,0 +1,9 @@
{{ define "main" }}
<main class="main">
<div class="page404 block center">
<h1 class="page404__title">{{ T "page404_title" }}</h1>
<p class="page404__lead">{{ T "page404_lead" }}</p>
<a class="page404__link" href="{{ "" | relLangURL }}">{{ T "page404_link" }}</a>
</div>
</main>
{{ end }}

View File

@ -0,0 +1,69 @@
<!DOCTYPE html>
<html class="no-js" lang="{{ .Site.LanguageCode | default "en-us" }}">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="theme-color" content="{{ .Site.Params.Manifest.themeColor | default "#1b1b1b" }}">
<title>{{ block "title" . }}{{ if not .IsHome }}{{ .Title }} | {{ end }}{{ .Site.Title }}{{ end }}</title>
<script>(function(d,e){d[e]=d[e].replace("no-js","js");})(document.documentElement,"className");</script>
<meta name="description" content="{{ if .IsHome }}{{ .Site.Params.description }}{{ else }}{{ .Description }}{{ end }}">
{{- if .Site.Params.opengraph }}
{{ template "_internal/opengraph.html" . }}
{{- end }}
{{- if .Site.Params.schema }}
{{ template "_internal/schema.html" . }}
{{- end }}
{{- if .Site.Params.twitter_cards }}
{{ template "_internal/twitter_cards.html" . }}
{{- end }}
{{- $cssReboot := resources.Get "css/reboot.css" }}
{{- $cssMain := resources.Get "css/main.css" }}
{{- $cssPrint := resources.Get "css/print.css" }}
{{- $style := slice $cssReboot $cssMain $cssPrint | resources.Concat "css/bundle.css" }}
<link rel="stylesheet" href="{{ $style.RelPermalink }}">
{{- range .Site.Params.customCSS }}
<link rel="stylesheet" href="{{ . | relURL }}">
{{- end }}
{{- with .Site.Params.colorTheme }}
<link rel="stylesheet" href="{{ (printf "css/themes/%s.css" .) | relURL }}">
{{- end }}
<link rel="icon" href="{{ "icons/16.png" | relURL }}" sizes="16x16" type="image/png">
<link rel="icon" href="{{ "icons/32.png" | relURL }}" sizes="32x32" type="image/png">
{{- with .OutputFormats.Get "rss" }}
{{ printf `<link rel="%s" type="%s" href="%s" title="%s">` .Rel .MediaType.Type .RelPermalink $.Site.Title | safeHTML }}
{{- end }}
{{- with ((.Site.GetPage "home").OutputFormats.Get "manifest") }}
<link rel="manifest" href="{{ "manifest.json" | relURL }}">
{{- end }}
{{- $server := "" }}
{{- if ge (int (index (split hugo.Version ".") 1)) "120" }}
{{- $server = hugo.IsServer }}
{{- else }}
{{- $server = .Site.IsServer }}
{{- end }}
{{- if not $server -}}
{{ template "_internal/google_analytics.html" . }}
{{- end }}
</head>
<body class="body kind-{{ .Kind }}">
{{ partial "header" . }}
<div class="primary">
{{ block "main" . }}
{{- if or .Title .Content }}
<div class="page block">
{{ with .Title }}<h1 class="page__title">{{ . }}</h1>{{ end }}
{{ with .Content }}<div class="page__content{{ if not $.Title }} page__content--notitle{{ end }}">{{ . }}</div>{{ end }}
</div>
{{ end }}
{{ end }}
</div>
{{ partial "footer" . }}
{{- with .Site.Menus.main }}
<script src="{{ "js/menu.js" | relURL }}"></script>
{{- end }}
{{- partial "mathjax.html" . -}}
{{- range .Site.Params.customJS }}
<script src="{{ . | relURL }}"></script>
{{- end }}
</body>
</html>

View File

@ -0,0 +1,19 @@
{{ define "main" }}
<main class="main">
{{ partial "breadcrumb.html" . }}
{{- if or .Title .Content }}
<div class="page block">
{{ with .Title }}<h1 class="page__title">{{ . }}</h1>{{ end }}
{{ with .Content }}<div class="page__content{{ if not $.Title }} page__content--notitle{{ end }}">{{ . }}</div>{{ end }}
</div>
{{- end }}
<div class="cards">
{{ range .Paginator.Pages }}
<div class="card{{ if and (ge ($.Param "columns") 1) (le ($.Param "columns") 3) }} card--{{ $.Param "columns" }}col{{ else }} card--2col{{ end }}">
{{ .Render "summary" }}
</div>
{{ end }}
</div>
</main>
{{ partial "pagination.html" . }}
{{ end }}

View File

@ -0,0 +1,23 @@
{{ define "main" }}
<main class="main">
{{ partial "breadcrumb.html" . }}
<div class="single block">
<article class="entry">
{{- partial "entry/featured.html" (dict "page" . "IsSingle" true) }}
{{- partial "entry/meta.html" (dict "page" . "class" "mb") }}
<h1 class="entry__title">{{ .Title }}</h1>
{{- partial "entry/toc.html" . }}
<div class="entry__content">{{ .Content }}</div>
{{ if or (.Param "share") (isset $.Params "tags") }}
<footer class="entry__footer">
{{ partial "entry/tags.html" . }}
{{ partial "entry/share.html" . }}
</footer>
{{ end }}
</article>
</div>
</main>
{{ partial "authorbox.html" . }}
{{ partial "related.html" . }}
{{ partial "comments.html" . }}
{{ end }}

View File

@ -0,0 +1,8 @@
<article class="entry card__box block">
{{- partial "entry/featured.html" (dict "page" . "link" .RelPermalink) }}
<h1 class="entry__title title-excerpt"><a class="entry__title-link" href="{{ .RelPermalink }}">{{ .Title }}</a></h1>
{{- with .Summary }}
<div class="entry__content">{{ . }}</div>
{{- end }}
{{- partial "entry/meta.html" (dict "page" . "class" "mt tar") }}
</article>

View File

@ -0,0 +1,29 @@
{{ define "main" }}
<main class="main">
{{- with .Content }}
<div class="page block">
<div class="page__content page__content--notitle">{{ . }}</div>
</div>
{{- end }}
{{- $mainSections := .Site.Params.mainSections }}
{{- $paginator := .Paginate (where .Site.RegularPages "Type" "in" $mainSections) }}
{{- if gt $paginator.TotalNumberOfElements 0 }}
<div class="cards">
{{- range $paginator.Pages }}
<div class="card{{ if and (ge ($.Param "columns") 1) (le ($.Param "columns") 3) }} card--{{ $.Param "columns" }}col{{ else }} card--2col{{ end }}">
{{ .Render "summary" }}
</div>
{{- end }}
</div>
{{- end }}
{{- if and (not .Site.Params.hideNoPostsWarning) (eq $paginator.TotalNumberOfElements 0) }}
<div class="empty block center">
<div class="empty__icon">¯\_(ツ)_/¯</div>
<h3 class="empty__title">{{ T "empty_title" }}</h3>
<p class="empty__text">{{ T "empty_text_start" | safeHTML }} ({{ delimit (apply $mainSections "printf" "<code>content/%s</code>" ".") ", " | safeHTML }}), {{ T "empty_text_end" }}.</p>
<p class="empty__tip">{{ T "empty_tip" | safeHTML }}</p>
</div>
{{- end }}
</main>
{{ partial "pagination.html" . }}
{{ end }}

View File

@ -0,0 +1,29 @@
{
"name": "{{ .Site.Params.Manifest.name | default .Site.Title }}",
"short_name": "{{ .Site.Params.Manifest.shortName | default .Site.Title }}",
"display": "{{ .Site.Params.Manifest.display | default "browser" }}",
"start_url": "{{ .Site.Params.Manifest.startUrl | default "/" }}",
"background_color": "{{ .Site.Params.Manifest.backgroundColor | default "#2a2a2a" }}",
"theme_color": "{{ .Site.Params.Manifest.themeColor | default "#1b1b1b" }}",
{{- with .Site.Params.Manifest.description }}
"description": "{{ . }}",
{{- end }}
{{- with .Site.Params.Manifest.orientation }}
"orientation": "{{ . }}",
{{- end }}
{{- with .Site.Params.Manifest.scope }}
"scope": "{{ . }}",
{{- end }}
"icons": [
{
"src": "icons/192.png",
"sizes": "192x192",
"type": "image/png"
},
{
"src": "icons/512.png",
"sizes": "512x512",
"type": "image/png"
}
]
}

View File

@ -0,0 +1,21 @@
{{- if .Param "authorbox" }}
<div class="authorbox block">
<div class="author">
{{- with .Site.Author.avatar }}
<figure class="author__avatar">
<img class="author__img" alt="{{ $.Site.Author.name }} avatar" src="{{ $.Site.Author.avatar | relURL }}" height="90" width="90">
</figure>
{{- end }}
<div class="author__body">
<div class="author__name">
{{ .Site.Author.name }}
</div>
{{- with .Site.Author.bio }}
<div class="author__bio">
{{- . -}}
</div>
{{- end }}
</div>
</div>
</div>
{{- end }}

View File

@ -0,0 +1,31 @@
{{- $breadcrumb := default .Site.Params.breadcrumb.enable .Params.breadcrumb -}}
{{- define "breadcrumbnav" }}
{{- if .p1.Parent -}}
{{- template "breadcrumbnav" (dict "p1" .p1.Parent "p2" .p2) -}}
{{- else if not .p1.IsHome }}
{{- template "breadcrumbnav" (dict "p1" .p1.Site.Home "p2" .p2) -}}
{{- end }}
{{- $crumbTitle := .p1.Title | default "..." -}}
{{- $crumbTitleHome := .p1.Site.Params.Breadcrumb.homeText | default .p1.Site.Title -}}
{{- if .p1.IsHome -}}
{{- $crumbTitle = $crumbTitleHome -}}
{{- end -}}
{{- if ne .p1 .p2 }}
<li class="breadcrumb__item">
<a class="breadcrumbs__link" href="{{ .p1.RelPermalink }}">{{ $crumbTitle }}</a>
</li>
{{- else }}
<li class="breadcrumbs__item breadcrumb__item--active" aria-current="page">{{ $crumbTitle }}</li>
{{- end }}
{{- end }}
{{- if $breadcrumb }}
<nav class="breadcrumb{{ if not (or $.Title $.Content) }} breadcrumb--separated{{ end }} block" aria-label="breadcrumb">
<ol class="breadcrumb__list">
{{ template "breadcrumbnav" (dict "p1" . "p2" .) }}
</ol>
</nav>
{{- end }}

View File

@ -0,0 +1,11 @@
{{- $server := "" }}
{{- if ge (int (index (split hugo.Version ".") 1)) "120" }}
{{- $server = hugo.IsServer }}
{{- else }}
{{- $server = .Site.IsServer }}
{{- end }}
{{- if and (.Site.Config.Services.Disqus.Shortname) (.Param "comments") (not $server) }}
<section class="comments block">
{{ template "_internal/disqus.html" . }}
</section>
{{- end }}

View File

@ -0,0 +1,41 @@
{{- with .page.Resources.ByType "image" }}
{{- $link := $.link -}}
{{- $IsSingle := $.IsSingle -}}
{{- $match := $.page.Params.featured -}}
{{- $featuredMap := "" -}}
{{- $IsMap := reflect.IsMap $match -}}
{{- if $IsMap }}
{{- $featuredMap = $match -}}
{{- $match = $match.url -}}
{{- end }}
{{- $featured := .GetMatch ($match | default "{featured.*,thumbnail.*}") -}}
{{ if and $featured (not (and $IsSingle ($.page.Param "featured.previewOnly"))) }}
<figure class="entry__featured featured">
{{- with $link }}<a class="featured__link" href="{{ . }}">{{ end }}
<img class="featured__img" src="{{ $featured.RelPermalink }}" alt="
{{- with $featuredMap -}}
{{- .alt | default $featured.Title -}}
{{- else -}}
{{- $featured.Title -}}
{{- end -}}
"/>
{{- with $link }}</a>{{ end }}
{{- with $IsSingle }}
{{- with $featuredMap }}
{{- if or .caption .credit }}
<figcaption class="featured__figcaption">
{{- with .caption }}
<div class="featured__caption">{{ . | markdownify }}</div>
{{- end }}
{{- with .credit }}
<cite class="featured__credit">{{ . | markdownify }}</cite>
{{- end }}
</figcaption>
{{- end }}
{{- end }}
{{- end }}
</figure>
{{- end }}
{{- end }}

View File

@ -0,0 +1,7 @@
{{- $page := .page -}} {{- $pageMeta := default $page.Site.Params.Entry.meta
$page.Params.meta -}} {{- with $pageMeta }}
<div class="entry__meta meta {{ $.class }}">
{{- range . }} {{- $metaFieldPath := printf "entry/meta/%s.html" . -}} {{-
partial $metaFieldPath $page -}} {{- end }}
</div>
{{- end }}

View File

@ -0,0 +1,11 @@
{{- if .Params.categories }}
<div class="entry__meta-categories meta-categories">
<span class="meta-categories__list">{{ T "meta_categories" }}:
{{- range $index, $category := .Params.categories }}{{ if gt $index 0 }}, {{ end }}
<a class="meta-categories__link" href="{{ "categories/" | relLangURL }}{{ . | urlize | lower }}/" rel="category">
{{- . -}}
</a>
{{- end }}
</span>
</div>
{{- end }}

View File

@ -0,0 +1,9 @@
{{ $mois := dict "January" "janvier" "February" "février" "March" "mars" "April"
"avril" "May" "mai" "June" "juin" "July" "juillet" "August" "août" "September"
"septembre" "October" "octobre" "November" "novembre" "December" "décembre" }}
{{ $jour := .Date.Format "2" }} {{ $moisEn := .Date.Format "January" }} {{
$annee := .Date.Format "2006" }} {{ $moisFr := index $mois $moisEn }}
<span class="entry__meta-item date"
>{{ $jour }} {{ $moisFr }} {{ $annee }}</span
>

View File

@ -0,0 +1,3 @@
<span class="entry__meta-item reading-time">
{{ .ReadingTime }} min de lecture
</span>

View File

@ -0,0 +1,11 @@
{{- if .Params.tags }}
<div class="entry__meta-tags meta-tags">
<span class="meta-tags__list">{{ T "meta_tags" }}:
{{- range $index, $category := .Params.tags }}{{ if gt $index 0 }}, {{ end }}
<a class="meta-tags__link" href="{{ "tags/" | relLangURL }}{{ . | urlize | lower }}/" rel="tag">
{{- . -}}
</a>
{{- end }}
</span>
</div>
{{- end }}

View File

@ -0,0 +1,44 @@
{{- if and .IsPage (.Param "share") }}
<div class="entry__share share">
{{- if .Param "share.facebook" }}
<a class="share__link btn" title="{{ T "share-caption" }} Facebook" href="https://www.facebook.com/sharer/sharer.php?u={{ .Permalink }}" target="_blank" rel="noopener noreferrer" onclick="window.open(this.href, '{{ T "share-caption" }} Facebook', 'width=800,height=600,toolbar=0,status=0'); return false">
{{ partial "svg/facebook.svg" (dict "class" "share__icon" ) }}
</a>
{{- end }}
{{- if .Param "share.twitter" }}
<a class="share__link btn" title="{{ T "share-caption" }} Twitter" href="https://twitter.com/intent/tweet/?url={{ .Permalink }}&amp;text={{ .Title }}" target="_blank" rel="noopener noreferrer" onclick="window.open(this.href, '{{ T "share-caption" }} Twitter', 'width=800,height=450,resizable=yes,toolbar=0,status=0'); return false">
{{ partial "svg/twitter.svg" (dict "class" "share__icon" ) }}
</a>
{{- end }}
{{- if .Param "share.reddit" }}
<a class="share__link btn" title="{{ T "share-caption" }} Reddit" href="https://www.reddit.com/submit?url={{ .Permalink }}&amp;title={{ .Title }}" target="_blank" rel="noopener noreferrer" onclick="window.open(this.href, '{{ T "share-caption" }} Reddit', 'width=832,height=624,toolbar=0,status=0'); return false">
{{ partial "svg/reddit.svg" (dict "class" "share__icon" ) }}
</a>
{{- end }}
{{- if .Param "share.telegram" }}
<a class="share__link btn" title="{{ T "share-caption" }} Telegram" href="https://t.me/share/url?url={{ .Permalink }}&amp;title={{ .Title }}" target="_blank" rel="noopener noreferrer" onclick="window.open(this.href, '{{ T "share-caption" }} Telegram', 'width=800,height=600,toolbar=0,status=0'); return false">
{{ partial "svg/telegram.svg" (dict "class" "share__icon" ) }}
</a>
{{- end }}
{{- if .Param "share.linkedin" }}
<a class="share__link btn" title="{{ T "share-caption" }} LinkedIn" href="https://www.linkedin.com/shareArticle?mini=true&url={{ .Permalink }}&title={{ .Title }}" target="_blank" rel="noopener noreferrer" onclick="window.open(this.href, '{{ T "share-caption" }} LinkedIn', 'width=640,height=480,toolbar=0,status=0'); return false">
{{ partial "svg/linkedin.svg" (dict "class" "share__icon" ) }}
</a>
{{- end }}
{{- if .Param "share.vk" }}
<a class="share__link btn" title="{{ T "share-caption" }} VK" href="https://vk.com/share.php?url={{ .Permalink }}" target="_blank" rel="noopener noreferrer" onclick="window.open(this.href, '{{ T "share-caption" }} VK', 'width=640,height=480,toolbar=0,status=0'); return false">
{{ partial "svg/vk.svg" (dict "class" "share__icon" ) }}
</a>
{{- end }}
{{- if .Param "share.pocket" }}
<a class="share__link btn" title="{{ T "save-caption" }} Pocket" href="https://getpocket.com/edit?url={{ .Permalink }}&amp;title={{ .Title }}" target="_blank" rel="noopener noreferrer" onclick="window.open(this.href, '{{ T "save-caption" }} Pocket', 'width=480,height=320,toolbar=0,status=0'); return false">
{{ partial "svg/pocket.svg" (dict "class" "share__icon" ) }}
</a>
{{- end }}
{{- if .Param "share.pinterest" }}
<a class="share__link btn" title="{{ T "save-caption" }} Pinterest" href="https://pinterest.com/pin/create/button/?url={{ .Permalink }}&description={{ .Title }}" target="_blank" rel="noopener noreferrer" onclick="window.open(this.href, '{{ T "save-caption" }} Pocket', 'width=800,height=720,toolbar=0,status=0'); return false">
{{ partial "svg/pinterest.svg" (dict "class" "share__icon" ) }}
</a>
{{- end }}
</div>
{{- end }}

View File

@ -0,0 +1,12 @@
{{- $taxo := "tags" -}}
{{- with .Param $taxo }}
<div class="entry__tags">
{{- range . }}
{{- $url := urls.Parse (. | urlize) -}}
{{- $path := $url.Path -}}
{{- with $.Site.GetPage (printf "/%s/%s" $taxo $path) }}
<a class="entry__tag btn" href="{{ .RelPermalink }}">{{ .Title }}</a>
{{- end }}
{{- end }}
</div>
{{- end }}

View File

@ -0,0 +1,9 @@
{{- $toc := default .Site.Params.Entry.toc .Params.toc -}}
{{- $tocOpen := default .Site.Params.Entry.tocOpen .Params.tocOpen -}}
{{- if $toc }}
<details class="entry__toc toc" {{ if $tocOpen }}open{{ end }}>
<summary class="toc__title">{{- T "entry_toc" -}}</summary>
{{ .TableOfContents }}
</details>
{{- end }}

View File

@ -0,0 +1,5 @@
<footer class="footer">
{{- partial "footer_social.html" . }}
{{- partial "footer_menu.html" . }}
<div class="footer__copyright">© {{ now.Format "2006" }} {{ .Site.Params.copyright | default .Site.Title }}. <span class="footer__copyright-credits">{{ T "footer_credits" | safeHTML }}</span></div>
</footer>

View File

@ -0,0 +1,7 @@
{{- with .Site.Menus.footer }}
<div class="footer__links{{ if $.Site.Params.social }} mt{{ end }}">
{{ range $key, $value := . }}
{{- if ne $key 0 }} • {{ end }}<a class="footer__link" href="{{ $value.URL }}">{{ $value.Name }}</a>
{{- end }}
</div>
{{- end }}

View File

@ -0,0 +1,11 @@
{{- if .Site.Params.social }}
<div class="footer__social social">
{{- range sort .Site.Data.social.icons "weight" }}
{{- if isset $.Site.Params.Social .id }}
<a class="social__link" target="_blank" rel="noopener noreferrer" href="{{ printf .url (index $.Site.Params.Social .id) }}">
{{ partial .icon (dict "class" "social__icon") }}
</a>
{{- end }}
{{- end }}
</div>
{{- end }}

View File

@ -0,0 +1,4 @@
<header class="header">
{{ partial "header_logo.html" . }}
{{ partial "header_menu.html" . }}
</header>

View File

@ -0,0 +1 @@
<a class="logo" href="{{ "" | relLangURL }}">{{ .Site.Title }}</a>

View File

@ -0,0 +1,27 @@
{{- if .Site.Menus.main }}
<nav class="main-nav{{ if eq .Site.Params.mainMenuAlignment "right" }} main-nav--right{{ end }}" role="navigation">
<button id="toggle" class="main-nav__btn" aria-label="Menu toggle" aria-expanded="false" tabindex="0">
<div class="main-nav__btn-box" tabindex="-1">
<svg class="main-nav__icon icon-menu" width="18" height="18" viewBox="0 0 18 18">
<path class="icon-menu__burger" d="M18 0v3.6H0V0h18zM0 10.8h18V7.2H0v3.6zM0 18h18v-3.6H0V18z"/>
<path class="icon-menu__x" d="M11.55 9L18 15.45 15.45 18 9 11.55 2.55 18 0 15.45 6.45 9 0 2.55 2.55 0 9 6.45 15.45 0 18 2.55 11.55 9z"/>
</svg>
</div>
</button>
<ul id="menu" class="main-nav__list">
{{- $currentNode := . }}
{{- range .Site.Menus.main }}
{{- $current := (or ($currentNode.IsMenuCurrent "main" .) ($currentNode.HasMenuCurrent "main" .)) }}
{{- if .Name }}
<li class="main-nav__item{{ if $current }} main-nav__item--active{{ end }}">
{{ if not $current }}<a class="main-nav__link" href="{{ .URL }}">{{ end }}
{{ .Pre }}
<span class="main-nav__text">{{ .Name }}</span>
{{ .Post }}
{{ if not $current }}</a>{{ end }}
</li>
{{- end }}
{{- end }}
</ul>
</nav>
{{- end }}

View File

@ -0,0 +1,3 @@
{{ if and .IsPage (eq (.Param "mathjax") true) }}
<script src="{{ .Param "mathjaxPath" | default "https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.6/MathJax.js" }}{{ with .Param "mathjaxConfig" | default "TeX-AMS-MML_HTMLorMML" }}?config={{ . }}{{ end }}" async></script>
{{ end }}

View File

@ -0,0 +1,30 @@
{{- $pag := $.Paginator }}
{{- if gt $pag.TotalPages 1 }}
<div class="pagination block">
{{- $ellipsed := false }}
{{- $shouldEllipse := false }}
{{- range $pag.Pagers }}
{{- $right := sub .TotalPages .PageNumber }}
{{- $showNumber := or (le .PageNumber 3) (eq $right 0) }}
{{- $showNumber := or $showNumber (and (gt .PageNumber (sub $pag.PageNumber 2)) (lt .PageNumber (add $pag.PageNumber 2))) }}
{{- if $showNumber }}
{{- $ellipsed = false }}
{{- $shouldEllipse = false }}
{{- else }}
{{- $shouldEllipse = not $ellipsed }}
{{- $ellipsed = true }}
{{- end }}
{{- if $showNumber }}
{{- if eq . $pag }}
<span class="pagination__item pagination__item--active" data-total="{{ $pag.TotalPages }}">
{{- .PageNumber -}}
</span>
{{- else }}
<a class="pagination__item pagination__item--desktop" href="{{ .URL }}">{{ .PageNumber }}</a>
{{- end }}
{{- else if $shouldEllipse }}
<span class="pagination__item pagination__item--gap">&hellip;</span>
{{- end }}
{{- end }}
</div>
{{- end }}

View File

@ -0,0 +1,13 @@
{{ $relatedMax := .Site.Params.relatedMax | default 5 }}
{{ $related := .Site.RegularPages.Related . | first $relatedMax }}
{{ if and ($related) (.Param "related") }}
<div class="related block">
<h3 class="related__title">{{ T "related_title" }}</h3>
<ul class="related__list">
{{ range $related }}
<li class="related__item"><a class="related__link" href="{{ .RelPermalink }}">{{ .Title }}</a></li>
{{ end }}
</ul>
</div>
{{ end }}

View File

@ -0,0 +1 @@
<svg class="{{ .class }}" aria-label="Email" role="img" width="32" height="32" viewBox="0 0 512 512"><path d="M299 268l124 106c-4 4-10 7-17 7H106c-7 0-13-3-17-7l124-106 43 38 43-38zm-43 13L89 138c4-4 10-7 17-7h300c7 0 13 3 17 7L256 281zm54-23l121-105v208L310 258zM81 153l121 105L81 361V153z"/></svg>

After

Width:  |  Height:  |  Size: 299 B

View File

@ -0,0 +1 @@
<svg class="{{ .class }}" aria-label="Facebook" role="img" width="32" height="32" viewBox="0 0 512 512"><path d="M330 512V322h64l9-74h-73v-47c0-22 6-36 37-36h39V99c-7-1-30-3-57-3-57 0-95 34-95 98v54h-64v74h64v190z"/></svg>

After

Width:  |  Height:  |  Size: 222 B

View File

@ -0,0 +1 @@
<svg class="{{ .class }}" aria-label="Github" role="img" width="32" height="32" viewBox="0 0 512 512"><path d="M335 499c14 0 12 17 12 17H165s-2-17 12-17c13 0 16-6 16-12l-1-50c-71 16-86-28-86-28-12-30-28-37-28-37-24-16 1-16 1-16 26 2 40 26 40 26 22 39 59 28 74 22 2-17 9-28 16-35-57-6-116-28-116-126 0-28 10-51 26-69-3-6-11-32 3-67 0 0 21-7 70 26 42-12 86-12 128 0 49-33 70-26 70-26 14 35 6 61 3 67 16 18 26 41 26 69 0 98-60 120-117 126 10 8 18 24 18 48l-1 70c0 6 3 12 16 12z"/></svg>

After

Width:  |  Height:  |  Size: 483 B

View File

@ -0,0 +1 @@
<svg class="{{ .class }}" aria-label="Gitlab" role="img" width="32" height="32" viewBox="0 0 512 512"><path d="M450 282l-22-67-43-133c-2-7-12-7-14 0l-43.3 133H184.3L141 82c-2-7-12-7-14 0L84 215l-22 67c-2 6 0 13 6 16l188 137 188-137c6-3 8-10 6-16z"/></svg>

After

Width:  |  Height:  |  Size: 255 B

View File

@ -0,0 +1 @@
<svg class="{{ .class }}" aria-label="Instagram" role="img" width="32" height="32" viewBox="0 0 512 512"><g fill="none" stroke-width="29"><rect height="296" rx="78" width="296" x="108" y="108"/><circle cx="256" cy="256" r="69"/></g><circle cx="343" cy="169" r="19"/></svg>

After

Width:  |  Height:  |  Size: 272 B

View File

@ -0,0 +1 @@
<svg class="{{ .class }}" aria-label="LinkedIn" role="img" width="32" height="32" viewBox="0 0 512 512"><circle cx="142" cy="138" r="37"/><path stroke-width="66" d="M244 194v198M142 194v198"/><path d="M276 282c0-20 13-40 36-40 24 0 33 18 33 45v105h66V279c0-61-32-89-76-89-34 0-51 19-59 32"/></svg>

After

Width:  |  Height:  |  Size: 297 B

View File

@ -0,0 +1 @@
<svg class="{{ .class }}" aria-label="Mastodon" role="img" width="32" height="32" viewBox="0 0 512 512"><path d="M416 197c0-74-49-96-49-96-42-22-172-24-222 0 0 0-49 22-49 96v59c2 72 14 145 81 162 33 9 89 18 140-6l-2-27s-27 7-58 7c-74 2-67-39-70-52 0 0 51 17 137 6 42-6 80-32 85-56 8-38 7-93 7-93zm-58 96h-35v-88c0-18-8-27-23-27-18 0-27 11-27 33v47h-34v-47c0-22-9-33-27-33-15 0-23 9-23 27v88h-35v-91c0-18 5-60 52-60 39 0 50 37 50 37s10-37 50-37c45 0 52 42 52 60v91z"/></svg>

After

Width:  |  Height:  |  Size: 473 B

View File

@ -0,0 +1 @@
<svg class="{{ .class }}" aria-label="Medium" role="img" width="32" height="32" viewBox="0 0 512 512"><path d="M125 173c0-4-2-9-5-11l-31-38v-6h98l75 166 67-166h93v6l-27 26c-2 1-3 4-3 7v190c0 3 1 6 3 8l27 25v6H289v-6l27-26c3-3 3-4 3-8V193l-76 192h-10l-88-192v129c-1 5 1 11 5 15l35 43v5H85v-5l35-43c4-4 6-10 5-15z"/></svg>

After

Width:  |  Height:  |  Size: 320 B

View File

@ -0,0 +1 @@
<svg class="{{ .class }}" aria-label="Pinterest" role="img" width="32" height="32" viewBox="0 0 512 512"><path d="m265 65c-104 0-157 75-157 138 0 37 14 71 45 83 5 2 10 0 12-5l3-18c2-6 1-7-2-12-9-11-15-24-15-43 0-56 41-106 108-106 60 0 92 37 92 85 0 64-28 116-70 116-23 0-40-18-34-42 6-27 19-57 19-77 0-18-9-34-30-34-24 0-42 25-42 58 0 20 7 34 7 34l-29 120a249 249 0 0 0 2 86l3-1c2-3 31-37 40-72l16-61c7 15 29 28 53 28 71 0 119-64 119-151 0-66-56-126-140-126z"/></svg>

After

Width:  |  Height:  |  Size: 467 B

View File

@ -0,0 +1 @@
<svg class="{{ .class }}" aria-label="Pocket" role="img" width="32" height="32" viewBox="0 0 512 512"><path d="M388.8 88.9H123.2A47.4 47.4 0 0 0 76 136.5v131.9c0 2.4.2 4.8.5 7.2a101.8 101.8 0 0 0-.5 10.6c0 75.6 80.6 137 180 137s180-61.4 180-137c0-3.6-.2-7.1-.5-10.6.3-2.4.5-4.8.5-7.2v-132A47.4 47.4 0 0 0 388.8 89zm-22.4 132.6l-93 93c-4.7 4.6-11 7-17.1 7a23.8 23.8 0 0 1-17.7-7l-93-93a24 24 0 0 1 33.8-33.8l76.6 76.5 76.6-76.5a24 24 0 0 1 33.8 33.8z"/></svg>

After

Width:  |  Height:  |  Size: 458 B

View File

@ -0,0 +1 @@
<svg class="{{ .class }}" aria-label="Reddit" role="img" width="32" height="32" viewBox="0 0 512 512"><path fill-rule="evenodd" d="M375 146a32 32 0 1 0-29-46l-65-13c-5-1-9 2-10 6l-22 97c-45 1-85 15-113 36a42 42 0 1 0-45 69l-1 12c0 65 74 117 166 117s166-52 166-117l-1-11a42 42 0 1 0-44-69c-28-21-67-35-111-37l19-86 58 13a32 32 0 0 0 32 29zM190 353c2-1 4 0 5 1 15 11 38 18 61 18s46-6 61-18a7 7 0 0 1 8 10c-18 14-44 21-69 21-25-1-51-7-69-21a6 6 0 0 1 3-11zm23-44a31 31 0 1 1-44-44 31 31 0 0 1 44 44zm130 0a31 31 0 1 0-44-44 31 31 0 0 0 44 44z"/></svg>

After

Width:  |  Height:  |  Size: 548 B

View File

@ -0,0 +1 @@
<svg class="{{ .class }}" aria-label="Stack Overflow" role="img" width="32" height="32" viewBox="0 0 512 512"><g stroke-width="30"><path fill="none" d="M125 297v105h241V297"/><path d="M170 341h150m-144-68l148 31M199 204l136 64m-95-129l115 97M293 89l90 120"/></g></svg>

After

Width:  |  Height:  |  Size: 268 B

View File

@ -0,0 +1 @@
<svg class="{{ .class }}" aria-label="Telegram" role="img" width="32" height="32" viewBox="0 0 512 512"><path d="M199 404c-11 0-10-4-13-14l-32-105 245-144"/><path d="M199 404c7 0 11-4 16-8l45-43-56-34"/><path d="M204 319l135 99c14 9 26 4 30-14l55-258c5-22-9-32-24-25L79 245c-21 8-21 21-4 26l83 26 190-121c9-5 17-3 11 4"/></svg>

After

Width:  |  Height:  |  Size: 327 B

View File

@ -0,0 +1 @@
<svg class="{{ .class }}" aria-label="Twitter" role="img" width="32" height="32" viewBox="0 0 512 512"><path d="M437 152a72 72 0 0 1-40 12 72 72 0 0 0 32-40 72 72 0 0 1-45 17 72 72 0 0 0-122 65 200 200 0 0 1-145-74 72 72 0 0 0 22 94 72 72 0 0 1-32-7 72 72 0 0 0 56 69 72 72 0 0 1-32 1 72 72 0 0 0 67 50 200 200 0 0 1-105 29 200 200 0 0 0 309-179 200 200 0 0 0 35-37"/></svg>

After

Width:  |  Height:  |  Size: 374 B

View File

@ -0,0 +1 @@
<svg class="{{ .class }}" aria-label="VK" role="img" width="32" height="32" viewBox="0 0 512 512"><path d="M274 363c5-1 14-3 14-15 0 0-1-30 13-34s32 29 51 42c14 9 25 8 25 8l51-1s26-2 14-23c-1-2-9-15-39-42-31-30-26-25 11-76 23-31 33-50 30-57-4-7-20-6-20-6h-57c-6 0-9 1-12 6 0 0-9 25-21 45-25 43-35 45-40 42-9-5-7-24-7-37 0-45 7-61-13-65-13-2-59-4-73 3-7 4-11 11-8 12 3 0 12 1 17 7 8 13 9 75-2 81-15 11-53-62-62-86-2-6-5-7-12-9H79c-6 0-15 1-11 13 27 56 83 193 184 192z"/></svg>

After

Width:  |  Height:  |  Size: 475 B

4370
themes/binario/package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,75 @@
{
"name": "binario",
"version": "1.0.0",
"description": "Responsive card-based & code-light Hugo theme",
"license": "MIT",
"browserslist": [
"> 0.25%",
"last 2 version",
"not dead",
"IE 11",
"iOS >= 9"
],
"postcss": {
"plugins": {
"autoprefixer": {
"cascade": false
}
}
},
"eslintConfig": {
"extends": "airbnb-base",
"env": {
"browser": true
},
"rules": {
"indent": [
2,
"tab"
],
"comma-dangle": [
"error",
{
"arrays": "always-multiline",
"objects": "always-multiline",
"imports": "always-multiline",
"exports": "always-multiline",
"functions": "ignore"
}
],
"no-tabs": 0
}
},
"dependencies": {},
"devDependencies": {
"autoprefixer": "^10.4.16",
"editorconfig-checker": "^5.1.1",
"eslint": "^8.52.0",
"eslint-config-airbnb-base": "^15.0.0",
"eslint-plugin-import": "^2.29.0",
"postcss": "^8.4.31",
"postcss-cli": "^10.1.0",
"stylelint": "^15.11.0",
"stylelint-order": "^6.0.3"
},
"scripts": {
"lint:prefixes": "postcss static/css/*.css assets/css/*.css",
"lint:css": "stylelint static/css/*.css assets/css/*.css",
"lint:js": "eslint static/js/*.js",
"lint:editorconfig": "editorconfig-checker",
"lint": "npm run lint:css && npm run lint:js && npm run lint:editorconfig",
"fix:prefixes": "postcss -r static/css/*.css assets/css/*.css",
"fix:css": "stylelint static/css/*.css assets/css/*.css --fix",
"fix:js": "eslint static/js/*.js --fix",
"fix": "npm run fix:prefixes && npm run fix:css && npm run fix:js",
"test": "npm run lint"
},
"repository": {
"type": "git",
"url": "git+https://github.com/Vimux/Binario.git"
},
"bugs": {
"url": "https://github.com/Vimux/Binario/issues"
},
"homepage": "https://github.com/Vimux/Binario"
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 124 B

View File

@ -0,0 +1,28 @@
a {
color: #77baff;
}
blockquote {
border-color: #77baff;
}
mark {
background-color: #77baff;
}
.logo:hover {
color: #77baff;
}
.main-nav__btn {
fill: #77baff;
}
.toc {
color: #77baff;
}
.share__icon {
fill: #77baff;
stroke: #77baff;
}

View File

@ -0,0 +1,28 @@
a {
color: #9ccc6c;
}
blockquote {
border-color: #9ccc6c;
}
mark {
background-color: #9ccc6c;
}
.logo:hover {
color: #9ccc6c;
}
.main-nav__btn {
fill: #9ccc6c;
}
.toc {
color: #9ccc6c;
}
.share__icon {
fill: #9ccc6c;
stroke: #9ccc6c;
}

View File

@ -0,0 +1,28 @@
a {
color: #ff5562;
}
blockquote {
border-color: #ff5562;
}
mark {
background-color: #ff5562;
}
.logo:hover {
color: #ff5562;
}
.main-nav__btn {
fill: #ff5562;
}
.toc {
color: #ff5562;
}
.share__icon {
fill: #ff5562;
stroke: #ff5562;
}

View File

@ -0,0 +1,28 @@
a {
color: #bc7de8;
}
blockquote {
border-color: #bc7de8;
}
mark {
background-color: #bc7de8;
}
.logo:hover {
color: #bc7de8;
}
.main-nav__btn {
fill: #bc7de8;
}
.toc {
color: #bc7de8;
}
.share__icon {
fill: #bc7de8;
stroke: #bc7de8;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 86 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 126 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 94 B

Some files were not shown because too many files have changed in this diff Show More