Skip to content

Commit f896db7

Browse files
authored
doc(Home): add rotate effects (#6583)
1 parent 0945757 commit f896db7

File tree

2 files changed

+46
-1
lines changed

2 files changed

+46
-1
lines changed

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@
1212
@Localizer["Support"]
1313
</span>
1414
</a>
15-
<img src="./favicon.png" alt="bootstrap-blazor" class="bb-logo d-sm-block mx-auto my-5">
15+
<div class="bb-logo d-sm-block mx-auto my-5">
16+
<img src="./favicon.png" alt="bootstrap-blazor">
17+
</div>
1618
<h1 class="mb-3 fw-semibold">@Localizer["Title"]</h1>
1719
<p class="lead mb-4">
1820
@Localizer["SubTitle"]

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

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,53 @@
3030
}
3131

3232
.bd-masthead .bb-logo {
33+
--bb-btn-space: 4px;
3334
width: 200px;
3435
height: 200px;
36+
position: relative;
37+
overflow: hidden;
38+
border-radius: 30px;
3539
}
3640

41+
.bd-masthead .bb-logo img {
42+
width: calc(100% - 2 * var(--bb-btn-space));
43+
height: calc(100% - 2 * var(--bb-btn-space));
44+
position: absolute;
45+
left: var(--bb-btn-space);
46+
top: var(--bb-btn-space);
47+
}
48+
49+
.bb-logo:before {
50+
content: '';
51+
position: absolute;
52+
inset: 0;
53+
background-color: #5a23c8;
54+
z-index: -2;
55+
}
56+
57+
.bb-logo:after {
58+
content: '';
59+
position: absolute;
60+
left: 50%;
61+
top: 50%;
62+
width: 68%;
63+
height: 68%;
64+
background-image: linear-gradient(to bottom, #3f51b1 0%, #5a55ae 13%, #7b5fac 25%, #8f6aae 38%, #a86aa4 50%, #cc6b8e 62%, #f18271 75%, #f3a469 87%, #f7c978 100%);
65+
transform-origin: left top;
66+
animation: rotate 5s linear infinite;
67+
z-index: -1;
68+
}
69+
70+
@keyframes rotate {
71+
0% {
72+
transform: rotate(0deg);
73+
}
74+
75+
100% {
76+
transform: rotate(360deg);
77+
}
78+
}
79+
3780
.bd-gutter {
3881
--bs-gutter-x: 3rem;
3982
}

0 commit comments

Comments
 (0)