rdrew
2 years ago
21 changed files with 536 additions and 132 deletions
@ -1,23 +0,0 @@
|
||||
<?php |
||||
/** |
||||
* @file |
||||
* Template for a 1 column panel layout. |
||||
* |
||||
* This template provides a very simple "one column" panel display layout. |
||||
* |
||||
* Variables: |
||||
* - $css_id: An optional CSS ID. |
||||
* - $id_attribute: The whole id="$css_id" string. |
||||
* - $content: An array of content, each item in the array is keyed to one |
||||
* panel of the layout. This layout supports the following sections: |
||||
* $content['middle']: The only panel in the layout. |
||||
*/ |
||||
?> |
||||
<section class="grid-x <?php print $panel_classes; ?>"<?php print $panel_id; ?>>
|
||||
<div class="cell medium-4 diy_side"> |
||||
<?php print $content['side']; ?> |
||||
</div> |
||||
<div class="cell medium-8 diy_content"> |
||||
<?php print $content['content']; ?> |
||||
</div> |
||||
</section> |
@ -1,39 +0,0 @@
|
||||
<?php |
||||
/** |
||||
* @file |
||||
* Define the a single-column style plugin. |
||||
*/ |
||||
|
||||
// Plugin definition. |
||||
$plugin = array( |
||||
'title' => t('DIY layout'), |
||||
'category' => t('Rob Custom'), |
||||
'icon' => 'onecol_clean.png', |
||||
'theme' => 'diy_layout', |
||||
'regions' => array( |
||||
'side' => t('Side'), |
||||
'content' => t('Content') |
||||
|
||||
)); |
||||
|
||||
/** |
||||
* Prepares variables for panels_onecol_clean templates. |
||||
* |
||||
* Default template: panels-onecol-clean.tpl.php. |
||||
* |
||||
* @param array $variables |
||||
* An associative array containing: |
||||
* - $content: An array of content, each item in the array is keyed to one |
||||
* panel of the layout. |
||||
*/ |
||||
function template_preprocess_diy_layout(&$variables) { |
||||
// Construct an ID/Class attributes. |
||||
$variables['panel_classes'] = 'panel-display diy-layout clearfix'; |
||||
if ($variables['css_id']) { |
||||
$variables['panel_id'] = ' id="' . $variables['css_id'] . '"'; |
||||
$variables['panel_classes'] .= ' ' . $variables['css_id']; |
||||
} |
||||
else { |
||||
$variables['panel_id'] = ''; |
||||
} |
||||
} |
Before Width: | Height: | Size: 122 B |
@ -0,0 +1,5 @@
|
||||
<ul class="accordion" data-accordion data-allow-all-closed="true" role="tablist"> |
||||
{% for item in items %} |
||||
<li class="accordion-item" data-accordion-item >{{ item.content }}</li> |
||||
{% endfor %} |
||||
</ul> |
@ -0,0 +1,4 @@
|
||||
|
||||
{% for item in items %} |
||||
{{ item.content }} |
||||
{% endfor %} |
@ -0,0 +1,5 @@
|
||||
{% for item in items %} |
||||
<h3> |
||||
{{ item.content }} |
||||
</h3> |
||||
{% endfor %} |
@ -0,0 +1,7 @@
|
||||
<!-- Accordion tab title --> |
||||
<a href="#" class="accordion-title">{{ content.field_question }}</a> |
||||
<!-- Accordion tab content: it would start in the open state due to using the `is-active` state class. --> |
||||
<div class="accordion-content" data-tab-content> |
||||
{{ content.field_answer }} |
||||
</div> |
||||
|
@ -0,0 +1,95 @@
|
||||
{# |
||||
/** |
||||
* @file |
||||
* Theme override for a main view template. |
||||
* |
||||
* Available variables: |
||||
* - attributes: Remaining HTML attributes for the element. |
||||
* - css_name: A CSS-safe version of the view name. |
||||
* - css_class: The user-specified classes names, if any. |
||||
* - header: The optional header. |
||||
* - footer: The optional footer. |
||||
* - rows: The results of the view query, if any. |
||||
* - empty: The content to display if there are no rows. |
||||
* - pager: The optional pager next/prev links to display. |
||||
* - exposed: Exposed widget form/info to display. |
||||
* - feed_icons: Optional feed icons to display. |
||||
* - more: An optional link to the next page of results. |
||||
* - title: Title of the view, only used when displaying in the admin preview. |
||||
* - title_prefix: Additional output populated by modules, intended to be |
||||
* displayed in front of the view title. |
||||
* - title_suffix: Additional output populated by modules, intended to be |
||||
* displayed after the view title. |
||||
* - attachment_before: An optional attachment view to be displayed before the |
||||
* view content. |
||||
* - attachment_after: An optional attachment view to be displayed after the |
||||
* view content. |
||||
* - dom_id: Unique id for every view being printed to give unique class for |
||||
* JavaScript. |
||||
* |
||||
* @see template_preprocess_views_view() |
||||
*/ |
||||
#} |
||||
{% |
||||
set classes = [ |
||||
'view', |
||||
'view-' ~ id|clean_class, |
||||
'view-id-' ~ id, |
||||
'view-display-id-' ~ display_id, |
||||
dom_id ? 'js-view-dom-id-' ~ dom_id, |
||||
] |
||||
%} |
||||
<div{{ attributes.addClass(classes) }}> |
||||
{{ title_prefix }} |
||||
{% if title %} |
||||
{{ title }} |
||||
{% endif %} |
||||
{{ title_suffix }} |
||||
{% if header %} |
||||
<div class="view-header"> |
||||
{{ header }} |
||||
</div> |
||||
{% endif %} |
||||
{% if exposed %} |
||||
<div class="view-filters"> |
||||
{{ exposed }} |
||||
</div> |
||||
{% endif %} |
||||
{% if attachment_before %} |
||||
<div class="attachment attachment-before"> |
||||
{{ attachment_before }} |
||||
</div> |
||||
{% endif %} |
||||
|
||||
{% if rows %} |
||||
<div class="view-content"> |
||||
{{ rows }} |
||||
</div> |
||||
{% elseif empty %} |
||||
<div class="view-empty"> |
||||
{{ empty }} |
||||
</div> |
||||
{% endif %} |
||||
|
||||
{% if pager %} |
||||
{{ pager }} |
||||
{% endif %} |
||||
{% if attachment_after %} |
||||
<div class="attachment attachment-after"> |
||||
{{ attachment_after }} |
||||
</div> |
||||
{% endif %} |
||||
{% if more %} |
||||
{{ more }} |
||||
{% endif %} |
||||
{% if footer %} |
||||
<div class="view-footer"> |
||||
{{ footer }} |
||||
</div> |
||||
{% endif %} |
||||
{% if feed_icons %} |
||||
<div class="feed-icons"> |
||||
{{ feed_icons }} |
||||
</div> |
||||
{% endif %} |
||||
</div> |
@ -0,0 +1,50 @@
|
||||
{# |
||||
/** |
||||
* @file |
||||
* Default view template to display all the fields in a row. |
||||
* |
||||
* Available variables: |
||||
* - view: The view in use. |
||||
* - fields: A list of fields, each one contains: |
||||
* - content: The output of the field. |
||||
* - raw: The raw data for the field, if it exists. This is NOT output safe. |
||||
* - class: The safe class ID to use. |
||||
* - handler: The Views field handler controlling this field. |
||||
* - inline: Whether or not the field should be inline. |
||||
* - wrapper_element: An HTML element for a wrapper. |
||||
* - wrapper_attributes: List of attributes for wrapper element. |
||||
* - separator: An optional separator that may appear before a field. |
||||
* - label: The field's label text. |
||||
* - label_element: An HTML element for a label wrapper. |
||||
* - label_attributes: List of attributes for label wrapper. |
||||
* - label_suffix: Colon after the label. |
||||
* - element_type: An HTML element for the field content. |
||||
* - element_attributes: List of attributes for HTML element for field content. |
||||
* - has_label_colon: A boolean indicating whether to display a colon after |
||||
* the label. |
||||
* - element_type: An HTML element for the field content. |
||||
* - element_attributes: List of attributes for HTML element for field content. |
||||
* - row: The raw result from the query, with all data it fetched. |
||||
* |
||||
* @see template_preprocess_views_view_fields() |
||||
* |
||||
* @ingroup themeable |
||||
*/ |
||||
#} |
||||
|
||||
<a class="news-grid__link" href="/node/{{ fields.nid.content|striptags }}"> |
||||
<div class="callout news-grid__tile events media-object"> |
||||
<div class="news-grid__image media-object-section"> |
||||
<div class="thumbnail"> |
||||
{{ fields.field_image.content }} |
||||
</div> |
||||
</div> |
||||
<div class="media-object-section news-grid__text"> |
||||
<h3> {{ fields.title.content|striptags }} </h3> |
||||
<div> |
||||
{{ fields.body.content }} |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</a> |
||||
|
@ -0,0 +1,30 @@
|
||||
{# |
||||
/** |
||||
* @file |
||||
* Theme override to display a view of unformatted rows. |
||||
* |
||||
* Available variables: |
||||
* - title: The title of this group of rows. May be empty. |
||||
* - rows: A list of the view's row items. |
||||
* - attributes: The row's HTML attributes. |
||||
* - content: The row's content. |
||||
* - view: The view object. |
||||
* - default_row_class: A flag indicating whether default classes should be |
||||
* used on rows. |
||||
* |
||||
* @see template_preprocess_views_view_unformatted() |
||||
*/ |
||||
#} |
||||
{% if title %} |
||||
<h3>{{ title }}</h3> |
||||
{% endif %} |
||||
{% for row in rows %} |
||||
{% |
||||
set row_classes = [ |
||||
default_row_class ? 'views-row', |
||||
] |
||||
%} |
||||
<div{{ row.attributes.addClass(row_classes) }}> |
||||
{{- row.content -}} |
||||
</div> |
||||
{% endfor %} |
@ -0,0 +1,93 @@
|
||||
{# |
||||
/** |
||||
* @file |
||||
* Theme override to display a single page. |
||||
* |
||||
* The doctype, html, head and body tags are not in this template. Instead they |
||||
* can be found in the html.html.twig template in this directory. |
||||
* |
||||
* Available variables: |
||||
* |
||||
* General utility variables: |
||||
* - base_path: The base URL path of the Drupal installation. Will usually be |
||||
* "/" unless you have installed Drupal in a sub-directory. |
||||
* - is_front: A flag indicating if the current page is the front page. |
||||
* - logged_in: A flag indicating if the user is registered and signed in. |
||||
* - is_admin: A flag indicating if the user has permission to access |
||||
* administration pages. |
||||
* |
||||
* Site identity: |
||||
* - front_page: The URL of the front page. Use this instead of base_path when |
||||
* linking to the front page. This includes the language domain or prefix. |
||||
* |
||||
* Page content (in order of occurrence in the default page.html.twig): |
||||
* - node: Fully loaded node, if there is an automatically-loaded node |
||||
* associated with the page and the node ID is the second argument in the |
||||
* page's path (e.g. node/12345 and node/12345/revisions, but not |
||||
* comment/reply/12345). |
||||
* |
||||
* Regions: |
||||
* - page.header: Items for the header region. |
||||
* - page.primary_menu: Items for the primary menu region. |
||||
* - page.secondary_menu: Items for the secondary menu region. |
||||
* - page.highlighted: Items for the highlighted content region. |
||||
* - page.help: Dynamic help text, mostly for admin pages. |
||||
* - page.content: The main content of the current page. |
||||
* - page.sidebar_first: Items for the first sidebar. |
||||
* - page.sidebar_second: Items for the second sidebar. |
||||
* - page.footer: Items for the footer region. |
||||
* - page.breadcrumb: Items for the breadcrumb region. |
||||
* |
||||
* @see template_preprocess_page() |
||||
* @see html.html.twig |
||||
*/ |
||||
#} |
||||
{#{% include '@roblib_2023/templates/components/topnav_test.html.twig' %}#} |
||||
{#{% $term = \Drupal::entityTypeManager()->getStorage('taxonomy_term')->load($tid); %}#} |
||||
|
||||
<div class="layout-container"> |
||||
|
||||
<header role="banner"> |
||||
{{ page.header }} |
||||
</header> |
||||
|
||||
{{ page.primary_menu }} |
||||
{{ page.secondary_menu }} |
||||
|
||||
{{ page.breadcrumb }} |
||||
|
||||
{{ page.highlighted }} |
||||
|
||||
{{ page.help }} |
||||
|
||||
<main role="main"> |
||||
<a id="main-content" tabindex="-1"></a>{# link is in html.html.twig #} |
||||
|
||||
<div class="layout-content"> |
||||
{{ 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> |
||||
|
||||
<footer role="contentinfo"> |
||||
{% if page.footer %} |
||||
{{ page.footer }} |
||||
{% endif %} |
||||
{% if page.subfooter %} |
||||
{{ page.subfooter }} |
||||
{% endif %} |
||||
</footer> |
||||
|
||||
</div>{# /.layout-container #} |
@ -0,0 +1,55 @@
|
||||
{% |
||||
set classes = [ |
||||
'region', |
||||
'region-' ~ region|clean_class, |
||||
] |
||||
%} |
||||
{% if content %} |
||||
<div{{ attributes.addClass(classes) }}> |
||||
{{ content }} |
||||
{#copied from old footer#} |
||||
<div class="container"> |
||||
|
||||
|
||||
<div id="block-block-17" class="block block--block block-block-17 block--block-17"> |
||||
<div class="block__content"> |
||||
<div class="footeraddress"> |
||||
<div class="addressleft"> |
||||
<div class="address">550 University Avenue, Charlottetown<br> |
||||
Prince Edward Island, Canada C1A 4P3</div> |
||||
|
||||
<div style="color:white;font-size: .8em;padding-bottom:5px;">On traditional and unceded Mi'kmaq territory</div> |
||||
|
||||
<div class="links-last"><a href="http://www.upei.ca/emergency/">Emergency Preparedness</a> | <a href="http://home.upei.ca/about-upei/publications">Publications</a> | <a href="http://www.upei.ca/policy/gov/brd/gnl/0017">Privacy Policy</a> | <a href="http://home.upei.ca/disclaimer">Disclaimer</a> | <a href="http://home.upei.ca/about-website">About this Website</a> | <a href="http://home.upei.ca/directory">Contact UPEI</a> </div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
|
||||
<div id="block-block-19" class="block block--block block-block-19 block--block-19"> |
||||
<div class="block__content"> |
||||
<div id="address_right"> |
||||
<div class="socialmedia"> |
||||
<ul> |
||||
<li> |
||||
<i class="fa-solid fa-user"></i> |
||||
<a class="noicon facebook" href="http://facebook.com/UniversityofPEI"><img src="//files.upei.ca/misc/social/upei_facebook.png" style="width: 20px; height: 20px;"></a></li> |
||||
<li><a class="noicon twitter" href="http://twitter.com/upei"><img src="//files.upei.ca/misc/social/upei_twitter.png" style="width: 20px; height: 20px;"></a></li> |
||||
<li><a class="noicon youtube" href="http://youtube.com/UofPEI"><img src="//files.upei.ca/misc/social/upei_youtube.png" style="width: 20px; height: 20px;"></a></li> |
||||
<li><a class="noicon flickr" href="http://flickr.com/groups/upei"><img src="//files.upei.ca/misc/social/upei_flickr.png" style="width: 30px; height: 30px;"></a> |
||||
<ul> |
||||
</ul> |
||||
</li> |
||||
</ul> |
||||
</div> |
||||
|
||||
<div class="footerlogo"><a href="http://www.upei.ca"><img src="//files.upei.ca/misc/shieldfooter.png" style="width: 142px; height: 56px;"></a></div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
|
||||
|
||||
</div> |
||||
{#end paste#} |
||||
</div> |
||||
{% endif %} |
@ -0,0 +1,42 @@
|
||||
<div class="container"> |
||||
|
||||
|
||||
<div id="block-block-17" class="block block--block block-block-17 block--block-17"> |
||||
<div class="block__content"> |
||||
<div class="footeraddress"> |
||||
<div class="addressleft"> |
||||
<div class="address">550 University Avenue, Charlottetown<br> |
||||
Prince Edward Island, Canada C1A 4P3</div> |
||||
|
||||
<div style="color:white;font-size: .8em;padding-bottom:5px;">On traditional and unceded Mi'kmaq territory</div> |
||||
|
||||
<div class="links-last"><a href="http://www.upei.ca/emergency/">Emergency Preparedness</a> | <a href="http://home.upei.ca/about-upei/publications">Publications</a> | <a href="http://www.upei.ca/policy/gov/brd/gnl/0017">Privacy Policy</a> | <a href="http://home.upei.ca/disclaimer">Disclaimer</a> | <a href="http://home.upei.ca/about-website">About this Website</a> | <a href="http://home.upei.ca/directory">Contact UPEI</a> </div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
|
||||
<div id="block-block-19" class="block block--block block-block-19 block--block-19"> |
||||
<div class="block__content"> |
||||
<div id="address_right"> |
||||
<div class="socialmedia"> |
||||
<ul> |
||||
<li> |
||||
<i class="fa-solid fa-user"></i> |
||||
<a class="noicon facebook" href="http://facebook.com/UniversityofPEI"><img src="//files.upei.ca/misc/social/upei_facebook.png" style="width: 20px; height: 20px;"></a></li> |
||||
<li><a class="noicon twitter" href="http://twitter.com/upei"><img src="//files.upei.ca/misc/social/upei_twitter.png" style="width: 20px; height: 20px;"></a></li> |
||||
<li><a class="noicon youtube" href="http://youtube.com/UofPEI"><img src="//files.upei.ca/misc/social/upei_youtube.png" style="width: 20px; height: 20px;"></a></li> |
||||
<li><a class="noicon flickr" href="http://flickr.com/groups/upei"><img src="//files.upei.ca/misc/social/upei_flickr.png" style="width: 30px; height: 30px;"></a> |
||||
<ul> |
||||
</ul> |
||||
</li> |
||||
</ul> |
||||
</div> |
||||
|
||||
<div class="footerlogo"><a href="http://www.upei.ca"><img src="//files.upei.ca/misc/shieldfooter.png" style="width: 142px; height: 56px;"></a></div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
|
||||
|
||||
</div> |
@ -0,0 +1,80 @@
|
||||
{# |
||||
/** |
||||
* @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) }}> |
||||
{% 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,55 @@
|
||||
{# |
||||
/** |
||||
* @file |
||||
* Default theme implementation to display a paragraph. |
||||
* |
||||
* Available variables: |
||||
* - paragraph: Full paragraph entity. |
||||
* Only method names starting with "get", "has", or "is" and a few common |
||||
* methods such as "id", "label", and "bundle" are available. For example: |
||||
* - paragraph.getCreatedTime() will return the paragraph creation timestamp. |
||||
* - paragraph.id(): The paragraph ID. |
||||
* - paragraph.bundle(): The type of the paragraph, for example, "image" or "text". |
||||
* - paragraph.getOwnerId(): The user ID of the paragraph author. |
||||
* See Drupal\paragraphs\Entity\Paragraph for a full list of public properties |
||||
* and methods for the paragraph object. |
||||
* - content: All paragraph items. Use {{ content }} to print them all, |
||||
* or print a subset such as {{ content.field_example }}. Use |
||||
* {{ content|without('field_example') }} to temporarily suppress the printing |
||||
* of a given child element. |
||||
* - attributes: HTML attributes for the containing element. |
||||
* The attributes.class element may contain one or more of the following |
||||
* classes: |
||||
* - paragraphs: The current template type (also known as a "theming hook"). |
||||
* - paragraphs--type-[type]: The current paragraphs type. For example, if the paragraph is an |
||||
* "Image" it would result in "paragraphs--type--image". Note that the machine |
||||
* name will often be in a short form of the human readable label. |
||||
* - paragraphs--view-mode--[view_mode]: The View Mode of the paragraph; for example, a |
||||
* preview would result in: "paragraphs--view-mode--preview", and |
||||
* default: "paragraphs--view-mode--default". |
||||
* - view_mode: View mode; for example, "preview" or "full". |
||||
* - logged_in: Flag for authenticated user status. Will be true when the |
||||
* current user is a logged-in member. |
||||
* - is_admin: Flag for admin user status. Will be true when the current user |
||||
* is an administrator. |
||||
* |
||||
* @see template_preprocess_paragraph() |
||||
* |
||||
* @ingroup themeable |
||||
*/ |
||||
#} |
||||
{% |
||||
set classes = [ |
||||
'paragraph', |
||||
'paragraph--type--' ~ paragraph.bundle|clean_class, |
||||
view_mode ? 'paragraph--view-mode--' ~ view_mode|clean_class, |
||||
not paragraph.isPublished() ? 'paragraph--unpublished' |
||||
] |
||||
%} |
||||
{% block paragraph %} |
||||
<div{{ attributes.addClass(classes) }}> |
||||
{% block content %} |
||||
{{ content }} |
||||
{% endblock %} |
||||
</div> |
||||
{% endblock paragraph %} |
Loading…
Reference in new issue