Randomg things.

This commit is contained in:
calcu1on 2025-10-15 22:49:16 -04:00
parent 73b1faf9cc
commit 09043d7884
12 changed files with 8214 additions and 114 deletions

8102
web/db.sql Normal file

File diff suppressed because one or more lines are too long

BIN
web/db/backup.sqlite Normal file

Binary file not shown.

View File

@ -0,0 +1,5 @@
testing:
js:
js/testing.js: {}
dependencies:
- core/drupal

View File

@ -0,0 +1,5 @@
<?php
function dc_tests_preprocess_node(&$variables) {
$variables['#attached']['library'][] = 'dc_tests/testing';
}

View File

@ -0,0 +1,10 @@
((Drupal, once) => {
Drupal.behaviors.myBehavior = {
attach(context) {
let target = once('myBehavior', 'body');
target.forEach((t) => {
alert('Behavior attached test');
});
},
};
})(Drupal, once);

View File

@ -0,0 +1 @@
<h1>Hello World</h1>

File diff suppressed because one or more lines are too long

View File

@ -12,19 +12,19 @@
# This means that if you want to override any value of a parameter, the
# whole parameter array needs to be copied from
# sites/default/default.services.yml or from core/core.services.yml file.
parameters:
http.response.debug_cacheability_headers: true
services:
cache.backend.null:
class: Drupal\Core\Cache\NullBackendFactory
logger.channel.config_schema:
parent: logger.channel_base
arguments: [ 'config_schema' ]
config.schema_checker:
class: Drupal\Core\Config\Development\LenientConfigSchemaChecker
arguments:
- '@config.typed'
- '@messenger'
- '@logger.channel.config_schema'
tags:
- { name: event_subscriber }
# parameters:
# http.response.debug_cacheability_headers: true
# services:
# cache.backend.null:
# class: Drupal\Core\Cache\NullBackendFactory
# logger.channel.config_schema:
# parent: logger.channel_base
# arguments: [ 'config_schema' ]
# config.schema_checker:
# class: Drupal\Core\Config\Development\LenientConfigSchemaChecker
# arguments:
# - '@config.typed'
# - '@messenger'
# - '@logger.channel.config_schema'
# tags:
# - { name: event_subscriber }

View File

@ -0,0 +1,13 @@
name: Alert
props:
type: object
properties:
alertType:
type: string
title: Alert Type
description: 'The type of alert.'
slots:
alertText:
title: Alert Text
required: true
description: The test for the alert.

View File

@ -0,0 +1,21 @@
.alert-wrapper .field_alert_text {
padding: 20px 0;
text-align: center;
}
.alert.normal {
background-color: deepskyblue;
color: darkblue;
}
.alert.warning {
background-color: goldenrod;
color: black;
font-weight: bold;
}
.alert.danger {
background-color: lightpink;
color: darkred;
font-weight: bolder;
}

View File

@ -0,0 +1,3 @@
<div class="alert {{ alertType }}">
{% block alertText %}{% endblock %}
</div>

View File

@ -0,0 +1,26 @@
{#
* Component variables
*
* props:
* alerType
*
* slots
* alertText
*
#}
<div {{ attributes.addClass('alert-wrapper') }}>
{{ title_prefix }}
{{ title_suffix }}
{% set alertType = content.field_alert_type.0['#markup']|clean_class %}
{% embed 'dchadwick:alert' with {
alertType: alertType,
}%}
{% block alertText %}
<p>{{ content.field_alert_text }}</p>
{% endblock%}
{% endembed %}
</div>