$(".welcome").addClass("visible");
}
- $(".welcome .close").on("click", function () {
+ $(".welcome .btn-close").on("click", function () {
$(".welcome").removeClass("visible");
Cookies.set("_osm_welcome", "hide", { secure: true, expires: expiry, path: "/", samesite: "lax" });
});
var bannerExpiry = new Date();
bannerExpiry.setYear(bannerExpiry.getFullYear() + 1);
- $("#banner .close-wrap").on("click", function (e) {
+ $("#banner .btn-close").on("click", function (e) {
var cookieId = e.target.id;
$("#banner").hide();
e.preventDefault();
$("#browse_status").html(
$("<div>")
.append(
+ $("<button type='button' class='btn-close float-end mt-1'>")
+ .click(cancel),
$("<h2>")
.text(I18n.t("browse.start_rjs.load_data"))
- .prepend($("<span class='icon close'></span>").click(cancel)))
- .append(
+ .prepend(),
$("<div>")
.append(
$("<p class='alert alert-warning clearfix'></p>")
}));
});
- $(".directions_form .close").on("click", function (e) {
+ $(".directions_form .btn-close").on("click", function (e) {
e.preventDefault();
var route_from = endpoints[0].value;
if (route_from) {
map.fitBounds(polyline.getBounds().pad(0.05));
}
- var html = "<h2><a class=\"geolink\" href=\"#\">" +
- "<span class=\"icon close\"></span></a>" + I18n.t("javascripts.directions.directions") +
- "</h2><p>" +
+ var html = "<a class=\"geolink\" href=\"#\"><button type='button' class='btn-close float-end mt-1'></button></a>" +
+ "<h2>" + I18n.t("javascripts.directions.directions") + "</h2>" +
+ "<p>" +
I18n.t("javascripts.directions.distance") + ": " + formatDistance(route.distance) + ". " +
I18n.t("javascripts.directions.time") + ": " + formatTime(route.time) + ".";
if (typeof route.ascend !== "undefined" && typeof route.descend !== "undefined") {
.attr("class", "sidebar_heading")
.appendTo($ui)
.append(
- $("<span>")
- .text(I18n.t("javascripts.close"))
- .attr("class", "icon close")
+ $("<button type='button' class='btn-close float-end mt-1'>")
+ .attr("aria-label", I18n.t("javascripts.close"))
.bind("click", toggle))
.append(
$("<h4>")
.attr("class", "sidebar_heading")
.appendTo($ui)
.append(
- $("<span>")
- .text(I18n.t("javascripts.close"))
- .attr("class", "icon close")
+ $("<button type='button' class='btn-close float-end mt-1'>")
+ .attr("aria-label", I18n.t("javascripts.close"))
.bind("click", toggle))
.append(
$("<h4>")
.attr("class", "sidebar_heading")
.appendTo($ui)
.append(
- $("<span>")
- .text(I18n.t("javascripts.close"))
- .attr("class", "icon close")
+ $("<button type='button' class='btn-close float-end mt-1'>")
+ .attr("aria-label", I18n.t("javascripts.close"))
.bind("click", toggle))
.append(
$("<h4>")
.icon.clipboard { /* no-r2 */ background-position: -160px 0; }
.icon.link { /* no-r2 */ background-position: -180px 0; }
.icon.close { /* no-r2 */ background-position: -200px 0; }
-.close-wrap:hover .icon.close,
.icon.close:hover { /* no-r2 */ background-position: -200px -20px; }
.icon.check { /* no-r2 */ background-position: -220px 0; }
.icon.note { /* no-r2 */ background-position: -240px 0; }
clear: both;
width: 100%;
}
-
- .close-wrap {
- cursor: pointer;
- position: absolute;
- top: 0;
- right: 0;
- width: 60px;
- height: 60px;
-
- .icon.close {
- pointer-events: none;
- position: absolute;
- right: 20px;
- top: 20px;
- }
- }
}
.overlay-sidebar #sidebar {
padding: $lineheight/2 $lineheight;
// background: $offwhite;
// border-bottom: 1px solid $grey;
- > .close {
- float: right;
- margin-top: 2px;
- cursor: pointer;
- }
}
#browse_status {
</div>
<div>
<a class="geolink" href="<%= root_path %>">
- <span class="icon close"></span>
+ <button type="button" class="btn-close float-end mt-1"></button>
</a>
</div>
</div>
<% unless (banner = next_banner()).nil? %>
<%= link_to (image_tag banner[:img], :alt => banner[:alt], :title => banner[:alt]), banner[:link] %>
-<div class="close-wrap" id="<%= banner_cookie(banner[:id]) %>"><span class="icon close"></span></div>
+<button type="button" class="btn-close position-absolute top-0 end-0 p-4" id="<%= banner_cookie(banner[:id]) %>"></button>
<% end %>
</form>
<form method="GET" action="<%= directions_path %>" class="directions_form pb-3">
- <div class="clearfix px-3 py-3"><span class="icon close"></span></div>
+ <div class="clearfix px-3 py-3"><button type="button" class="btn-close float-end"></button></div>
<div class="row gx-2 m-1">
<div class="col-1">