Location focused page with bootstrap

Example of the simple theme that displays a single page with location data and custom fields

Custom theme

Header code

Adds bootstrap library from a CDN and includes some Google webfonts

<!-- Bootstrap CDN -->
<link href="//stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" rel="stylesheet">
<!-- Google Fonts -->
<link href="//fonts.googleapis.com/css?family=Merriweather+Sans:400,700" rel="stylesheet">
<link href='//fonts.googleapis.com/css?family=Merriweather:400,300,300italic,400italic,700,700italic' rel='stylesheet' type='text/css'>

CSS

Some CSS styles to customize our elements

body,
html {
  width: 100%;
  height: 100%;
}

.btn {
  font-family: "Merriweather Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
}

#contact {
    padding-top: 100px;
    padding-bottom: 100px;
}

Header template

Simple copyright notice for the bottom of the pages

Page blocks

These page blocks will be created from a HTML Code module dragged from the module tray into the body of the page. You can stack many of these kind of blocks to construct your page. Note: you will need to activate the "Enable Jinja rendering" option under "Advanced" when you add the module to the page.

Block #1 - Location information

This example shows standard ways of outputting the location data as:

  • Macros - i.e. ${location_name}

  • Template variables - i.e. {{ location.street }}

Block #2 - Custom field examples

This example shows how to access the custom fields as:

  • Macros - i.e. ${custom_headline}

  • Template variables - i.e. {{ site.custom_fields.description }}

For more examples of custom fields, view those here.

Last updated

Was this helpful?