Skip to content

Commit

Permalink
Merge pull request #65 from gethinode/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
markdumay authored Feb 17, 2023
2 parents 99a6ad7 + 754a806 commit 86864cd
Show file tree
Hide file tree
Showing 28 changed files with 746 additions and 2,721 deletions.
22 changes: 22 additions & 0 deletions config/_default/menus/menus.en.toml
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,25 @@
pre = "<i class=\"fab fa-medium fa-2x\"></i>"
url = "https://medium.com/"
weight = 30

[[sample]]
name = "Blog"
url = "/blog/"
weight = 10

[[sample]]
name = "Projects"
url = "/projects/"
weight = 20

[[sample]]
name = "Sample project"
url = "/en/projects/sample-project/"
parent = "Projects"
weight = 1

[[sample]]
name = "Another project"
url = "/en/projects/another-project/"
parent = "Projects"
weight = 2
24 changes: 23 additions & 1 deletion config/_default/menus/menus.nl.toml
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,26 @@
name = "Medium"
pre = "<i class=\"fab fa-medium fa-2x\"></i>"
url = "https://medium.com/"
weight = 30
weight = 30

[[sample]]
name = "Blog"
url = "/blog/"
weight = 10

[[sample]]
name = "Projecten"
url = "/projecten/"
weight = 20

[[sample]]
name = "Voorbeeldproject"
url = "/nl/projecten/voorbeeldproject/"
parent = "Projecten"
weight = 1

[[sample]]
name = "Ander project"
url = "/nl/projecten/ander-project/"
parent = "Projecten"
weight = 2
8 changes: 6 additions & 2 deletions config/_default/params.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
enableDarkMode = true

[docs]
version = "0.8"
version = "0.9"
basePath = "node_modules/@gethinode/hinode"

[home]
sections = ["blog", "projects"]
Expand Down Expand Up @@ -101,8 +102,11 @@
#theme = ""

[links]
pagespeed = "https://pagespeed.web.dev/report?url=https%3A%2F%2Fdemo.gethinode.com%2F"
bs_badge_heading = "https://getbootstrap.com/docs/5.2/components/badge/#headings"
hinode_docs = "https://gethinode.com/docs"
hugo_imaging = "https://gohugo.io/content-management/image-processing/#imaging-configuration"
mozilla_image = "https://developer.mozilla.org/en-US/docs/Learn/HTML/Multimedia_and_embedding/Responsive_images"
observatory = "https://observatory.mozilla.org/analyze/demo.gethinode.com"
pagespeed = "https://pagespeed.web.dev/report?url=https%3A%2F%2Fdemo.gethinode.com%2F"
utterances = "https://utteranc.es"

5 changes: 3 additions & 2 deletions content/en/about.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
title: About
description: Hinode is a clean documentation and blog theme for your Hugo site based on Bootstrap 5.
date: 2022-04-11
updated: 2023-01-14
updated: 2023-02-11
showComments: false
---

<p class="text-center"><img src="/img/logo_embedded.svg" class="img-fluid w-50" alt="Logo"></p>
<p class="text-center"><svg class="img-fluid w-50"><use href="/img/logo_var.svg#logo"></use></svg></p>

<section class="section section-sm mt-5 mb-5">
<div class="container-fluid">
Expand All @@ -32,6 +32,7 @@ showComments: false

Additional features include:

* Switching between light mode and dark mode
* Support for multiple languages
* Reusable Bootstrap components through configurable shortcodes and partials
* Embedded comments through light-weight integration with GitHub via [utteranc.es]({{< param "links.utterances" >}})
Expand Down
243 changes: 243 additions & 0 deletions content/en/blog/bootstrap-elements.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,243 @@
---
author: Mark Dumay
title: Bootstrap elements
date: 2023-02-17
description: Use shortcodes to add common Bootstrap elements with ease.
tags: ["bootstrap", "shortcode"]
thumbnail: img/boots.jpg
photoCredits: <a href="https://unsplash.com/@nate_dumlao">Nathan Dumlao</a>
photoSource: <a href="https://unsplash.com/photos/QLPWQvHvmII">Unsplash</a>
---

