Skip to content

Commit 61cfc19

Browse files
fix: grid layout and refactor css (#1978)
fix grid layout and refactor css
1 parent 0989623 commit 61cfc19

File tree

3 files changed

+13
-12
lines changed

3 files changed

+13
-12
lines changed

_layouts/home.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
<div id="overlay"></div>
1515

1616
{% if page.lang != 'en' %}
17-
<div id="i18n-notice-box" class="doc-box doc-notice">
17+
<div id="i18n-notice-box" class="doc-notice">
1818
{% include i18n-notice.html %}
1919
</div>
2020
{% endif %}

_layouts/page.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<div id="overlay"></div>
1616

1717
{% if page.lang != 'en' %}
18-
<div id="i18n-notice-box" class="doc-box doc-notice">
18+
<div id="i18n-notice-box" class="doc-notice">
1919
{% include i18n-notice.html %}
2020
</div>
2121
{% endif %}

css/style.css

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ body {
1212
display: grid;
1313
grid-template-areas:
1414
'header'
15+
'i18n'
1516
'content'
1617
'footer'
1718
}
@@ -86,20 +87,13 @@ main.home {
8687
max-width: 75rem;
8788
margin: 40px auto 2%;
8889
padding-inline: 5%;
90+
grid-area: content;
8991
}
9092

9193
#home-content {
9294
display: flex;
9395
}
9496

95-
.non-en-doc:has(#i18n-notice-box.hidden) #home-content {
96-
margin-top: 150px;
97-
}
98-
99-
.non-en-doc:has(#i18n-notice-box:not(.hidden)) .content {
100-
margin-top: 50px;
101-
}
102-
10397
#homepage-leftpane {
10498
min-width: 500px;
10599
margin-right: 30px;
@@ -619,6 +613,10 @@ table ul {
619613
}
620614

621615
.doc-notice {
616+
padding-block: 1rem;
617+
padding-inline: 2.5rem;
618+
color: var(--box-fg);
619+
border-radius: 0 6px 6px 0;
622620
background: var(--notice-bg);
623621
border-left: 3px solid var(--notice-accent);
624622
}
@@ -649,14 +647,16 @@ table ul {
649647
}
650648

651649
#i18n-notice-box {
652-
margin: 100px 3% 20px 3%;
650+
margin-inline: auto;
651+
margin-block-start: 2rem;
653652
position: relative;
653+
grid-area: i18n;
654654
}
655655

656656
#close-i18n-notice-box {
657657
position: absolute;
658658
top: 3px;
659-
right: 4px;
659+
right: 9px;
660660
color: var(--notice-accent);
661661
cursor: pointer;
662662
}
@@ -1100,6 +1100,7 @@ h2 a {
11001100
display: flex;
11011101
justify-content: center;
11021102
flex-direction: column;
1103+
grid-area: content;
11031104
}
11041105

11051106
.content-404 p {

0 commit comments

Comments
 (0)