Remove the hard-coded footer and menu links
This commit is contained in:
parent
98472ea66b
commit
58869fa91e
6 changed files with 98 additions and 40 deletions
49
web/themes/custom/opdavies/templates/menu--main.html.twig
Normal file
49
web/themes/custom/opdavies/templates/menu--main.html.twig
Normal file
|
@ -0,0 +1,49 @@
|
|||
{#
|
||||
/**
|
||||
* @file
|
||||
* Default theme implementation to display a menu.
|
||||
*
|
||||
* Available variables:
|
||||
* - menu_name: The machine name of the menu.
|
||||
* - items: A nested list of menu items. Each menu item contains:
|
||||
* - attributes: HTML attributes for the menu item.
|
||||
* - below: The menu item child items.
|
||||
* - title: The menu link title.
|
||||
* - url: The menu link URL, instance of \Drupal\Core\Url
|
||||
* - localized_options: Menu link localized options.
|
||||
* - is_expanded: TRUE if the link has visible children within the current
|
||||
* menu tree.
|
||||
* - is_collapsed: TRUE if the link has children within the current menu tree
|
||||
* that are not currently visible.
|
||||
* - in_active_trail: TRUE if the link is in the active trail.
|
||||
*
|
||||
* @ingroup themeable
|
||||
*/
|
||||
#}
|
||||
{% import _self as menus %}
|
||||
|
||||
{{ menus.menu_links(items, attributes, 0) }}
|
||||
|
||||
{% macro menu_links(items, attributes, menu_level) %}
|
||||
{% import _self as menus %}
|
||||
{% if items %}
|
||||
{% if menu_level == 0 %}
|
||||
<ul{{ attributes.addClass('flex flex-wrap justify-center -mb-3') }}>
|
||||
{% else %}
|
||||
<ul>
|
||||
{% endif %}
|
||||
|
||||
{% for item in items %}
|
||||
<li{{ item.attributes }}>
|
||||
{{ link(item.title, item.url, {
|
||||
class: 'mx-3 mb-3 text-base block underline md:text-lg dark:text-white hover:no-underline link dark:hover:text-blue-400 hover:text-gray-900',
|
||||
}) }}
|
||||
|
||||
{% if item.below %}
|
||||
{{ menus.menu_links(item.below, attributes, menu_level + 1) }}
|
||||
{% endif %}
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
{% endmacro %}
|
|
@ -97,12 +97,6 @@
|
|||
{% endif %}
|
||||
</main>
|
||||
|
||||
{% if page.footer %}
|
||||
<footer role="contentinfo">
|
||||
{{ page.footer }}
|
||||
</footer>
|
||||
{% endif %}
|
||||
|
||||
<div>
|
||||
<h2 class="text-xl font-bold">About me</h2>
|
||||
|
||||
|
@ -120,34 +114,14 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<footer class="mt-16 mb-6">
|
||||
<a id="footer" tabindex="-1"></a>
|
||||
<nav class="flex flex-wrap justify-center -mb-3">
|
||||
<a class="mx-3 mb-3 text-base underline md:text-lg dark:text-white hover:no-underline link dark:hover:text-blue-400 hover:text-gray-900" href="/" title="Home">
|
||||
Home
|
||||
</a>
|
||||
<a class="mx-3 mb-3 text-base underline md:text-lg dark:text-white hover:no-underline link dark:hover:text-blue-400 hover:text-gray-900" href="/press" title="Press Info">
|
||||
Press Info
|
||||
</a>
|
||||
<a class="mx-3 mb-3 text-base underline md:text-lg dark:text-white hover:no-underline link dark:hover:text-blue-400 hover:text-gray-900" href="/pricing" title="Services">
|
||||
Services
|
||||
</a>
|
||||
<a class="mx-3 mb-3 text-base underline md:text-lg dark:text-white hover:no-underline link dark:hover:text-blue-400 hover:text-gray-900" href="/presentations" title="Presentations">
|
||||
Presentations
|
||||
</a>
|
||||
<a class="mx-3 mb-3 text-base underline md:text-lg dark:text-white hover:no-underline link dark:hover:text-blue-400 hover:text-gray-900" href="/podcast" title="The Beyond Blocks Podcast">
|
||||
Podcast
|
||||
</a>
|
||||
<a class="mx-3 mb-3 text-base underline md:text-lg dark:text-white hover:no-underline link dark:hover:text-blue-400 hover:text-gray-900" href="/daily" title="The Daily Drupaler Email List">
|
||||
Daily list
|
||||
</a>
|
||||
<a class="mx-3 mb-3 text-base underline md:text-lg dark:text-white hover:no-underline link dark:hover:text-blue-400 hover:text-gray-900" href="/sponsor" title="Sponsor me">
|
||||
Sponsor me
|
||||
</a>
|
||||
<a class="mx-3 mb-3 text-base underline md:text-lg dark:text-white hover:no-underline link dark:hover:text-blue-400 hover:text-gray-900" href="mailto:oliver+website@oliverdavies.uk" title="Contact Oliver">
|
||||
Contact
|
||||
</a>
|
||||
</nav>
|
||||
</footer>
|
||||
{% if page.footer %}
|
||||
<div class="mt-16 mb-6">
|
||||
<a id="footer" tabindex="-1"></a>
|
||||
|
||||
<footer>
|
||||
{{ page.footer }}
|
||||
</footer>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue