ServerKit is a lightweight, modern server control panel for managing web applications, databases, and services on your VPS or dedicated server. Built with Python/Flask backend and React frontend.
Python astracloudflarecontrol-panelcyberpaneldnsfablehosting-control-panelhosting-panelkimi-k3server-managementserverkitubuntu-web-panelwebserver
Redesign sidebar layout and styles
Juan Denis11408563461b
diff --git a/frontend/src/components/Sidebar.jsx b/frontend/src/components/Sidebar.jsxindex 5d45d54a..9e045648 100644--- a/frontend/src/components/Sidebar.jsx+++ b/frontend/src/components/Sidebar.jsx@@ -8,20 +8,20 @@ const Sidebar = () => {return (<aside className="sidebar">- <div className="brand">+ <div className="brand-section"><div className="brand-logo">- <svg viewBox="0 0 24 24" width="20" height="20" stroke="currentColor" fill="none" strokeWidth="2">+ <svg viewBox="0 0 24 24" width="14" height="14" stroke="currentColor" fill="none" strokeWidth="2.5"><path d="M12 2L2 7l10 5 10-5-10-5zM2 17l10 5 10-5M2 12l10 5 10-5"/></svg></div>- ServerKit+ <span className="brand-text">ServerKit</span></div>- <div className="sidebar-nav-container">- <div className="menu-label">Overview</div>+ <div className="nav-scroll">+ <div className="nav-category">Overview</div><nav className="nav"><NavLink to="/" className={({ isActive }) => `nav-item ${isActive ? 'active' : ''}`} end>- <svg viewBox="0 0 24 24">+ <svg className="nav-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor"><rect x="3" y="3" width="7" height="7"/><rect x="14" y="3" width="7" height="7"/><rect x="14" y="14" width="7" height="7"/>@@ -31,10 +31,10 @@ const Sidebar = () => {</NavLink></nav>- <div className="menu-label">Infrastructure</div>+ <div className="nav-category">Infrastructure</div><nav className="nav"><NavLink to="/servers" className={({ isActive }) => `nav-item ${isActive ? 'active' : ''}`}>- <svg viewBox="0 0 24 24">+ <svg className="nav-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor"><rect x="2" y="2" width="20" height="8" rx="2" ry="2"/><rect x="2" y="14" width="20" height="8" rx="2" ry="2"/><line x1="6" y1="6" x2="6.01" y2="6"/>@@ -43,7 +43,7 @@ const Sidebar = () => {Servers</NavLink><NavLink to="/domains" className={({ isActive }) => `nav-item ${isActive ? 'active' : ''}`}>- <svg viewBox="0 0 24 24">+ <svg className="nav-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor"><circle cx="12" cy="12" r="10"/><line x1="2" y1="12" x2="22" y2="12"/><path d="M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z"/>@@ -51,7 +51,7 @@ const Sidebar = () => {Domains & Sites</NavLink><NavLink to="/apps" className={({ isActive }) => `nav-item ${isActive ? 'active' : ''}`}>- <svg viewBox="0 0 24 24">+ <svg className="nav-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor"><path d="M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z"/><polyline points="3.27 6.96 12 12.01 20.73 6.96"/><line x1="12" y1="22.08" x2="12" y2="12"/>@@ -59,7 +59,7 @@ const Sidebar = () => {Applications</NavLink><NavLink to="/templates" className={({ isActive }) => `nav-item ${isActive ? 'active' : ''}`}>- <svg viewBox="0 0 24 24">+ <svg className="nav-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor"><rect x="3" y="3" width="7" height="9"/><rect x="14" y="3" width="7" height="5"/><rect x="14" y="12" width="7" height="9"/>@@ -68,7 +68,7 @@ const Sidebar = () => {Templates</NavLink><NavLink to="/workflow" className={({ isActive }) => `nav-item ${isActive ? 'active' : ''}`}>- <svg viewBox="0 0 24 24">+ <svg className="nav-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor"><circle cx="18" cy="5" r="3"/><circle cx="6" cy="12" r="3"/><circle cx="18" cy="19" r="3"/>@@ -78,7 +78,7 @@ const Sidebar = () => {Workflow Builder</NavLink><NavLink to="/databases" className={({ isActive }) => `nav-item ${isActive ? 'active' : ''}`}>- <svg viewBox="0 0 24 24">+ <svg className="nav-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor"><ellipse cx="12" cy="5" rx="9" ry="3"/><path d="M21 12c0 1.66-4 3-9 3s-9-1.34-9-3"/><path d="M3 5v14c0 1.66 4 3 9 3s9-1.34 9-3V5"/>@@ -86,14 +86,14 @@ const Sidebar = () => {Databases</NavLink><NavLink to="/ssl" className={({ isActive }) => `nav-item ${isActive ? 'active' : ''}`}>- <svg viewBox="0 0 24 24">+ <svg className="nav-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor"><rect x="3" y="11" width="18" height="11" rx="2" ry="2"/><path d="M7 11V7a5 5 0 0 1 10 0v4"/></svg>SSL Certificates</NavLink><NavLink to="/docker" className={({ isActive }) => `nav-item ${isActive ? 'active' : ''}`}>- <svg viewBox="0 0 24 24">+ <svg className="nav-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor"><rect x="2" y="7" width="6" height="6" rx="1"/><rect x="9" y="7" width="6" height="6" rx="1"/><rect x="16" y="7" width="6" height="6" rx="1"/>@@ -103,7 +103,7 @@ const Sidebar = () => {Docker</NavLink><NavLink to="/git" className={({ isActive }) => `nav-item ${isActive ? 'active' : ''}`}>- <svg viewBox="0 0 24 24">+ <svg className="nav-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor"><circle cx="18" cy="18" r="3"/><circle cx="6" cy="6" r="3"/><path d="M6 21V9a9 9 0 0 0 9 9"/>@@ -112,16 +112,16 @@ const Sidebar = () => {</NavLink></nav>- <div className="menu-label">Operations</div>+ <div className="nav-category">Operations</div><nav className="nav"><NavLink to="/files" className={({ isActive }) => `nav-item ${isActive ? 'active' : ''}`}>- <svg viewBox="0 0 24 24">+ <svg className="nav-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor"><path d="M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z"/></svg>File Manager</NavLink><NavLink to="/ftp" className={({ isActive }) => `nav-item ${isActive ? 'active' : ''}`}>- <svg viewBox="0 0 24 24">+ <svg className="nav-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor"><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"/><polyline points="17 8 12 3 7 8"/><line x1="12" y1="3" x2="12" y2="15"/>@@ -129,13 +129,13 @@ const Sidebar = () => {FTP Server</NavLink><NavLink to="/monitoring" className={({ isActive }) => `nav-item ${isActive ? 'active' : ''}`}>- <svg viewBox="0 0 24 24">+ <svg className="nav-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor"><path d="M22 12h-4l-3 9L9 3l-3 9H2"/></svg>Monitoring</NavLink><NavLink to="/backups" className={({ isActive }) => `nav-item ${isActive ? 'active' : ''}`}>- <svg viewBox="0 0 24 24">+ <svg className="nav-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor"><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"/><polyline points="7 10 12 15 17 10"/><line x1="12" y1="15" x2="12" y2="3"/>@@ -143,14 +143,14 @@ const Sidebar = () => {Backups</NavLink><NavLink to="/cron" className={({ isActive }) => `nav-item ${isActive ? 'active' : ''}`}>- <svg viewBox="0 0 24 24">+ <svg className="nav-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor"><circle cx="12" cy="12" r="10"/><polyline points="12 6 12 12 16 14"/></svg>Cron Jobs</NavLink><NavLink to="/security" className={({ isActive }) => `nav-item ${isActive ? 'active' : ''}`}>- <svg viewBox="0 0 24 24">+ <svg className="nav-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor"><path d="M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z"/><path d="M12 8v4m0 4h.01"/></svg>@@ -158,23 +158,23 @@ const Sidebar = () => {</NavLink></nav>- <div className="menu-label">System</div>+ <div className="nav-category">System</div><nav className="nav"><NavLink to="/terminal" className={({ isActive }) => `nav-item ${isActive ? 'active' : ''}`}>- <svg viewBox="0 0 24 24">+ <svg className="nav-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor"><path d="M4 17l6-6-6-6M12 19h8"/></svg>Terminal / Logs</NavLink><NavLink to="/settings" className={({ isActive }) => `nav-item ${isActive ? 'active' : ''}`}>- <svg viewBox="0 0 24 24">+ <svg className="nav-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor"><circle cx="12" cy="12" r="3"/><path d="M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z"/></svg>Settings</NavLink><NavLink to="/downloads" className={({ isActive }) => `nav-item ${isActive ? 'active' : ''}`}>- <svg viewBox="0 0 24 24">+ <svg className="nav-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor"><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"/><polyline points="7 10 12 15 17 10"/><line x1="12" y1="15" x2="12" y2="3"/>@@ -184,37 +184,28 @@ const Sidebar = () => {</nav></div>- <a- href="https://github.com/jhd3197/ServerKit"- target="_blank"- rel="noopener noreferrer"- className="sidebar-github-link"- title="View on GitHub"- >- <Github size={16} />- <span>GitHub</span>- </a>+ <div className="sidebar-footer">+ <a+ href="https://github.com/jhd3197/ServerKit"+ target="_blank"+ rel="noopener noreferrer"+ className="promo-btn"+ >+ <span className="promo-content">+ <Github size={14} />+ ServerKit+ </span>+ <span className="promo-tag">Star</span>+ </a>- <div className="user-profile">- <div className="user-card">- <div className="avatar">+ <div className="user-mini" onClick={logout} title="Click to logout">+ <div className="user-avatar">{user?.username?.charAt(0).toUpperCase() || 'U'}</div>- <div className="user-info">- <div className="user-name">{user?.username || 'User'}</div>- <div className="user-role">{user?.role || 'user'}</div>+ <div className="user-meta">+ <span className="user-handle">{user?.username || 'User'}</span>+ <span className="user-status">Online</span></div>- <button- onClick={logout}- className="logout-btn"- title="Logout"- >- <svg viewBox="0 0 24 24" width="16" height="16" stroke="currentColor" fill="none" strokeWidth="2">- <path d="M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4"/>- <polyline points="16 17 21 12 16 7"/>- <line x1="21" y1="12" x2="9" y2="12"/>- </svg>- </button></div></div></aside>diff --git a/frontend/src/styles/layout/_sidebar.less b/frontend/src/styles/layout/_sidebar.lessindex 76c5955b..6d99386f 100644--- a/frontend/src/styles/layout/_sidebar.less+++ b/frontend/src/styles/layout/_sidebar.less@@ -1,196 +1,237 @@// ============================================-// SIDEBAR LAYOUT+// SIDEBAR LAYOUT - Pro Style// ============================================.sidebar {width: @sidebar-width;- background-color: @bg-sidebar;- border-right: 1px solid @border-subtle;- .flex-column();+ background-color: @bg-body; // Seamless look with main content+ border-right: 1px solid @border-default;+ display: flex;+ flex-direction: column;position: fixed;height: 100vh;z-index: @z-fixed;+ padding: 0 1rem;@media (max-width: @breakpoint-md) {display: none;}}-// Brand/Logo-.brand {- padding: @space-6 @space-8;- font-size: @font-size-md;- font-weight: @font-weight-bold;- letter-spacing: -0.5px;- color: @text-primary;- .flex-start();- gap: @space-3;- border-bottom: 1px solid @border-subtle;+// Brand Section - Clean & Minimal+.brand-section {+ height: 70px;+ display: flex;+ align-items: center;+ gap: 12px;+ margin-bottom: 1rem;+ padding: 0 0.5rem;flex-shrink: 0;}.brand-logo {- .icon-box(32px);- background: linear-gradient(135deg, @accent-primary, lighten(@accent-primary, 15%));+ width: 28px;+ height: 28px;+ background: linear-gradient(135deg, @accent-primary, darken(@accent-primary, 10%));border-radius: @radius-lg;+ display: grid;+ place-items: center;color: white;+ box-shadow: 0 4px 12px @accent-shadow;}-// Scrollable nav container-.sidebar-nav-container {+.brand-text {+ font-size: 1rem;+ font-weight: @font-weight-semibold;+ color: @text-primary;+ letter-spacing: -0.01em;+}++// Scrollable Navigation Container+.nav-scroll {flex: 1;overflow-y: auto;overflow-x: hidden;- // Custom scrollbar- &::-webkit-scrollbar {- width: 4px;- }-- &::-webkit-scrollbar-track {- background: transparent;- }-- &::-webkit-scrollbar-thumb {- background: @border-active;- border-radius: @radius-full;- }+ // Hide scrollbar visually but keep functionality+ scrollbar-width: none;+ -ms-overflow-style: none;- &::-webkit-scrollbar-thumb:hover {- background: @text-tertiary;+ &::-webkit-scrollbar {+ display: none;}}-// Menu labels-.menu-label {- padding: @space-6 @space-8 @space-2;- font-size: @font-size-xs + 1;+// Navigation Category Labels+.nav-category {+ font-size: 0.7rem;font-weight: @font-weight-semibold;+ color: @text-secondary;text-transform: uppercase;- letter-spacing: 0.05em;- color: @text-tertiary;+ letter-spacing: 0.08em;+ margin: 1.5rem 0 0.5rem 0.75rem;+ opacity: 0.6;++ &:first-of-type {+ margin-top: 0.5rem;+ }}// Navigation.nav {- .flex-column();- padding: 0 @space-4;- gap: @space-1;+ display: flex;+ flex-direction: column;+ gap: 2px;}+// Navigation Item.nav-item {- .flex-start();- gap: @space-3;- padding: @space-2 + 2 @space-4;- color: @text-secondary;+ display: flex;+ align-items: center;+ gap: 12px;+ padding: 0.5rem 0.75rem;+ border-radius: @radius-lg;+ color: @text-tertiary;text-decoration: none;- border-radius: @radius-md;- .transition();+ font-size: 0.85rem;font-weight: @font-weight-medium;+ transition: all 0.2s ease;margin-bottom: 2px;+ position: relative;+ // Pro Hover State&:hover {- background-color: rgba(255, 255, 255, 0.03);color: @text-primary;+ background-color: rgba(255, 255, 255, 0.03);}+ // Pro Active State&.active {background-color: @accent-glow;color: @accent-primary;- border-left: 3px solid @accent-primary;- border-radius: @radius-sm;- }- svg {- width: 16px;- height: 16px;- stroke: currentColor;- stroke-width: 2;- stroke-linecap: round;- stroke-linejoin: round;- fill: none;+ // Active Indicator Dot+ &::after {+ content: '';+ position: absolute;+ right: 8px;+ width: 4px;+ height: 4px;+ border-radius: 50%;+ background-color: @accent-primary;+ box-shadow: 0 0 6px @accent-primary;+ }}}-// GitHub link-.sidebar-github-link {+// Navigation Icon+.nav-icon {+ width: 18px;+ height: 18px;+ stroke: currentColor;+ stroke-width: 2px;+ stroke-linecap: round;+ stroke-linejoin: round;+ fill: none;+ opacity: 0.8;flex-shrink: 0;+}++// Sidebar Footer+.sidebar-footer {+ padding: 1rem 0;+ margin-top: auto;+ border-top: 1px solid @border-default;+ flex-shrink: 0;+}++// Promo Button (GitHub Star CTA)+.promo-btn {display: flex;align-items: center;- gap: @space-2;- padding: @space-3 @space-6;- margin: @space-2 @space-4;- color: @text-tertiary;+ justify-content: space-between;+ padding: 0.65rem 0.75rem;+ margin-bottom: 0.75rem;+ background: @bg-secondary;+ border: 1px solid @border-default;+ border-radius: @radius-lg;+ color: @text-primary;+ font-size: 0.75rem;+ font-weight: @font-weight-semibold;text-decoration: none;- font-size: @font-size-sm;- border-radius: @radius-md;- .transition();+ transition: all 0.2s ease;- svg {- flex-shrink: 0;+ &:hover {+ border-color: @text-tertiary;+ transform: translateY(-1px);}- &:hover {- background-color: @bg-hover;- color: @text-primary;+ .promo-content {+ display: flex;+ align-items: center;+ gap: 8px;}}-// User profile at bottom-.user-profile {- flex-shrink: 0;- padding: @space-4;- border-top: 1px solid @border-subtle;+.promo-tag {+ font-size: 0.65rem;+ background: rgba(245, 158, 11, 0.1);+ color: @warning;+ padding: 2px 6px;+ border-radius: @radius-sm;+ font-weight: @font-weight-bold;}-.user-card {+// User Mini Profile+.user-mini {display: flex;align-items: center;- gap: @space-3;- padding: @space-3;+ gap: 10px;+ padding: 0.5rem;+ cursor: pointer;border-radius: @radius-lg;- background: @bg-hover;- border: 1px solid @border-subtle;+ transition: all 0.2s ease;++ &:hover {+ background: @bg-secondary;+ }}-.avatar {- .icon-box(32px);- background-color: @accent-primary;- border-radius: @radius-full;- color: white;+.user-avatar {+ width: 28px;+ height: 28px;+ background: @text-tertiary;+ border-radius: 50%;+ display: grid;+ place-items: center;+ font-size: 0.75rem;font-weight: @font-weight-semibold;- font-size: @font-size-sm;+ color: white;}-.user-info {+.user-meta {display: flex;flex-direction: column;- flex: 1;}-.user-name {- font-size: @font-size-sm;- font-weight: @font-weight-semibold;+.user-handle {+ font-size: 0.8rem;+ font-weight: @font-weight-medium;color: @text-primary;}-.user-role {- font-size: @font-size-xs;- color: @text-tertiary;- font-family: @font-mono;-}--.logout-btn {- background: none;- border: none;- cursor: pointer;- color: @text-tertiary;- padding: @space-1;- border-radius: @radius-sm;- .transition();-- &:hover {- color: @text-primary;- background: rgba(255, 255, 255, 0.05);+.user-status {+ font-size: 0.7rem;+ color: @success;+ display: flex;+ align-items: center;+ gap: 4px;++ &::before {+ content: '';+ width: 6px;+ height: 6px;+ background: currentColor;+ border-radius: 50%;}}