Some Liquid components which can be used in Jekyll, for use in the Neon theme system.
This repo only contains renderers for HTML code. As such, it assumes you will be using the Neon stylesheet system to render these components. This can be utilized simply by importing the following as normal CSS stylesheets:
-
Flex: https://Stylesheets.BHStudios.org/assets/v2/structure/flex.css
-
Neon Tables: https://Stylesheets.BHStudios.org/assets/v2/neon/neon-tables.css
-
Neon Renderer: https://Stylesheets.BHStudios.org/assets/v2/neon/neon-renderer.css
-
A Neon theme stylesheet, such as these:
-
Material Icons: https://fonts.googleapis.com/icon?family=Material+Icons
Additionally, these are recommended:
- Print: https://Stylesheets.BHStudios.org/assets/v2/basics/print.css
- Some Google fonts: https://fonts.googleapis.com/css?family=Roboto:100,100i,300,300i,400,400i,500,500i,700|Questrial|ZCOOL+QingKe+HuangYou|Oswald:600&subset=chinese-simplified,korean,latin-ext,vietnamese,cyrillic,cyrillic-ext,greek,greek-ext
Of course, if you prefer, you can use any stylesheet you want, including making your own.
This repo contains the following components, usable as Jekyll/Liquid includes. The documentation below uses some symbols to help it remain compact:
- 👇🏽 - The argument can be placed directly in the include's arguments
- 📄 - The argument can be specified in the page's front-matter
- 🌐 - The argument can be specified in the site's config
This is also the precedence order: The top items in this list take precedence over following ones. If two or more are specified, the highest one is used.
App-Bar/app-bar.html
The app bar is modeled after the Material app bar (Top).
Argument | Description | Allowed values |
---|---|---|
👇🏽📄 `title` | The text shown in the app bar as the page title |
|
_optional_ 👇🏽📄 `navigation-back` | Whether to provide a "Back" button in the app bar. This can be specified in the page front matter, or as an include argument. If both are specified, the include argument take precedence. |
|
_optional_ 👇🏽📄 `subtitle` | A subtitle to show in the app bar |
|
Sidebar/sidebar.html
The sidebar is modeled after the Material navigation Drawer
All site config variants to these must be nested under a sidebar
YML object, like this:
sidebar:
headerImage:
url: https://example.com/sidebar-header.png
htmlClassNames: "greyscale square"
Argument | Description | Allowed values |
---|---|---|
_optional_ 👇🏽🌐 `emptyHeader` | Whether to leave the header of the sidebar empty (no image). If specified via the site config, then it must be nested as `sidebar.emptyHeader`. If not specified, then `headerImage_url` must be specified (see below). |
|
_optional_ 👇🏽 `headerImage_url` 🌐 `headerImage.url` | The URL to the image to display in the sidebar's header. If excluded, then `site.author.avatar` will be used. If that configuration isn't set, then `emptyHeader` must be specified. |
- Excluded or `false`: The header image is the author's avatar, or is not displayed. If `emptyHeader` is not `true`, then an error message is displayed instead, to ensure that this is on-purpose.
- Any string: The URL to the header image
|
_optional_ 👇🏽 `headerImage_htmlClassNames` 🌐 `headerImage.htmlClassNames` | Any classnames to place in the `class` attribute of the HTML element representing the header image. |
|
_optional_ 👇🏽🌐 `excludeHomepageLink` | Whether to exclude the homepage link from the sidebar. |
|
_optional_ 👇🏽🌐 `excludeAboutLink` | Whether to exclude the about page link from the sidebar. The name of the about page is specified in the site config as `pages.about`; if that's not specified, it's assumed to be `about`, with the path `/about/`. |
|
_optional_ 👇🏽 `links` | Page-specific links to place in the sidebar |
|
_optional_ 👇🏽 `additionalSectionIncludes` | Any additional sections to place below the links in the sidebar. |
|
Jump-Pills/jump-pills.html
A collection of pill-shaped buttons which serve to allow the user to jump to different parts of the page.
Argument | Description | Allowed values |
---|---|---|
👇🏽 `ids` | The `id`s of elements on the page |
|
Some image galleries
Galleries/thumbnails-gallery.html
A grid of thumbnail images and a caption
Argument | Description | Allowed values |
---|---|---|
👇🏽 `images` | The images to display in the gallery |
|
_optional_ 👇🏽 `caption` | The text to display at the bottom of the gallery |
|
Galleries/single-item-highlight.html
A "gallery" which only highlights one single item.
Argument | Description | Allowed values |
---|---|---|
👇🏽 `full` | The URL to the full-size version of the item |
|
_optional_ 👇🏽 `thumb` | The URL to a small version of the image, to show the user in this gallery before they've selected it |
|
_optional_ 👇🏽 `alt` | Metadata text to include with the image, which will be shown if the thumbnail fails to render for any reason, and which will be read by screen readers. |
|
_optional_ 👇🏽 `caption` | The text to display at the bottom of the gallery |
|
_optional_ 👇🏽 `small` | Whether to render the gallery smaller than normal. This relies on an external CSS stylesheet to render galleries with the `small` class differently than others. |
|
_optional_ 👇🏽 `raised` | Whether to render the gallery as a raised or flat card. This relies on an external CSS stylesheet to render galleries with the `raised` class differently than others. |
|
_optional_ 👇🏽 `float` | Whether the gallery should [float](https://developer.mozilla.org/en-US/docs/Web/CSS/float) in the page flow. This relies on an external CSS stylesheet to render galleries with the `left` and `right` classes differently than others. |
|
Galleries/single-item-highlight-custom-start.html
and Galleries/single-item-highlight-custom-end.html
A "gallery" which only highlights one single item, and allows you to place anything at all in the gallery (for example, a YouTube video).
This requires you include the start
, then place your custom content, then include the end
.
Argument | Description | Allowed values |
---|---|---|
_optional_ 👇🏽 `raised` | Whether to render the gallery as a raised or flat card. This relies on an external CSS stylesheet to render galleries with the `raised` class differently than others. |
|
Argument | Description | Allowed values |
---|---|---|
_optional_ 👇🏽 `caption` | The text to display at the bottom of the gallery |
|