Skip to content

Commit 9456428

Browse files
author
y-yamasaki
committed
Merge branch 'develop'
2 parents 4a50e77 + b7f7c0b commit 9456428

7 files changed

Lines changed: 305 additions & 143 deletions

File tree

assets/css/base.css

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,12 +59,13 @@ html {
5959
scroll-behavior: smooth;
6060
-webkit-text-size-adjust: 100%;
6161
text-size-adjust: 100%;
62+
overflow-x: hidden; /* 横スクロール防止 */
6263
}
6364

6465
body {
6566
margin: 0;
6667
padding: 0;
67-
overflow-x: hidden;
68+
overflow-x: hidden; /* 横スクロール防止 */
6869
font-family: var(--font-body);
6970
line-height: 1.6;
7071
color: var(--color-text);
@@ -88,6 +89,8 @@ body {
8889
min-height: 100vh;
8990
display: flex;
9091
flex-direction: column;
92+
overflow-wrap: break-word; /* 長い単語の折り返し */
93+
word-break: break-word; /* 長い単語の折り返し(互換性) */
9194
}
9295

9396
h1,
@@ -197,6 +200,7 @@ button {
197200
margin: 0 auto;
198201
padding: 2.5rem 1.25rem;
199202
flex-grow: 1;
203+
width: 100%; /* コンテナのはみ出し防止 */
200204
}
201205

202206
.text-muted {

assets/css/layout.css

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -158,12 +158,6 @@
158158
border: 1px solid var(--color-border);
159159
}
160160

161-
.section--soft {
162-
background: var(--color-surface);
163-
box-shadow: var(--shadow-md);
164-
border-color: var(--color-border-soft);
165-
}
166-
167161
.section__title {
168162
margin-top: 0;
169163
margin-bottom: 1.5rem;

assets/css/top.css

Lines changed: 53 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -161,20 +161,6 @@
161161
);
162162
}
163163

164-
.btn-outline {
165-
background: var(--color-surface);
166-
border-color: var(--color-border);
167-
color: var(--color-text-muted);
168-
}
169-
170-
.btn-outline:hover {
171-
background: var(--color-accent-soft);
172-
border-color: var(--color-accent);
173-
color: var(--color-text);
174-
transform: translateY(-2px);
175-
box-shadow: var(--shadow-glow);
176-
}
177-
178164
/* ==========================================================================
179165
3. サイドパネル
180166
========================================================================== */
@@ -249,7 +235,7 @@
249235
}
250236

251237
/* ==========================================================================
252-
4. プロフィールセクション
238+
4. プロフィールセクション & Featuresセクション
253239
========================================================================== */
254240
.section--profile {
255241
margin-top: 2.5rem;
@@ -264,54 +250,14 @@
264250
gap: 1.25rem;
265251
}
266252

