css rorschach theme

This commit is contained in:
2023-06-18 20:42:25 +02:00
parent 0e6de56e3e
commit 71b72cb231
26 changed files with 406 additions and 205 deletions
@@ -1,47 +0,0 @@
{#
/**
* @file
* Theme override to display a block.
*
* Available variables:
* - plugin_id: The ID of the block implementation.
* - label: The configured label of the block if visible.
* - configuration: A list of the block's configuration values.
* - label: The configured label for the block.
* - label_display: The display settings for the label.
* - provider: The module or other provider that provided this block plugin.
* - Block plugin specific settings will also be stored here.
* - content: The content of this block.
* - attributes: array of HTML attributes populated by modules, intended to
* be added to the main container tag of this template.
* - id: A valid HTML ID and guaranteed unique.
* - title_attributes: Same as attributes, except applied to the main title
* tag that appears in the template.
* - title_prefix: Additional output populated by modules, intended to be
* displayed in front of the main title tag that appears in the template.
* - title_suffix: Additional output populated by modules, intended to be
* displayed after the main title tag that appears in the template.
*
* @see template_preprocess_block()
*/
#}
{%
set classes = [
'block',
'block-' ~ configuration.provider|clean_class,
'block-' ~ plugin_id|clean_class,
]
%}
<div{{ attributes.addClass(classes) }}>
{{ title_prefix }}
{% if label %}
<span><h2{{ title_attributes }}>{{ label }}</h2></span>
{% endif %}
{{ title_suffix }}
{% block content %}
{{ content }}
{% endblock %}
</div>
@@ -0,0 +1,28 @@
{% extends "block.html.twig" %}
{#
/**
* @file
* Default theme implementation for a branding block.
*
* Each branding element variable (logo, name, slogan) is only available if
* enabled in the block configuration.
*
* Available variables:
* - site_logo: Logo for site as defined in Appearance or theme settings.
* - site_name: Name for site as defined in Site information settings.
* - site_slogan: Slogan for site as defined in Site information settings.
*
* @ingroup themeable
*/
#}
{% block content %}
{% if site_logo %}
<a href="{{ path('<front>') }}" rel="home">
<img src="{{ site_logo }}" alt="{{ 'Home'| t }}" />
</a>
{% endif %}
{% if site_name %}
<a href="{{ path('<front>') }}" rel="home">{{ site_name }}</a>
{% endif %}
{{ site_slogan }}
{% endblock %}
@@ -1,89 +0,0 @@
{#
/**
* @file
* Theme override for a field.
*
* To override output, copy the "field.html.twig" from the templates directory
* to your theme's directory and customize it, just like customizing other
* Drupal templates such as page.html.twig or node.html.twig.
*
* Instead of overriding the theming for all fields, you can also just override
* theming for a subset of fields using
* @link themeable Theme hook suggestions. @endlink For example,
* here are some theme hook suggestions that can be used for a field_foo field
* on an article node type:
* - field--node--field-foo--article.html.twig
* - field--node--field-foo.html.twig
* - field--node--article.html.twig
* - field--field-foo.html.twig
* - field--text-with-summary.html.twig
* - field.html.twig
*
* Available variables:
* - attributes: HTML attributes for the containing element.
* - label_hidden: Whether to show the field label or not.
* - title_attributes: HTML attributes for the title.
* - label: The label for the field.
* - multiple: TRUE if a field can contain multiple items.
* - items: List of all the field items. Each item contains:
* - attributes: List of HTML attributes for each item.
* - content: The field item's content.
* - entity_type: The entity type to which the field belongs.
* - field_name: The name of the field.
* - field_type: The type of the field.
* - label_display: The display settings for the label.
*
*
* @see template_preprocess_field()
*/
#}
{%
set classes = [
'field',
'field--name-' ~ field_name|clean_class,
'field--type-' ~ field_type|clean_class,
'field--label-' ~ label_display,
label_display == 'inline' ? 'clearfix',
]
%}
{%
set title_classes = [
'field__label',
label_display == 'visually_hidden' ? 'visually-hidden',
]
%}
{% if label_hidden %}
{% if multiple %}
<div{{attributes.addClass(classes,'field__items')}}>
{% for item in items %}
<div{{item.attributes.addClass('field__item')}}{{ item.content }}></div>
{% endfor %}
</div>
{% else %}
{% for item in items %}
<div {{ attributes.addClass(classes, 'field__item') }}>{{ item.content }}</div>
{% endfor %}
{% endif %}
{% else %}
<div{{attributes.addClass(classes)}}>
<div{{title_attributes.addClass(title_classes)}}>{{ label }}</div>
{% if multiple %}
<div class="field__items">
{% endif %}
{% for item in items %}
<div{{item.attributes.addClass('field__item')}}>{{ item.content }}</div>
{% endfor %}
{% if multiple %}
</div>
{% endif %}
</div>
{% endif %}
@@ -0,0 +1,2 @@
{# footnotes/footnote-link.html.twig #}
<a class="see-footnote" id="{{ fn.ref_id }}" title="{{ fn.text_clean }}" href="#{{ fn.fn_id }}">{{ fn.value }}</a>
@@ -0,0 +1,23 @@
{# footnotes/footnote-list.html.twig #}
<ul class="footnotes">
{% for fn in footnotes %}
{% if fn.ref_id is iterable %}
{#
// Output footnote that has more than one reference to it in the body.
// The only difference is to insert backlinks to all references.
// Helper: we need to enumerate a, b, c...
#}
{% set abc = "abcdefghijklmnopqrstuvwxyz"|split('') %}
{% set i = 0 %}
<li class="footnote" id="{{ fn.fn_id }}"><a href="#{{ fn.ref_id.0 }}" class="footnote-label">{{ fn.value }}</a>
{% for ref in fn.ref_id %}
<a class="footnote-multi" href="#{{ ref }}">{{ attribute(abc, i) }}</a>
{% set i = i + 1 %}
{% endfor %}
{{ fn.text|raw }}</li>
{% else %}
{# Output normal footnote. #}
<li class="footnote" id="{{ fn.fn_id }}"><a class="footnote-label" href="#{{ fn.ref_id }}">{{ fn.value }}</a>{{ fn.text|raw }}</li>
{% endif %}
{% endfor %}
</ul>
@@ -31,7 +31,7 @@
*/
#}
<div class="layout-container">
<div class="layout-container grid-full">
@@ -52,6 +52,20 @@
{{ page.content }}
</div>{# /.layout-content #}
{# {% if page.sidebar_first %}
<aside class="layout-sidebar-first" role="complementary">
{{ page.sidebar_first }}
</aside>
{% endif %}
{% if page.sidebar_second %}
<aside class="layout-sidebar-second" role="complementary">
{{ page.sidebar_second }}
</aside>
{% endif %} #}
</main>
<aside role="book navigation">
{% if page.sidebar_first %}
<aside class="layout-sidebar-first" role="complementary">
{{ page.sidebar_first }}
@@ -63,8 +77,10 @@
{{ page.sidebar_second }}
</aside>
{% endif %}
</main>
<div class="book-navigation">
{{ page.sidebar }}
</div>
</aside>
<footer role="contentinfo">
{{ page.footer_top }}
@@ -0,0 +1,28 @@
{#
/**
* @file
* Olivero's theme override to display the sidebar region.
*
* Available variables:
* - content: The content for this region, typically blocks.
* - attributes: HTML attributes for the region <div>.
* - region: The name of the region variable as defined in the theme's
* .info.yml file.
*
* @see template_preprocess_region()
*/
#}
{%
set classes = [
'region',
'region--' ~ region|clean_class,
]
%}
{# {{ attach_library('olivero/sidebar') }} #}
{% if content %}
<aside{{ attributes.addClass(classes) }}>
{{ content }}
</aside>
{% endif %}