Name: tdwg-theme
Owner: Biodiversity Information Standards (TDWG)
Description: A Pelican theme for the TDWG website
Created: 2017-08-21 12:20:44.0
Updated: 2017-10-26 19:06:10.0
Pushed: 2018-01-15 17:09:30.0
Homepage: null
Size: 872
Language: CSS
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
A Pelican theme for the TDWG website.
This theme was developed for the TDWG website. It wouldn't make a lot of sense to use for any other website, but you're welcome to adapt it. To get started, download the theme and reference its path in your Pelican settings. For example:
E = "../tdwg-theme" # If tdwg-theme is in the same directory as your website repo
The repository structure is that of a Pelican theme. Files/directories indicated with GENERATED
should not be edited manually.
README.md : Description of this repository
LICENSE : Project license
package.json : npm package description, contains scripts for development
.gitignore : Files and folders to be ignored by git (including node_modules)
node_modules : Modules installed by npm, is gitignored. GENERATED
src
??? js : Theme specific Javascript files (look here if you want to adapt the JS)
??? scss : Theme specific SCSS (look here if you want to adapt the CSS)
static : All static files for this theme. Similar to a "dist" directory. GENERATED
templates : Pelican Jinja templates (look here if you want to adapt the HTML)
This theme uses Bootstrap v4.0 as a framework to create a responsive website. The HTML is entirely structured around Bootstrap classes for layout, content, components and utilities, with as little deviation as possible. The CSS starts from Bootstrap's SCSS/SASS, with custom variable overwrites in src/scss/_variables.css
and custom CSS in src/scss/main.scss
. These get bundled together with Bootstrap in a single static/css/main.css
.
The HTML is structured in templates with a Jinja syntax. templates/base.html
is the main template: all other templates are build upon it. See the Pelican documentation to understand what each template does.
No npm
scripts need to be run to make HTML changes effective (the templates
directory is read directly by Pelican).
To update the SCSS and/or JS, npm is required. It is used to install all dependencies (such as Bootstrap v4.0) and run development scripts (such as generating the CSS from SCSS).
git clone https://github.com/tdwg/tdwg-theme
node -v
(tested with 3.10)npm install
(will read package.json to create the node_modules
directory)src/scss
.scss
filesstatic/css
with npm run build:css
npm run watch:css
src/js
.js
filesstatic/js
(will be emptied) as well as the required JS files for Bootstrap with npm run build:js
npm run watch:js
Important: do not touch files in the static
directory: those are all generated! Look for the files in src
instead. To completely rebuild the static
directory, do npm run build:all