Skip to content

Commit 832d2ae

Browse files
committed
ボタンUI/UX調整
1 parent bb544a5 commit 832d2ae

3 files changed

Lines changed: 133 additions & 10 deletions

File tree

WebSite/assets/css/layout.css

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
:root {
2+
--color-accent-soft: rgba(108, 99, 255, 0.15);
23
--color-accent: #6c63ff;
34
--color-accent-dark: #4f47cc;
45

@@ -544,3 +545,75 @@ body.no-scroll .site-header {
544545
padding: 0.1rem 0.4rem;
545546
font-size: 0.75rem;
546547
}
548+
549+
/* ==========================================================================
550+
8. 言語切り替え
551+
========================================================================== */
552+
.lang-group {
553+
display: inline-flex;
554+
align-items: center;
555+
gap: 0.5rem;
556+
margin-left: 0.75rem;
557+
padding-left: 0.75rem;
558+
border-left: 1px solid var(--color-border);
559+
color: var(--color-text-muted);
560+
}
561+
562+
.lang-icon {
563+
width: 1.25rem;
564+
height: 1.25rem;
565+
fill: none;
566+
stroke: currentColor;
567+
stroke-width: 2;
568+
stroke-linecap: round;
569+
stroke-linejoin: round;
570+
opacity: 0.8;
571+
}
572+
573+
.lang-option {
574+
text-decoration: none;
575+
color: var(--color-text-muted);
576+
font-size: 0.85rem;
577+
font-weight: 500;
578+
padding: 0.25rem 0.5rem;
579+
border-radius: var(--radius-sm);
580+
transition: var(--transition-smooth);
581+
cursor: pointer;
582+
line-height: 1;
583+
}
584+
585+
.lang-option:hover {
586+
color: var(--color-text);
587+
background-color: var(--color-accent-soft);
588+
}
589+
590+
.lang-option.active {
591+
color: var(--color-accent);
592+
background-color: rgba(var(--color-accent-rgb), 0.1);
593+
font-weight: 700;
594+
cursor: default;
595+
pointer-events: none;
596+
}
597+
598+
.lang-sep {
599+
opacity: 0.3;
600+
font-size: 0.8rem;
601+
user-select: none;
602+
}
603+
604+
@media (max-width: 768px) {
605+
.lang-group {
606+
margin-left: 0;
607+
padding-left: 0;
608+
border-left: none;
609+
margin-top: 1rem;
610+
padding-top: 1rem;
611+
border-top: 1px solid var(--color-border-soft);
612+
width: 100%;
613+
}
614+
615+
.lang-option {
616+
font-size: 1rem;
617+
padding: 0.5rem 1rem;
618+
}
619+
}

WebSite/partials/header.html

Lines changed: 30 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,36 @@
3737
data-nav="https://breadmotion.github.io/WebSite/contact.html"
3838
>Contact</a
3939
>
40-
<a
41-
href="https://breadmotion.github.io/WebSite/en/index.html"
42-
class="lang-switch"
43-
>EN</a
44-
>
40+
<div class="lang-group">
41+
<svg
42+
class="lang-icon"
43+
xmlns="http://www.w3.org/2000/svg"
44+
viewBox="0 0 24 24"
45+
fill="none"
46+
stroke="currentColor"
47+
stroke-width="2"
48+
stroke-linecap="round"
49+
stroke-linejoin="round"
50+
>
51+
<circle cx="12" cy="12" r="10"></circle>
52+
<line
53+
x1="2"
54+
y1="12"
55+
x2="22"
56+
y2="12"
57+
></line>
58+
<path
59+
d="M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z"
60+
></path>
61+
</svg>
62+
<span class="lang-option active">JP</span>
63+
<span class="lang-sep">/</span>
64+
<a
65+
href="https://breadmotion.github.io/WebSite/en/index.html"
66+
class="lang-option lang-switch"
67+
>EN</a
68+
>
69+
</div>
4570
</nav>
4671
</div>
4772
</header>

WebSite/partials/header_en.html

Lines changed: 30 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,36 @@
4040
data-nav="https://breadmotion.github.io/WebSite/contact.html"
4141
>Contact</a
4242
>
43-
<a
44-
href="https://breadmotion.github.io/WebSite/index.html"
45-
class="lang-switch"
46-
>JA</a
47-
>
43+
<div class="lang-group">
44+
<svg
45+
class="lang-icon"
46+
xmlns="http://www.w3.org/2000/svg"
47+
viewBox="0 0 24 24"
48+
fill="none"
49+
stroke="currentColor"
50+
stroke-width="2"
51+
stroke-linecap="round"
52+
stroke-linejoin="round"
53+
>
54+
<circle cx="12" cy="12" r="10"></circle>
55+
<line
56+
x1="2"
57+
y1="12"
58+
x2="22"
59+
y2="12"
60+
></line>
61+
<path
62+
d="M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z"
63+
></path>
64+
</svg>
65+
<a
66+
href="https://breadmotion.github.io/WebSite/index.html"
67+
class="lang-option lang-switch"
68+
>JP</a
69+
>
70+
<span class="lang-sep">/</span>
71+
<span class="lang-option active">EN</span>
72+
</div>
4873
</nav>
4974
</div>
5075
</header>

0 commit comments

Comments
 (0)