Code Monkey home page Code Monkey logo

grav-theme-t2b5's Introduction

T2B5 Theme

Description

The T2B5 Theme is for Grav CMS. It includes numerous customisation options, such as navbar styles and web-app settings, as well as comprehensive favicon support. It supports using the following:

  • Bootstrap 5.0.2
  • Bootswatch 5.0.2
  • FontAwesome 5.15.3
  • Hover.css 2.3.1
  • Animate.css 4.1.1

Installation

New sites

The recommended way to use the theme is by starting with the grav-skeleton-t2b5 repository. This includes this theme as well as the required pages, sample icons, and plugins.

Existing sites

To add the theme to an existing site first clone the repository into your /user/themes folder:

git clone https://github.com/stom66/grav-theme-t2b5 /path/to/grav/user/themes/t2b5

To configure your site to use T2B5 you will need to do the following:

  • Edit /user/config/system.yaml to have the following properties:
    • Set theme: setting to t2b5.
    • Set absolute_urls: setting to true.
  • Clear the Grav cache. The simplest way to do this is by going to the root Grav directory in Terminal and typing bin/grav clear-cache.
  • Install the dependencies below
  • Add the ICO media type (described below)
  • Add the manifest.json and browserconfig.xml pages (described below)

Dependencies

The T2B5 theme depends on a number of plugins. If you install via GPM you should be prompted to also install them.

If you were not prompted to install these automatically you can install them via the terminal with the following command:

bin/grav install

Post-install steps

Some additional steps you can take after installing the theme to get the most from it:

  • Add Sitemap: https://example.com/sitemap.xml to your robots.txt file

Customisation

To customise the theme and rebuild the css first do the following:

  1. From the terminal cd to the theme dir: cd /path/to/user/themes/t2b5
  2. Run: npm install
  3. Run: npm run watch to trigger the gulp build
  • Custom styles can be added and changed in t2b5/src/scss/custom/_styles.scss
  • Google Fonts can be added and changed in t2b5/src/scss/custom/_typography.scss
  • The most common Boostrap variables are in t2b5/src/scss/custom/_variables.scss

By default the Bootstrap/Bootswatch libraries are included from CDNs and are not included in theme.css If you wish to use a customised local Bootstrap style:

  1. Disable the CSS CDN includes in the theme options
  2. Uncomment the boostrap include statement in t2b5/src/scss/theme.scss
  3. Run either npm run watch or npm run build to rebuild the CSS

You may wish to toggle the "Use minified CSS" option in the theme options during development to assist inspection.

Favicons:

The theme has comprehensive support for favicons and will automatically resize images to a variety of sizes to ensure maxium compatibility with popular browsers and devices.

Upload your favicons to the folder /user/images/icons and select them via the Theme config page in the admin panel.

To enable support for ICO files in the theme configuration page add the following to user/config/media.yaml:

  ico:
    type: file
    thumb: media/thumb-png.png
    mime: image/x-icon
    image: null

manifest.json and browserconfig.xml

To enable browserconfig.xml create the file pages/browserconfig/default.md with the following contents:

---
slug: browserconfig.xml
title: browserconfig.xml
append_url_extension: '.xml'
template_format: xml
template: browserconfig
---

To enable manifest.json create the file pages/manifest/default.md with the following contents:

---
slug: manifest
title: manifest.json
append_url_extension: '.json'
template_format: json
template: manifest
---

grav-theme-t2b5's People

Contributors

stom66 avatar

Stargazers

pmoreno.rodriguez avatar  avatar

Watchers

 avatar

Forkers

hmedrano

grav-theme-t2b5's Issues

Template override for child theme only works when template in parent theme is deleted

Hi,
first, thanks for this theme!
I created a child theme for your theme but the template override is not working.
Only if i delete the template in the parent theme, all changes are accepted. Can you give me a hint, what might be wrong
steps I did
Inheriting manually: https://learn.getgrav.org/17/themes/customization#inheriting-manually
copy template: from
user\themes\t2b5\templates\default.html.twig โ†’ user\themes\myb5\templates\default.html.twig
changed
<div class="container"> โ†’ <div class="container-fluid">
clear all cache

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.