Files
779776787 efca70ecb2 push
首次推送
2025-08-12 14:19:34 +08:00

531 lines
9.3 KiB
CSS

/**
* --------------------------------------------------------------------
* @description 项目的整体样式定义。
* @author https://t.me/CCfork
* @copyright Copyright (c) 2025, https://t.me/CCfork
* --------------------------------------------------------------------
*/
*,
*::before,
*::after {
box-sizing: border-box;
}
body {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
line-height: 1.6;
margin: 0;
background-color: #f8f9fa;
color: #212529;
padding: 20px;
}
.container {
max-width: 90%;
margin: 20px auto;
background: #fff;
padding: 25px;
border-radius: 12px;
box-shadow: 0 4px 25px rgba(0, 0, 0, .05);
border: 1px solid #dee2e6;
}
h1 {
text-align: center;
color: #343a40;
margin-bottom: 25px;
font-weight: 600;
}
h3 {
color: #495057;
}
.list-title {
margin-top: 40px !important;
border-top: 1px solid #e9ecef;
padding-top: 20px;
}
.controls-container {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 10px;
flex-wrap: wrap;
gap: 8px;
}
.left-controls {
display: flex;
gap: 10px;
align-items: center;
}
.top-controls-row {
display: flex;
gap: 10px;
margin-bottom: 10px;
}
.layout-selector {
display: flex;
align-items: center;
gap: 10px;
flex-wrap: wrap;
}
.layout-selector label {
font-weight: 500;
color: #495057;
}
.layout-selector select {
padding: 5px 10px;
border-radius: 6px;
border: 1px solid #ced4da;
font-size: 14px;
}
.details-panel {
max-height: 0;
overflow: hidden;
background-color: #f8f9fa;
border-radius: 6px;
margin-top: 5px;
transition: max-height .3s ease-in-out, padding .3s ease-in-out, opacity .3s;
padding: 0 15px;
opacity: 0;
}
.details-panel.active {
max-height: 1200px;
padding: 20px 15px;
opacity: 1;
}
.details-panel-actions {
margin-top: 20px;
padding-top: 15px;
border-top: 1px solid #e9ecef;
display: flex;
justify-content: flex-end;
}
.details-form-grid {
display: grid;
gap: 15px 20px;
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}
.details-item {
display: flex;
flex-direction: row;
align-items: center;
}
.details-label {
font-size: 13px;
font-weight: 500;
color: #6c757d;
margin-right: 10px;
flex-basis: 80px;
flex-shrink: 0;
}
.details-input {
width: 100%;
padding: 6px 10px;
border: 1px solid #ced4da;
border-radius: 4px;
font-size: 14px;
background-color: #fff;
cursor: initial;
min-width: 0;
}
.details-panel textarea {
min-height: 60px;
resize: vertical;
font-family: monospace;
font-size: 13px;
line-height: 1.5;
}
.rule-list-grid {
display: grid;
gap: 20px;
grid-template-columns: repeat(var(--grid-columns, 2), 1fr);
}
.rule-item-container {
position: relative;
background-color: #f8f9fa;
border: 1px solid #e9ecef;
border-radius: 8px;
padding: 15px;
padding-right: 35px; transition: transform .2s ease-in-out, box-shadow .2s ease-in-out;
overflow: hidden;
}
.rule-item-container:hover {
transform: translateY(-3px);
box-shadow: 0 4px 15px rgba(0, 0, 0, .08);
}
.delete-item-btn {
position: absolute;
top: 8px;
right: 8px;
width: 24px;
padding: 0;
height: 24px;
background-color: #dc3545;
border: 2px solid white;
border-radius: 50%;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
font-size: 14px;
font-weight: bold;
line-height: 1;
box-shadow: 0 1px 4px rgba(0,0,0,0.25);
transition: all 0.2s ease-in-out;
z-index: 10;
opacity: 0;
transform: scale(0.5);
}
.rule-item-container:hover .delete-item-btn {
opacity: 1;
transform: scale(1);
}
.delete-item-btn:hover {
transform: scale(1.15);
background-color: #c82333;
}
.file-list-container {
padding: 10px 20px !important;
}
ul.file-list,
ul.file-list ul {
list-style: none;
padding-left: 0;
margin: 0;
}
ul.file-list ul {
padding-left: 20px;
}
.file-list-item {
display: flex;
align-items: center;
padding: 6px 0;
cursor: default; }
.file-list-item.is-dir {
font-weight: 500;
cursor: pointer;
}
.file-list-item.is-dir:hover,
.file-list-item label:hover {
background-color: #f1f3f5;
}
.file-list-item label {
display: flex;
align-items: center;
cursor: pointer;
width: 100%;
}
.file-list-item .icon {
margin-right: 8px;
width: 20px;
text-align: center;
}
.file-list li.dir.collapsed > ul {
display: none;
}
.toggle-icon {
width: 1.2em;
text-align: center;
display: inline-block;
font-weight: bold;
color: #888;
transition: transform 0.2s; }
.dir:not(.collapsed) .toggle-icon {
transform: rotate(90deg);
}
.download-status {
display: none;
width: 12px;
height: 12px;
border-radius: 50%;
margin-left: 8px;
vertical-align: middle;
background-color: #adb5bd; border: 1px solid rgba(0,0,0,0.1);
transition: background-color 0.3s;
}
.show-status .download-status {
display: inline-block;
}
.download-status.downloading {
background-color: #ffc107;
animation: pulse 1.5s infinite;
}
.download-status.downloaded {
background-color: #28a745;
}
.download-status.failed {
background-color: #dc3545;
}
@keyframes pulse {
0% { box-shadow: 0 0 0 0 rgba(255, 193, 7, 0.7); }
70% { box-shadow: 0 0 0 10px rgba(255, 193, 7, 0); }
100% { box-shadow: 0 0 0 0 rgba(255, 193, 7, 0); }
}
.shake-on-delete {
animation: shake-animation 0.7s ease-in-out both;
}
@keyframes shake-animation {
10%, 90% { transform: translateX(-1px); }
20%, 80% { transform: translateX(2px); }
30%, 50%, 70% { transform: translateX(-3px); }
40%, 60% { transform: translateX(3px); }
}
.item-fade-out {
animation: fade-out-animation 0.4s ease-out forwards;
}
.variable-accordion {
display: none;
flex-direction: column;
gap: 15px;
margin-left: 160px;
margin-top: 8px;
padding: 15px;
background-color: #ffffff;
border: 1px solid #dee2e6;
border-radius: 6px;
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}
.variable-list {
display: flex;
flex-wrap: wrap;
gap: 8px;
}
.variable-item {
padding: 5px 12px;
background-color: #e9ecef;
border: 1px solid #dee2e6;
color: #495057;
border-radius: 20px;
cursor: pointer;
font-size: 13px;
font-weight: 500;
transition: all 0.2s ease-in-out;
}
.variable-item:hover {
background-color: #dee2e6;
border-color: #adb5bd;
transform: translateY(-1px);
}
.example-code {
font-family: 'Courier New', Courier, monospace;
white-space: pre-wrap;
word-break: break-all;
background-color: #f8f9fa;
padding: 10px;
border: 1px solid #e9ecef;
border-radius: 4px;
font-size: 13px;
color: #343a40;
margin-bottom: 8px;
}
@keyframes fade-out-animation {
from { opacity: 1; transform: scale(1); }
to { opacity: 0; transform: scale(0.95); }
}
.header-container {
display: flex;
justify-content: space-between;
align-items: flex-end;
margin-bottom: 20px;
flex-wrap: wrap;
gap: 15px;
}
.file-info {
flex: 1;
min-width: 200px;
}
.file-path {
display: flex;
align-items: center;
font-size: 18px;
font-weight: 500;
color: #495057;
margin-bottom: 5px;
}
.file-icon {
margin-right: 8px;
font-size: 20px;
}
.full-path {
font-size: 13px;
color: #6c757d;
word-break: break-all;
}
.header-actions {
flex-shrink: 0;
}
.file-list-item input[type="radio"] {
width: auto !important;
margin-right: 8px;
}
.main-header {
gap: 0.3rem;
margin-bottom: 20px;
}
.header-row {
width: 100%;
}
.file-path {
display: flex;
align-items: center;
font-size: 16px;
font-weight: 500;
color: #495057;
}
.file-icon {
margin-right: 8px;
font-size: 18px;
}
#sourceCodeView {
display: block;
white-space: pre-wrap;
word-break: break-all;
background-color: #282c34; color: #abb2bf; padding: 1em;
border-radius: 6px;
font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
font-size: 14px;
}
#historyList {
list-style: none;
padding: 0;
margin: 0;
}
.history-item {
padding: 10px 15px;
border-bottom: 1px solid #f0f0f0;
cursor: pointer;
transition: background-color 0.2s ease;
word-break: break-all;
font-size: 14px;
}
.history-item:last-child {
border-bottom: none;
}
.history-item:hover {
background-color: #f8f9fa;
}
@media (max-width:768px) {
body {
padding: 10px;
}
.container {
max-width: none;
margin: 0;
padding: 10px;
border: none;
box-shadow: none;
}
.input-with-buttons {
flex-direction: column;
align-items: stretch;
}
.input-with-buttons .action-btn-group {
margin-left: 0;
margin-top: 10px;
display: grid;
grid-template-columns: repeat(3, 1fr);
}
.controls-container {
flex-direction: column;
align-items: stretch;
}
.left-controls,
.top-controls-row {
width: 100%;
}
.rule-list-grid,
.details-form-grid {
grid-template-columns: 1fr;
}
.layout-selector {
display: none;
}
.variable-accordion {
margin-left: 0;
}
.header-container {
flex-direction: column;
align-items: flex-start;
}
.header-actions {
width: 100%;
}
.btn-group {
width: 100%;
}
}