Spaces:
Sleeping
Sleeping
Download frontend/style.css from cormort/Keyword_finder: direct link, hf CLI and curl.
- Browser
- Download file 8.29 kB
-
https://huggingface.co/spaces/cormort/Keyword_finder/resolve/main/frontend/style.css
- Command line
-
hf download hf://spaces/cormort/Keyword_finder/frontend/style.css
-
curl -L -o style.css https://huggingface.co/spaces/cormort/Keyword_finder/resolve/main/frontend/style.css
8.29 kB
| /* frontend/style.css */ | |
| @import url('https://fonts.googleapis.com/css2?family=Noto+Sans+TC:wght@400;500;700&display=swap'); | |
| :root { | |
| --panel-width: 340px; | |
| --gap-width: 25px; | |
| --bg-color: #f4f7f6; | |
| --panel-bg: #ffffff; | |
| --text-color: #2c3e50; | |
| --text-light: #666; | |
| --primary-color: #007bff; | |
| --primary-hover: #0056b3; | |
| --border-color: #e0e0e0; | |
| --shadow: 0 4px 8px rgba(0, 0, 0, 0.08); | |
| --danger-bg: #fffbe6; | |
| --danger-border: #ffe58f; | |
| --danger-text-header: #d46b08; | |
| --danger-text: #595959; | |
| --danger-text-strong: #bf2c24; | |
| } | |
| body { | |
| font-family: 'Noto Sans TC', sans-serif; | |
| line-height: 1.6; | |
| background-color: var(--bg-color); | |
| margin: 0; | |
| padding: 25px; | |
| font-size: 15px; | |
| transition: padding-left 0.4s ease-in-out; | |
| } | |
| body.layout-collapsed { | |
| padding-left: 25px; | |
| } | |
| body.layout-collapsed .left-panel { | |
| margin-left: calc(-1 * (var(--panel-width) + var(--gap-width))); | |
| } | |
| body.layout-collapsed .right-panel { | |
| max-width: 100%; | |
| } | |
| .hidden { display: none ; } | |
| .header-container { text-align: center; margin-bottom: 25px; } | |
| h1 { color: var(--text-color); margin: 0; font-size: 2.2em; } | |
| .main-layout { display: flex; flex-grow: 1; gap: var(--gap-width); align-items: flex-start; } | |
| .left-panel { | |
| flex: 0 0 var(--panel-width); | |
| background-color: var(--panel-bg); | |
| padding: 25px; | |
| border-radius: 10px; | |
| box-shadow: var(--shadow); | |
| position: sticky; | |
| top: 25px; | |
| max-height: calc(100vh - 50px); | |
| overflow-y: auto; | |
| transition: margin-left 0.4s ease-in-out; | |
| } | |
| .right-panel { | |
| flex: 1; | |
| display: flex; | |
| flex-direction: column; | |
| gap: 25px; | |
| position: relative; | |
| max-width: calc(100% - var(--panel-width) - var(--gap-width)); | |
| transition: max-width 0.4s ease-in-out; | |
| } | |
| #toggle-panel-btn { | |
| position: absolute; | |
| top: -15px; | |
| left: -40px; | |
| width: 30px; | |
| height: 30px; | |
| border-radius: 50%; | |
| background-color: var(--panel-bg); | |
| border: 1px solid var(--border-color); | |
| box-shadow: 0 2px 5px rgba(0,0,0,0.1); | |
| cursor: pointer; | |
| display: flex; | |
| align-items: center; | |
| justify-content: center; | |
| font-size: 1.2rem; | |
| color: var(--text-color); | |
| z-index: 10; | |
| transition: all 0.3s ease; | |
| } | |
| #toggle-panel-btn:hover { | |
| background-color: var(--primary-color); | |
| color: white; | |
| border-color: var(--primary-hover); | |
| } | |
| .content-box { background-color: var(--panel-bg); padding: 25px; border-radius: 10px; box-shadow: var(--shadow); } | |
| .left-panel h2 { font-size: 1.2em; margin: 0 0 20px 0; display: flex; align-items: center; } | |
| .left-panel .icon { margin-right: 10px; opacity: 0.7; } | |
| .right-panel h2 { color: var(--text-color); border-bottom: 1px solid var(--border-color); padding-bottom: 12px; text-align: center; margin: 0 0 20px 0; font-size: 1.6em; } | |
| .form-group { margin-bottom: 15px; } | |
| .form-group label { display: block; margin-bottom: 5px; font-weight: 500; font-size: 0.9em; } | |
| .form-group select, .form-group textarea { width: 100%; box-sizing: border-box; padding: 8px 10px; border: 1px solid var(--border-color); border-radius: 6px; font-size: 0.9em; } | |
| .custom-file-input { border: 2px dashed #bdc3c7; border-radius: 8px; padding: 15px 10px; text-align: center; cursor: pointer; transition: background-color 0.3s, border-color 0.3s; } | |
| .custom-file-input:hover, .custom-file-input.highlight { border-color: var(--primary-color); background-color: #f8f9fa; } | |
| .custom-file-input input[type="file"] { display: none; } | |
| .custom-file-input .file-label-button { background: none; border: none; font-size: 1em; color: var(--primary-color); font-weight: 500; cursor: pointer; padding: 0; } | |
| .custom-file-input #file-count-text { font-size: 0.9em; color: var(--text-light); margin-top: 5px; display: block; } | |
| .divider { border: none; border-top: 1px solid var(--border-color); margin: 25px 0; } | |
| button#submit-btn { | |
| width: 100%; | |
| padding: 12px; | |
| background-color: var(--primary-color); | |
| color: white; | |
| border: none; | |
| border-radius: 6px; | |
| cursor: pointer; | |
| font-size: 1rem; | |
| font-weight: bold; | |
| margin-bottom: 25px; | |
| } | |
| button#submit-btn:hover { background-color: var(--primary-hover); } | |
| #status-message { padding: 3rem; border: 2px dashed var(--border-color); border-radius: 8px; text-align: center; font-size: 1.1rem; color: var(--text-light); } | |
| #results-area { display: flex; flex-direction: column; gap: 25px; } | |
| #summary-section { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1.5rem; } | |
| .summary-card { text-align: center; } | |
| .summary-card h3 { margin: 0 0 0.5rem 0; font-size: 0.95rem; font-weight: 500; color: var(--text-light); } | |
| .summary-card p { margin: 0; font-size: 2.5rem; font-weight: 700; color: var(--primary-color); } | |
| #filter-section { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 15px; } | |
| .filter-group label { font-size: 0.85em; font-weight: 500; margin-bottom: 5px; display: block; } | |
| .filter-group select { width: 100%; padding: 6px 10px; font-size: 0.85em; border-radius: 6px; border: 1px solid #bdc3c7; } | |
| #error-log-area { background-color: var(--danger-bg); border: 1px solid var(--danger-border); border-radius: 8px; padding: 1rem 1.5rem; margin-top: 20px; } | |
| #error-log-area h4 { margin: 0 0 0.75rem 0; color: var(--danger-text-header); font-weight: 700; } | |
| #error-log-area ul { margin: 0; padding-left: 20px; } | |
| #error-log-area li { color: var(--danger-text); margin-bottom: 0.5rem; } | |
| #error-log-area li strong { color: var(--danger-text-strong); } | |
| .table-container { max-height: 60vh; overflow: auto; border: 1px solid var(--border-color); border-radius: 8px; margin-top: 20px; } | |
| table { width: 100%; border-collapse: collapse; } | |
| th, td { padding: 10px 12px; text-align: left; border-bottom: 1px solid #eee; } | |
| th { background-color: #f8f9fa; position: sticky; top: 0; z-index: 2; font-size: 0.9em; white-space: nowrap; } | |
| td { background-color: var(--panel-bg); font-size: 0.85em; } | |
| tr:nth-child(even) td { background-color: #fcfcfc; } | |
| #results-table tbody tr { cursor: pointer; transition: background-color 0.2s; } | |
| #results-table tbody tr:hover td { background-color: #f0f8ff; } | |
| td strong { color: #e74c3c; font-weight: bold; } | |
| #loader { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(255, 255, 255, 0.85); z-index: 9999; display: flex; justify-content: center; align-items: center; } | |
| .spinner { border: 8px solid #f3f3f3; border-top: 8px solid var(--primary-color); border-radius: 50%; width: 60px; height: 60px; animation: spin 1s linear infinite; } | |
| @keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } } | |
| .modal { position: fixed; z-index: 1000; left: 0; top: 0; width: 100%; height: 100%; overflow: auto; background-color: rgba(0, 0, 0, 0.5); display: flex; align-items: center; justify-content: center; } | |
| .modal.hidden { display: none; } | |
| .modal-content { background-color: #fefefe; margin: auto; padding: 0; border: 1px solid #888; width: 80%; max-width: 900px; border-radius: 8px; box-shadow: 0 5px 15px rgba(0,0,0,0.3); display: flex; flex-direction: column; max-height: 85vh; } | |
| .modal-header { padding: 1rem 1.5rem; background-color: var(--primary-color); color: white; display: flex; justify-content: space-between; align-items: center; border-top-left-radius: 8px; border-top-right-radius: 8px; } | |
| .modal-header h3 { margin: 0; font-size: 1.2rem; } | |
| .close-button { color: #fff; font-size: 28px; font-weight: bold; opacity: 0.8; } | |
| .close-button:hover, .close-button:focus { color: #000; text-decoration: none; cursor: pointer; opacity: 1; } | |
| .modal-body { padding: 1.5rem; overflow-y: auto; } | |
| #modal-text-content { white-space: pre-wrap; word-wrap: break-word; font-family: 'Menlo', 'Monaco', 'Courier New', monospace; font-size: 0.9rem; line-height: 1.6; color: #333; } | |
| @media (max-width: 992px) { | |
| .main-layout { flex-direction: column; } | |
| .left-panel { width: 100%; box-sizing: border-box; max-height: none; position: static; } | |
| .right-panel { max-width: 100%; } | |
| #toggle-panel-btn { display: none; } | |
| } | |
| @media (max-width: 600px) { | |
| body { padding: 15px; } | |
| .header-container { margin-bottom: 15px; } | |
| .left-panel, .right-panel, .content-box { padding: 15px; } | |
| h1 { font-size: 1.8em; } | |
| } |