📘
Lab Website Template docs
  • Introduction
    • Overview
    • Is this right for me?
    • Gallery
    • Support
  • Getting Started
    • Set up your site
    • Set up your URL
    • Tidy up your repo
    • Change your site
    • Preview your site
  • Basics
    • Repo structure
    • Configure your site
    • Edit pages
    • Write basic content
    • Use your logo
    • Customize your theme
    • Team members
    • Blog posts
    • Citations
    • Components
      • Section
      • Figure
      • Button
      • Icon
      • Feature
      • List
      • Citation
      • Card
      • Portrait
      • Post Excerpt
      • Alert
      • Tags
      • Float
      • Grid
      • Cols
      • Search
      • Site Search
  • Advanced
    • Update your template
    • Embeds
    • Math, diagrams, videos, etc.
    • Analytics
    • Data and collections
    • Jekyll plugins
    • Custom components
    • Background knowledge
Powered by GitBook
On this page
  1. Basics
  2. Components

Section

A section break with customizable styling

PreviousComponentsNextFigure

Last updated 2 years ago

Use this component to create a section break – i.e. end the previous section of content and start a new one – and style the next section. If you want to style the first section on a page, just put this component before any other content.

Previous section of content

{%
  include section.html
  background="images/some-bg-image.jpg"
  dark=true
  size=full
%}

Next section of content
Parameter
Description
Default

background

Solid color background

dark

Whether the section should be forced to dark (true) or light (false) mode.

Match visitor's currently selected dark/light mode

size

Limited width

Tip: Put a section break before every # Heading 1 and ## Heading 2 to visually break up your content and make it more readable.

Sections also have a solid color that overlays any background image to always maintain readability of text.

section.scss style has an editable variable for the width limit. When on large desktop screens, most websites limit the width of text content in the center of the screen to make it .

URL to background image, the section based on its contents.

Width/padding of the section. Set to wide to make section take up entire page width, e.g. for large tables of data. Set to full to make section take up entire screen width, with no margins, e.g. for use with 100% width to make banner images.

👁️
PREVIEW
easier to read
scaled to cover
figures