mirror of
https://github.com/gethinode/hinode.git
synced 2025-10-07 18:14:28 +00:00
Compare commits
28 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
c996f7b902 | ||
![]() |
6d1af55263 | ||
![]() |
176d14fe8a | ||
![]() |
294526883d | ||
![]() |
4b9bf2c254 | ||
![]() |
954154c2a5 | ||
![]() |
c8f33170da | ||
![]() |
0aa9877169 | ||
![]() |
f4c4ea28ed | ||
![]() |
12d406ea38 | ||
![]() |
2e1040b25b | ||
![]() |
c019703a30 | ||
![]() |
81a3be47a7 | ||
![]() |
e2c5c92e9b | ||
![]() |
791f318614 | ||
![]() |
7be58d48dc | ||
![]() |
70d9d054ce | ||
![]() |
7be7cb171c | ||
![]() |
4889daf3e2 | ||
![]() |
db3fc14da4 | ||
![]() |
c535323ea0 | ||
![]() |
74156590c5 | ||
![]() |
a2f91fac9b | ||
![]() |
ec682d687b | ||
![]() |
4cf595d901 | ||
![]() |
e5c7b3c5a4 | ||
![]() |
3024924f50 | ||
![]() |
b5721351ea |
2
.github/workflows/lint.yml
vendored
2
.github/workflows/lint.yml
vendored
@@ -14,7 +14,7 @@ jobs:
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
node-version: [12.x, 14.x, 16.x]
|
||||
node-version: [14.x, 16.x, 18.x]
|
||||
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
|
||||
|
||||
steps:
|
||||
|
@@ -1,4 +1,5 @@
|
||||
assets/scss/common/_variables.scss
|
||||
assets/scss/components/_syntax.scss
|
||||
assets/scss/vendor
|
||||
assets/scss/app.scss
|
||||
node_modules
|
||||
|
@@ -155,8 +155,8 @@ The `hugo-theme-hinode` and `hugo-theme-hinode-child` codebase is released under
|
||||
<!-- MARKDOWN MAINTAINED LINKS -->
|
||||
<!-- TODO: add blog link
|
||||
[blog]: https://markdumay.com
|
||||
-->
|
||||
[blog]: https://github.com/markdumay
|
||||
-->
|
||||
[demo]: https://hinode-demo.markdumay.org/
|
||||
[license]: https://github.com/markdumay/hugo-theme-hinode/blob/main/LICENSE
|
||||
[repository]: https://github.com/markdumay/hugo-theme-hinode.git
|
||||
|
BIN
assets/img/notepad.jpg
Normal file
BIN
assets/img/notepad.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 173 KiB |
@@ -155,3 +155,42 @@ Source:
|
||||
}
|
||||
}
|
||||
}());
|
||||
|
||||
|
||||
/*
|
||||
Source:
|
||||
- https://simplernerd.com/hugo-add-copy-to-clipboard-button/
|
||||
*/
|
||||
|
||||
const svgCopy =
|
||||
'<svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg>';
|
||||
const svgCheck =
|
||||
'<svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true"><path fill-rule="evenodd" fill="rgb(63, 185, 80)" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg>';
|
||||
|
||||
const addCopyButtons = (clipboard) => {
|
||||
// 1. Look for pre > code elements in the DOM
|
||||
document.querySelectorAll("pre > code").forEach((codeBlock) => {
|
||||
// 2. Create a button that will trigger a copy operation
|
||||
const button = document.createElement("button");
|
||||
button.className = "clipboard-button";
|
||||
button.type = "button";
|
||||
button.innerHTML = svgCopy;
|
||||
button.addEventListener("click", () => {
|
||||
clipboard.writeText(codeBlock.innerText).then(
|
||||
() => {
|
||||
button.blur();
|
||||
button.innerHTML = svgCheck;
|
||||
setTimeout(() => (button.innerHTML = svgCopy), 2000);
|
||||
},
|
||||
(error) => (button.innerHTML = "Error")
|
||||
);
|
||||
});
|
||||
// 3. Append the button directly before the pre tag
|
||||
const pre = codeBlock.parentNode;
|
||||
pre.parentNode.insertBefore(button, pre);
|
||||
});
|
||||
};
|
||||
|
||||
if (navigator && navigator.clipboard) {
|
||||
addCopyButtons(navigator.clipboard);
|
||||
}
|
@@ -9,6 +9,7 @@ $themeColor: {{ site.Params.style.themeColor | default "#007bff" }};
|
||||
|
||||
// Import Bootstrap configuration
|
||||
@import "bootstrap/scss/variables";
|
||||
@import "bootstrap/scss/maps";
|
||||
@import "bootstrap/scss/mixins";
|
||||
@import "bootstrap/scss/utilities";
|
||||
|
||||
@@ -60,10 +61,12 @@ $themeColor: {{ site.Params.style.themeColor | default "#007bff" }};
|
||||
@import "components/blockquote.scss";
|
||||
@import "components/buttons.scss";
|
||||
@import "components/card.scss";
|
||||
@import "components/clipboard.scss";
|
||||
@import "components/comments.scss";
|
||||
@import "components/navbar.scss";
|
||||
@import "components/img.scss";
|
||||
@import "components/search.scss";
|
||||
@import "components/syntax.scss";
|
||||
@import "components/vimeo.scss";
|
||||
@import "common/styles.scss";
|
||||
@import "layouts/reboot.scss";
|
||||
|
@@ -1,5 +1,6 @@
|
||||
// Bootstrap variables overrides for theme
|
||||
$primary: $themeColor;
|
||||
$enable-negative-margins: true;
|
||||
|
||||
// Font awesome variables overrides for theme
|
||||
$fa-font-path: "../fonts";
|
||||
|
44
assets/scss/components/_clipboard.scss
Normal file
44
assets/scss/components/_clipboard.scss
Normal file
@@ -0,0 +1,44 @@
|
||||
// Adapted from https://simplernerd.com/hugo-add-copy-to-clipboard-button/
|
||||
|
||||
.clipboard-button {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
padding: 2px 7px 5px;
|
||||
margin: 5px;
|
||||
color: #767676;
|
||||
border-color: #767676;
|
||||
background-color: #ededed;
|
||||
border: 1px solid;
|
||||
border-radius: 6px;
|
||||
font-size: 0.8em;
|
||||
z-index: 1;
|
||||
opacity: 0;
|
||||
transition: 0.1s;
|
||||
}
|
||||
|
||||
.clipboard-button > svg {
|
||||
fill: #767676;
|
||||
}
|
||||
|
||||
.clipboard-button:hover {
|
||||
cursor: pointer;
|
||||
border-color: #696969;
|
||||
background-color: #e0e0e0;
|
||||
}
|
||||
|
||||
.clipboard-button:hover > svg {
|
||||
fill: #696969;
|
||||
}
|
||||
|
||||
.clipboard-button:focus {
|
||||
outline: 0;
|
||||
}
|
||||
|
||||
.highlight {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.highlight:hover > .clipboard-button {
|
||||
opacity: 1;
|
||||
transition: 0.2s;
|
||||
}
|
85
assets/scss/components/_syntax.scss
Normal file
85
assets/scss/components/_syntax.scss
Normal file
@@ -0,0 +1,85 @@
|
||||
/* Background */ .bg { color: #272822; background-color: #fafafa }
|
||||
/* PreWrapper */ .chroma { color: #272822; background-color: #fafafa; }
|
||||
/* Other */ .chroma .x { }
|
||||
/* Error */ .chroma .err { color: #960050; background-color: #1e0010 }
|
||||
/* CodeLine */ .chroma .cl { }
|
||||
/* LineTableTD */ .chroma .lntd { vertical-align: top; padding: 0; margin: 0; border: 0; }
|
||||
/* LineTable */ .chroma .lntable { border-spacing: 0; padding: 0; margin: 0; border: 0; }
|
||||
/* LineHighlight */ .chroma .hl { background-color: #ffffcc }
|
||||
/* LineNumbersTable */ .chroma .lnt { white-space: pre; user-select: none; margin-right: 0.4em; padding: 0 0.4em 0 0.4em;color: #7f7f7f }
|
||||
/* LineNumbers */ .chroma .ln { white-space: pre; user-select: none; margin-right: 0.4em; padding: 0 0.4em 0 0.4em;color: #7f7f7f }
|
||||
/* Line */ .chroma .line { display: flex; }
|
||||
/* Keyword */ .chroma .k { color: #00a8c8 }
|
||||
/* KeywordConstant */ .chroma .kc { color: #00a8c8 }
|
||||
/* KeywordDeclaration */ .chroma .kd { color: #00a8c8 }
|
||||
/* KeywordNamespace */ .chroma .kn { color: #f92672 }
|
||||
/* KeywordPseudo */ .chroma .kp { color: #00a8c8 }
|
||||
/* KeywordReserved */ .chroma .kr { color: #00a8c8 }
|
||||
/* KeywordType */ .chroma .kt { color: #00a8c8 }
|
||||
/* Name */ .chroma .n { color: #111111 }
|
||||
/* NameAttribute */ .chroma .na { color: #75af00 }
|
||||
/* NameBuiltin */ .chroma .nb { color: #111111 }
|
||||
/* NameBuiltinPseudo */ .chroma .bp { color: #111111 }
|
||||
/* NameClass */ .chroma .nc { color: #75af00 }
|
||||
/* NameConstant */ .chroma .no { color: #00a8c8 }
|
||||
/* NameDecorator */ .chroma .nd { color: #75af00 }
|
||||
/* NameEntity */ .chroma .ni { color: #111111 }
|
||||
/* NameException */ .chroma .ne { color: #75af00 }
|
||||
/* NameFunction */ .chroma .nf { color: #75af00 }
|
||||
/* NameFunctionMagic */ .chroma .fm { color: #111111 }
|
||||
/* NameLabel */ .chroma .nl { color: #111111 }
|
||||
/* NameNamespace */ .chroma .nn { color: #111111 }
|
||||
/* NameOther */ .chroma .nx { color: #75af00 }
|
||||
/* NameProperty */ .chroma .py { color: #111111 }
|
||||
/* NameTag */ .chroma .nt { color: #f92672 }
|
||||
/* NameVariable */ .chroma .nv { color: #111111 }
|
||||
/* NameVariableClass */ .chroma .vc { color: #111111 }
|
||||
/* NameVariableGlobal */ .chroma .vg { color: #111111 }
|
||||
/* NameVariableInstance */ .chroma .vi { color: #111111 }
|
||||
/* NameVariableMagic */ .chroma .vm { color: #111111 }
|
||||
/* Literal */ .chroma .l { color: #ae81ff }
|
||||
/* LiteralDate */ .chroma .ld { color: #d88200 }
|
||||
/* LiteralString */ .chroma .s { color: #d88200 }
|
||||
/* LiteralStringAffix */ .chroma .sa { color: #d88200 }
|
||||
/* LiteralStringBacktick */ .chroma .sb { color: #d88200 }
|
||||
/* LiteralStringChar */ .chroma .sc { color: #d88200 }
|
||||
/* LiteralStringDelimiter */ .chroma .dl { color: #d88200 }
|
||||
/* LiteralStringDoc */ .chroma .sd { color: #d88200 }
|
||||
/* LiteralStringDouble */ .chroma .s2 { color: #d88200 }
|
||||
/* LiteralStringEscape */ .chroma .se { color: #8045ff }
|
||||
/* LiteralStringHeredoc */ .chroma .sh { color: #d88200 }
|
||||
/* LiteralStringInterpol */ .chroma .si { color: #d88200 }
|
||||
/* LiteralStringOther */ .chroma .sx { color: #d88200 }
|
||||
/* LiteralStringRegex */ .chroma .sr { color: #d88200 }
|
||||
/* LiteralStringSingle */ .chroma .s1 { color: #d88200 }
|
||||
/* LiteralStringSymbol */ .chroma .ss { color: #d88200 }
|
||||
/* LiteralNumber */ .chroma .m { color: #ae81ff }
|
||||
/* LiteralNumberBin */ .chroma .mb { color: #ae81ff }
|
||||
/* LiteralNumberFloat */ .chroma .mf { color: #ae81ff }
|
||||
/* LiteralNumberHex */ .chroma .mh { color: #ae81ff }
|
||||
/* LiteralNumberInteger */ .chroma .mi { color: #ae81ff }
|
||||
/* LiteralNumberIntegerLong */ .chroma .il { color: #ae81ff }
|
||||
/* LiteralNumberOct */ .chroma .mo { color: #ae81ff }
|
||||
/* Operator */ .chroma .o { color: #f92672 }
|
||||
/* OperatorWord */ .chroma .ow { color: #f92672 }
|
||||
/* Punctuation */ .chroma .p { color: #111111 }
|
||||
/* Comment */ .chroma .c { color: #75715e }
|
||||
/* CommentHashbang */ .chroma .ch { color: #75715e }
|
||||
/* CommentMultiline */ .chroma .cm { color: #75715e }
|
||||
/* CommentSingle */ .chroma .c1 { color: #75715e }
|
||||
/* CommentSpecial */ .chroma .cs { color: #75715e }
|
||||
/* CommentPreproc */ .chroma .cp { color: #75715e }
|
||||
/* CommentPreprocFile */ .chroma .cpf { color: #75715e }
|
||||
/* 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 { }
|
@@ -1,17 +1,17 @@
|
||||
defaultMarkdownHandler = "goldmark"
|
||||
|
||||
[highlight]
|
||||
anchorLineNos = false
|
||||
codeFences = true
|
||||
guessSyntax = true
|
||||
hl_Lines = ""
|
||||
lineAnchors = ""
|
||||
lineNoStart = 1
|
||||
lineNos = true
|
||||
lineNumbersInTable = false
|
||||
noClasses = false
|
||||
# style = "monokai" # This parameter affects nothing, see https://github.com/razonyang/hugo-theme-bootstrap#syntax-highlighting.
|
||||
tabWidth = 2
|
||||
anchorLineNos = false
|
||||
codeFences = true
|
||||
guessSyntax = true
|
||||
hl_Lines = ""
|
||||
lineAnchors = ""
|
||||
lineNoStart = 1
|
||||
lineNos = false
|
||||
lineNumbersInTable = false
|
||||
noClasses = false
|
||||
# style = "monokailight" ## Update the 'create:syntax' command in package.json to modify the style
|
||||
tabWidth = 2
|
||||
|
||||
[goldmark]
|
||||
[goldmark.extensions]
|
||||
|
@@ -10,38 +10,38 @@ module.exports = {
|
||||
'./layouts/**/*.html',
|
||||
'./content/**/*.md',
|
||||
],
|
||||
safelist: {
|
||||
standard: [
|
||||
/lazyloaded/,
|
||||
/table/,
|
||||
/thead/,
|
||||
/tbody/,
|
||||
/tr/,
|
||||
/th/,
|
||||
/td/,
|
||||
/h5/,
|
||||
/alert-link/,
|
||||
/container-xxl/,
|
||||
/container-fluid/,
|
||||
/^bg-opacity-\d+/,
|
||||
/svg.*/,
|
||||
/fa.*/,
|
||||
/ratio.*/,
|
||||
/suggestion.*/,
|
||||
],
|
||||
...whitelister([
|
||||
safelist: [
|
||||
/lazyloaded/,
|
||||
/table/,
|
||||
/thead/,
|
||||
/tbody/,
|
||||
/tr/,
|
||||
/th/,
|
||||
/td/,
|
||||
/h5/,
|
||||
/alert-link/,
|
||||
/container-xxl/,
|
||||
/container-fluid/,
|
||||
/^bg-opacity-\d+/,
|
||||
/svg.*/,
|
||||
/fa.*/,
|
||||
/ratio.*/,
|
||||
/suggestion.*/,
|
||||
...whitelister([
|
||||
'./assets/scss/components/_blockquote.scss',
|
||||
'./assets/scss/components/_buttons.scss',
|
||||
'./assets/scss/components/_card.scss',
|
||||
'./assets/scss/components/_clipboard.scss',
|
||||
'./assets/scss/components/_img.scss',
|
||||
'./assets/scss/components/_navbar.scss',
|
||||
'./assets/scss/components/_search.scss',
|
||||
'./assets/scss/components/_syntax.scss',
|
||||
'./assets/scss/layouts/_reboot.scss',
|
||||
'./assets/scss/layouts/type.scss',
|
||||
'./node_modules/bootstrap/scss/_dropdown.scss',
|
||||
'./node_modules/bootstrap/scss/_utilities.scss',
|
||||
]),
|
||||
},
|
||||
],
|
||||
}),
|
||||
],
|
||||
}
|
||||
}
|
||||
|
57
content/en/blog/code-highlighting.md
Normal file
57
content/en/blog/code-highlighting.md
Normal file
@@ -0,0 +1,57 @@
|
||||
---
|
||||
author: "Mark Dumay"
|
||||
title: "Code Highlighting"
|
||||
date: 2022-04-16
|
||||
description: "Examples on how to enable code highlighting"
|
||||
tags: ["code"]
|
||||
thumbnail: img/notepad.jpg
|
||||
credits: Photo by <a href="https://unsplash.com/@frederickjmedina">Frederick Medina</a> on <a href="https://unsplash.com/photos/PdfRE-xB--s">Unsplash</a>
|
||||
---
|
||||
|
||||
## Code Fencing
|
||||
|
||||
Use code fencing to highlight the syntax of a specific language.
|
||||
|
||||
```json
|
||||
{
|
||||
"version": "0.2.0",
|
||||
"themes": [],
|
||||
"projects": [],
|
||||
"configuration": {}
|
||||
}
|
||||
```
|
||||
|
||||
```html
|
||||
<div class="highlight">
|
||||
<pre>
|
||||
<code>some code...</code>
|
||||
</pre>
|
||||
</div>
|
||||
```
|
||||
|
||||
## Highlight Partial
|
||||
|
||||
Use the `highlight` partial to customize the layout of a specific code block.
|
||||
|
||||
{{< highlight go "linenos=table,hl_lines=8 15-17,linenostart=199" >}}
|
||||
// GetTitleFunc returns a func that can be used to transform a string to
|
||||
// title case.
|
||||
//
|
||||
// The supported styles are
|
||||
//
|
||||
// - "Go" (strings.Title)
|
||||
// - "AP" (see https://www.apstylebook.com/)
|
||||
// - "Chicago" (see https://www.chicagomanualofstyle.org/home.html)
|
||||
//
|
||||
// If an unknown or empty style is provided, AP style is what you get.
|
||||
func GetTitleFunc(style string) func(s string) string {
|
||||
switch strings.ToLower(style) {
|
||||
case "go":
|
||||
return strings.Title
|
||||
case "chicago":
|
||||
return transform.NewTitleConverter(transform.ChicagoStyle)
|
||||
default:
|
||||
return transform.NewTitleConverter(transform.APStyle)
|
||||
}
|
||||
}
|
||||
{{< / highlight >}}
|
BIN
images/screenshot.png
Normal file
BIN
images/screenshot.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 903 KiB |
BIN
images/tn.png
Normal file
BIN
images/tn.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.9 MiB |
@@ -1,7 +1,7 @@
|
||||
{{ define "main" -}}
|
||||
<div class="p-5">
|
||||
<div class="p-4">
|
||||
<h1>{{ .Title }}</h1>
|
||||
<div class="container-fluid">
|
||||
<div class="container-fluid p-0">
|
||||
<div class="row row-cols-1 row-cols-sm-2 row-cols-md-3 g-4">
|
||||
{{ $max := sub (len .Pages) 1 -}}
|
||||
{{ range $index, $element := (.Paginate .RegularPagesRecursive).Pages -}}
|
||||
|
@@ -3,7 +3,7 @@
|
||||
{{ $datestr := (partial "utilities/date.html" (dict "date" .Date "language" $.Page.Language "format" "long")) -}}
|
||||
|
||||
<div class="container-fluid">
|
||||
<div class="row row-cols-1 row-cols-sm-3 align-items-center p-5">
|
||||
<div class="row row-cols-1 row-cols-sm-3 align-items-center p-3">
|
||||
<div class="col col-md-2 d-none d-md-block"></div>
|
||||
<div class="col col-sm-12 col-md-8">
|
||||
{{ range .Params.tags -}}
|
||||
@@ -27,7 +27,7 @@
|
||||
</div>
|
||||
|
||||
{{ if .Params.thumbnail -}}
|
||||
<div class="row row-cols-1 row-cols-sm-3 align-items-center p-5">
|
||||
<div class="row row-cols-1 row-cols-sm-3 align-items-center p-3">
|
||||
<div class="col col-md-2 d-none d-md-block"></div>
|
||||
<div class="col col-sm-12 col-md-8">
|
||||
{{- partial "image.html" (dict "url" .Params.thumbnail "ratio" "21x9" "outerClass" "img-wrap" "innerClass" "rounded" "title" .Params.title "caption" .Params.credits) -}}
|
||||
@@ -36,7 +36,7 @@
|
||||
</div>
|
||||
{{ end -}}
|
||||
|
||||
<div class="row row-cols-1 row-cols-sm-2 p-5">
|
||||
<div class="row row-cols-1 row-cols-sm-2 p-3">
|
||||
<div class="col col-md-2 d-none d-md-block"></div>
|
||||
<div class="col col-sm-12 col-md-8">
|
||||
{{ .Content }}
|
||||
@@ -69,7 +69,7 @@
|
||||
|
||||
{{- if and .Site.Params.comments.enabled .Params.showComments | default true -}}
|
||||
<div class="container-fluid">
|
||||
<div class="row row-cols-1 row-cols-sm-2 p-5">
|
||||
<div class="row row-cols-1 row-cols-sm-2 p-3">
|
||||
<div class="col col-md-2 d-none d-md-block"></div>
|
||||
<div class="col col-sm-12 col-md-8">
|
||||
<hr>
|
||||
|
@@ -3,14 +3,14 @@
|
||||
|
||||
{{ range $section, $taxonomy := .Site.Sections -}}
|
||||
{{ if eq $section 0 -}}
|
||||
<div class="p-5">
|
||||
<div class="p-4">
|
||||
<h1>Recent posts</h1>
|
||||
<div class="container-fluid">
|
||||
<div class="row row-cols-1 row-cols-sm-2 row-cols-md-3 g-4">
|
||||
<div class="container-fluid p-0">
|
||||
<div class="row row-cols-1 row-cols-sm-2 row-cols-md-3">
|
||||
{{ $items := first 3 ($taxonomy.Pages.ByDate.Reverse) -}}
|
||||
{{ $max := sub (len $items) 1 -}}
|
||||
{{ range $index, $element := $items -}}
|
||||
<div class="col">
|
||||
<div class="col gx-4">
|
||||
{{- partial "assets/blog-card.html" $element -}}
|
||||
</div>
|
||||
{{ if (lt $index $max) -}}
|
||||
@@ -27,13 +27,13 @@
|
||||
{{ end -}}
|
||||
</div>
|
||||
{{ else -}}
|
||||
<div class="p-5">
|
||||
<div class="p-4">
|
||||
<h1>{{ $taxonomy.Title }}</h1>
|
||||
<div class="container-fluid">
|
||||
<div class="row row-cols-1 g-4">
|
||||
{{ $items := first 3 ($taxonomy.Pages) -}}
|
||||
{{ range $index, $element := $items -}}
|
||||
<div class="col">
|
||||
<div class="col p-0">
|
||||
{{- partial "assets/project-card.html" $element -}}
|
||||
</div>
|
||||
{{ end -}}
|
||||
|
@@ -4,7 +4,7 @@
|
||||
{{- partial "image.html" (dict "url" .Params.thumbnail "ratio" "16x9" "outerClass" "card-img-wrap" "innerClass" "card-img-top" "title" .Params.title) -}}
|
||||
</a>
|
||||
{{ end }}
|
||||
<div class="card-body d-flex flex-column">
|
||||
<div class="card-body d-flex flex-column p-0">
|
||||
<p class="card-text">
|
||||
<small class="text-muted text-uppercase">
|
||||
{{- partial "utilities/date.html" (dict "date" .Date "language" $.Page.Language "format" "long") -}}
|
||||
|
@@ -1,14 +1,14 @@
|
||||
<nav class="navbar navbar-expand-sm bg-white navbar-light ps-4 pe-4">
|
||||
<nav class="navbar navbar-expand-sm bg-white navbar-light m-3">
|
||||
<div class="container-fluid">
|
||||
<a class="navbar-brand" href="{{ .Site.Home.RelPermalink }}">
|
||||
{{ if .Site.Params.main.logo -}}
|
||||
<img src="{{ .Site.Params.main.logo }}" alt="{{ .Site.Title }} logo" height="30">
|
||||
{{ else -}}
|
||||
<span class="fw-bold ">{{ .Site.Title }}</span>
|
||||
<span class="fw-bold">{{ .Site.Title }}</span>
|
||||
{{ end -}}
|
||||
</a>
|
||||
|
||||
<button class="navbar-toggler collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent"
|
||||
<button class="navbar-toggler collapsed me-n3" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent"
|
||||
aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
|
||||
<span class="toggler-icon top-bar"></span>
|
||||
<span class="toggler-icon middle-bar"></span>
|
||||
|
@@ -12,7 +12,7 @@
|
||||
|
||||
{{ $indexTemplate := resources.Get "js/index.js" -}}
|
||||
{{ $jsIndex := $indexTemplate | resources.ExecuteAsTemplate "index.js" . }}
|
||||
{{ $js := (slice $jsIndex) | resources.Concat "js/main.js" }}
|
||||
{{ $js := (slice $jsIndex) | resources.Concat "js/main.js" }}
|
||||
|
||||
{{ if not hugo.IsProduction }}
|
||||
<script src="{{ $js.RelPermalink }}"></script>
|
||||
|
@@ -1,9 +1,9 @@
|
||||
<div class="container-fluid">
|
||||
<div class="row row-cols-1 row-cols-sm-4 bg-primary p-5 bg-opacity-{{ .Site.Params.style.themeOpacity | default "25" | safeHTML }} align-items-center">
|
||||
<div class="row row-cols-1 row-cols-sm-4 bg-primary p-3 bg-opacity-{{ .Site.Params.style.themeOpacity | default "25" | safeHTML }} align-items-center">
|
||||
<div class="col col-md-2 d-none d-md-block"></div>
|
||||
<div class="col col-sm-6 col-md-4">
|
||||
<div class="fs-3 fw-bold">{{ .Site.Params.socialTitle }}</div>
|
||||
{{ .Site.Params.socialCaption }}
|
||||
<p>{{ .Site.Params.socialCaption }}</p>
|
||||
</div>
|
||||
<div class="col text-sm-start text-center col-sm-6 col-md-4">
|
||||
{{ range .Site.Menus.social -}}
|
||||
|
@@ -1,5 +1,5 @@
|
||||
<div class="container-fluid">
|
||||
<div class="row row-cols-1 row-cols-sm-4 bg-primary p-5 bg-opacity-{{ .Site.Params.style.themeOpacity | default "25" | safeHTML }} align-items-center">
|
||||
<div class="row row-cols-1 row-cols-sm-4 bg-primary p-3 bg-opacity-{{ .Site.Params.style.themeOpacity | default "25" | safeHTML }} align-items-center">
|
||||
<div class="col col-md-2 d-none d-md-block"></div>
|
||||
<div class="col col-sm-6 col-md-4">
|
||||
<p class="fs-1 fw-bold">{{ .Site.Params.introTitle }}</p>
|
||||
|
@@ -13,7 +13,7 @@
|
||||
/><!-- Closing img tag -->
|
||||
{{- if .Get "link" }}</a>{{ end -}}
|
||||
{{- if or (or (.Get "title") (.Get "caption")) (.Get "attr") -}}
|
||||
<figcaption>
|
||||
<figcaption class="figure-caption">
|
||||
{{ with (.Get "title") -}}
|
||||
<h4>{{ . }}</h4>
|
||||
{{- end -}}
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{{ define "main" }}
|
||||
<div class="container-fluid">
|
||||
<div class="row row-cols-1 row-cols-sm-3 align-items-center p-5">
|
||||
<div class="row row-cols-1 row-cols-sm-3 align-items-center p-3">
|
||||
<div class="col col-md-2 d-none d-md-block"></div>
|
||||
<div class="col col-sm-12 col-md-8">
|
||||
<h1>{{ .Name | humanize }}</h1>
|
||||
|
3703
package-lock.json
generated
3703
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
35
package.json
35
package.json
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@markdumay/hugo-theme-hinode",
|
||||
"version": "0.2.1",
|
||||
"version": "0.4.5",
|
||||
"description": "Hinode is a clean blog theme for Hugo, an open-source static site generator",
|
||||
"main": "index.js",
|
||||
"publishConfig": {
|
||||
@@ -12,6 +12,7 @@
|
||||
"create": "exec-bin node_modules/.bin/hugo/hugo new",
|
||||
"prestart": "npm run clean",
|
||||
"start": "exec-bin node_modules/.bin/hugo/hugo server --bind=0.0.0.0 --disableFastRender",
|
||||
"prod": "exec-bin node_modules/.bin/hugo/hugo server --bind=0.0.0.0 --disableFastRender -e production",
|
||||
"prebuild": "npm run clean",
|
||||
"build": "exec-bin node_modules/.bin/hugo/hugo --gc --minify",
|
||||
"build:preview": "npm run build -D -F",
|
||||
@@ -28,7 +29,9 @@
|
||||
"precheck": "npm version",
|
||||
"check": "exec-bin node_modules/.bin/hugo/hugo version",
|
||||
"copy:fonts": "shx cp ./node_modules/@fortawesome/fontawesome-free/webfonts/* ./static/fonts/",
|
||||
"create:syntax": "exec-bin node_modules/.bin/hugo/hugo gen chromastyles --style=monokailight > ./assets/scss/components/_syntax.scss",
|
||||
"postinstall": "hugo-installer --version otherDependencies.hugo --extended --destination node_modules/.bin/hugo",
|
||||
"upgrade": "npx npm-check-updates -u",
|
||||
"version": "auto-changelog -p && git add CHANGELOG.md"
|
||||
},
|
||||
"repository": {
|
||||
@@ -42,26 +45,26 @@
|
||||
},
|
||||
"homepage": "https://github.com/markdumay/hugo-theme-hinode#readme",
|
||||
"devDependencies": {
|
||||
"@fortawesome/fontawesome-free": "^6.0.0",
|
||||
"@fullhuman/postcss-purgecss": "^4.1.3",
|
||||
"autoprefixer": "^10.4.2",
|
||||
"bootstrap": "^5.1.3",
|
||||
"eslint": "^7.32.0",
|
||||
"eslint-config-standard": "^16.0.3",
|
||||
"@fortawesome/fontawesome-free": "^6.2.0",
|
||||
"@fullhuman/postcss-purgecss": "^5.0.0",
|
||||
"autoprefixer": "^10.4.12",
|
||||
"bootstrap": "^5.2.2",
|
||||
"eslint": "^8.25.0",
|
||||
"eslint-config-standard": "^17.0.0",
|
||||
"eslint-plugin-import": "^2.26.0",
|
||||
"eslint-plugin-node": "^11.1.0",
|
||||
"eslint-plugin-promise": "^5.2.0",
|
||||
"eslint-plugin-n": "^15.3.0",
|
||||
"eslint-plugin-promise": "^6.1.1",
|
||||
"exec-bin": "^1.0.0",
|
||||
"flexsearch": "^0.7.21",
|
||||
"hugo-installer": "^3.1.0",
|
||||
"markdownlint-cli2": "^0.4.0",
|
||||
"postcss-cli": "^9.1.0",
|
||||
"flexsearch": "^0.7.31",
|
||||
"hugo-installer": "^4.0.1",
|
||||
"markdownlint-cli2": "^0.5.1",
|
||||
"postcss-cli": "^10.0.0",
|
||||
"purgecss-whitelister": "^2.4.0",
|
||||
"shx": "^0.3.4",
|
||||
"stylelint": "^14.6.1",
|
||||
"stylelint-config-standard-scss": "^3.0.0"
|
||||
"stylelint": "^14.14.0",
|
||||
"stylelint-config-standard-scss": "^5.0.0"
|
||||
},
|
||||
"otherDependencies": {
|
||||
"hugo": "0.96.0"
|
||||
"hugo": "0.104.3"
|
||||
}
|
||||
}
|
||||
|
@@ -1,7 +1,7 @@
|
||||
name = "Hinode"
|
||||
license = "MIT"
|
||||
licenselink = "https://github.com/markdumay/hugo-theme-hinode/blob/main/LICENSE"
|
||||
description = "Hinode is a clean blog theme for Hugo, an open-source static site generator."
|
||||
description = "A clean blog theme for your Hugo site based on Bootstrap 5."
|
||||
homepage = "https://github.com/markdumay/hugo-theme-hinode"
|
||||
demosite = "https://hinode-demo.markdumay.org/"
|
||||
tags = ["blog", "minimal", "modern", "customizable", "search", "bootstrap"]
|
||||
|
Reference in New Issue
Block a user