Initial Drupal 11 with DDEV setup
This commit is contained in:
@ -0,0 +1,2 @@
|
||||
# Default settings of {{ name }} theme.
|
||||
example: 'foo'
|
||||
8
vendor/chi-teck/drupal-code-generator/templates/_theme/config/schema/model.schema.yml.twig
vendored
Normal file
8
vendor/chi-teck/drupal-code-generator/templates/_theme/config/schema/model.schema.yml.twig
vendored
Normal file
@ -0,0 +1,8 @@
|
||||
# Schema for the configuration files of the {{ name }} theme.
|
||||
{{ machine_name }}.settings:
|
||||
type: theme_settings
|
||||
label: '{{ name }} settings'
|
||||
mapping:
|
||||
example:
|
||||
type: string
|
||||
label: Example
|
||||
17
vendor/chi-teck/drupal-code-generator/templates/_theme/js/model.js.twig
vendored
Normal file
17
vendor/chi-teck/drupal-code-generator/templates/_theme/js/model.js.twig
vendored
Normal file
@ -0,0 +1,17 @@
|
||||
/**
|
||||
* @file
|
||||
* {{ name }} behaviors.
|
||||
*/
|
||||
(function (Drupal) {
|
||||
|
||||
'use strict';
|
||||
|
||||
Drupal.behaviors.{{ machine_name|camelize(false) }} = {
|
||||
attach (context, settings) {
|
||||
|
||||
console.log('It works!');
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
} (Drupal));
|
||||
4
vendor/chi-teck/drupal-code-generator/templates/_theme/logo.svg.twig
vendored
Normal file
4
vendor/chi-teck/drupal-code-generator/templates/_theme/logo.svg.twig
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="100" height="60">
|
||||
<rect x="3" y="3" rx="10" ry="10" width="94" height="54" style="stroke: #187bb8; fill: #f5f5ff;"/>
|
||||
<text x="50%" y="50%" text-anchor="middle" alignment-baseline="middle" style="font-family: Arial, 'Helvetica Neue', Helvetica; fill: #187bb8;">{{ name }} logo</text>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 341 B |
30
vendor/chi-teck/drupal-code-generator/templates/_theme/model.breakpoints.yml.twig
vendored
Normal file
30
vendor/chi-teck/drupal-code-generator/templates/_theme/model.breakpoints.yml.twig
vendored
Normal file
@ -0,0 +1,30 @@
|
||||
{{ machine_name }}.extra_small:
|
||||
label: mobile
|
||||
mediaQuery: ''
|
||||
weight: 0
|
||||
multipliers:
|
||||
- 1x
|
||||
{{ machine_name }}.small:
|
||||
label: mobile
|
||||
mediaQuery: 'all and (min-width: 576px) and (max-width: 767px)'
|
||||
weight: 1
|
||||
multipliers:
|
||||
- 1x
|
||||
{{ machine_name }}.medium:
|
||||
label: narrow
|
||||
mediaQuery: 'all and (min-width: 768px) and (max-width: 991px)'
|
||||
weight: 2
|
||||
multipliers:
|
||||
- 1x
|
||||
{{ machine_name }}.large:
|
||||
label: wide
|
||||
mediaQuery: 'all and (min-width: 992px) and (max-width: 1199px)'
|
||||
weight: 3
|
||||
multipliers:
|
||||
- 1x
|
||||
{{ machine_name }}.extra_large:
|
||||
label: wide
|
||||
mediaQuery: 'all and (min-width: 1200px)'
|
||||
weight: 4
|
||||
multipliers:
|
||||
- 1x
|
||||
20
vendor/chi-teck/drupal-code-generator/templates/_theme/model.info.twig
vendored
Normal file
20
vendor/chi-teck/drupal-code-generator/templates/_theme/model.info.twig
vendored
Normal file
@ -0,0 +1,20 @@
|
||||
name: {{ name }}
|
||||
type: theme
|
||||
base theme: {{ base_theme }}
|
||||
description: {{ description }}
|
||||
package: {{ package }}
|
||||
core_version_requirement: ^10 || ^11
|
||||
libraries:
|
||||
- {{ machine_name }}/global
|
||||
regions:
|
||||
header: 'Header'
|
||||
primary_menu: 'Primary menu'
|
||||
secondary_menu: 'Secondary menu'
|
||||
page_top: 'Page top'
|
||||
page_bottom: 'Page bottom'
|
||||
featured: 'Featured'
|
||||
breadcrumb: 'Breadcrumb'
|
||||
content: 'Content'
|
||||
sidebar_first: 'Sidebar first'
|
||||
sidebar_second: 'Sidebar second'
|
||||
footer: 'Footer'
|
||||
24
vendor/chi-teck/drupal-code-generator/templates/_theme/model.libraries.yml.twig
vendored
Normal file
24
vendor/chi-teck/drupal-code-generator/templates/_theme/model.libraries.yml.twig
vendored
Normal file
@ -0,0 +1,24 @@
|
||||
# Main theme library.
|
||||
global:
|
||||
js:
|
||||
js/{{ machine_name|u2h }}.js: {}
|
||||
css:
|
||||
base:
|
||||
css/base/elements.css: {}
|
||||
component:
|
||||
css/component/block.css: {}
|
||||
css/component/breadcrumb.css: {}
|
||||
css/component/field.css: {}
|
||||
css/component/form.css: {}
|
||||
css/component/header.css: {}
|
||||
css/component/menu.css: {}
|
||||
css/component/messages.css: {}
|
||||
css/component/node.css: {}
|
||||
css/component/sidebar.css: {}
|
||||
css/component/table.css: {}
|
||||
css/component/tabs.css: {}
|
||||
css/component/buttons.css: {}
|
||||
layout:
|
||||
css/layout/layout.css: {}
|
||||
theme:
|
||||
css/theme/print.css: { media: print }
|
||||
29
vendor/chi-teck/drupal-code-generator/templates/_theme/model.theme.twig
vendored
Normal file
29
vendor/chi-teck/drupal-code-generator/templates/_theme/model.theme.twig
vendored
Normal file
@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Functions to support theming in the {{ name }} theme.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Implements hook_preprocess_HOOK() for html.html.twig.
|
||||
*/
|
||||
function {{ machine_name }}_preprocess_html(array &$variables): void {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Implements hook_preprocess_HOOK() for page.html.twig.
|
||||
*/
|
||||
function {{ machine_name }}_preprocess_page(array &$variables): void {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Implements hook_preprocess_HOOK() for node.html.twig.
|
||||
*/
|
||||
function {{ machine_name }}_preprocess_node(array &$variables): void {
|
||||
|
||||
}
|
||||
10
vendor/chi-teck/drupal-code-generator/templates/_theme/package.json.twig
vendored
Normal file
10
vendor/chi-teck/drupal-code-generator/templates/_theme/package.json.twig
vendored
Normal file
@ -0,0 +1,10 @@
|
||||
{
|
||||
"name": "{{ machine_name }}",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"livereload": "livereload --exclusions node_modules/ --exts 'css,js,twig,theme,apng,avif,gif,jpg,jpeg,jfif,pjpeg,pjp,png,svg,webp'"
|
||||
},
|
||||
"devDependencies": {
|
||||
"livereload": "^0.9.3"
|
||||
}
|
||||
}
|
||||
29
vendor/chi-teck/drupal-code-generator/templates/_theme/theme-settings.php.twig
vendored
Normal file
29
vendor/chi-teck/drupal-code-generator/templates/_theme/theme-settings.php.twig
vendored
Normal file
@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Theme settings form for {{ name }} theme.
|
||||
*/
|
||||
|
||||
use Drupal\Core\Form\FormState;
|
||||
|
||||
/**
|
||||
* Implements hook_form_system_theme_settings_alter().
|
||||
*/
|
||||
function {{ machine_name }}_form_system_theme_settings_alter(array &$form, FormState $form_state): void {
|
||||
|
||||
$form['{{ machine_name }}'] = [
|
||||
'#type' => 'details',
|
||||
'#title' => t('{{ name }}'),
|
||||
'#open' => TRUE,
|
||||
];
|
||||
|
||||
$form['{{ machine_name }}']['example'] = [
|
||||
'#type' => 'textfield',
|
||||
'#title' => t('Example'),
|
||||
'#default_value' => theme_get_setting('example'),
|
||||
];
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user