Skip to content

Commit deaccd5

Browse files
authored
doc(Footer): update footer style (#4733)
* doc: 更新 Ip 屏蔽逻辑 * doc: 更新备案号 * doc: 重构基金会准则 * doc: 移动基金会信息到 footer 中 * refactor: 更新样式
1 parent 195c0ab commit deaccd5

File tree

5 files changed

+39
-46
lines changed

5 files changed

+39
-46
lines changed

src/BootstrapBlazor.Server/Components/Layout/HomeLayout.razor

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,12 @@
1111
@Body
1212

1313
<footer>
14+
<div class="bb-foundation">
15+
<div class="bb-foundation-content">本项目属于 <a href="https://www.dotnetfoundation.org/">.NET 基金会</a>,并根据其 <a href="https://www.dotnetfoundation.org/code-of-conduct">行为准则</a> 运作</div>
16+
<a class="bb-foundation-img d-none d-sm-block" href="https://www.dotnetfoundation.org/">
17+
<img src="./images/dotnet_foundation_v4.png" width="100" />
18+
</a>
19+
</div>
1420
<div class="footer-body">
1521
<div>
1622
<h4>@Localizer["FooterH1"]</h4>
@@ -55,7 +61,7 @@
5561
</ul>
5662
</div>
5763
</div>
58-
<div class="footer-info d-flex">
64+
<div class="footer-info">
5965
<div class="d-flex">
6066
<div>Powered by .NET @Version on @OS</div>
6167
<div class="ms-1">BB @VersionService.Version</div>
@@ -70,7 +76,7 @@
7076
</div>
7177
<div class="d-flex flex-fill align-items-center justify-content-center">
7278
<a class="d-none d-md-block me-3" href="@WebsiteOption.CurrentValue.GiteeRepositoryUrl" target="_blank">@Localizer["Footer"]</a>
73-
<a class="d-none d-lg-block me-3" href="https://beian.miit.gov.cn/" target="_blank">苏ICP备16047547号</a>
79+
<a class="d-none d-lg-block me-3" href="https://beian.miit.gov.cn/" target="_blank">鲁ICP备19015061号-4</a>
7480
</div>
7581
<div class="d-md-flex d-none">
7682
<img alt="global" class="footer-lang" src="./images/global.svg" />

src/BootstrapBlazor.Server/Components/Layout/HomeLayout.razor.css

Lines changed: 28 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1-
.footer-body {
1+
footer {
2+
background-color: var(--bs-tertiary-bg);
3+
}
4+
5+
.footer-body {
26
padding: 1rem;
3-
color: var(--bb-footer-body-color);
4-
background-color: var(--bb-footer-body-bg);
57
margin: 0;
68
display: flex;
79
flex-direction: column;
@@ -19,8 +21,7 @@
1921
}
2022

2123
.footer-body .footer-link {
22-
transition: all .3s linear;
23-
color: rgba(255,255,255,.9);
24+
color: var(--bs-body-color);
2425
text-decoration: none;
2526
line-height: 2;
2627
display: block;
@@ -29,26 +30,23 @@
2930

3031
.footer-body .footer-link:hover,
3132
.footer-body .footer-link a:hover {
32-
color: #40a9ff;
33+
color: var(--bs-link-hover-color);
34+
text-decoration: underline;
3335
}
3436

3537
.footer-body .footer-link:not(:last-child) {
3638
margin-top: 1rem;
3739
}
3840

39-
.footer-body .footer-link a {
40-
transition: all .3s linear;
41-
color: #fff;
42-
}
43-
4441
.footer-info {
4542
background-color: #222;
4643
padding: var(--bb-footer-padding);
47-
color: #9d9d9d;
44+
color: #ddd;
45+
display: flex;
4846
}
4947

5048
.footer-info a {
51-
color: #9d9d9d;
49+
color: #ddd;
5250
}
5351

5452
.footer-info .footer-logo {
@@ -65,9 +63,26 @@
6563
color: var(--bs-success)
6664
}
6765

66+
.bb-foundation {
67+
display: flex;
68+
align-items: center;
69+
}
70+
71+
.bb-foundation .bb-foundation-content {
72+
text-align: center;
73+
font-size: 1rem;
74+
font-weight: bolder;
75+
padding: 1rem 0;
76+
flex-grow: 1;
77+
}
78+
6879
@media (min-width: 768px) {
6980
.footer-body {
7081
padding: 2rem;
7182
flex-direction: row;
7283
}
84+
85+
.bb-foundation .bb-foundation-content {
86+
margin-left: 100px;
87+
}
7388
}

src/BootstrapBlazor.Server/Components/Pages/Index.razor

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,4 @@
3636
<h5 class="d-none d-sm-block mb-3">@Localizer["DonateH2"]</h5>
3737
<img alt="barcode" class="barcode" src="./images/[email protected]" />
3838
</div>
39-
<div class="bb-foundation">
40-
<a class="bb-foundation-img d-none d-sm-block" href="https://www.dotnetfoundation.org/">
41-
<img src="./images/dotnet_foundation_v4.png" width="100" />
42-
</a>
43-
<div class="bb-foundation-content">本项目属于 <a href="https://www.dotnetfoundation.org/">.NET 基金会</a>,并根据其 <a href="https://www.dotnetfoundation.org/code-of-conduct">行为准则</a> 运作。</div>
44-
</div>
4539
</section>

src/BootstrapBlazor.Server/Components/Pages/Index.razor.css

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -84,25 +84,6 @@
8484
width: 280px;
8585
}
8686

87-
.bb-foundation {
88-
background-color: rgb(var(--bs-tertiary-bg-rgb));
89-
position: relative;
90-
}
91-
92-
.bb-foundation .bb-foundation-img {
93-
position: absolute;
94-
right: 1rem;
95-
top: 1rem;
96-
}
97-
98-
.bb-foundation .bb-foundation-content {
99-
text-align: center;
100-
font-size: 1.1rem;
101-
font-weight: bolder;
102-
line-height: 100px;
103-
padding: 1rem 0;
104-
}
105-
10687
@media (min-width: 768px) {
10788
.bd-masthead .lead {
10889
font-size: calc(1.275rem + .3vw);

src/BootstrapBlazor.Server/Extensions/IpExtensions.cs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,9 @@ public static string MaskIpString(this string ip)
1212
var ret = ip;
1313
if (!string.IsNullOrEmpty(ip))
1414
{
15-
var index = ip.LastIndexOf('.');
16-
if (index > -1)
17-
{
18-
var mask = ip[index..];
19-
ret = ip.Replace(mask, ".###");
20-
}
15+
var segments = ip.Split('.');
16+
segments[^1] = "###";
17+
ret = string.Join('.', segments);
2118
}
2219
return ret;
2320
}

0 commit comments

Comments
 (0)