Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/catalyst/cca_base

Islandora base theme
https://github.com/catalyst/cca_base

Last synced: 3 days ago
JSON representation

Islandora base theme

Awesome Lists containing this project

README

        

# Catalyst Islandora base theme

## Setup

### Install base theme to your project

1. Open `composer.json` in your project root, add following repository in `repositories` array

```json
"repositories": [
...
{
"type": "vcs",
"url": "https://github.com/catalyst/cca_base.git"
},
...
]
```

### Create subtheme

1. Go to `themes/contrib/cca_base/subtheme`
1. Make script executable
```bash
chmod +x scripts/create_subtheme.sh
```
1. Run script. You will be asked to enter the subtheme name. The subtheme will be created under `themes/custom/{subtheme_name}`.
```bash
./scripts/create_subtheme.sh
```

### Enable subtheme

Once you have finished creating your subtheme, enable it in `/admin/appearance`.

### Updating base theme

To update, run `composer require islandora/cca_base`. This will update if there is a new tag.
Note that `composer update` somehow doesn't get the new version. Use `composer require`.

## Theming

### Setup dev env

This will install the tooling for compiling scss.

1. Go to `themes/custom/your_theme`
1. Run `npm install`
1. Install gulp if not already: `npm install --global gulp-cli`

### Basic theming

- Replace `favicon.ico` and `logo.svg`
- Define colours and other bootstrap variables that you want to override in `scss/_variables.scss`
- Define typography in `scss/_typography.scss`
- Additional stylings go to `scss/style.scss` (or split files if necessary)
- Compile scss to css (see below)
- Add custom templates in `templates` folder
- Don't forget to `drush cr`

### Gulp commands for compiling css

#### `gulp styles`

Compiles scss to css.

#### `gulp styles:watch`

Compiles scss to css, then watchs for scss changes and recompiles automatically.