Skip to content

Commit 2609c4c

Browse files
committed
Improve mobile tool toolbar layout
1 parent b108d47 commit 2609c4c

2 files changed

Lines changed: 87 additions & 2 deletions

File tree

src/_data/toolData/base64-encode.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
"cn": {
3434
"title": "Base64 编码解码 — Coding.Tools",
3535
"description": "在浏览器中直接将文本编码为 Base64 或将 Base64 解码回可读文本。快速、私密、免费使用。",
36-
"toolTitle": "Base64 编码",
36+
"toolTitle": "Base64 编码解码",
3737
"toolDescription": "将文本转换为 Base64,将 Base64 解码回可读文本,并复制或下载结果。",
3838
"categoryName": "哈希与加密",
3939
"inputPlaceholder": "输入文本进行编码或粘贴 Base64 进行解码...",

src/css/tool.css

Lines changed: 86 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,21 @@
3838
color: var(--success);
3939
}
4040

41+
.btn:disabled {
42+
cursor: not-allowed;
43+
opacity: 0.45;
44+
transform: none;
45+
box-shadow: none;
46+
}
47+
48+
.btn:disabled:hover {
49+
color: inherit;
50+
background: transparent;
51+
border-color: var(--border);
52+
transform: none;
53+
box-shadow: none;
54+
}
55+
4156
/* --- Status Bar --- */
4257
.status-bar {
4358
display: flex;
@@ -419,6 +434,12 @@
419434
}
420435

421436
/* --- Responsive --- */
437+
@media (max-width: 1024px) {
438+
.tool-main {
439+
width: 100%;
440+
}
441+
}
442+
422443
@media (max-width: 768px) {
423444
.main-content { padding: 0 20px; }
424445
.toolbar { flex-direction: column; align-items: flex-start; }
@@ -697,10 +718,74 @@
697718
font-size: 12px;
698719
}
699720

721+
/* ============================================================
722+
Base64 Workbench
723+
A compact vertical conversion flow that keeps the original
724+
editor-first feel while reducing first-viewport sprawl.
725+
============================================================ */
726+
727+
.base64-workbench {
728+
display: flex;
729+
flex-direction: column;
730+
gap: 12px;
731+
}
732+
733+
.base64-workbench .pane-card {
734+
padding: 20px;
735+
border-radius: 12px;
736+
}
737+
738+
.base64-workbench .pane-editor {
739+
min-height: 168px;
740+
height: clamp(168px, 24vh, 220px);
741+
resize: vertical;
742+
}
743+
744+
.base64-command-bar {
745+
padding: 2px 0 0;
746+
}
747+
748+
.base64-command-bar .pane-toolbar {
749+
margin: 0;
750+
padding: 0;
751+
gap: 12px;
752+
}
753+
754+
.base64-command-bar .pane-toolbar-left,
755+
.base64-command-bar .pane-toolbar-right {
756+
flex-wrap: wrap;
757+
}
758+
759+
.base64-command-bar .pane-toolbar-right {
760+
margin-left: auto;
761+
}
762+
763+
.base64-workbench .status-bar-dual {
764+
padding: 0 4px;
765+
}
766+
767+
@media (max-width: 768px) {
768+
.pane-toolbar {
769+
align-items: flex-start;
770+
flex-direction: row;
771+
flex-wrap: nowrap;
772+
gap: 8px;
773+
}
774+
.pane-toolbar-left {
775+
flex: 0 0 auto;
776+
width: auto;
777+
}
778+
.pane-toolbar-right {
779+
flex: 1 1 auto;
780+
justify-content: flex-end;
781+
min-width: 0;
782+
width: auto;
783+
}
784+
}
785+
700786
@media (max-width: 600px) {
701787
.pane-card { padding: 16px; }
702788
.pane-card .pane-editor { min-height: 200px; font-size: 13px; }
703-
.pane-toolbar { gap: 6px; }
704789
}
705790

706791
/* ============================================================

0 commit comments

Comments
 (0)