From 78604d3bda3c0f0c4a011ded7b8fdb396337c4b3 Mon Sep 17 00:00:00 2001 From: Brendan O'Leary Date: Tue, 16 Dec 2025 20:49:24 -0500 Subject: [PATCH] Page design update --- src/CrossPointWebServer.cpp | 418 +++++++++++++++++++++++++++--------- 1 file changed, 312 insertions(+), 106 deletions(-) diff --git a/src/CrossPointWebServer.cpp b/src/CrossPointWebServer.cpp index 1a1637d..62479ac 100644 --- a/src/CrossPointWebServer.cpp +++ b/src/CrossPointWebServer.cpp @@ -166,8 +166,7 @@ static const char* FILES_PAGE_HEADER = R"rawliteral( } h1 { color: #2c3e50; - border-bottom: 2px solid #3498db; - padding-bottom: 10px; + margin-bottom: 5px; } h2 { color: #34495e; @@ -180,6 +179,41 @@ static const char* FILES_PAGE_HEADER = R"rawliteral( margin: 15px 0; box-shadow: 0 2px 4px rgba(0,0,0,0.1); } + .page-header { + display: flex; + justify-content: space-between; + align-items: center; + flex-wrap: wrap; + gap: 15px; + margin-bottom: 20px; + padding-bottom: 15px; + border-bottom: 2px solid #3498db; + } + .page-header-left { + display: flex; + align-items: baseline; + gap: 12px; + flex-wrap: wrap; + } + .breadcrumb-inline { + color: #7f8c8d; + font-size: 1.1em; + } + .breadcrumb-inline a { + color: #3498db; + text-decoration: none; + } + .breadcrumb-inline a:hover { + text-decoration: underline; + } + .breadcrumb-inline .sep { + margin: 0 6px; + color: #bdc3c7; + } + .breadcrumb-inline .current { + color: #2c3e50; + font-weight: 500; + } .nav-links { margin: 20px 0; } @@ -195,10 +229,118 @@ static const char* FILES_PAGE_HEADER = R"rawliteral( .nav-links a:hover { background-color: #2980b9; } + /* Add dropdown styles */ + .add-dropdown { + position: relative; + display: inline-block; + } + .add-btn { + background-color: #e67e22; + color: white; + padding: 10px 20px; + border: none; + border-radius: 4px; + cursor: pointer; + font-size: 1em; + font-weight: 600; + display: flex; + align-items: center; + gap: 6px; + } + .add-btn:hover { + background-color: #d35400; + } + .add-btn .arrow { + font-size: 0.8em; + transition: transform 0.2s; + } + .add-dropdown.open .add-btn .arrow { + transform: rotate(180deg); + } + .dropdown-menu { + display: none; + position: absolute; + right: 0; + top: 100%; + margin-top: 5px; + background: white; + border-radius: 8px; + box-shadow: 0 4px 12px rgba(0,0,0,0.15); + min-width: 200px; + z-index: 100; + overflow: hidden; + } + .add-dropdown.open .dropdown-menu { + display: block; + } + .dropdown-item { + display: flex; + align-items: center; + gap: 10px; + padding: 12px 16px; + cursor: pointer; + border: none; + background: none; + width: 100%; + text-align: left; + font-size: 1em; + color: #2c3e50; + transition: background-color 0.15s; + } + .dropdown-item:hover { + background-color: #f8f9fa; + } + .dropdown-item .icon { + font-size: 1.2em; + } + .dropdown-divider { + height: 1px; + background-color: #eee; + margin: 0; + } + /* Upload modal */ + .modal-overlay { + display: none; + position: fixed; + top: 0; + left: 0; + right: 0; + bottom: 0; + background: rgba(0,0,0,0.5); + z-index: 200; + justify-content: center; + align-items: center; + } + .modal-overlay.open { + display: flex; + } + .modal { + background: white; + border-radius: 8px; + padding: 25px; + max-width: 450px; + width: 90%; + box-shadow: 0 4px 20px rgba(0,0,0,0.2); + } + .modal h3 { + margin: 0 0 15px 0; + color: #2c3e50; + } + .modal-close { + float: right; + background: none; + border: none; + font-size: 1.5em; + cursor: pointer; + color: #7f8c8d; + line-height: 1; + } + .modal-close:hover { + color: #2c3e50; + } .file-table { width: 100%; border-collapse: collapse; - margin-top: 10px; } .file-table th, .file-table td { padding: 12px; @@ -255,32 +397,12 @@ static const char* FILES_PAGE_HEADER = R"rawliteral( color: #3498db; text-decoration: underline; } - .breadcrumb { - padding: 10px 15px; - background-color: #f8f9fa; - border-radius: 4px; - margin-bottom: 15px; - } - .breadcrumb a { - color: #3498db; - text-decoration: none; - } - .breadcrumb a:hover { - text-decoration: underline; - } - .breadcrumb span { - color: #7f8c8d; - margin: 0 5px; - } .upload-form { - margin-top: 15px; - padding: 15px; - background-color: #f8f9fa; - border-radius: 4px; - border: 2px dashed #ddd; + margin-top: 10px; } .upload-form input[type="file"] { margin: 10px 0; + width: 100%; } .upload-btn { background-color: #27ae60; @@ -290,6 +412,7 @@ static const char* FILES_PAGE_HEADER = R"rawliteral( border-radius: 4px; cursor: pointer; font-size: 1em; + width: 100%; } .upload-btn:hover { background-color: #219a52; @@ -301,7 +424,7 @@ static const char* FILES_PAGE_HEADER = R"rawliteral( .file-info { color: #7f8c8d; font-size: 0.85em; - margin-top: 5px; + margin: 8px 0; } .no-files { text-align: center; @@ -324,24 +447,21 @@ static const char* FILES_PAGE_HEADER = R"rawliteral( color: #721c24; border: 1px solid #f5c6cb; } - .summary { + .contents-header { display: flex; justify-content: space-between; - padding: 10px 0; - border-bottom: 2px solid #eee; - margin-bottom: 10px; + align-items: center; + margin-bottom: 12px; } - .summary-item { - text-align: center; + .contents-title { + font-size: 1.1em; + font-weight: 600; + color: #34495e; + margin: 0; } - .summary-number { - font-size: 1.5em; - font-weight: bold; - color: #2c3e50; - } - .summary-label { - font-size: 0.85em; + .summary-inline { color: #7f8c8d; + font-size: 0.9em; } #progress-container { display: none; @@ -367,16 +487,16 @@ static const char* FILES_PAGE_HEADER = R"rawliteral( color: #7f8c8d; } .folder-form { - display: flex; - gap: 10px; - margin-top: 15px; + margin-top: 10px; } .folder-input { - flex: 1; + width: 100%; padding: 10px; border: 1px solid #ddd; border-radius: 4px; font-size: 1em; + margin-bottom: 10px; + box-sizing: border-box; } .folder-btn { background-color: #f39c12; @@ -386,6 +506,7 @@ static const char* FILES_PAGE_HEADER = R"rawliteral( border-radius: 4px; cursor: pointer; font-size: 1em; + width: 100%; } .folder-btn:hover { background-color: #d68910; @@ -393,8 +514,6 @@ static const char* FILES_PAGE_HEADER = R"rawliteral( -

📁 File Manager

- + + + + + +