[openstreetmap/openstreetmap-website] More padding for menu items on mobile devices (PR #6730)
Marwin Hochfelsner
notifications at github.com
Mon Feb 2 00:58:41 UTC 2026
@hlfan commented on this pull request.
> <% if Settings.status != "database_offline" && can?(:index, Issue) %>
- <li class="nav-item">
+ <li class="nav-item pb-2 pb-md-0">
<%= link_to issues_path(:status => "open"), :class => header_nav_link_class(issues_path) do %>
<%= t("layouts.issues") %>
<%= open_issues_count %>
<% end -%>
</li>
<% end %>
- <li class="nav-item">
+ <li class="nav-item pb-2 pb-md-0">
<%= link_to t("layouts.history"), history_path, :class => header_nav_link_class(history_path) %>
</li>
- <li class="nav-item">
+ <li class="nav-item pb-2 pb-md-0">
<%= link_to t("layouts.export"), export_path, :class => header_nav_link_class(export_path) %>
</li>
- <li class="nav-item">
+ <li class="nav-item pb-2 pb-md-0">
<%= link_to t("layouts.gps_traces"), traces_path, :class => header_nav_link_class(traces_path) %>
</li>
- <li class="nav-item">
+ <li class="nav-item pb-2 pb-md-0">
<%= link_to t("layouts.user_diaries"), diary_entries_path, :class => header_nav_link_class(diary_entries_path) %>
</li>
- <li class="nav-item">
+ <li class="nav-item pb-2 pb-md-0">
<%= link_to t("layouts.communities"), communities_path, :class => header_nav_link_class(communities_path) %>
</li>
- <li class="nav-item">
+ <li class="nav-item pb-2 pb-md-0">
<%= link_to t("layouts.copyright"), copyright_path, :class => header_nav_link_class(copyright_path) %>
</li>
- <li class="nav-item">
+ <li class="nav-item pb-2 pb-md-0">
<%= link_to t("layouts.help"), help_path, :class => header_nav_link_class(help_path) %>
</li>
- <li class="nav-item">
+ <li class="nav-item pb-2 pb-md-0">
<%= link_to t("layouts.about"), about_path, :class => header_nav_link_class(about_path) %>
</li>
> There's already a helper there used to generate the class on the link element but maybe the helper should generate the whole li element and it's link?
I don't like the repetition either; there may be a less roundabout way to do that, though. Perhaps something similar to this:
```suggestion
<% secondary_nav_items = [
[history_path, t("layouts.history")],
[export_path, t("layouts.export")],
[traces_path, t("layouts.gps_traces")],
[diary_entries_path, t("layouts.user_diaries")],
[communities_path, t("layouts.communities")],
[copyright_path, t("layouts.copyright")],
[help_path, t("layouts.help")],
[about_path, t("layouts.about")]
]
secondary_nav_items.prepend([
issues_path(:status => "open"),
safe_join([t("layouts.issues"), open_issues_count], " ")
]) if Settings.status != "database_offline" && can?(:index, Issue)
secondary_nav_items.each do |path, label| %>
<li class="nav-item pb-2 pb-md-0">
<%= link_to label, path, :class => ["nav-link", "px-1", "py-0", current_page?(path) ? "active text-secondary-emphasis" : "text-secondary"] %>
</li>
<% end %>
```
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/6730#pullrequestreview-3736934262
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/pull/6730/review/3736934262 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20260201/1caf4dcf/attachment.htm>
More information about the rails-dev
mailing list