Use standard padding size for map-ui sidebar

The previous padding didn't match the main sidebar, and also used
sass division as part of the calculation.
This commit is contained in:
Andy Allan 2023-09-06 16:29:47 +01:00
parent 6fc0f764d5
commit c162a9660e
4 changed files with 4 additions and 11 deletions

View file

@ -8,7 +8,7 @@ L.OSM.layers = function (options) {
.attr("class", "section base-layers") .attr("class", "section base-layers")
.appendTo($ui); .appendTo($ui);
var baseLayers = $("<ul class='list-unstyled'>") var baseLayers = $("<ul class='list-unstyled mb-0'>")
.appendTo(baseSection); .appendTo(baseSection);
layers.forEach(function (layer) { layers.forEach(function (layer) {

View file

@ -20,7 +20,7 @@ L.OSM.sidebarPane = function (options, uiClass, buttonTitle, paneTitle) {
var $ui = $("<div>") var $ui = $("<div>")
.attr("class", uiClass + "-ui"); .attr("class", uiClass + "-ui");
$("<div class='sidebar_heading d-flex'>") $("<div class='d-flex p-3 pb-0'>")
.appendTo($ui) .appendTo($ui)
.append($("<h4 class='flex-grow-1 text-break'>") .append($("<h4 class='flex-grow-1 text-break'>")
.text(I18n.t(paneTitle))) .text(I18n.t(paneTitle)))

View file

@ -486,7 +486,7 @@ body.small-nav {
.section { .section {
border-bottom: 1px solid $grey; border-bottom: 1px solid $grey;
padding: 10px 20px; padding: $spacer;
} }
} }
} }
@ -606,13 +606,6 @@ body.small-nav {
/* Rules for the sidebar */ /* Rules for the sidebar */
.sidebar_heading {
position: relative;
padding: $lineheight/2 $lineheight;
// background: $offwhite;
// border-bottom: 1px solid $grey;
}
#browse_status { #browse_status {
input { input {
display: block; display: block;

View file

@ -1,5 +1,5 @@
<div id="mapkey"> <div id="mapkey">
<table class="table table-sm table-borderless mapkey-table"> <table class="table table-sm table-borderless mapkey-table mb-0">
<% YAML.load_file(Rails.root.join("config/key.yml")).each do |name,data| %> <% YAML.load_file(Rails.root.join("config/key.yml")).each do |name,data| %>
<% data.each do |entry| %> <% data.each do |entry| %>
<tr class="mapkey-table-entry" data-layer="<%= name %>" data-zoom-min="<%= entry["min_zoom"] %>" data-zoom-max="<%= entry["max_zoom"] %>"> <tr class="mapkey-table-entry" data-layer="<%= name %>" data-zoom-min="<%= entry["min_zoom"] %>" data-zoom-max="<%= entry["max_zoom"] %>">