hudada-cli
Version:
专为程序员准备的本地文档搜索,快捷开发工具
585 lines (499 loc) • 10.6 kB
CSS
body {
font-family: Arial, sans-serif;
max-width: 800px;
margin: 0 auto;
padding: 20px;
background: #f5f5f5;
}
.drop-zone {
width: 100%;
min-height: 200px;
border: 2px dashed #ccc;
border-radius: 8px;
display: flex;
align-items: center;
justify-content: center;
margin: 20px 0;
background: white;
transition: all 0.3s;
}
.drop-zone.dragover {
background: #e1f5fe;
border-color: #2196f3;
}
.file-list {
margin-top: 20px;
}
.file-item {
background: white;
padding: 10px;
margin: 5px 0;
border-radius: 4px;
display: flex;
justify-content: space-between;
align-items: center;
}
.progress {
width: 100%;
height: 4px;
background: #f0f0f0;
border-radius: 2px;
overflow: hidden;
}
.progress-bar {
height: 100%;
background: #2196f3;
width: 0%;
transition: width 0.3s;
}
.existing-files {
margin-top: 30px;
background: white;
border-radius: 8px;
padding: 20px;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.existing-file {
display: flex;
justify-content: space-between;
align-items: center;
padding: 10px;
border-bottom: 1px solid #eee;
}
.existing-file:last-child {
border-bottom: none;
}
.file-info {
display: flex;
align-items: center;
gap: 15px;
}
.file-name {
font-weight: 500;
}
.file-size {
color: #666;
font-size: 0.9em;
}
.download-btn {
background: #4caf50;
color: white;
padding: 5px 15px;
border-radius: 4px;
text-decoration: none;
font-size: 0.9em;
transition: background 0.3s;
}
.download-btn:hover {
background: #388e3c;
}
.section-title {
margin: 30px 0 15px;
color: #333;
font-size: 1.2em;
}
.refresh-btn {
background: #2196f3;
color: white;
border: none;
padding: 8px 16px;
border-radius: 4px;
cursor: pointer;
float: right;
transition: background 0.3s;
}
.refresh-btn:hover {
background: #1976d2;
}
.folder-info {
color: #1976d2;
margin-left: 10px;
font-size: 0.9em;
}
.upload-info {
margin-top: 10px;
font-size: 0.9em;
color: #666;
}
.folder-item {
padding: 8px;
border-radius: 4px;
cursor: pointer;
transition: background 0.2s;
}
.folder-item:hover {
background: #f5f5f5;
}
.folder-content {
margin-left: 20px;
display: none;
}
.folder-content.open {
display: block;
}
.file-icon {
margin-right: 8px;
}
.folder-icon {
color: #FFA000;
}
.file-icon {
color: #2196F3;
}
.folder-header {
display: flex;
align-items: center;
justify-content: space-between;
}
.folder-actions {
display: flex;
gap: 10px;
}
.download-folder {
background: #4CAF50;
color: white;
border: none;
padding: 4px 8px;
border-radius: 4px;
cursor: pointer;
font-size: 0.8em;
}
.download-folder:hover {
background: #388E3C;
}
.breadcrumb {
margin-bottom: 15px;
padding: 8px;
background: #f5f5f5;
border-radius: 4px;
}
.size-info {
color: #666;
font-size: 0.9em;
margin-left: 10px;
}
.folder-structure {
margin-top: 20px;
background: white;
border-radius: 8px;
padding: 20px;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.file-table th,
.file-table td {
padding: 12px;
text-align: left;
border-bottom: 1px solid #eee;
}
.file-table th {
background: #f5f5f5;
font-weight: 500;
color: #333;
}
.file-table tr:hover {
background: #f9f9f9;
}
.file-table tr:last-child td {
border-bottom: none;
}
.file-table {
width: 100%;
border-collapse: collapse;
margin: 20px 0;
background: white;
border-radius: 8px;
overflow: hidden;
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.file-icon {
margin-right: 8px;
font-size: 1.2em;
}
.file-name {
display: flex;
align-items: center;
}
.file-actions {
display: flex;
gap: 8px;
}
.action-btn {
padding: 4px 8px;
border: none;
border-radius: 4px;
cursor: pointer;
font-size: 0.9em;
color: white;
}
.download-btn {
background: #4CAF50;
}
.delete-btn {
background: #f44336;
}
.empty-message {
text-align: center;
padding: 40px;
color: #666;
background: white;
border-radius: 8px;
margin: 20px 0;
}
.ssh-context-menu {
position: fixed;
background: #1e1e1e;
border: 1px solid #444;
border-radius: 4px;
padding: 4px 0;
min-width: 120px;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
z-index: 1000;
}
.context-menu-item {
padding: 6px 12px;
cursor: pointer;
color: #fff;
font-size: 14px;
}
.context-menu-item:hover {
background: #2c2c2c;
}
.upload-buttons {
display: flex;
gap: 16px;
margin-top: 20px;
}
.upload-btn {
display: flex;
align-items: center;
gap: 8px;
padding: 10px 20px;
border: none;
border-radius: 6px;
background-color: #4a90e2;
color: white;
font-size: 14px;
cursor: pointer;
transition: background-color 0.3s;
}
.upload-btn:hover {
background-color: #357abd;
}
.folder-btn {
background-color: #28a745;
}
.folder-btn:hover {
background-color: #218838;
}
.btn-icon {
font-size: 16px;
}
/* 适配移动端 */
@media (max-width: 768px) {
.upload-buttons {
flex-direction: column;
gap: 10px;
}
.upload-btn {
width: 100%;
justify-content: center;
}
}
.breadcrumb {
padding: 10px;
margin-bottom: 20px;
background: #f5f5f5;
border-radius: 4px;
}
.breadcrumb-item {
color: #1890ff;
cursor: pointer;
}
.breadcrumb-item:hover {
text-decoration: underline;
}
.breadcrumb-separator {
margin: 0 8px;
color: #999;
}
.file-name {
display: flex;
align-items: center;
gap: 8px;
cursor: pointer;
}
.file-name:hover {
color: #1890ff;
}
.download-btn {
display: inline-flex;
align-items: center;
gap: 4px;
padding: 6px 12px;
border: none;
border-radius: 4px;
background-color: #1890ff;
color: white;
font-size: 14px;
cursor: pointer;
text-decoration: none;
transition: all 0.3s ease;
}
.download-btn:hover {
background-color: #40a9ff;
transform: translateY(-1px);
box-shadow: 0 2px 4px rgba(24, 144, 255, 0.2);
}
.download-btn:active {
background-color: #096dd9;
transform: translateY(0);
}
.btn-icon {
font-size: 16px;
line-height: 1;
}
.file-table {
width: 100%;
border-collapse: collapse;
margin-top: 16px;
}
.file-table th,
.file-table td {
padding: 12px;
border-bottom: 1px solid #f0f0f0;
}
.file-table th {
background: #fafafa;
font-weight: 500;
text-align: left;
}
.file-table tr:hover {
background-color: #fafafa;
}
.file-name {
display: flex;
align-items: center;
gap: 8px;
cursor: pointer;
}
.file-icon {
font-size: 18px;
}
@media (max-width: 768px) {
.download-btn {
padding: 4px 8px;
font-size: 12px;
}
.btn-icon {
font-size: 14px;
}
.file-table td {
padding: 8px;
}
}
.action-column {
display: flex;
gap: 8px;
align-items: center;
}
.delete-btn {
display: inline-flex;
align-items: center;
gap: 4px;
padding: 6px 12px;
border: none;
border-radius: 4px;
background-color: #ff4d4f;
color: white;
font-size: 14px;
cursor: pointer;
transition: all 0.3s ease;
}
.delete-btn:hover {
background-color: #ff7875;
transform: translateY(-1px);
box-shadow: 0 2px 4px rgba(255, 77, 79, 0.2);
}
.delete-btn:active {
background-color: #d9363e;
transform: translateY(0);
}
@media (max-width: 768px) {
.action-column {
flex-direction: column;
gap: 4px;
}
.delete-btn {
padding: 4px 8px;
font-size: 12px;
}
}
.modal {
display: none;
position: fixed;
z-index: 1000;
left: 0;
top: 0;
width: 100%;
height: 100%;
overflow: auto;
background-color: rgba(0,0,0,0.5);
backdrop-filter: blur(5px);
}
.modal-content {
background-color: white;
margin: 10% auto;
padding: 20px;
border-radius: 10px;
width: 80%;
max-width: 1200px;
position: relative;
box-shadow: 0 4px 6px rgba(0,0,0,0.1);
animation: modalSlideIn 0.3s ease;
}
.modal-content iframe {
width: 100%;
height: 70vh;
border: none;
border-radius: 8px;
}
.close-btn {
color: #aaa;
float: right;
font-size: 28px;
font-weight: bold;
cursor: pointer;
}
.close-btn:hover {
color: black;
}
@keyframes modalSlideIn {
from { opacity: 0; transform: translateY(-50px); }
to { opacity: 1; transform: translateY(0); }
}
.search-container {
display: flex;
align-items: center;
margin-bottom: 15px;
gap: 10px;
}
#searchInput {
flex-grow: 1;
padding: 8px 12px;
border: 1px solid #ddd;
border-radius: 20px;
font-size: 14px;
transition: all 0.3s ease;
}
#searchInput:focus {
outline: none;
border-color: #4CAF50;
box-shadow: 0 0 5px rgba(76, 175, 80, 0.3);
}
#searchType {
padding: 8px;
border: 1px solid #ddd;
border-radius: 20px;
background-color: white;
font-size: 14px;
}