Skip to content

shibotto/lanyon-blogc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Lanyon for blogc

Lanyon is an unassuming Jekyll theme that places content first by tucking away navigation in a hidden drawer. It's based on Poole, the Jekyll butler.

This is the exact same theme ported to blogc.

Lanyon Lanyon with open sidebar

Contents

Usage

Lanyon for blogc is ready to use, just run blogc-make in your terminal and you are good to go.

Options

Lanyon includes some customizable options, typically applied via classes on the <body> element.

Sidebar menu

At this time pages and links can be added to the sidebar by editing templates/main.tmpl and Makefile.

Relevant templates/main.tmpl parts:

<!-- Home link -->
<a class="sidebar-nav-item{%if MAKE_RULE == "index" %} active{% endif %}" href="{{ BASE_URL }}/">Home</a>
<!-- About link -->
<a class="sidebar-nav-item{%if MAKE_SLUG == "about" %} active{% endif %}" href="{{ BASE_URL }}/about/">About</a>

<a class="sidebar-nav-item" href="https://github.com/shiba89/lanyon-blogc/archive/master.zip">Download</a>
<a class="sidebar-nav-item" href="https://github.com/shiba89/lanyon-blogc">GitHub project</a>
<span class="sidebar-nav-item">Currently devel</span>

Relevant Makefile parts:

[pages]
about
404

This will hopefully change in the future.

Themes

Lanyon ships with eight optional themes based on the base16 color scheme. Apply a theme to change the color scheme (mostly applies to sidebar and links).

Lanyon with red theme Lanyon with red theme and open sidebar

There are eight themes available at this time.

Available theme classes

To use a theme, add any one of the available theme classes to the <body> element in the templates/main.tmpl template, like so:

<body class="theme-base-08">
  ...
</body>

To create your own theme, look to the Themes section of included CSS file. Copy any existing theme (they're only a few lines of CSS), rename it, and change the provided colors.

Reverse layout

Lanyon with reverse layout Lanyon with reverse layout and open sidebar

Reverse the page orientation with a single class.

<body class="layout-reverse">
  ...
</body>

Sidebar overlay instead of push

Make the sidebar overlap the viewport content with a single class:

<body class="sidebar-overlay">
  ...
</body>

This will keep the content stationary and slide in the sidebar over the side content. It also adds a box-shadow based outline to the toggle for contrast against backgrounds, as well as a box-shadow on the sidebar for depth.

It's also available for a reversed layout when you add both classes:

<body class="layout-reverse sidebar-overlay">
  ...
</body>

Sidebar open on page load

Show an open sidebar on page load by modifying the <input> to add the checked boolean attribute:

<input type="checkbox" class="sidebar-checkbox" id="sidebar-checkbox" checked>

You can also conditionally show the sidebar open on a per-page basis. For example, here's how you could have it open on the About page only:

<input type="checkbox" class="sidebar-checkbox" id="sidebar-checkbox"{% if MAKE_SLUG == "about" %} checked{% endif %}>

Author

Shiba

Mark Otto

License

Lanyon for blogc is open sourced under the GPL & MIT license.

<3

About

Lanyon theme ported to blogc.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages