first commit

This commit is contained in:
2024-07-15 12:33:27 +02:00
commit ce50ae282b
22084 changed files with 2623791 additions and 0 deletions

View 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));

View 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

View 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

View File

@@ -0,0 +1,20 @@
name: {{ name }}
type: theme
base theme: {{ base_theme }}
description: {{ description }}
package: {{ package }}
core_version_requirement: ^10
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'

View 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 }

View 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 {
}

View 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"
}
}

View 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'),
];
}