Hinode provides several shortcodes that wrap common Bootstrap components. Refer to the [official documentation]({{< param "links.hinode_docs" >}}) for more details.

## Accordion

As an example, the following shortcode displays an accordion with three elements, of which the first element is expanded.

<!-- markdownlint-disable MD037 -->
{{< example lang="hugo" >}}
{{</* accordion */>}}
{{</* accordion-item header="Accordion Item #1" show="true" */>}}
This is the first item's accordion body. It supports HTML content. The item is shown by adding the value
<code>show</code> to the <code>class</code> argument.
{{</* /accordion-item */>}}
{{</* accordion-item header="Accordion Item #2" */>}}
This is the second item's accordion body. It supports HTML content too.
{{</* /accordion-item */>}}
{{</* accordion-item header="Accordion Item #3" */>}}
This is the third item's accordion body.
{{</* /accordion-item */>}}
{{</* /accordion */>}}
{{< /example >}}
<!-- markdownlint-enable MD037 -->

## Alert

As an example, the following shortcode displays a simple alert.

<!-- markdownlint-disable MD037 -->
{{< example lang="hugo" >}}
{{</* alert color="danger" dismissible="true" */>}}
A simple danger alert—check it out!
{{</* /alert */>}}
{{< /example >}}
<!-- markdownlint-enable MD037 -->

## Badge

Use HTML code to display a badge for a heading. See the Bootstrap [documentation]({{< param "links.bs_badge_heading" >}}) for more options.

{{< example >}}
<h1>Example heading of size one <span class="badge bg-secondary">New</span></h1>
<h2>Example heading of size two <span class="badge bg-secondary">New</span></h2>
<h3>Example heading of size three <span class="badge bg-secondary">New</span></h3>
<h4>Example heading of size four <span class="badge bg-secondary">New</span></h4>
<h5>Example heading of size five <span class="badge bg-secondary">New</span></h5>
<h6>Example heading of size six <span class="badge bg-secondary">New</span></h6>
{{< /example >}}

## Breadcrumb

As an example, the following shortcode displays a breadcrumb for the blog page.

<!-- markdownlint-disable MD037 -->
{{< example lang="hugo" >}}
{{</* breadcrumb path="blog" */>}}
{{< /example >}}
<!-- markdownlint-enable MD037 -->

## Button

As an example, the following shortcode displays a tooltip for a dark button with a badge.

<!-- markdownlint-disable MD037 -->
{{< example lang="hugo" >}}
{{</* button color="secondary" tooltip="Click on the inbox to view your unread messages" href="#" badge="99+" */>}}
Inbox
{{</* /button */>}}
{{< /example>}}
<!-- markdownlint-enable MD037 -->

## Button group

As an example, the following shortcode displays a group of three buttons.

<!-- markdownlint-disable MD037 -->
{{< example lang="hugo" >}}
{{</* button-group aria-label="Basic example" */>}}
{{</* button color="primary" href="#" */>}}Left{{</* /button */>}}
{{</* button color="primary" href="#" */>}}Middle{{</* /button */>}}
{{</* button color="primary" href="#" */>}}Right{{</* /button */>}}
{{</* /button-group */>}}
{{< /example >}}
<!-- markdownlint-enable MD037 -->

## Card

As an example, the following shortcode displays a stacked card with icon that links to the [about]({{< ref "about" >}}) page. It includes a custom header.

<!-- markdownlint-disable MD037 -->
{{< example lang="hugo" >}}
{{</* card path="about" padding="3" class="w-50" color="light" header="publication" footer="none" */>}}
{{< /example >}}
<!-- markdownlint-enable MD037 -->

## Carousel

As an example, the following shortcode displays a centered carousel with three slides, 16x9 aspect ratio, and a relative width of 67% on large screens.

<!-- markdownlint-disable MD037 -->
{{< example lang="hugo" >}}
{{</* carousel ratio="16x9" class="col-sm-12 col-lg-8 mx-auto" */>}}
{{</* img src="img/coffee.jpg" caption="slide 1" */>}}
{{</* img src="img/phone.jpg" caption="slide 2" */>}}
{{</* img src="img/dunes.jpg" caption="slide 3" */>}}
{{</* /carousel */>}}
{{< /example >}}
<!-- markdownlint-enable MD037 -->

