Skip to content

Commit d1f8175

Browse files
スタイルの調整とアニメーションの追加
1 parent 7411a92 commit d1f8175

File tree

4 files changed

+55
-9
lines changed

4 files changed

+55
-9
lines changed

src/app/[article_year]/[month]/[aid]/page.css

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -266,11 +266,6 @@ html {
266266

267267
.other-articles a {
268268
text-decoration: none;
269-
color: var(--link-color);
270-
}
271-
272-
.other-articles a:hover {
273-
text-decoration: underline;
274269
}
275270

276271
/* スマートフォン対応 */

src/app/article/article.css

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
display: flex;
33
flex-wrap: wrap;
44
gap: 16px;
5+
background: color-mix(in srgb, transparent 75%, var(--primary));
6+
backdrop-filter: blur(4px);
57
justify-content: center;
68
}
79

src/app/globals.css

Lines changed: 52 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
--foreground: #171717;
66
--primary: #eeeeee;
77
--link-color: #0000ff;
8+
--body-color-value: 0deg;
89
/* ライトテーマ用のリンク色を追加 */
910
}
1011

@@ -34,15 +35,57 @@ body {
3435
/* 横スクロールのみを禁止 */
3536
}
3637

38+
@keyframes body-background-animation {
39+
0% {
40+
--body-color-value: 0deg;
41+
}
42+
43+
17% {
44+
--body-color-value: 60deg;
45+
}
46+
47+
33% {
48+
--body-color-value: 120deg;
49+
}
50+
51+
50% {
52+
--body-color-value: 180deg;
53+
}
54+
55+
67% {
56+
--body-color-value: 240deg;
57+
}
58+
59+
83% {
60+
--body-color-value: 300deg;
61+
}
62+
63+
100% {
64+
--body-color-value: 360deg;
65+
}
66+
}
67+
68+
69+
@property --body-color-value {
70+
syntax: "<angle>";
71+
inherits: true;
72+
initial-value: 0deg;
73+
}
74+
3775
body {
38-
background: var(--background);
3976
color: var(--foreground);
77+
background:
78+
radial-gradient(color-mix(in srgb,
79+
hsl(var(--body-color-value) 100% 50%),
80+
var(--background) 80%),
81+
var(--background));
4082
min-height: 100vh;
83+
animation: body-background-animation 20s infinite;
4184
}
4285

4386
header {
4487
width: 100%;
45-
background-color: var(--primary);
88+
background-color: color-mix(in srgb, var(--primary), transparent 50%);
4689
position: sticky;
4790
top: 0;
4891
z-index: 10;
@@ -60,6 +103,10 @@ header a {
60103
text-decoration: none;
61104
}
62105

106+
header nav {
107+
background-color: color-mix(in srgb, var(--primary), transparent 50%);
108+
backdrop-filter: blur(4px);
109+
}
63110

64111
main {
65112
width: 100%;
@@ -80,6 +127,7 @@ main>section.title>h1 {
80127

81128
section {
82129
padding: 1rem;
130+
margin: 1rem;
83131
}
84132

85133
section h1,
@@ -96,7 +144,8 @@ section p {
96144

97145
footer {
98146
width: 100%;
99-
background-color: var(--primary);
147+
background-color: color-mix(in srgb, var(--primary), transparent 50%);
148+
backdrop-filter: blur(4px);
100149
}
101150

102151
a {

src/app/layout/header.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ export default function Header() {
103103
} md:opacity-100 md:max-h-none
104104
transition-all duration-300 ease-in-out
105105
fixed md:relative top-0 left-0 w-full h-full md:w-auto md:h-100%
106-
bg-[var(--primary)] md:bg-transparent
106+
md:bg-transparent
107107
z-20 overflow-hidden
108108
flex flex-col md:flex-row items-center justify-center md:justify-end
109109
`}

0 commit comments

Comments
 (0)