Block Elements – Theme Builder

Volume uses total of 6 block elements and 1 header element to customize the post archives and single post templates. For more information on Block Elements you should read the following documentation:

https://docs.generatepress.com/article/block-element-overview/

All done ? Lets take a look at each of the Elements Volume is built with.

Archive Navigation

Position: After Post Loop
Element Type: Archive Navigation
Hook name: after_main_content
Display Location: Blog, All Archives

A simple 2 button block displaying static prev and next labels with icons, with a dynamic link of Next Post and Previous Post.

NOTE: Within the Block settings the option to Disable default pagination has been checked.

Author Box

Position: Above Right Sidebar
Element Type: Hook
Hook name: before_right_sidebar_bar
Display Location: Posts > All Posts

Drawing its dynamic data from the User Meta ( Profile ) it uses a GP Dynamic Image Block for the Author Avatar, a Headline Block for the Author Name, a GP Dynamic Content Block for the Author Description and a Button with static text and a dynamic link to the Author Archives.

Post Archive template

Position: Post Archive Cards
Element Type: Content Template
Hook name: n/a
Display Location: Blog, All Archives

This card replaces the default themes post template used on the Blog and Archive Cards.

First off the content is placed inside a parent Container Block, at the top of which is the GP Dynamic Image Block set to display the Featured image which has been set to a medium-large ( 768px ) image size.

Below the Image is a nested Container Block which has an Advanced > Additional CSS Class of post-summary this class is necessary for CSS to align the elements vertically.

Within the post summary there are several blocks set to display the post category terms, the post title, the post excerpt and finally a inline row to display post meta.

NOTE: This element is a Parent Element. What makes it a parent is that the following element is one of its Children.

– First Post Template

Position: Post Archive Cards
Element Type: Content Template
Hook name: n/a
Display Location: None – inherited from Parent: Post Card

This element is grid layout version of the Post Card Block Element. It has not Display Rules as it inherits them from its parent ( the Post Card Block Element ). In the sidebar settings you will see it has Apply to: First Post.

Note: in the Customizer > Layout > Blog –> Columns we have the Make First Featured checked. This gives this element a specific class of featured-column which is used in Custom CSS to make it fill the entire row on Desktop and Tablet.

Post Navigation

Position: Above Footer on Single Post
Element Type: Post Navigation
Hook name: before_footer
Display Location: Posts > All Posts

Using a prebuilt Navigation Template that displays the Next Prev Post label and title over the respective featured image.

Single Post Hero

Position: Below Header ( merged ) Single Post
Element Type: Page Hero
Hook name: after_header
Display Location: Posts > All Posts

The Single Post hero is comprised of two main elements:

The parent Container Block

This comprises of a solid background color, a Dynamic Image Background displaying the Featured Image which is set to Display the medium-large ( 768px ) image and positioned to the Right Center.

The parent container block has an Advanced > Additional CSS Class of: page-hero-block which is used for CSS to reposition the image on Tablet, and remove it altogether on Mobile.

Within the parent Container is a 1 column grid – the single column is set to 75% width on Desktop and 100% on Tablet an Mobile. Within this grid container we’re displaying dynamic Post Title (H1), the Post Excerpt, followed by a Post Meta layout.

GP Dynamic image block – mobile only

This block is set to display the Post Featured image using an image size of medium-large ( 768px ). In the Advanced > Additional CSS Classes we’re using 2 x hide-on-* classes to remove the image block on Desktop and Tablet.

Single Post Merged Header

This is a Header Element – its sole purpose is to created the Merged Header effect on the Single Post. It does not contain any Page Hero content – it simply merges the site header with the first block on the post, which is the Single Post Header Block.

You can find out more on the Header Element here:

https://docs.generatepress.com/article/header-element-overview/

CSS Styling

In Comparison to the original Volume which required over 350 lines of CSS, Volume remastered uses less that 50. But why do we need CSS when Blocks does it all? I hear you ask. Well there are somethings that i just like to tweak and sometimes a little CSS is required.

The CSS added to the Site can be found in Customizer > Additional CSS. Lets take a closer look at what each of them does

Post navigation

the default behaviour of the Post Navigation Block Element is to display a 50/50 row showing the previous and next post. The following CSS removes the empty space when a user is on the first or last post so the block spans the full width.

/* Custom Post Navigation remove empty classes */
.featured-navigation .gb-grid-column:empty {
    flex: 0 1;
}

@media(min-width: 769px) {
    .featured-navigation .gb-grid-column:not(:empty) {
        flex: 1 0;
    }
}

Single Post Featured Images

the following CSS adjusts the featured image background size for tablet, and removes it from Mobile

/* Single Post Hero image responsive controls */
@media(max-width: 1024px) and (min-width: 769px) {
    .page-hero-block:before {
        background-size: cover;
    }
    .featured-column,
    .featured-column img.wp-post-image {
        width: 100% !important;
    }
}

@media(max-width: 768px) {
    .page-hero-block:before {
        background: none;
    }
}

Post Archives align meta to bottom of post

A simple flex box CSS to push the last element in the post-summary ( the post meta ) to align vertically at the bottom of the post.

/* Post Archives - force post meta to vertically align bottom */
.generate-columns-container .post>.gb-container,
.generate-columns-container .post>.gb-container>.gb-inside-container,
.post-summary>.gb-inside-container {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.post-summary {
    flex: 1;
}

.post-summary>.gb-inside-container>*:last-child {
    margin-top: auto;
}

Border radius on post archive images

/* Add border radius to post archive images */
.generate-columns-container .dynamic-featured-image {
    border-radius: 4px;
}

How to change the colors

The colors are defined in the following areas:

  1. Customize > Colors
    This controls the global colors for all content.
  2. Theme Builder Block Elements
    The majority of colors are inherited from the Customizer, however some colors such as the Next / Previous label are set in the specific block element.
  3. Navigation colors in the Merged Sit
    These colors are set in the Appearance > Elements > Single Post Merged header.

Style Guide

Heading One H1

Heading Two H2

Heading Three H3

Heading Four H4

Heading Five H5
Heading Six H6

Font: Muli

Vernon Adams practiced typeface design from 2007 to 2014. A lifelong artist, during this time he eagerly explored designing type for the cloud-based era. His work spans all genres, from lively script faces to workhorse text families and operating system UI. Vernon graduated with an MA in Typeface Design from the University of Reading and lives in California. His designs are mostly published as open source Google Fonts and his favorite projects include Oxygen Mono, Monda, and Bowlby One.

volume button

Color Plan

#ff3366
#f1f6f7
#383f49
#62707c
#0b0521

 

volume button