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();
.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; }
h3, h4 {
font-size: 1.25rem;
}
-
- .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 {
<% 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 %>