aboutsummaryrefslogtreecommitdiffstats
path: root/frontend/src/App.css
diff options
context:
space:
mode:
authorAdam Mathes <adam@adammathes.com>2026-02-14 14:49:09 -0800
committerAdam Mathes <adam@adammathes.com>2026-02-14 14:49:09 -0800
commit490edf9e9f2911231df6c76ef4afeb3b1fb763d2 (patch)
treeab3ed784ecb79f93af52714a993096e09040a455 /frontend/src/App.css
parentafa87af01c79a9baa539f2992d32154d2a4739bd (diff)
downloadneko-490edf9e9f2911231df6c76ef4afeb3b1fb763d2.tar.gz
neko-490edf9e9f2911231df6c76ef4afeb3b1fb763d2.tar.bz2
neko-490edf9e9f2911231df6c76ef4afeb3b1fb763d2.zip
task: improve mobile responsiveness of React UI\n\n- Added media queries to App.css to handle mobile sidebar layout (overlay with backdrop)\n- Implemented auto-hiding sidebar on mobile when links are clicked\n- Reduced padding and adjusted max-widths for smaller screens in App.css, FeedItem.css, and Settings.css\n- Added window resize listener to Dashboard to manage sidebar visibility based on width\n- Verified all existing tests pass\n\nFixes NK-g818qn
Diffstat (limited to 'frontend/src/App.css')
-rw-r--r--frontend/src/App.css65
1 files changed, 62 insertions, 3 deletions
diff --git a/frontend/src/App.css b/frontend/src/App.css
index 773e114..f47c179 100644
--- a/frontend/src/App.css
+++ b/frontend/src/App.css
@@ -58,16 +58,75 @@ body {
top: 1rem;
left: 1rem;
z-index: 1000;
- background: transparent;
+ background: var(--bg-color);
+ /* Added bg to be visible over content if needed */
border: none;
font-size: 2rem;
line-height: 1;
cursor: pointer;
- padding: 0;
+ padding: 0.2rem;
color: var(--text-color);
- /* Inherit didn't work well if parent is transparent */
+ border-radius: 50%;
+ box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
+ display: flex;
+ align-items: center;
+ justify-content: center;
}
.fixed-toggle:hover {
transform: scale(1.1);
+}
+
+/* Mobile Responsiveness */
+@media (max-width: 768px) {
+ .dashboard-sidebar {
+ position: fixed;
+ top: 0;
+ left: 0;
+ bottom: 0;
+ z-index: 1100;
+ box-shadow: 2px 0 10px rgba(0, 0, 0, 0.2);
+ width: 14rem;
+ /* Slightly wider on mobile for better target area */
+ }
+
+ .dashboard-sidebar.hidden {
+ margin-left: -14rem;
+ }
+
+ .dashboard-main {
+ padding: 1rem;
+ padding-top: 4rem;
+ /* Space for the toggle button */
+ }
+
+ .dashboard-main>* {
+ max-width: 100%;
+ }
+
+ /* When sidebar is visible on mobile, we show a backdrop */
+ .sidebar-backdrop {
+ position: fixed;
+ top: 0;
+ left: 0;
+ right: 0;
+ bottom: 0;
+ background: rgba(0, 0, 0, 0.4);
+ z-index: 1050;
+ animation: fadeIn 0.3s ease;
+ }
+
+ .dashboard.sidebar-visible::after {
+ display: none;
+ }
+}
+
+@keyframes fadeIn {
+ from {
+ opacity: 0;
+ }
+
+ to {
+ opacity: 1;
+ }
} \ No newline at end of file