README.md
@@ -1,4 +1,4 @@ # Anatole  [](https://alexbilz.com/) # Anatole  [](https://alexbilz.com/) Anatole is a beautiful minimalist two-column [hugo](https://gohugo.io/) theme based on farbox-theme-Anatole. @@ -6,9 +6,10 @@  ## Features Anatole's aims to be minimalistic and sleek, but still brings some great functionality. ### Features include: ### Features include - Profile picture and slogan - Dark mode @@ -19,6 +20,7 @@ - Google Analytics (optional) - Comments powered by Disqus (optional) - Katex support (optional) - Formspree Contact Form (optional) - Twitter Cards support - MIT License - Fontawesome 5.15.1 icons @@ -30,27 +32,33 @@ - Uses Hugo pipes to process assets ## Preview the exampleSite ``` ```shell git clone https://github.com/lxndrblz/anatole.git anatole cd anatole/exampleSite hugo server --themesDir ../.. ``` ## Quick Start 1. Add the repository into your Hugo Project repository as a submodule: `git submodule add https://github.com/lxndrblz/anatole.git themes/anatole`. 2. Configure your `config.toml`. Feel free to copy the demo `config.toml` and some content from the exampleSite. 3. Build your site with `hugo serve` and admire the result at `http://localhost:1313/`. ## Update your installation If you want to get the latest update of the `Anatole` theme please execute this command: ``` ```shell git submodule update --remote --merge ``` ## Modifying the config.toml Ìn this section I'll discuss the custom parameters available within the `config.toml`. The complete [sample](https://github.com/lxndrblz/anatole/blob/master/exampleSite/config.toml) can be found in the exampleSite folder. ### Profile picture and slogan ```toml [params] title = "I'm Jane Doe" @@ -60,10 +68,13 @@ ``` ### Favicon Add you own favicon in `static/favicons/favicon.ico`. ### Navigation items Non-content entries can be added right from the `config.toml` file. ```toml [menu] @@ -85,17 +96,37 @@ identifier = "about" url = "/about/" ``` ### Prefer dark theme You can easily enable the dark mode from the `config.toml` all you have to do is to set the parameter `displayMode` to `dark`. If you dont specify any displayMode, then the light version will be loaded. Please also note that returning visitors will see the theme that was last displayed to them on your site. If your user has his system configured to dark mode, then this will also take presendence over the displayMode set in the `config.toml`. ```toml [params] displayMode = "dark" ``` ### Disable Animations You can easily disable the animations from the `config.toml`. All you have to do is to set the parameter `doNotLoadAnimations` to `true`. ```toml [params] doNotLoadAnimations = true # Animations are loaded by default ``` ### Have a static page as a home page If you prefer having a static page as your home page rather than a listing of the latest posts, then make sure you leave the `mainSections` parameter blank: ```toml [params] mainSections = [] ``` Put any content into the `_index.md` file located in the content directory. If you want, you can also have some static text and the posts below. In such case, simply keep the `mainSections = ["post"]` and put any static content in the `_index.md`. ### Multilingual support Anatole supports multilingual page setups. All you need to do is to add the languages to your 'config.toml'. For each Language you can set the custom options like title or description. It's important to include a `LanguageName`, as it will be displayed in the main menu. ```toml [Languages] [Languages.en] @@ -109,7 +140,9 @@ weight = 2 LanguageName = "DE" ``` There are two ways of translating your content either by adding a suffix in the filename eg. `mypost.de.md` or by setting a contentDir (a certain directory) for each language. [Link to the Hugo documentation](https://gohugo.io/content-management/multilingual/). If you want to use the option with the `contentDir`, you will have to add the `contentDir` parameter for each language: ```toml [languages] [languages.en] @@ -117,7 +150,9 @@ languageName = "EN" weight = 1 ``` To make sure your menu is linking to the correct localized content, make sure that you customize the menu items to inlude the language prefix. Your menu might look like the following: ```toml [[Languages.de.menu.main]] url = "/de/" @@ -137,58 +172,83 @@ identifier = "about" url = "/de/about/" ``` Anatole currently ships with support for some basic languages. Contributions for other language translations are welcome. ### :100: Google Lighthouse score The theme is optimized to adhere to the requirements checked for in the Lighthouse Audit. On my [personal site](https://www.alexbilz.com) I was able to reach a perfect 100⁄100 score.  ### Comments powered by Disqus No comment section is shown on the `single.html`, unless a disqus code is specified in the `config.toml` file. ```toml disqusShortname = "XXX" ``` ### Google Analytics To use Google Analytics, a valid tracking code has to be added. If you don't want to load the code, then commend out the parameter. ```toml googleAnalytics = "UA-123-45" ``` ### Google Site Verification To use Google Site Verification, add the following line to the `[params]`: ```toml [params] googleSiteVerify = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789" ``` Replace the hash with the one Google provided you. ### Beautiful math functions ```toml ## Math settings [params.math] enable = false # options: true, false. Enable math support globally, default: false. You can always enable math on per page. use = "katex" # options: "katex", "mathjax". default is "katex". ``` ### Formspree Contact Form on the Contact page Step 1: Configure the `contactFormAction` in the `config.toml` ```toml [params] #contactFormAction = "https://formspree.io/f/your-form-hash-here" ``` Step 2: Activate the `contact: true` or `contact=true` in the frontmatter of a page. See the `exampleSite/content/contact.html` as an example. ### Twitter Cards support In order to use the full functionality of Twitter cards, you will have to define a couple of settings in the `config.toml` and the frontmatter of a page. In the `config.toml` you can configure a site feature image. This image will be displayed, if no image is defined in the frontmatter of a page. ```toml [params] images = ["images/site-feature-image.png"] ``` To define a custom image of a page, you might want to add the following to the frontmatter of a post. ```toml images = ["post-cover.png"] ``` ### Custom CSS You can add your custom CSS files with the `customCss` parameter of the configuration file. Put your files into the `assets/css` directory. ```toml customCss = ["css/custom.css", "css/styles.css"] ``` On the user-side it will look like this: ```text . └── assets @@ -196,13 +256,18 @@ ├── custom.css └── styles.css ``` ### Custom JavaScript You can add your custom JS files with the `customJs` parameter of the configuration file. Put your files into the `assets/js` directory. ```toml [params] customJs = ["js/hello.js", "js/world.js"] ``` On the user-side it will look like this: ```text . └── assets @@ -210,22 +275,28 @@ ├── hello.js └── world.js ``` `hello.js` and `world.js` will be bundled into a `custom.min.js`. You can also include links to remote javascript files (hosted on CDNs for example). But be aware, that integrity settings and minification won't be applied. Further make sure to adjust your CSP. You can load a remote script like this: ```toml [params] customJs = ["http://cdn.exmple.org/fancyscript.js"] ``` Both approaches can even be mixed: ```toml [params] customJs = ["https://cdn.exmple.org/fancyscript.js", "js/world.js"] ``` ### Content Security Policy The theme is compliant with most strict CSP policies out of the box. A sample CSP for an Anatole-based site would look something like this: ``` ```text Content-Security-Policy " base-uri 'self'; connect-src 'self'; @@ -238,8 +309,10 @@ style-src 'self' cdnjs.cloudflare.com; " ``` If you want to configure the security headers for a site running on Netlify, you want to make sure you create a special `_headers` file in your sites static folder. The content might look like the following: ``` ```text /* X-Frame-Options: DENY X-Clacks-Overhead: "GNU Terry Pratchett" @@ -249,34 +322,47 @@ Content-Security-Policy: base-uri 'self'; connect-src 'self'; default-src 'self'; frame-ancestors 'none'; font-src 'self' cdnjs.cloudflare.com; img-src 'self'; object-src 'none'; script-src 'self'; style-src 'self' cdnjs.cloudflare.com; Strict-Transport-Security: max-age=63072000; includeSubDomains; preload ``` ### Configurable pagination section You can configure the pages shown on the front page by altering the `mainSections` parameter: ```toml [params] mainSections = ["post", "docs"] ``` ### Robots.txt If you want Hugo to generate a robots.txt, you will have to set the `enableRobotsTXT` in the `config.toml` to `true`. By default a robots.txt, which allows search engine crawlers to access to any page, will be generated. It will look like this: ``` ```text User-agent: * ``` If certain sites shoud be excluded from being accessed, you might want to setup a custom robots.txt file within your `static` folder of your site. ### Syntax highlighting This theme has support for either Hugo's lightning fast Chroma code highlighting. See the [Hugo docs](https://gohugo.io/content-management/syntax-highlighting/) for more information. To enable Chroma, add the following to your site parameters: ``` ```toml pygmentsCodeFences = true pygmentsUseClasses = true ``` Then, you can generate a different style by running: ``` ```shell hugo gen chromastyles --style=monokailight > assets/css/syntax.css ``` If you get any errors, make sure the `assets/css/` directory exists within your sites root folder. Include the newly generated `syntax.css` like a standard custom css script: ``` ```toml [params] customCss = ["css/syntax.css"] ``` @@ -291,5 +377,5 @@ ## Special Thanks 🎁 * Go to [Cai Cai](https://github.com/hi-caicai), for the great Anatole Farbox theme that formed the foundation for this theme. * Go to [Kareya Saleh](https://unsplash.com/photos/tLKOj6cNwe0) for providing the profile picture in the exampleSite. - Go to [Cai Cai](https://github.com/hi-caicai), for the great Anatole Farbox theme that formed the foundation for this theme. - Go to [Kareya Saleh](https://unsplash.com/photos/tLKOj6cNwe0) for providing the profile picture in the exampleSite. assets/scss/main.scss
@@ -18,6 +18,8 @@ --body-color: rgba(0, 0, 0, 0.7); --post-color: rgba(0, 0, 0, 0.44); --border-color: rgba(0, 0, 0, 0.15); --form-border-color: #9f9f9f; --form-button-hover-border-color: #000; --pre-bg-color: #f9f9fd; --nav-text-color: #5a5a5a; --tag-color: #424242; @@ -37,6 +39,8 @@ --body-color: rgb(169, 169, 179); --post-color: rgba(0, 0, 0, 0.44); --border-color: rgb(38, 38, 38); --form-border-color: rgb(169, 169, 179); --form-button-hover-border-color: #fff; --pre-bg-color: rgb(33, 33, 45); --nav-text-color: rgb(191, 191, 191); --tag-color: rgb(191, 191, 191); @@ -1028,5 +1032,80 @@ height: 60px; border-bottom: 1px solid var(--border-color); } <<<<<<< HEAD:assets/scss/main.scss } ======= } /* (CONTACT) FORM */ .contact-form { margin-top: 30px; } .form-style{ width: 100%; } .form-style ul { padding: 0; margin: 0; list-style: none; } .form-style ul li { display: block; margin-bottom: 10px; min-height: 35px; } .form-style ul li .field-style { box-sizing: border-box; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; font-size: 14px; padding: 8px; outline: none; background-color: var(--bg-color); border: 1px solid var(--form-border-color); color: var(--body-color); } .form-style ul li .field-style:focus { box-shadow: 0 0 5px; border:1px solid; } .form-style ul li .field-split { width: 49%; } .form-style ul li .field-full { width: 100%; } .form-style ul li input.align-left { float:left; } .form-style ul li input.align-right { float:right; } .form-style ul li textarea { background-color: var(--bg-color); border: 1px solid var(--form-border-color); color: var(--body-color); width: 100%; height: auto; } .form-style ul li input[type="button"], .form-style ul li input[type="submit"] { background-color: var(--bg-color); border: 1px solid var(--form-border-color); display: inline-block; cursor: pointer; color: var(--body-color); text-decoration: none; width: 100%; } .form-style ul li input[type="button"]:hover, .form-style ul li input[type="submit"]:hover { background-color: var(--bg-color); border: 1px solid var(--form-button-hover-border-color); } /* (CONTACT) FORM END */ >>>>>>> upstream/master:assets/css/style.css assets/scss/markupHighlight.css
New file @@ -0,0 +1,215 @@ :root { /* Light -> monokailight */ --chr-def-color: #272822; --chr-def-bg-color: #fafafa; --chr-err-color: #960050; --chr-err-bg-color: #960050; --chr-hl-bg-color: #ffffcc; --chr-lnt-color: #7f7f7f; --chr-ln-color: #7f7f7f; --chr-k-color: #00a8c8; --chr-kc-color: #00a8c8; --chr-kd-color: #00a8c8; --chr-kn-color: #f92672; --chr-kp-color: #00a8c8; --chr-kr-color: #00a8c8; --chr-kt-color: #00a8c8; --chr-n-color: #111111; --chr-na-color: #75af00; --chr-nb-color: #111111; --chr-bp-color: #111111; --chr-nc-color: #75af00; --chr-no-color: #00a8c8; --chr-nd-color: #75af00; --chr-ni-color: #111111; --chr-ne-color: #75af00; --chr-nf-color: #75af00; --chr-fm-color: #111111; --chr-nl-color: #111111; --chr-nn-color: #111111; --chr-nx-color: #75af00; --chr-py-color: #111111; --chr-nt-color: #f92672; --chr-nv-color: #111111; --chr-vc-color: #111111; --chr-vg-color: #111111; --chr-vi-color: #111111; --chr-vm-color: #111111; --chr-l-color: #ae81ff; --chr-ld-color: #d88200; --chr-s-color: #d88200; --chr-sa-color: #d88200; --chr-sb-color: #d88200; --chr-sc-color: #d88200; --chr-dl-color: #d88200; --chr-sd-color: #d88200; --chr-s2-color: #d88200; --chr-se-color: #8045ff; --chr-sh-color: #d88200; --chr-si-color: #d88200; --chr-sx-color: #d88200; --chr-sr-color: #d88200; --chr-s1-color: #d88200; --chr-ss-color: #d88200; --chr-m-color: #ae81ff; --chr-mb-color: #ae81ff; --chr-mf-color: #ae81ff; --chr-mh-color: #ae81ff; --chr-mi-color: #ae81ff; --chr-il-color: #ae81ff; --chr-mo-color: #ae81ff; --chr-o-color: #f92672; --chr-ow-color: #f92672; --chr-p-color: #111111; --chr-c-color: #75715e; --chr-ch-color: #75715e; --chr-cm-color: #75715e; --chr-c1-color: #75715e; --chr-cs-color: #75715e; --chr-cp-color: #75715e; --chr-cpf-color: #75715e; } html[data-theme='dark'] { /* Dark -> monokai */ --chr-def-color: #f8f8f2; --chr-def-bg-color: #272822; --chr-err-color: #960050; --chr-err-bg-color: #1e0010; --chr-hl-bg-color: #ffffcc; --chr-lnt-color: #7f7f7f; --chr-ln-color: #7f7f7f; --chr-k-color: #66d9ef; --chr-kc-color: #66d9ef; --chr-kd-color: #66d9ef; --chr-kn-color: #f92672; --chr-kp-color: #66d9ef; --chr-kr-color: #66d9ef; --chr-kt-color: #66d9ef; --chr-na-color: #a6e22e; --chr-nc-color: #a6e22e; --chr-no-color: #66d9ef; --chr-nd-color: #a6e22e; --chr-ne-color: #a6e22e; --chr-nf-color: #a6e22e; --chr-nx-color: #a6e22e; --chr-nt-color: #f92672; --chr-l-color: #ae81ff; --chr-ld-color: #e6db74; --chr-s-color: #e6db74; --chr-sa-color: #e6db74; --chr-sb-color: #e6db74; --chr-sc-color: #e6db74; --chr-dl-color: #e6db74; --chr-sd-color: #e6db74; --chr-s2-color: #e6db74; --chr-se-color: #ae81ff; --chr-sh-color: #e6db74; --chr-si-color: #e6db74; --chr-sx-color: #e6db74; --chr-sr-color: #e6db74; --chr-s1-color: #e6db74; --chr-ss-color: #e6db74; --chr-m-color: #ae81ff; --chr-mb-color: #ae81ff; --chr-mf-color: #ae81ff; --chr-mh-color: #ae81ff; --chr-mi-color: #ae81ff; --chr-il-color: #ae81ff; --chr-mo-color: #ae81ff; --chr-o-color: #f92672; --chr-ow-color: #f92672; --chr-c-color: #75715e; --chr-ch-color: #75715e; --chr-cm-color: #75715e; --chr-c1-color: #75715e; --chr-cs-color: #75715e; --chr-cp-color: #75715e; --chr-cpf-color: #75715e; --chr-gd-color: #f92672; --chr-gi-color: #a6e22e; --chr-gu-color: #75715e; } /* Background */ .chroma { color: var(--chr-def-color); background-color: var(--chr-def-bg-color) } /* Other */ .chroma .x { } /* Error */ .chroma .err { color: var(--chr-err-color); background-color: var(--chr-err-bg-color) } /* LineTableTD */ .chroma .lntd { vertical-align: top; padding: 0; margin: 0; border: 0; } /* LineTable */ .chroma .lntable { border-spacing: 0; padding: 0; margin: 0; border: 0; width: auto; overflow: auto; display: block; } /* LineHighlight */ .chroma .hl { display: block; width: 100%;background-color: var(--chr-hl-bg-color) } /* LineNumbersTable */ .chroma .lnt { margin-right: 0.4em; padding: 0 0.4em 0 0.4em;color: var(--chr-lnt-color) } /* LineNumbers */ .chroma .ln { margin-right: 0.4em; padding: 0 0.4em 0 0.4em;color: var(--chr-ln-color) } /* Keyword */ .chroma .k { color: var(--chr-k-color) } /* KeywordConstant */ .chroma .kc { color: var(--chr-kc-color) } /* KeywordDeclaration */ .chroma .kd { color: var(--chr-kd-color) } /* KeywordNamespace */ .chroma .kn { color: var(--chr-kn-color) } /* KeywordPseudo */ .chroma .kp { color: var(--chr-kp-color) } /* KeywordReserved */ .chroma .kr { color: var(--chr-kr-color) } /* KeywordType */ .chroma .kt { color: var(--chr-kt-color) } /* Name */ .chroma .n { color: var(--chr-n-color) } /* NameAttribute */ .chroma .na { color: var(--chr-na-color) } /* NameBuiltin */ .chroma .nb { color: var(--chr-nb-color) } /* NameBuiltinPseudo */ .chroma .bp { color: var(--chr-bp-color) } /* NameClass */ .chroma .nc { color: var(--chr-nc-color) } /* NameConstant */ .chroma .no { color: var(--chr-no-color) } /* NameDecorator */ .chroma .nd { color: var(--chr-nd-color) } /* NameEntity */ .chroma .ni { color: var(--chr-ni-color) } /* NameException */ .chroma .ne { color: var(--chr-ne-color) } /* NameFunction */ .chroma .nf { color: var(--chr-nf-color) } /* NameFunctionMagic */ .chroma .fm { color: var(--chr-fm-color) } /* NameLabel */ .chroma .nl { color: var(--chr-nl-color) } /* NameNamespace */ .chroma .nn { color: var(--chr-nn-color) } /* NameOther */ .chroma .nx { color: var(--chr-nx-color) } /* NameProperty */ .chroma .py { color: var(--chr-py-color) } /* NameTag */ .chroma .nt { color: var(--chr-nt-color) } /* NameVariable */ .chroma .nv { color: var(--chr-nv-color) } /* NameVariableClass */ .chroma .vc { color: var(--chr-vc-color) } /* NameVariableGlobal */ .chroma .vg { color: var(--chr-vg-color) } /* NameVariableInstance */ .chroma .vi { color: var(--chr-vi-color) } /* NameVariableMagic */ .chroma .vm { color: var(--chr-vm-color) } /* Literal */ .chroma .l { color: var(--chr-l-color) } /* LiteralDate */ .chroma .ld { color: var(--chr-ld-color) } /* LiteralString */ .chroma .s { color: var(--chr-s-color) } /* LiteralStringAffix */ .chroma .sa { color: var(--chr-sa-color) } /* LiteralStringBacktick */ .chroma .sb { color: var(--chr-sb-color) } /* LiteralStringChar */ .chroma .sc { color: var(--chr-sc-color) } /* LiteralStringDelimiter */ .chroma .dl { color: var(--chr-dl-color) } /* LiteralStringDoc */ .chroma .sd { color: var(--chr-sd-color) } /* LiteralStringDouble */ .chroma .s2 { color: var(--chr-s2-color) } /* LiteralStringEscape */ .chroma .se { color: var(--chr-se-color) } /* LiteralStringHeredoc */ .chroma .sh { color: var(--chr-sh-color) } /* LiteralStringInterpol */ .chroma .si { color: var(--chr-si-color) } /* LiteralStringOther */ .chroma .sx { color: var(--chr-sx-color) } /* LiteralStringRegex */ .chroma .sr { color: var(--chr-sr-color) } /* LiteralStringSingle */ .chroma .s1 { color: var(--chr-s1-color) } /* LiteralStringSymbol */ .chroma .ss { color: var(--chr-ss-color) } /* LiteralNumber */ .chroma .m { color: var(--chr-m-color) } /* LiteralNumberBin */ .chroma .mb { color: var(--chr-mb-color) } /* LiteralNumberFloat */ .chroma .mf { color: var(--chr-mf-color) } /* LiteralNumberHex */ .chroma .mh { color: var(--chr-mh-color) } /* LiteralNumberInteger */ .chroma .mi { color: var(--chr-mi-color) } /* LiteralNumberIntegerLong */ .chroma .il { color: var(--chr-il-color) } /* LiteralNumberOct */ .chroma .mo { color: var(--chr-mo-color) } /* Operator */ .chroma .o { color: var(--chr-o-color) } /* OperatorWord */ .chroma .ow { color: var(--chr-ow-color) } /* Punctuation */ .chroma .p { color: var(--chr-p-color) } /* Comment */ .chroma .c { color: var(--chr-c-color) } /* CommentHashbang */ .chroma .ch { color: var(--chr-ch-color) } /* CommentMultiline */ .chroma .cm { color: var(--chr-cm-color) } /* CommentSingle */ .chroma .c1 { color: var(--chr-c1-color) } /* CommentSpecial */ .chroma .cs { color: var(--chr-cs-color) } /* CommentPreproc */ .chroma .cp { color: var(--chr-cp-color) } /* CommentPreprocFile */ .chroma .cpf { color: var(--chr-cpf-color) } /* Generic */ .chroma .g { } /* GenericDeleted */ .chroma .gd { } /* GenericEmph */ .chroma .ge { font-style: italic } /* GenericError */ .chroma .gr { } /* GenericHeading */ .chroma .gh { } /* GenericInserted */ .chroma .gi { } /* GenericOutput */ .chroma .go { } /* GenericPrompt */ .chroma .gp { } /* GenericStrong */ .chroma .gs { font-weight: bold } /* GenericSubheading */ .chroma .gu { } /* GenericTraceback */ .chroma .gt { } /* GenericUnderline */ .chroma .gl { } /* TextWhitespace */ .chroma .w { } exampleSite/config.toml
@@ -13,6 +13,11 @@ # Google Analytics #googleAnalytics = "UA-123-45" # Syntax highlighting pygmentsUseClasses = true pygmentsCodeFences = true pygmentsCodefencesGuessSyntax = true [params] title = "I'm Jane Doe" author = "Jane Doe" @@ -20,13 +25,23 @@ profilePicture = "images/profile.jpg" keywords = "" favicon = "favicons/" # example ["css/custom.css"] customCss = [] # example ["js/custom.js"] customJs = [] mainSections = ["post"] images = ["images/site-feature-image.png"] # Google Site Verification doNotLoadAnimations = false # Form Spree Contact Form #contactFormAction = "https://formspree.io/f/your-form-hash-here" # Google Site Verify #googleSiteVerify = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789" indexDateFormat = "Mon, Jan 2, 2006" listDateFormat = "Jan 2" singleDateFormat = "Mon, Jan 2, 2006" ## Math settings [params.math] enable = false # options: true, false. Enable math support globally, default: false. You can always enable math on per page. @@ -75,3 +90,9 @@ weight = 300 identifier = "about" url = "/about/" [[menu.main]] name = "Contact" weight = 400 identifier = "contact" url = "/contact/" exampleSite/content/_index.md
@@ -1,3 +1,24 @@ +++ author = "Hugo Authors" +++ <!-- This file is left intentionally empty by default to be backward compatible with initial theme setup. Although the theme has advanced a little bit and it now allows to specify the content on the main page (even if the list of posts/articles is not intended). This can be: - with the list of posts/articles (default: `mainSections = ["post"]) or - without the list of posts/articles (by setting `mainSections = [""]`) Markdown supported, ie: ``` # Welcome - Hugo :rocket: - Hugo theme :rocket: Don't forget to check the README.md file! ``` --> exampleSite/content/contact.md
New file @@ -0,0 +1,7 @@ --- author: Hugo Authors title: Contact date: 2019-03-08 description: Contact Page contact: true --- i18n/de.toml
@@ -19,3 +19,6 @@ [comments] other = "Kommentare" [send] other = "Senden" i18n/dk.toml
@@ -19,3 +19,6 @@ [comments] other = "kommentar" [send] other = "Sende" i18n/en.toml
@@ -19,3 +19,6 @@ [comments] other = "comments" [send] other = "Send" i18n/es.toml
@@ -19,3 +19,6 @@ [comments] other = "comentarios" [send] other = "Enviar" i18n/fa.toml
@@ -19,3 +19,6 @@ [comments] other = "نظرات" [send] other = "ارسال" i18n/fi.toml
@@ -19,3 +19,6 @@ [comments] other = "kommentit" [send] other = "Lähetä" i18n/fr.toml
New file @@ -0,0 +1,24 @@ [category] other = "catégorie" [tag] other = "tag" [reading_time] one = "Une minute de lecture" other = "{{ .Count }} minutes de lecture" [page_not_found] other = "Page Non Trouvée" [page_does_not_exist] other = "Désolé, cette page n'existe pas." [head_back] other = "Vous pouvez revenir à <a href=\"{{ . }}\">l'accueil</a>." [comments] other = "commentaire" [send] other = "Envoyer" i18n/it.toml
@@ -19,3 +19,6 @@ [comments] other = "commenti" [send] other = "Spedire" i18n/zh-tw.toml
New file @@ -0,0 +1,24 @@ [category] other = "分類" [tag] other = "標籤" [reading_time] one = "閱讀時間 1 分鐘" other = "閱讀時間 {{ .Count }} 分鐘" [page_not_found] other = "找不到頁面" [page_does_not_exist] other = "此頁面不存在" [head_back] other = "返回 <a href=\"{{ . }}\">首頁</a>." [comments] other = "註解" [send] other = "發送" i18n/zh-zn.toml
File was renamed from i18n/ch-zn.toml @@ -19,3 +19,6 @@ [comments] other = "注释" [send] other = "发送" layouts/_default/list.html
@@ -1,5 +1,5 @@ {{ define "main" }} <div class="archive animated fadeInDown"> <div class="archive {{ with .Site.Params.doNotLoadAnimations }} . {{ else }} animated fadeInDown {{ end }}"> <ul class="list-with-title"> {{ range .Data.Pages.GroupByDate "2006" }} <div class="listing-title">{{ .Key }}</div> @@ -7,7 +7,7 @@ <ul class="listing"> <div class="listing-item"> <div class="listing-post"><a href="{{ .Permalink }}" title="{{ .Title }}">{{ .Title }}</a> <div class="post-time"><span class="date">{{.Date.Format "Jan 2" }}</span></div> <div class="post-time"><span class="date">{{.Date.Format .Site.Params.listDateFormat }}</span></div> </div> </div> </ul> layouts/_default/single.html
@@ -1,13 +1,12 @@ {{ define "main" }} <div class="post animated fadeInDown"> <div class="post {{ with .Site.Params.doNotLoadAnimations }} . {{ else }} animated fadeInDown {{ end }}"> <div class="post-content"> <div class="post-title"> <h3>{{ .Title }}</h3> {{ if eq .Type "post"}} <div class="info"> <em class="fas fa-calendar-day"></em> <span class="date">{{ .Date.Format "Mon, Jan 2, 2006" }}</span> <span class="date">{{ .Date.Format .Site.Params.singleDateFormat }}</span> <em class="fas fa-stopwatch"></em> <span class="reading-time">{{ i18n "reading_time" .ReadingTime }}</span> </div> @@ -15,6 +14,11 @@ </div> {{ .Content }} {{- if (eq .Params.contact true) -}} {{- partial "contact.html" . -}} {{- end -}} </div> <div class="post-footer"> <div class="info"> layouts/index.html
@@ -1,7 +1,19 @@ {{ define "main" }} <div class="post {{ with .Site.Params.doNotLoadAnimations }} . {{ else }} animated fadeInDown {{ end }}"> <!-- (Optional) Home -- on top of `mainSections` content (aka posts) ; -- as declared in content/_index.md One can set `mainSections = [""]` and have the content/_index.md specified here --> {{ .Content }} </div> {{ $paginator := .Paginate (where .Site.RegularPages "Type" "in" .Site.Params.mainSections) }} {{ range $paginator.Pages }} <div class="post animated fadeInDown"> <div class="post {{ with .Site.Params.doNotLoadAnimations }} . {{ else }} animated fadeInDown {{ end }}"> <div class="post-title"> <h3><a href="{{ .RelPermalink }}">{{ .Title }}</a> </h3> @@ -12,7 +24,7 @@ <div class="post-footer"> <div class="meta"> <div class="info"><em class="fas fa-calendar-day"></em><span class="date">{{ .Date.Format "Mon, Jan 2, 2006" }}</span> class="date">{{ .Date.Format .Site.Params.indexDateFormat }}</span> {{ with .Params.tags }} {{- range $index, $el := . -}} <a class="tag" layouts/partials/contact.html
New file @@ -0,0 +1,19 @@ <div class="contact-form"> <form class="form-style" method="POST" action="{{ .Site.Params.contactFormAction }}" data-toggle="validator"> <ul> <li> <input class="field-style field-full" type="text" name="username" id="username" placeholder="Name" required> </li> <li> <input class="field-style field-full" type="email" id="email" name="email" placeholder="Email" required> </li> <li> <textarea class="field-style" name="message" id="message" rows="6" placeholder="{{ i18n "message" }}"></textarea> </li> <li> <input class="field-style" type="submit" value="{{ i18n "send" }}"></input> </li> </ul> </form> </div> layouts/partials/head.html
@@ -11,6 +11,7 @@ {{- end -}} <!-- CSS --> <<<<<<< HEAD {{ $styles := resources.Get "scss/main.scss" | resources.ExecuteAsTemplate "style.main.scss" . | toCSS | minify | fingerprint }} <link rel="stylesheet" @@ -20,12 +21,29 @@ {{- $css := "" -}} {{- range .Site.Params.customCss -}} {{ $css := resources.Get . | fingerprint }} ======= {{ $style := resources.Get "css/style.css" | resources.Minify | resources.Fingerprint }} <link rel="stylesheet" href="{{ $css.Permalink }}" integrity="{{ $css.Data.Integrity }}" href="{{ $style.Permalink }}" integrity="{{ $style.Data.Integrity }}" crossorigin="anonymous" type="text/css"> {{- end -}} {{ $markupHighlightStyle := resources.Get "css/markupHighlight.css" | resources.Minify | resources.Fingerprint }} >>>>>>> upstream/master <link rel="stylesheet" href="{{ $markupHighlightStyle.Permalink }}" integrity="{{ $markupHighlightStyle.Data.Integrity }}" crossorigin="anonymous" type="text/css"> {{ range .Site.Params.customCss }} {{ $minstyles := resources.Get . }} {{ $styles := $minstyles | resources.Minify | resources.Fingerprint }} <link rel="stylesheet" href="{{ $styles.Permalink }}" integrity="{{ $styles.Data.Integrity }}" crossorigin="anonymous" media="screen" /> {{ end }} <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.1/css/all.min.css" integrity="sha512-+4zCK9k+qNFUR5X+cKL9EIR+ZOhtIloNl9GIKS57V1MyNsYpYcUrUeQc9vNfzsWfV28IaLL3i96P9sdNyeRssA==" layouts/partials/navbar.html
@@ -1,4 +1,4 @@ <div class="page-top animated fadeInDown"> <div class="page-top {{ with .Site.Params.doNotLoadAnimations }} . {{ else }} animated fadeInDown {{ end }}"> <a role="button" class="navbar-burger" data-target="navMenu" aria-label="menu" aria-expanded="false"> <span aria-hidden="true"></span> <span aria-hidden="true"></span> layouts/partials/sidebar.html
@@ -1,4 +1,4 @@ <div class="sidebar animated fadeInDown"> <div class="sidebar{{ with .Site.Params.doNotLoadAnimations }} . {{ else }} animated fadeInDown {{ end }}"> <div class="logo-title"> <div class="title"> <img src="{{ .Site.Params.profilePicture | absURL }}" alt="profile picture">