267-
.profile-card {
268-
position: relative;
269-
z-index: 1;
270-
background: var(--color-surface);
271-
border-radius: var(--radius-md);
253+
/* 共通カード(layout.css)への拡張 */
254+
.card--profile {
272255
padding: 1.5rem;
273-
border: 1px solid var(--color-border-soft);
274-
box-shadow: var(--shadow-md);
275-
transition: var(--transition-smooth);
276-
overflow: hidden;
277256
}
278257

279-
.profile-card::before {
280-
content: "";
281-
position: absolute;
282-
z-index: -1;
283-
top: 0;
284-
left: 0;
285-
right: 0;
286-
bottom: 0;
287-
border-radius: inherit;
288-
border: 1px solid transparent;
289-
background: linear-gradient(
290-
to right,
291-
var(--color-accent),
292-
var(--color-accent-dark)
293-
)
294-
border-box;
295-
mask:
296-
linear-gradient(#fff 0 0) padding-box,
297-
linear-gradient(#fff 0 0);
298-
-webkit-mask-composite: destination-out;
299-
mask-composite: exclude;
300-
opacity: 0;
301-
transition: var(--transition-smooth);
302-
}
303-
304-
.profile-card:hover {
305-
transform: translateY(-4px);
306-
box-shadow: var(--shadow-lg), var(--shadow-glow);
307-
background: var(--color-panel);
308-
}
309-
310-
.profile-card:hover::before {
311-
opacity: 1;
312-
}
313-
314-
.profile-card-title {
258+
/* カード内タイトル */
259+
.card--profile .card__title,
260+
.section--feature .card h3 {
315261
margin: 0 0 1rem;
316262
font-size: 1.3rem;
317263
color: var(--color-heading);
@@ -428,10 +374,10 @@
428374
grid-template-columns: 1fr;
429375
gap: 1rem;
430376
}
431-
.profile-card {
377+
.card--profile {
432378
padding: 1.2rem;
433379
}
434-
.profile-card-title {
380+
.card--profile .card__title {
435381
font-size: 1.15rem;
436382
margin-bottom: 0.8rem;
437383
}
@@ -460,3 +406,48 @@
460406
minmax(280px, 1fr)
461407
);
462408
}
409+
410+
/* コンテンツカードのリンク化対応 */
411+
.section--top-grid .card-list li {
412+
display: flex; /* aタグの高さを揃えるためにflex化 */
413+
}
414+
415+
.card--link {
416+
display: flex;
417+
flex-direction: column;
418+
width: 100%;
419+
height: 100%;
420+
text-decoration: none;
421+
color: var(--color-text);
422+
}
423+
424+
.card--link h3 {
425+
margin-top: 0;
426+
margin-bottom: 0.5rem;
427+
color: var(--color-heading);
428+
transition: color 0.2s ease;
429+
}
430+
431+
.card--link p {
432+
flex-grow: 1; /* 下部余白を埋めて、"もっと見る"を下揃えに */
433+
}
434+
435+
.card__more {
436+
margin-top: 1.25rem;
437+
color: var(--color-accent);
438+
font-weight: 600;
439+
font-size: 0.95rem;
440+
display: inline-flex;
441+
align-items: center;
442+
transition: transform 0.2s ease;
443+
}
444+
445+
/* ホバー時の挙動 */
446+
.card--link:hover h3 {
447+
color: var(--color-accent);
448+
}
449+
450+
.card--link:hover .card__more {
451+
transform: translateX(6px);
452+
text-decoration: underline;
453+
}

assets/js/menuAnimation.js

Lines changed: 24 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,16 @@ const repulsionStrength = 20;
1010
let isMouseInsideBrowserWindow = false;
1111

1212
function setup() {
13-
// ページの全体の高さを取得
14-
let pageHeight = Math.max(
15-
document.body.scrollHeight,
16-
document.documentElement.scrollHeight,
17-
document.body.offsetHeight,
18-
document.documentElement.offsetHeight,
19-
document.body.clientHeight,
20-
document.documentElement.clientHeight,
21-
);
13+
// スクロールバーを含まないビューポートの幅を取得
14+
let w = document.documentElement.clientWidth;
15+
// 背景固定 (fixed) なので、ページ全体の高さではなくウィンドウの高さを使用
16+
let h = windowHeight;
2217

23-
animationCanvas = createCanvas(windowWidth, pageHeight);
18+
animationCanvas = createCanvas(w, h);
2419
animationCanvas.position(0, 0);
20+
21+
// position: fixed を明示的に設定(p5.jsのデフォルト動作による上書き防止)
22+
animationCanvas.style("position", "fixed");
2523
animationCanvas.style("z-index", "-1");
2624
animationCanvas.style("pointer-events", "none");
2725

@@ -40,15 +38,10 @@ function draw() {
4038
}
4139

4240
function windowResized() {
43-
let pageHeight = Math.max(
44-
document.body.scrollHeight,
45-
document.documentElement.scrollHeight,
46-
document.body.offsetHeight,
47-
document.documentElement.offsetHeight,
48-
document.body.clientHeight,
49-
document.documentElement.clientHeight,
50-
);
51-
resizeCanvas(windowWidth, pageHeight);
41+
// リサイズ時もスクロールバーを含まない幅で計算
42+
let w = document.documentElement.clientWidth;
43+
let h = windowHeight;
44+
resizeCanvas(w, h);
5245
}
5346

5447
class Particle {
@@ -88,25 +81,29 @@ class Particle {
8881
this.pos.add(this.vel);
8982
this.acc.mult(0);
9083

84+
// 画面端の判定と位置補正
85+
// (ウィンドウリサイズでキャンバスが小さくなった場合にパーティクルが外に残らないよう constrain で補正)
9186
if (
9287
this.pos.x > width - this.size / 2 ||
9388
this.pos.x < this.size / 2
9489
) {
9590
this.vel.x *= -1;
96-
if (this.pos.x > width - this.size / 2)
97-
this.pos.x = width - this.size / 2;
98-
if (this.pos.x < this.size / 2)
99-
this.pos.x = this.size / 2;
91+
this.pos.x = constrain(
92+
this.pos.x,
93+
this.size / 2,
94+
width - this.size / 2,
95+
);
10096
}
10197
if (
10298
this.pos.y > height - this.size / 2 ||
10399
this.pos.y < this.size / 2
104100
) {
105101
this.vel.y *= -1;
106-
if (this.pos.y > height - this.size / 2)
107-
this.pos.y = height - this.size / 2;
108-
if (this.pos.y < this.size / 2)
109-
this.pos.y = this.size / 2;
102+
this.pos.y = constrain(
103+
this.pos.y,
104+
this.size / 2,
105+
height - this.size / 2,
106+
);
110107
}
111108
}
112109

0 commit comments

Comments
 (0)