]> git.openstreetmap.org Git - rails.git/commitdiff
Merge remote-tracking branch 'upstream/pull/4663'
authorTom Hughes <tom@compton.nu>
Wed, 10 Apr 2024 17:28:13 +0000 (18:28 +0100)
committerTom Hughes <tom@compton.nu>
Wed, 10 Apr 2024 17:28:13 +0000 (18:28 +0100)
15 files changed:
Gemfile.lock
app/assets/images/avatar.svg [new file with mode: 0644]
app/assets/images/avatars.svg [deleted file]
app/assets/javascripts/leaflet.layers.js
app/assets/stylesheets/common.scss
app/helpers/application_helper.rb
app/helpers/user_helper.rb
app/views/layouts/_header.html.erb
app/views/layouts/_search.html.erb
app/views/site/about.html.erb
app/views/site/export.html.erb
app/views/user_blocks/_navigation.html.erb
config/locales/en.yml
test/helpers/application_helper_test.rb
test/helpers/user_helper_test.rb

index 00bf5384b81e9fa09bc127cac1e478f5d521e2eb..f3e39e829b05a57e1749b4075761c3ee43f0e535 100644 (file)
@@ -95,7 +95,7 @@ GEM
     autoprefixer-rails (10.4.16.0)
       execjs (~> 2)
     aws-eventstream (1.3.0)
-    aws-partitions (1.909.0)
+    aws-partitions (1.910.0)
     aws-sdk-core (3.191.6)
       aws-eventstream (~> 1, >= 1.3.0)
       aws-partitions (~> 1, >= 1.651.0)
@@ -475,7 +475,7 @@ GEM
     rdoc (6.6.3.1)
       psych (>= 4.0.0)
     regexp_parser (2.9.0)
-    reline (0.5.0)
+    reline (0.5.1)
       io-console (~> 0.5)
     request_store (1.6.0)
       rack (>= 1.4)
@@ -485,7 +485,7 @@ GEM
     rouge (4.2.1)
     rtlcss (0.2.1)
       mini_racer (>= 0.6.3)
-    rubocop (1.62.1)
+    rubocop (1.63.0)
       json (~> 2.3)
       language_server-protocol (>= 3.17.0)
       parallel (~> 1.10)
