Change the default theme

This commit is contained in:
Oliver Davies 2020-05-14 09:49:18 +01:00
parent d74bb29e10
commit b10ac4ef8c
13 changed files with 229 additions and 4 deletions

View file

@ -2,10 +2,7 @@ uuid: 43c851f2-4e05-4005-bd8a-c38bff6ffbd2
langcode: en
status: true
dependencies:
content:
- 'block_content:basic_block:cec72fa5-49c4-428d-bf49-59b477c9e886'
module:
- block_content
- node
theme:
- stark

View file

@ -0,0 +1,25 @@
uuid: 899f2bae-bde9-4bf2-80be-0bc9c08e7792
langcode: en
status: true
dependencies:
config:
- system.menu.main
module:
- system
theme:
- stark
id: mainnavigation
theme: stark
region: primary_menu
weight: 0
provider: null
plugin: 'system_menu_block:main'
settings:
id: 'system_menu_block:main'
label: 'Main navigation'
provider: system
label_display: '0'
level: 1
depth: 0
expand_all_items: false
visibility: { }

View file

@ -0,0 +1,30 @@
uuid: a3a4c380-0449-4e0e-b53d-d739c6d94a9c
langcode: en
status: true
dependencies:
module:
- node
theme:
- opdavies
id: opdavies_abouttheauthor_2
theme: opdavies
region: content
weight: 0
provider: null
plugin: 'block_content:cec72fa5-49c4-428d-bf49-59b477c9e886'
settings:
id: 'block_content:cec72fa5-49c4-428d-bf49-59b477c9e886'
label: 'About the Author'
provider: block_content
label_display: visible
status: true
info: ''
view_mode: full
visibility:
node_type:
id: node_type
bundles:
post: post
negate: false
context_mapping:
node: '@node.node_route_context:node'

View file

@ -0,0 +1,25 @@
uuid: 734abfa0-7611-49a6-bed7-4219ef6888dd
langcode: en
status: true
dependencies:
module:
- system
theme:
- opdavies
_core:
default_config_hash: fRKXNB91UxDvEMkzCR8ZBsawfC6Fqbme2gtobei3gu4
id: opdavies_branding
theme: opdavies
region: header
weight: 0
provider: null
plugin: system_branding_block
settings:
id: system_branding_block
label: 'Site branding'
provider: system
label_display: '0'
use_site_logo: true
use_site_name: true
use_site_slogan: true
visibility: { }

View file

@ -0,0 +1,20 @@
uuid: 88a93adc-1b95-4008-8e39-71d3a62be67b
langcode: en
status: true
dependencies:
theme:
- opdavies
_core:
default_config_hash: PffmQ-ABSz5tFjWmVsR7NesunDnEivvopnJnBjl8KNE
id: opdavies_local_actions
theme: opdavies
region: content
weight: -2
provider: null
plugin: local_actions_block
settings:
id: local_actions_block
label: 'Primary admin actions'
provider: core
label_display: '0'
visibility: { }

View file

@ -0,0 +1,22 @@
uuid: c298066d-6e90-4a7f-89cd-c10a8fb2821b
langcode: en
status: true
dependencies:
theme:
- opdavies
_core:
default_config_hash: c-06bbElRY5sKmglk74ppgTW93Et4-EJFyNiUZMb8JY
id: opdavies_local_tasks
theme: opdavies
region: content
weight: -3
provider: null
plugin: local_tasks_block
settings:
id: local_tasks_block
label: Tabs
provider: core
label_display: '0'
primary: true
secondary: true
visibility: { }

View file

@ -0,0 +1,25 @@
uuid: 6283b404-5d6e-474c-97db-ae819da114ca
langcode: en
status: true
dependencies:
config:
- system.menu.main
module:
- system
theme:
- opdavies
id: opdavies_mainnavigation
theme: opdavies
region: primary_menu
weight: 0
provider: null
plugin: 'system_menu_block:main'
settings:
id: 'system_menu_block:main'
label: 'Main navigation'
provider: system
label_display: '0'
level: 1
depth: 0
expand_all_items: false
visibility: { }

View file

@ -0,0 +1,20 @@
uuid: 09d6e46d-c9f7-4497-ac2d-8cecb1affb9e
langcode: en
status: true
dependencies:
module:
- system
theme:
- opdavies
id: opdavies_mainpagecontent
theme: opdavies
region: content
weight: -1
provider: null
plugin: system_main_block
settings:
id: system_main_block
label: 'Main page content'
provider: system
label_display: '0'
visibility: { }

View file

@ -0,0 +1,22 @@
uuid: 8d008e4f-1d1b-463b-b46b-5677be6165f0
langcode: en
status: true
dependencies:
module:
- system
theme:
- opdavies
_core:
default_config_hash: 5MNdk3fpMKx_xxBTcz2T11DL4XEU1H5SgHl8BsYdFsA
id: opdavies_messages
theme: opdavies
region: highlighted
weight: 0
provider: null
plugin: system_messages_block
settings:
id: system_messages_block
label: 'Status messages'
provider: system
label_display: '0'
visibility: { }

View file

@ -0,0 +1,20 @@
uuid: 62c54e09-4d24-4ef0-a038-a9c66fc13d6a
langcode: en
status: true
dependencies:
theme:
- opdavies
_core:
default_config_hash: 8yptDf6WrXxeyevUz4nP5vfr7BtxQqCBMninhV2IJ1g
id: opdavies_page_title
theme: opdavies
region: content
weight: -4
provider: null
plugin: page_title_block
settings:
id: page_title_block
label: 'Page title'
provider: core
label_display: '0'
visibility: { }

View file

@ -53,6 +53,7 @@ theme:
seven: 0
claro: 0
stark: 0
opdavies: 0
profile: minimal
_core:
default_config_hash: R4IF-ClDHXxblLcG0L7MgsLvfBIMAvi_skumNFQwkDc

View file

@ -1,4 +1,4 @@
admin: claro
default: stark
default: opdavies
_core:
default_config_hash: 6lQ55NXM9ysybMQ6NzJj4dtiQ1dAkOYxdDompa-r_kk

View file

@ -0,0 +1,18 @@
<?php
/**
* @file
* Functions to support theming in the Tailwind CSS theme.
*/
/**
* Implements hook_preprocess_HOOK().
*/
function opdavies_preprocess_block(&$variables) {
if ($variables['base_plugin_id'] == 'system_branding_block') {
$variables['site_logo'] = '';
if ($variables['content']['site_logo']['#access'] && $variables['content']['site_logo']['#uri']) {
$variables['site_logo'] = str_replace('.svg', '.png', $variables['content']['site_logo']['#uri']);
}
}
}