Wordpress theme used at the official site of Höörs kommun, https://www.hoor.se.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
acf-exports
assets
languages
library
templates
views
.csscomb.json
.editorconfig
.gitignore
.stylelintrc
README.md
composer.json
functions.php
gulpfile.js
package.json
screenshot.png
style.css
yarn.lock

README.md

hoor.se Wordpress theme

Höör kommuns logo

This is the Wordpress theme used at www.hoor.se, the official site of Höörs kommun. It's a child theme to Municipio by Helsingborg stad.

Plugins

Municipio Boilerplate gives a good overview of plugins that this theme styles and customizes, most notably Modularity.

Principles

As much as possible this theme tries to be a good citizen in the ecosystem created by Helsingborg stad. This means that where possible improvements are contributed to e.g Municipio instead of overridden here. This is especially important for performance heavy things where double work should be avoided.

The big exception we do here is that a customized version of styleguide-web is bundled in this theme. This is to be able to have more control over styling.

Code style and naming conventions

As much as possible this theme follows the code style and naming conventions of Municipio. E.g if we override functionality the same file name and PHP class name is used as in Municipio.

CSS is a sort of a mixed bag at the moment. We inherit some classes and styles from the bundled styleguide-web, but itcss is used as CSS architecture for styles from this theme.

Building assets

To build assets:

yarn install
yarn run build

Yarn is used to achieve deterministic builds. See gulpfile.js for different tasks, e.g gulp watch.

Cache busting

For performance reasons assets are set to never expire. During build all assets gets a hash appended to their file name: main.min.css → main.min-5d9ecac9a1.css. Assets used in the CSS are automatically handled. Don't link to assets in JavaScript, instead style using class names. In PHP a helper function is used to get the corrects asset filename: \Hoor\Helper\CacheBust::name('css/main.min.css').

Customizing Municipio

This theme does quite heavy customizations of Municipio. Do we recommend it? Time will tell, but up until now we have been able to use new versions of Municipio and Modularity without too much work.