diff --git a/app/assets/images/avatar.svg b/app/assets/images/avatar.svg
new file mode 100644 (file)
index 0000000..46d761b
--- /dev/null
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100">
+  <path
+    d="m 50,11 c -8,0 -12,5 -14,9 -2,4 -2,13 -1,19 0.98639,5.918364 3.9723,8.164584 5,12 0,0 0,3 0,4 l -14,3 c -9.47814,2.03103 -13.23303,8.02944 -14,18 l -1,13 78,0 -1,-13 c -0.76697,-9.97056 -4.40411,-16.62916 -14,-18 L 60,55 l -0,-4 c 0,-4 4.01361,-6.081636 5,-12 1,-6 1,-15 -1,-19 -2.0728,-4.145608 -6,-9 -14,-9 z"
+    fill="#dadaff" />
+</svg>
diff --git a/app/assets/images/avatars.svg b/app/assets/images/avatars.svg
deleted file mode 100644 (file)
index 85288b2..0000000
+++ /dev/null
@@ -1,182 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!-- Created with Inkscape (http://www.inkscape.org/) -->
-
-<svg
-   xmlns:dc="http://purl.org/dc/elements/1.1/"
-   xmlns:cc="http://creativecommons.org/ns#"
-   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
-   xmlns:svg="http://www.w3.org/2000/svg"
-   xmlns="http://www.w3.org/2000/svg"
-   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
-   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
-   id="svg54671"
-   version="1.1"
-   inkscape:version="0.48.2 r9819"
-   width="99.999969"
-   height="155"
-   sodipodi:docname="new-user-icon.svg">
-  <metadata
-     id="metadata54677">
-    <rdf:RDF>
-      <cc:Work
-         rdf:about="">
-        <dc:format>image/svg+xml</dc:format>
-        <dc:type
-           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
-        <dc:title />
-      </cc:Work>
-    </rdf:RDF>
-  </metadata>
-  <defs
-     id="defs54675">
-    <clipPath
-       clipPathUnits="userSpaceOnUse"
-       id="clipPath55579">
-      <rect
-         y="701"
-         x="157"
-         height="23.000002"
-         width="49.999985"
-         id="rect55581"
-         style="color:#000000;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" />
-    </clipPath>
-  </defs>
-  <sodipodi:namedview
-     pagecolor="#ffffff"
-     bordercolor="#666666"
-     borderopacity="1"
-     objecttolerance="10"
-     gridtolerance="10"
-     guidetolerance="10"
-     inkscape:pageopacity="0"
-     inkscape:pageshadow="2"
-     inkscape:window-width="1280"
-     inkscape:window-height="756"
-     id="namedview54673"
-     showgrid="true"
-     inkscape:zoom="4.3320463"
-     inkscape:cx="28.49301"
-     inkscape:cy="111.46394"
-     inkscape:window-x="11"
-     inkscape:window-y="0"
-     inkscape:window-maximized="0"
-     inkscape:current-layer="svg54671"
-     inkscape:object-nodes="true"
-     inkscape:object-paths="true"
-     showguides="false"
-     inkscape:guide-bbox="true"
-     fit-margin-top="0"
-     fit-margin-left="0"
-     fit-margin-right="0"
-     fit-margin-bottom="0">
-    <inkscape:grid
-       type="xygrid"
-       id="grid54700"
-       empspacing="5"
-       visible="true"
-       enabled="true"
-       snapvisiblegridlinesonly="true" />
-    <sodipodi:guide
-       orientation="1,0"
-       position="1000,117.39694"
-       id="guide54708" />
-    <sodipodi:guide
-       orientation="1,0"
-       position="830,101"
-       id="guide55315" />
-    <sodipodi:guide
-       orientation="1,0"
-       position="815,99.000004"
-       id="guide55317" />
-    <sodipodi:guide
-       orientation="1,0"
-       position="845,99.000004"
-       id="guide55319" />
-    <sodipodi:guide
-       orientation="0,1"
-       position="832,88.000004"
-       id="guide55321" />
-    <sodipodi:guide
-       orientation="1,0"
-       position="805,67.000004"
-       id="guide55323" />
-    <sodipodi:guide
-       orientation="1,0"
-       position="855,73.000004"
-       id="guide55325" />
-    <sodipodi:guide
-       orientation="1,0"
-       position="990,95.000004"
-       id="guide55476" />
-    <sodipodi:guide
-       orientation="1,0"
-       position="1020,73.000004"
-       id="guide55478" />
-    <sodipodi:guide
-       orientation="1,0"
-       position="970,74.000004"
-       id="guide55480" />
-    <sodipodi:guide
-       orientation="1,0"
-       position="1030,76.000004"
-       id="guide55482" />
-    <sodipodi:guide
-       orientation="0,1"
-       position="978,45.000004"
-       id="guide55484" />
-    <sodipodi:guide
-       orientation="1,0"
-       position="960,64.000004"
-       id="guide55486" />
-    <sodipodi:guide
-       orientation="1,0"
-       position="1040,63.000004"
-       id="guide55488" />
-    <sodipodi:guide
-       orientation="1,0"
-       position="980,81.000004"
-       id="guide55490" />
-    <sodipodi:guide
-       orientation="1,0"
-       position="1010,92.518344"
-       id="guide55492" />
-  </sodipodi:namedview>
-  <g
-     id="g55329"
-     transform="translate(-785,-42)">
-    <rect
-       y="42"
-       x="785"
-       height="100.00001"
-       width="99.999969"
-       id="rect54702"
-       style="color:#000000;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" />
-    <path
-       sodipodi:nodetypes="sssscssccsscssss"
-       inkscape:connector-curvature="0"
-       id="path54704"
-       d="m 834.99998,53.000004 c -8,0 -12,5 -14,9 -2,4 -2,13 -1,19 0.98639,5.918364 3.9723,8.164584 5,12 0,0 0,3 0,4 l -14,2.999996 c -9.47814,2.03103 -13.23303,8.02944 -14,18 l -1,13 78,0 -1,-13 c -0.76697,-9.97056 -4.40411,-16.62916 -14,-18 L 845,97 l -2e-5,-3.999996 c -2e-5,-4.000002 4.01361,-6.081636 5,-12 1,-6 1,-15 -1,-19 -2.0728,-4.145608 -6,-9 -14,-9 z"
-       style="color:#000000;fill:#dadaff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" />
-  </g>
-  <g
-     id="g3048"
-     transform="translate(-157,-258)">
-    <g
-       transform="matrix(0.5,0,0,0.5,-236.5,342)"
-       id="g55329-6">
-      <rect
-         style="color:#000000;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
-         id="rect54702-3"
-         width="99.999969"
-         height="100.00001"
-         x="787"
-         y="42" />
-    </g>
-    <path
-       style="color:#000000;fill:#dadaff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
-       d="m 181.99999,368.5 c -4,0 -6.5,2.5 -7.5,4.5 -1,2 -1,7 -0.5,10 0.4932,2.95918 2,3.43845 2,5.5 0,0.5 0,1 0,1.5 0,0.4714 -1,1 -1,1 l -5,1.5 c -4.64225,1.39267 -6.58477,4.01726 -7,9 l -0.5,6 39,0 -0.5,-6 c -0.41523,-4.98274 -2.35775,-7.60733 -7,-9 l -5,-1.5 c 0,0 -1,-0.5286 -1,-1 0,-0.5 0,-1 0,-1.5 0,-2 1.5068,-2.54082 2,-5.5 0.5,-3 0.5,-8 -0.5,-10 -1.0364,-2.07281 -3.5,-4.5 -7.5,-4.5 z"
-       id="path54704-4"
-       inkscape:connector-curvature="0"
-       sodipodi:nodetypes="ssssscssccsscsssss" />
-  </g>
-</svg>
index 27311f7c1441c3d22acde08cbcc526702b0e7e4e..b78ac6e0742b76830b9e6ef6f3e2e72196b57150 100644 (file)
@@ -5,26 +5,30 @@ L.OSM.layers = function (options) {
     var layers = options.layers;
 
     var baseSection = $("<div>")
-      .attr("class", "section base-layers")
+      .attr("class", "section base-layers d-grid gap-3")
       .appendTo($ui);
 
-    var baseLayers = $("<ul class='list-unstyled mb-0'>")
-      .appendTo(baseSection);
+    layers.forEach(function (layer, i) {
+      var id = "map-ui-layer-" + i;
 
-    layers.forEach(function (layer) {
-      var item = $("<li>")
-        .attr("class", "rounded-3")
-        .appendTo(baseLayers);
+      var buttonContainer = $("<div class='position-relative'>")
+        .appendTo(baseSection);
 
-      if (map.hasLayer(layer)) {
-        item.addClass("active");
-      }
+      var mapContainer = $("<div class='position-absolute top-0 start-0 bottom-0 end-0 z-0'>")
+        .appendTo(buttonContainer);
 
-      var div = $("<div>")
-        .appendTo(item);
+      var input = $("<input type='radio' class='btn-check' name='layer'>")
+        .prop("id", id)
+        .prop("checked", map.hasLayer(layer))
+        .appendTo(buttonContainer);
+
+      var item = $("<label class='btn btn-outline-primary border-4 rounded-3 bg-transparent position-absolute top-0 start-0 bottom-0 end-0 m-n1 overflow-hidden'>")
+        .prop("for", id)
+        .append($("<span class='badge position-absolute top-0 start-0 rounded-top-0 rounded-start-0 py-1 px-2 bg-body bg-opacity-75 text-body text-wrap text-start fs-6 lh-base'>").append(layer.options.name))
+        .appendTo(buttonContainer);
 
       map.whenReady(function () {
-        var miniMap = L.map(div[0], { attributionControl: false, zoomControl: false, keyboard: false })
+        var miniMap = L.map(mapContainer[0], { attributionControl: false, zoomControl: false, keyboard: false })
           .addLayer(new layer.constructor({ apikey: layer.options.apikey }));
 
         miniMap.dragging.disable();
@@ -55,17 +59,7 @@ L.OSM.layers = function (options) {
         }
       });
 
-      var label = $("<label>")
-        .appendTo(item);
-
-      var input = $("<input>")
-        .attr("type", "radio")
-        .prop("checked", map.hasLayer(layer))
-        .appendTo(label);
-
-      label.append(layer.options.name);
-
-      item.on("click", function () {
+      input.on("click", function () {
         layers.forEach(function (other) {
           if (other === layer) {
             map.addLayer(other);
@@ -79,7 +73,6 @@ L.OSM.layers = function (options) {
       item.on("dblclick", toggle);
 
       map.on("layeradd layerremove", function () {
-        item.toggleClass("active", map.hasLayer(layer));
         input.prop("checked", map.hasLayer(layer));
       });
     });
index a6b9a32de3a2f416c76ba428e93df262242e3ee3..3e22052a220ac36ccfa5a16810de6dcf34f62441 100644 (file)
@@ -150,11 +150,6 @@ nav.primary {
 nav.secondary {
   .nav-link {
     padding: 0.2rem;
-    color: $darkgrey;
-  }
-
-  > ul li.current a {
-    color: darken($darkgrey, 25%);
   }
 
   #inboxanchor {
@@ -382,7 +377,6 @@ body.small-nav {
     float: right;
     width: 250px;
     height: 100%;
-    background: white;
     overflow: auto;
 
     .section {
@@ -424,43 +418,14 @@ body.small-nav {
 }
 
 .layers-ui {
-  .base-layers {
-    .leaflet-container {
-      width: 100%;
-      height: 50px;
-      cursor: pointer;
-    }
-
-    li  {
-      overflow: hidden;
-      border-radius: 3px;
-      border: 2px solid #fff;
-      margin-bottom: 8px;
-      position: relative;
-      transition: border-color 0.08s ease-in;
-
-      label {
-        position: absolute;
-        top: 0;
-        left: 0;
-        padding: 2px 6px;
-        border-bottom-right-radius: 3px;
-        cursor: pointer;
-        font-weight: 600;
-        font-size: 16px;
-        text-stroke: 2px #fff;
-        background: rgba(255,255,255,.9);
-        z-index: 1000;
-        input[type="radio"] {
-          display: none;
-        }
-      }
+  .base-layers > * {
+    height: 56px;
 
-      &.active { border-color: darken($green, 10%); }
-      &:hover {
-        border-color: $grey;
-        &.active { border-color: darken($green, 20%); }
-      }
+    > .btn {
+      --bs-btn-border-color: var(--bs-body-bg);
+    }
+    > .btn:hover {
+      --bs-btn-border-color: var(--bs-primary-border-subtle);
     }
   }
 
@@ -697,18 +662,15 @@ tr.turn:hover {
   }
 
   .export_boxy {
-    background: $lightgrey;
-
-    #maxlat { margin-top: -1px; }
+    > * {
+        margin: -1px;
+    }
     #minlon {
-      float: left;
-      /*rtl:ignore*/ margin-left: -1px;
+      /*rtl:ignore*/ float: left;
     }
     #maxlon {
-      float: right;
-      /*rtl:ignore*/ margin-right: -1px;
+      /*rtl:ignore*/ float: right;
     }
-    #minlat { margin-bottom: -1px; }
   }
 }
 
@@ -853,8 +815,6 @@ tr.turn:hover {
 }
 
 .search_form {
-  background-color: $lightgrey;
-
   #query {
     z-index: 0;
   }
@@ -864,10 +824,6 @@ tr.turn:hover {
   }
 }
 
-.directions_form {
-  background-color: $lightgrey;
-}
-
 /* Rules for user images */
 
 img.user_image {
@@ -919,12 +875,12 @@ div.secondary-actions {
 .richtext,
 .prose {
   code {
-    background: $lightgrey;
+    background: var(--bs-secondary-bg);
     padding: 2px 3px;
   }
 
   pre {
-    background: $lightgrey;
+    background: var(--bs-secondary-bg);
     padding: 2px 3px;
     white-space: pre-wrap;
 
@@ -935,17 +891,17 @@ div.secondary-actions {
 
   img {
     padding: $lineheight;
-    background-color: $offwhite;
+    background-color: var(--bs-tertiary-bg);
     display: block;
     max-width: 100%;
     margin: auto;
   }
 
   blockquote {
-    border-left: $lineheight solid $offwhite;
+    border-left: $lineheight solid var(--bs-tertiary-bg);
     padding-left: $lineheight;
     margin: 0;
-    color: $darkgrey;
+    color: var(--bs-secondary-color);
   }
 }
 
@@ -1002,8 +958,6 @@ div.secondary-actions {
 }
 
 .site-about #content {
-  background-color: $lightgrey;
-
   .content-inner {
     max-width: 760px;
   }
index 17c36bdfe043066b81c518c9602546f3013af212..368668a9bbf4fbb5c82637595ab0a09560032d56 100644 (file)
@@ -41,8 +41,8 @@ module ApplicationHelper
     end
   end
 
-  def current_page_class(path)
-    :current if current_page?(path)
+  def header_nav_link_class(path)
+    ["nav-link", current_page?(path) ? "text-secondary-emphasis" : "text-secondary"]
   end
 
   def application_data
index cf2d40da565d68caec258ae063135500aa4ea58a..19bb8e0d6fb2d9da218c3cd3e67d17cfcec3319d 100644 (file)
@@ -2,7 +2,7 @@ module UserHelper
   # User images
 
   def user_image(user, options = {})
-    options[:class] ||= "user_image border border-secondary-subtle"
+    options[:class] ||= "user_image border border-secondary-subtle bg-body"
     options[:alt] ||= ""
 
     if user.image_use_gravatar
@@ -10,12 +10,12 @@ module UserHelper
     elsif user.avatar.attached?
       user_avatar_variant_tag(user, { :resize_to_limit => [100, 100] }, options)
     else
-      image_tag "avatar_large.png", options.merge(:width => 100, :height => 100)
+      image_tag "avatar.svg", options.merge(:width => 100, :height => 100)
     end
   end
 
   def user_thumbnail(user, options = {})
-    options[:class] ||= "user_thumbnail border border-secondary-subtle"
+    options[:class] ||= "user_thumbnail border border-secondary-subtle bg-body"
     options[:alt] ||= ""
 
     if user.image_use_gravatar
@@ -23,12 +23,12 @@ module UserHelper
     elsif user.avatar.attached?
       user_avatar_variant_tag(user, { :resize_to_limit => [50, 50] }, options)
     else
-      image_tag "avatar_small.png", options.merge(:width => 50, :height => 50)
+      image_tag "avatar.svg", options.merge(:width => 50, :height => 50)
     end
   end
 
   def user_thumbnail_tiny(user, options = {})
-    options[:class] ||= "user_thumbnail_tiny border border-secondary-subtle"
+    options[:class] ||= "user_thumbnail_tiny border border-secondary-subtle bg-body"
     options[:alt] ||= ""
 
     if user.image_use_gravatar
@@ -36,7 +36,7 @@ module UserHelper
     elsif user.avatar.attached?
       user_avatar_variant_tag(user, { :resize_to_limit => [50, 50] }, options)
     else
-      image_tag "avatar_small.png", options.merge(:width => 50, :height => 50)
+      image_tag "avatar.svg", options.merge(:width => 50, :height => 50)
     end
   end
 
@@ -46,7 +46,7 @@ module UserHelper
     elsif user.avatar.attached?
       polymorphic_url(user_avatar_variant(user, :resize_to_limit => [100, 100]), :host => Settings.server_url)
     else
-      image_url("avatar_large.png")
+      image_url("avatar.svg")
     end
   end
 
index 0fafc3c7f25ad9b23fd9b1b20ab0a8d2c148d49f..13a4aa65e99ffa3eb1d2f8e88bdab3cc392750aa 100644 (file)
   <nav class='secondary'>
     <ul class='mx-1 px-0'>
       <% if Settings.status != "database_offline" && can?(:index, Issue) %>
-        <li class="compact-hide nav-item <%= current_page_class(issues_path) %>">
-          <%= link_to issues_path(:status => "open"), :class => "nav-link" do %>
+        <li class="compact-hide nav-item">
+          <%= 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="compact-hide nav-item <%= current_page_class(traces_path) %>">
-        <%= link_to t("layouts.gps_traces"), traces_path, :class => "nav-link" %>
+      <li class="compact-hide nav-item">
+        <%= link_to t("layouts.gps_traces"), traces_path, :class => header_nav_link_class(traces_path) %>
       </li>
-      <li class="compact-hide nav-item <%= current_page_class(diary_entries_path) %>">
-        <%= link_to t("layouts.user_diaries"), diary_entries_path, :class => "nav-link" %>
+      <li class="compact-hide nav-item">
+        <%= link_to t("layouts.user_diaries"), diary_entries_path, :class => header_nav_link_class(diary_entries_path) %>
       </li>
-      <li class="compact-hide nav-item <%= current_page_class(communities_path) %>">
-        <%= link_to t("layouts.communities"), communities_path, :class => "nav-link" %>
+      <li class="compact-hide nav-item">
+        <%= link_to t("layouts.communities"), communities_path, :class => header_nav_link_class(communities_path) %>
       </li>
-      <li class="compact-hide nav-item <%= current_page_class(copyright_path) %>">
-        <%= link_to t("layouts.copyright"), copyright_path, :class => "nav-link" %>
+      <li class="compact-hide nav-item">
+        <%= link_to t("layouts.copyright"), copyright_path, :class => header_nav_link_class(copyright_path) %>
       </li>
-      <li class="compact-hide nav-item <%= current_page_class(help_path) %>">
-        <%= link_to t("layouts.help"), help_path, :class => "nav-link" %>
+      <li class="compact-hide nav-item">
+        <%= link_to t("layouts.help"), help_path, :class => header_nav_link_class(help_path) %>
       </li>
-      <li class="compact-hide nav-item <%= current_page_class(about_path) %>">
-        <%= link_to t("layouts.about"), about_path, :class => "nav-link" %>
+      <li class="compact-hide nav-item">
+        <%= link_to t("layouts.about"), about_path, :class => header_nav_link_class(about_path) %>
       </li>
       <li id="compact-secondary-nav" class="dropdown nav-item">
         <button class="dropdown-toggle nav-link btn btn-outline-secondary border-0 bg-white text-secondary" type="button" data-bs-toggle="dropdown"><%= t "layouts.more" %></button>
         <ul class="dropdown-menu">
           <% if Settings.status != "database_offline" && can?(:index, Issue) %>
-            <li class="<%= current_page_class(issues_path) %>">
+            <li>
               <%= link_to issues_path(:status => "open"), :class => "dropdown-item" do %>
                 <%= t("layouts.issues") %>
                 <%= open_issues_count %>
               <% end -%>
             </li>
           <% end %>
-          <li class="<%= current_page_class(traces_path) %>"><%= link_to t("layouts.gps_traces"), traces_path, :class => "dropdown-item" %></li>
-          <li class="<%= current_page_class(diary_entries_path) %>"><%= link_to t("layouts.user_diaries"), diary_entries_path, :class => "dropdown-item" %></li>
-          <li class="<%= current_page_class(communities_path) %>"><%= link_to t("layouts.communities"), communities_path, :class => "dropdown-item" %></li>
-          <li class="<%= current_page_class(copyright_path) %>"><%= link_to t("layouts.copyright"), copyright_path, :class => "dropdown-item" %></li>
-          <li class="<%= current_page_class(help_path) %>"><%= link_to t("layouts.help"), help_path, :class => "dropdown-item" %></li>
-          <li class="<%= current_page_class(about_path) %>"><%= link_to t("layouts.about"), about_path, :class => "dropdown-item" %></li>
+          <li><%= link_to t("layouts.gps_traces"), traces_path, :class => "dropdown-item" %></li>
+          <li><%= link_to t("layouts.user_diaries"), diary_entries_path, :class => "dropdown-item" %></li>
+          <li><%= link_to t("layouts.communities"), communities_path, :class => "dropdown-item" %></li>
+          <li><%= link_to t("layouts.copyright"), copyright_path, :class => "dropdown-item" %></li>
+          <li><%= link_to t("layouts.help"), help_path, :class => "dropdown-item" %></li>
+          <li><%= link_to t("layouts.about"), about_path, :class => "dropdown-item" %></li>
         </ul>
       </li>
     </ul>
     <% if current_user && current_user.id %>
       <div class='d-inline-flex dropdown user-menu logged-in'>
         <button class='dropdown-toggle btn btn-outline-secondary border-secondary-subtle bg-white text-secondary px-2 py-1 flex-grow-1' type='button' data-bs-toggle='dropdown'>
-          <%= user_thumbnail_tiny(current_user, :width => 25, :height => 25, :class => "user_thumbnail_tiny rounded-1") %>
+          <%= user_thumbnail_tiny(current_user, :width => 25, :height => 25, :class => "user_thumbnail_tiny rounded-1 bg-body") %>
           <%= render :partial => "layouts/inbox" %>
           <span class="user-button">
             <span class='username'>
index 397fdb8289b16fe3b4249d47ae787c4806685af3..c7939aa01c955975688a24a7b37ed851bfbbf83d 100644 (file)
@@ -1,5 +1,5 @@
 <div class="search_forms">
-  <form method="GET" action="<%= search_path %>" class="search_form px-1 py-2">
+  <form method="GET" action="<%= search_path %>" class="search_form bg-body-secondary px-1 py-2">
     <div class="row gx-2 mx-0">
       <div class="col">
         <div class="input-group flex-nowrap">
@@ -16,7 +16,7 @@
     </div>
   </form>
 
-  <form method="GET" action="<%= directions_path %>" class="directions_form pb-3">
+  <form method="GET" action="<%= directions_path %>" class="directions_form bg-body-secondary pb-3">
     <div class="d-flex flex-row-reverse px-3 py-3"><button type="button" class="btn-close" aria-label="<%= t("javascripts.close") %>"></button></div>
 
     <div class="row gx-2 m-1">
index 619094e567127bbbb3ff6fc5989ffa933c5bce7f..7dbed1514839add65c39a04f2e47a0d4c3b15ce1 100644 (file)
@@ -1,3 +1,4 @@
+<% content_for(:content_class) { "bg-body-secondary" } %>
 <% I18n.with_locale @locale do %>
   <%= tag.div :lang => @locale, :dir => t("html.dir") do %>
     <div class="container-lg attr">
         </div>
       </div>
       <div class='row'>
-        <div class="px-5 py-4 bg-dark">
+        <div class="px-5 py-4 bg-black bg-opacity-75">
           <h1 class="text-white fw-light"><%= t ".used_by_html", :name => tag.span("OpenStreetMap", :class => "user-name") %></h1>
         </div>
       </div>
     </div>
 
-    <div class='bg-white px-5 py-4'>
+    <div class='bg-body px-5 py-4'>
       <p class="lead"><%= t ".lede_text" %></p>
 
       <%= render :layout => "about_section", :locals => { :icon => "local", :title => "local_knowledge" } do %>
index 3bc62883f8427751890fa9535d2f9d81610caf9c..9b9499e6586f4f117a7bc760a49741f3c0640bdf 100644 (file)
@@ -6,7 +6,7 @@
   <%= hidden_field_tag "format", "osm", :autocomplete => "off" %>
 
   <div class='export_area_inputs'>
-    <div class='export_boxy border border-secondary-subtle rounded'>
+    <div class='export_boxy border border-secondary-subtle rounded bg-body-secondary'>
       <%= text_field_tag("maxlat", nil, :size => 10, :autocomplete => "off", :class => "export_bound form-control mx-auto") %>
       <div class="clearfix">
         <%= text_field_tag("minlon", nil, :size => 10, :autocomplete => "off", :class => "export_bound form-control my-2") %>
index a84ba133985c0b4331f339f669f1fc9296358547..f53f5cf2806bfc022e10ffed06518095c0fdcf6f 100644 (file)
                   :class => ["nav-link", { :active => action_name == "blocks_by" }] %>
     </li>
   <% end %>
+  <% if @user_block %>
+    <li class="nav-item">
+      <%= link_to t(".block", :id => @user_block.id),
+                  user_block_path(@user_block),
+                  :class => ["nav-link", { :active => action_name == "show" }] %>
+    </li>
+  <% end %>
 </ul>
index 0634fc2a0d1f52b1000462318c6bf42b0620d422..f9117ca1cc89add7669440805fbb59138644c7b0 100644 (file)
@@ -2991,6 +2991,7 @@ en:
       blocks_on_user: "Blocks on %{user}"
       blocks_by_me: "Blocks by Me"
       blocks_by_user: "Blocks by %{user}"
+      block: "Block #%{id}"
   user_mutes:
     index:
       title: "Muted Users"
index 34120e2078781ad732e69e5664a2e5324093157a..a905090dba6133a8c20908f8ee308a6fbb817015 100644 (file)
@@ -91,5 +91,5 @@ class ApplicationHelperTest < ActionView::TestCase
 
   def test_body_class; end
 
-  def test_current_page_class; end
+  def test_header_nav_link_class; end
 end
index e728877989e92e7798690da5352e3cb8256c94b8..f7d2726dbf96667654b6eb89bbad377a8476b088 100644 (file)
@@ -8,12 +8,12 @@ class UserHelperTest < ActionView::TestCase
     gravatar_user = create(:user, :image_use_gravatar => true)
 
     image = user_image(user)
-    assert_match %r{^<img class="user_image border border-secondary-subtle" .* src="/images/avatar_large.png" />$}, image
+    assert_match %r{^<img class="user_image border border-secondary-subtle bg-body" .* src="/images/avatar.svg" />$}, image
 
     image = user_image(user, :class => "foo")
-    assert_match %r{^<img class="foo" .* src="/images/avatar_large.png" />$}, image
+    assert_match %r{^<img class="foo" .* src="/images/avatar.svg" />$}, image
     image = user_image(gravatar_user)
-    assert_match %r{^<img class="user_image border border-secondary-subtle" .* src="http://www.gravatar.com/avatar/.*" />$}, image
+    assert_match %r{^<img class="user_image border border-secondary-subtle bg-body" .* src="http://www.gravatar.com/avatar/.*" />$}, image
 
     image = user_image(gravatar_user, :class => "foo")
     assert_match %r{^<img class="foo" .* src="http://www.gravatar.com/avatar/.*" />$}, image
@@ -24,13 +24,13 @@ class UserHelperTest < ActionView::TestCase
     gravatar_user = create(:user, :image_use_gravatar => true)
 
     image = user_thumbnail(user)
-    assert_match %r{^<img class="user_thumbnail border border-secondary-subtle" .* src="/images/avatar_small.png" />$}, image
+    assert_match %r{^<img class="user_thumbnail border border-secondary-subtle bg-body" .* src="/images/avatar.svg" />$}, image
 
     image = user_thumbnail(user, :class => "foo")
-    assert_match %r{^<img class="foo" .* src="/images/avatar_small.png" />$}, image
+    assert_match %r{^<img class="foo" .* src="/images/avatar.svg" />$}, image
 
     image = user_thumbnail(gravatar_user)
-    assert_match %r{^<img class="user_thumbnail border border-secondary-subtle" .* src="http://www.gravatar.com/avatar/.*" />$}, image
+    assert_match %r{^<img class="user_thumbnail border border-secondary-subtle bg-body" .* src="http://www.gravatar.com/avatar/.*" />$}, image
 
     image = user_thumbnail(gravatar_user, :class => "foo")
     assert_match %r{^<img class="foo" .* src="http://www.gravatar.com/avatar/.*" />$}, image
@@ -41,13 +41,13 @@ class UserHelperTest < ActionView::TestCase
     gravatar_user = create(:user, :image_use_gravatar => true)
 
     image = user_thumbnail_tiny(user)
-    assert_match %r{^<img class="user_thumbnail_tiny border border-secondary-subtle" .* src="/images/avatar_small.png" />$}, image
+    assert_match %r{^<img class="user_thumbnail_tiny border border-secondary-subtle bg-body" .* src="/images/avatar.svg" />$}, image
 
     image = user_thumbnail_tiny(user, :class => "foo")
-    assert_match %r{^<img class="foo" .* src="/images/avatar_small.png" />$}, image
+    assert_match %r{^<img class="foo" .* src="/images/avatar.svg" />$}, image
 
     image = user_thumbnail_tiny(gravatar_user)
-    assert_match %r{^<img class="user_thumbnail_tiny border border-secondary-subtle" .* src="http://www.gravatar.com/avatar/.*" />$}, image
+    assert_match %r{^<img class="user_thumbnail_tiny border border-secondary-subtle bg-body" .* src="http://www.gravatar.com/avatar/.*" />$}, image
 
     image = user_thumbnail_tiny(gravatar_user, :class => "foo")
     assert_match %r{^<img class="foo" .* src="http://www.gravatar.com/avatar/.*" />$}, image