diff --git a/templates/page/page.html.twig b/templates/page/page.html.twig new file mode 100644 index 0000000000000000000000000000000000000000..d24d7e5e6c8131fcaeb1ef086224820ec17058c0 --- /dev/null +++ b/templates/page/page.html.twig @@ -0,0 +1,59 @@ +{# +/** + * @file + * Theme override to display a single page. + * + * Available variables: + * + * General utility variables: + * - base_path: The base URL path of the Drupal installation. + * - 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. + * + * Page content (in order of occurrence in the default page.html.twig): + * - node: Fully loaded node + * + * Regions: + * - page.header: Items for the header region. + * - page.highlighted: Items for the highlighted 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 + */ +#} + +{% extends '@layouts/site-container/site-container.twig' %} + {% block header %} + {{ page.header }} + {{ page.navigation }} + {{ page.breadcrumb }} + {% endblock %} + + {% block highlighted %} + {{ page.highlighted }} + {{ page.help }} + {% endblock %} + + {% block main %} + {{ page.preface }} + {{ page.content }} + {{ page.postscript }} + {% endblock %} + + {% block footer %} + {{ page.sitefooter }} + {{ page.footer }} + {% endblock %} diff --git a/templates/regions/region--content.html.twig b/templates/regions/region--content.html.twig new file mode 100644 index 0000000000000000000000000000000000000000..d9d6a2ddf5f3dbc06af388fb0070422b26a0bbb7 --- /dev/null +++ b/templates/regions/region--content.html.twig @@ -0,0 +1,23 @@ +{# +/** + * @file + * Theme override to display a 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() + */ +#} +{% embed '@layouts/content/content.twig' with { + 'classes': classes +}%} + + {% block content %} + {{ content }} + {% endblock %} + +{% endembed %} diff --git a/templates/regions/region--footer.html.twig b/templates/regions/region--footer.html.twig new file mode 100644 index 0000000000000000000000000000000000000000..4555804c4896429b1ef850474c4b7610c170ece5 --- /dev/null +++ b/templates/regions/region--footer.html.twig @@ -0,0 +1,28 @@ +{# +/** + * @file + * Theme override to display a 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 social_media = simplify_menu('uw-menu-global-social-media') %} +{% set footer_menu = simplify_menu('uw-menu-global-footer') %} + +{% embed '@layouts/footer/footer.twig' with { + "social_media": social_media, + "social_media_placement": "global-site-footer", + "footer_menu": footer_menu.menu_tree +} %} + + {% block content %} + {{ content }} + {% endblock %} + +{% endembed %} diff --git a/templates/regions/region--header.html.twig b/templates/regions/region--header.html.twig new file mode 100644 index 0000000000000000000000000000000000000000..e296f54b9b5417125c44d7d1a69299f6362ae8b5 --- /dev/null +++ b/templates/regions/region--header.html.twig @@ -0,0 +1,26 @@ +{# +/** + * @file + * Theme override to display a 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 search = drupal_form('Drupal\\uw_cfg_common\\Form\\UwSearchForm') %} + +{% include '@layouts/header/header.twig' with { + 'site_name': site_name, + 'faculty': faculty, + 'classes': classes, + 'nav_items': main_menu, + 'secondary_items': secondary_menu, + 'home_link': home_link, + 'global_message': global_message, + 'search': search +}%} diff --git a/templates/regions/region--highlighted.html.twig b/templates/regions/region--highlighted.html.twig new file mode 100644 index 0000000000000000000000000000000000000000..d7605b138d8602fd780bb54437968f8f36b228a0 --- /dev/null +++ b/templates/regions/region--highlighted.html.twig @@ -0,0 +1,23 @@ +{# +/** + * @file + * Theme override to display a 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() + */ +#} +{% embed '@layouts/highlighted/highlighted.twig' with { + 'classes': classes +}%} + + {% block content %} + {{ content }} + {% endblock %} + +{% endembed %} diff --git a/templates/site-footer/uw-site-footer.html.twig b/templates/site-footer/uw-site-footer.html.twig new file mode 100644 index 0000000000000000000000000000000000000000..cb4aa2813ea07474ecda34103a18d71d16612c0d --- /dev/null +++ b/templates/site-footer/uw-site-footer.html.twig @@ -0,0 +1 @@ +Local site footer