Skip to content

Commit f21e72d

Browse files
committed
fix: remove every new line tempaltes to avoid unexpected rendering
1 parent 6da15ab commit f21e72d

File tree

2 files changed

+0
-17
lines changed

2 files changed

+0
-17
lines changed

templates/announcement-banner.html

-15
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,8 @@
66
flex-direction: column;
77
justify-content: center;
88
align-items: center;
9-
109
margin: 0;
1110
padding: 1rem 3.5rem;
12-
1311
background: repeating-linear-gradient(
1412
45deg,
1513
var(--site-announcement-bar-stripe-color1),
@@ -18,47 +16,38 @@
1816
var(--site-announcement-bar-stripe-color2) 40px
1917
);
2018
}
21-
2219
.announcement-banner {
2320
--site-announcement-bar-stripe-color1: #e5e7eb;
2421
--site-announcement-bar-stripe-color2: #d1d5db;
2522
}
26-
2723
.announcement-banner[data-theme="ocean"] {
2824
--site-announcement-bar-stripe-color1: #86b2f9;
2925
--site-announcement-bar-stripe-color2: #7298ea;
3026
}
31-
3227
.announcement-banner[data-theme="forest"] {
3328
--site-announcement-bar-stripe-color1: #97f5d6;
3429
--site-announcement-bar-stripe-color2: #6de0bf;
3530
}
36-
3731
.announcement-banner[data-theme="lava"] {
3832
--site-announcement-bar-stripe-color1: #fea3a3;
3933
--site-announcement-bar-stripe-color2: #e57e7e;
4034
}
41-
4235
html:is(.navy, .coal, .ayu) .announcement-banner {
4336
--site-announcement-bar-stripe-color1: #1f2937;
4437
--site-announcement-bar-stripe-color2: #111827;
4538
}
46-
4739
html:is(.navy, .coal, .ayu) .announcement-banner[data-theme="ocean"] {
4840
--site-announcement-bar-stripe-color1: #2563eb;
4941
--site-announcement-bar-stripe-color2: #1d4ed8;
5042
}
51-
5243
html:is(.navy, .coal, .ayu) .announcement-banner[data-theme="forest"] {
5344
--site-announcement-bar-stripe-color1: #22d3a5;
5445
--site-announcement-bar-stripe-color2: #0fbf8f;
5546
}
56-
5747
html:is(.navy, .coal, .ayu) .announcement-banner[data-theme="lava"] {
5848
--site-announcement-bar-stripe-color1: #f87171;
5949
--site-announcement-bar-stripe-color2: #ef4444;
6050
}
61-
6251
.announcement-banner p {
6352
width: 100%;
6453
margin: 0;
@@ -69,17 +58,14 @@
6958
text-overflow: ellipsis;
7059
text-wrap: balance;
7160
}
72-
7361
.announcement-banner button {
7462
top: 50%;
7563
right: 1rem;
7664
position: absolute;
7765
transform: translateY(-50%);
78-
7966
width: 3rem;
8067
height: 3rem;
8168
cursor: pointer !important;
82-
8369
border: none;
8470
font-weight: 900;
8571
border-radius: 50%;
@@ -96,7 +82,6 @@
9682
const id = banner.getAttribute("data-id");
9783
const message = banner.querySelector("p").textContent;
9884
const localData = JSON.parse(localStorage.getItem("mdbook-announcement-banner"));
99-
10085
if (!localData || localData.id !== id || localData.hide !== true) {
10186
banner.style.display = "flex";
10287
const page = document.querySelector(".page");

templates/scroll-to-top.html

-2
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,10 @@
66
display: none;
77
align-items: center;
88
justify-content: center;
9-
109
position: fixed;
1110
padding: 0.75rem;
1211
bottom: 4rem;
1312
right: calc(1.25rem + 90px + var(--page-padding));
14-
1513
z-index: 999;
1614
cursor: pointer;
1715
border: none;

0 commit comments

Comments
 (0)