Giter VIP home page Giter VIP logo

civictheme's Introduction

CivicTheme Drupal theme


Version: 1.3.2

Introduction

CivicTheme theme, the Drupal theme built using a standalone component library, provides components and data structures to enhance editorial experiences out-of-the-box.

The standalone component library is a CMS-agnostic HTML/CSS/JS framework based on Atomic Design principles.

The Drupal theme provides full integration with a library.

Installation

composer require salsadigitalauorg/civictheme

Enable CivicTheme theme to use it as-is - CivicTheme component library is already included as a set of compiled assets.

Creating a sub-theme from the CivicTheme theme

CivicTheme provides a starter theme and a script to generate a child theme for you to get started with.

Run the following command from within civictheme theme directory:

php civictheme_create_subtheme.php <theme_machine_name> "Human theme name" "Human theme description" /path/to/theme_machine_name

This will generate a sub-theme in 'path/to/theme_machine_name' theme directory with everything ready to be installed and compiled.

Compiling sub-theme assets

Run the following command from within your sub-theme directory:

npm run build

Managing colors

Website colors can be specified via:

  • CSS code
  • Color Selector
  • CSS code with Color Selector overrides

See admin/appearance/settings/civictheme for more details about colors and to set colors via Color Selector.

Disabling Color Selector

If colors managed in CSS code only, make sure that Color Selector is disabled

./vendor/bin/drush config-set civictheme.settings colors.use_color_selector 0

Setting colors via Drush command

Palette colors can be set in bulk via Drush command by providing Brand colors.

# Enable Color Selector.
./vendor/bin/drush config-set civictheme.settings colors.use_color_selector 1

# Enable Brand Colors.
./vendor/bin/drush config-set civictheme.settings colors.use_brand_colors 1

# Set Brand Colors.
./vendor/bin/drush --include=path/to/civictheme/src/Drush civictheme:set-brand-colors light_brand1 light_brand2 light_brand3 dark_brand1 dark_brand2 dark_brand3

# Purge dynamic assets cache. Will be rebuilt during next pageload.
./vendor/bin/drush --include=docroot/themes/contrib/civictheme/src/Drush civictheme:clear-cache

Example

./vendor/bin/drush -y config-set civictheme.settings colors.use_color_selector 1
./vendor/bin/drush -y config-set civictheme.settings colors.use_brand_colors 1
./vendor/bin/drush --include=docroot/themes/contrib/civictheme/src/Drush civictheme:set-brand-colors "#00698f" "#e6e9eb" "#121313" "#61daff" "#003a4f" "#00698f"
./vendor/bin/drush --include=docroot/themes/contrib/civictheme/src/Drush civictheme:clear-cache

Updating CivicTheme

See README.md in your custom theme.

Development documentation


Other resources

civictheme's People

Contributors

salsadeploy avatar

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.