## Collapse

As an example, the following shortcode displays a button that, when clicked, triggers a panel to appear or disappear.

<!-- markdownlint-disable MD037 -->
{{< example lang="hugo" >}}
{{</* button collapse="collapse-1" */>}}
Trigger panel
{{</* /button */>}}

{{</* collapse id="collapse-1" class="p-3 border rounded" */>}}
Some placeholder content for the collapse component. This panel is <i>hidden by default</i> but
revealed when the user activates the relevant trigger.
{{</* /collapse */>}}
{{< /example >}}
<!-- markdownlint-enable MD037 -->

## Command prompt

Use the `command` shortcode to generate a block with a default bash command prompt.

<!-- markdownlint-disable MD037 -->
{{< example lang="hugo" >}}
{{</* command */>}}
export MY_VAR=123
{{</* /command */>}}
{{< /example >}}
<!-- markdownlint-enable MD037 -->

Specify `user` and `host` to add the user context to the prompt. In addition, use `(out)` to specify an output line and use `\` to denote a line continuation.

<!-- markdownlint-disable MD037 -->
{{< example lang="hugo" >}}
{{</* command user="user" host="localhost" */>}}
export MY_VAR=123
echo "hello"
(out)hello
echo one \
two \
three
(out)one two three
echo "goodbye"
(out)goodbye
{{</* /command */>}}
{{< /example >}}
<!-- markdownlint-enable MD037 -->

## Docs

Use the `docs` shortcode to display the content of a `toml` or `scss` file:

{{< docs name="theme-colors" file="config/_default/params.toml" >}}

## Icon

As an example, the following shortcodes show a square check, a brand logo, and a circle check.

<!-- markdownlint-disable MD037 -->
{{< example lang="hugo" >}}
{{</* fa square-check */>}}
{{</* fab linkedin */>}}
{{</* fas circle-check */>}}
{{< /example >}}
<!-- markdownlint-enable MD037 -->

## Image

As an example, the following shortcode displays an image with rounded corners and a 21x9 aspect ratio.

<!-- markdownlint-disable MD037 -->
{{< example lang="hugo" >}}
{{</* image src="img/flowers.jpg" ratio="21x9" caption="Figure caption" class="rounded" */>}}
{{< /example >}}
<!-- markdownlint-enable MD037 -->

## Navbar

As an example, the following shortcode displays a light navigation header.

<!-- markdownlint-disable MD037 -->
{{< example lang="hugo" >}}
{{</* navbar path="about" color="primary" size="sm" search="false" menus="sample" title="Brand" */>}}
{{< /example >}}
<!-- markdownlint-enable MD037 -->

## Spinner

As an example, the following shortcode displays a centered spinner.

<!-- markdownlint-disable MD037 -->
{{< example lang="hugo" >}}
{{</* spinner color="info" class="text-center" */>}}
Loading...
{{</* /spinner */>}}
{{< /example>}}
<!-- markdownlint-enable MD037 -->

## Toast

As an example, the following shortcode displays a button that, when clicked, triggers the toast message.

<!-- markdownlint-disable MD037 -->
{{< example lang="hugo" >}}
{{</* button id="toastButton" */>}}
Show toast
{{</* /button */>}}

{{</* toast header="Custom title" */>}}
This is a toast message.
{{</* /toast */>}}
{{< /example >}}
<!-- markdownlint-enable MD037 -->

## Tooltip

As an example, the following shortcode displays a tooltip for a colored hyperlink.

<!-- markdownlint-disable MD037 -->
{{< example lang="hugo" >}}
{{</* tooltip color="primary" title="Tooltip" href="#" */>}}
Tooltip demonstration
{{</* /tooltip */>}}
{{< /example >}}
<!-- markdownlint-enable MD037 -->
2 changes: 1 addition & 1 deletion content/en/blog/child.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
author: "Mark Dumay"
title: "Child Theme"
date: 2023-01-27
date: 2023-02-17
description: "The Hinode child theme ensures your site uses future Hinode updates."
tags: ["theme"]
thumbnail: img/forest.jpg
Expand Down
Loading

0 comments on commit 86864cd

Please sign in to comment.