Conclusion of endless round of changes to make menu sort of usable

The dropdowns do not drop down on touch devices,
before fixing that need to check in on if the noble
battle to keep the menu visible for as many devices
as possible (and not hide behind the hamburger)
should in fact be given up.

Ref 
This commit is contained in:
benjamin melançon 2025-02-23 23:20:40 -05:00
parent aab893c1d9
commit 3f1860f671
5 changed files with 56 additions and 16 deletions

View file

@ -18,6 +18,47 @@
} }
} }
.geo-logo-name {
display: flex !important;
overflow: hidden;
width: 100%;
.logo, .sitename {
display: table-cell;
}
.logo a {
display: block;
width: 199px;
}
@include from($tablet) {
width: fit-content;
}
@include until($mini) {
justify-content: flex-end;
}
}
@include until($desktop) {
.search-bar {
display: none !important;
}
}
// Mostly to reduce the impact of the ridiculous (mostly on Chrome) ghost mobile horizontal scroll.
.search-icon {
padding-right: 1rem;
}
#navbar-menu {
display: flex;
// More modern Bulma has is-flex-wrap-wrap as a class for this.
flex-wrap: wrap;
@include until($tablet) {
width: 100%;
justify-content: space-around;
}
}
/* Featured images on article pages */ /* Featured images on article pages */
.featured-image figure.image { .featured-image figure.image {
width: 100vw; width: 100vw;

View file

@ -1,7 +1,6 @@
@charset "UTF-8"; @charset "UTF-8";
// Extend or override Bulma's layouts ../../node_modules/bulma/sass/layout // Extend or override Bulma's layouts ../../node_modules/bulma/sass/layout
// Center logo & sitename when they stack on tiny screens. // Center logo & sitename when they stack on tiny screens.
@include until($mini) { @include until($mini) {
.sitename.column, .sitename.column,
@ -15,6 +14,7 @@
display: inline-block; display: inline-block;
} }
// Allow the primary page content to be flush with the bottom of the slogan. // Allow the primary page content to be flush with the bottom of the slogan.
.main-section { .main-section {
padding-top: 0; padding-top: 0;
@ -38,9 +38,6 @@
} }
// Prevent a slight horizontal scroll. // Prevent a slight horizontal scroll.
.page-title .container {
overflow-x: hidden;
}
/* On content listing pages (e.g. card view mode). */ /* On content listing pages (e.g. card view mode). */
.background-replacement-for-no-image { .background-replacement-for-no-image {

View file

@ -14,18 +14,18 @@
* @ingroup themeable * @ingroup themeable
*/ */
#} #}
<div class="column is-narrow geo-logo-name is-paddingless">
{% if site_logo %} {% if site_logo %}
<div class="logo column is-narrow is-paddingless has-text-centered"> <div class="logo">
<figure class="image no-upscale"> <a href="{{ path('<front>') }}" title="{{ 'Home'|t }}" rel="home">
<a href="{{ path('<front>') }}" title="{{ 'Home'|t }}" rel="home"> <img src="{{ site_logo }}" alt="GEO's logo, a gently winding path through green to a large bright sun on the horizon." />
<img src="{{ site_logo }}" alt="{{ site_name }} Home" /> </a>
</a>
</figure>
</div> </div>
{% endif %} {% endif %}
<div class="sitename column is-narrow is-paddingless has-text-centered"> <div class="sitename">
<a class="site-title title is-3" href="{{ path('<front>') }}" title="{{ 'Home'|t }}" rel="home"> <a class="site-title title is-3" href="{{ path('<front>') }}" title="{{ 'Home'|t }}" rel="home">
<span class="green">Grassroots <span class="green">Grassroots
Economic</span> Economic</span>
<span class="yellow">Organizing</span></a> <span class="yellow">Organizing</span></a>
</div> </div>
</div>

View file

@ -58,7 +58,7 @@
%} %}
{% endif %} {% endif %}
{% if item.url|render == '/search' %} {% if item.url|render == '/search' %}
{% set item_classes = item_classes|merge(['is-hidden-tablet']) %} {% set item_classes = item_classes|merge(['is-hidden-desktop search-icon']) %}
{% endif %} {% endif %}
{% endif %} {% endif %}
{{ link( {{ link(

View file

@ -16,17 +16,17 @@
%} %}
{% endif %} {% endif %}
{% block navbar %} {% block navbar %}
{# We put everything in Bulma columns so must do navbar in header block #} {# We put everything in Bulma columns so must do navbar in header block, not here #}
{% endblock navbar %} {% endblock navbar %}
{% block header %} {% block header %}
<div class="header columns is-mobile is-multiline is-marginless"> <div class="header columns is-marginless">
{% block navbar_branding %} {% block navbar_branding %}
{{ page.navbar_branding }} {{ page.navbar_branding }}
{% endblock navbar_branding %} {% endblock navbar_branding %}
<nav class="navigation column"> <nav class="navigation column">
<div class="columns"> <div class="columns">
{% if page.header_search %} {% if page.header_search %}
<div class="search-bar column has-text-right is-hidden-mobile"> <div class="search-bar column has-text-right">
{{ page.header_search }} {{ page.header_search }}
</div> </div>
{% endif %} {% endif %}
@ -39,7 +39,7 @@
{% endblock navbar_social %} {% endblock navbar_social %}
{% block primary_menu %} {% block primary_menu %}
{% if page.primary_menu %} {% if page.primary_menu %}
<div class="column is-narrow"> <div class="column">
{{ page.primary_menu }} {{ page.primary_menu }}
</div> </div>
{% endif %} {% endif %}
@ -47,11 +47,13 @@
</div> </div>
</nav> </nav>
</div> </div>
{% if is_front %}
<div class="columns"> <div class="columns">
<div class="column has-text-centered"> <div class="column has-text-centered">
<p class="slogan"><strong class="title">{{ site_slogan }}</strong></p> <p class="slogan"><strong class="title">{{ site_slogan }}</strong></p>
</div> </div>
</div> </div>
{% endif %}
{{ page.highlighted }} {{ page.highlighted }}
{{ page.help }} {{ page.help }}
{% block tabs %} {% block tabs %}