更改项目名为NebulaShell
This commit is contained in:
145
store/@{NebulaShell}/webui/frontend/assets/css/main.css
Normal file
145
store/@{NebulaShell}/webui/frontend/assets/css/main.css
Normal file
@@ -0,0 +1,145 @@
|
||||
* {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
body {
|
||||
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
|
||||
background: #f5f5f5;
|
||||
color: #333;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.app {
|
||||
display: flex;
|
||||
height: 100vh;
|
||||
}
|
||||
|
||||
/* Dock 侧边栏 */
|
||||
.sidebar {
|
||||
width: 64px;
|
||||
min-width: 64px;
|
||||
background: #1a1a2e;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
padding: 16px 0;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.sidebar-nav {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 8px;
|
||||
padding: 0 12px;
|
||||
}
|
||||
|
||||
.nav-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
margin: 0 auto;
|
||||
color: rgba(255, 255, 255, 0.7);
|
||||
text-decoration: none;
|
||||
border-radius: 10px;
|
||||
transition: all 0.2s ease;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.nav-item i {
|
||||
font-size: 22px;
|
||||
}
|
||||
|
||||
.nav-item:hover {
|
||||
background: rgba(255, 255, 255, 0.1);
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.nav-item.active {
|
||||
background: rgba(74, 144, 217, 0.2);
|
||||
color: #4a90d9;
|
||||
}
|
||||
|
||||
.nav-item.active::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
left: -12px;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
width: 3px;
|
||||
height: 20px;
|
||||
background: #4a90d9;
|
||||
border-radius: 0 2px 2px 0;
|
||||
}
|
||||
|
||||
/* Tooltip on hover */
|
||||
.nav-item:hover::after {
|
||||
content: attr(title);
|
||||
position: absolute;
|
||||
left: 52px;
|
||||
background: rgba(0, 0, 0, 0.8);
|
||||
color: #fff;
|
||||
padding: 6px 12px;
|
||||
border-radius: 6px;
|
||||
font-size: 13px;
|
||||
white-space: nowrap;
|
||||
pointer-events: none;
|
||||
opacity: 0;
|
||||
transition: opacity 0.2s;
|
||||
z-index: 100;
|
||||
}
|
||||
|
||||
.nav-item:hover:hover::after {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.sidebar-footer {
|
||||
padding: 0 12px;
|
||||
}
|
||||
|
||||
.settings-btn {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
margin: 0 auto;
|
||||
background: rgba(255, 255, 255, 0.05);
|
||||
border: none;
|
||||
color: rgba(255, 255, 255, 0.7);
|
||||
border-radius: 10px;
|
||||
cursor: pointer;
|
||||
transition: all 0.2s;
|
||||
}
|
||||
|
||||
.settings-btn i {
|
||||
font-size: 22px;
|
||||
}
|
||||
|
||||
.settings-btn:hover {
|
||||
background: rgba(255, 255, 255, 0.1);
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
/* 内容区 */
|
||||
.content {
|
||||
flex: 1;
|
||||
overflow-y: auto;
|
||||
height: 100vh;
|
||||
}
|
||||
|
||||
.content-body {
|
||||
min-height: 100%;
|
||||
}
|
||||
|
||||
.empty-state {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
height: 100%;
|
||||
color: #999;
|
||||
font-size: 15px;
|
||||
}
|
||||
36
store/@{NebulaShell}/webui/frontend/assets/js/main.js
Normal file
36
store/@{NebulaShell}/webui/frontend/assets/js/main.js
Normal file
@@ -0,0 +1,36 @@
|
||||
/**
|
||||
* NebulaShell WebUI 主脚本
|
||||
* 提供基础框架功能
|
||||
*/
|
||||
|
||||
window.WebUI = {
|
||||
/**
|
||||
* 打开设置面板
|
||||
* 其他插件可以扩展此功能
|
||||
*/
|
||||
openSettings: function() {
|
||||
console.log('[WebUI] 打开设置面板');
|
||||
// 设置面板逻辑 - 其他插件可以扩展
|
||||
alert('设置功能需要其他插件支持');
|
||||
},
|
||||
|
||||
/**
|
||||
* 注册导航项
|
||||
* 其他插件可以调用此方法添加导航
|
||||
*/
|
||||
registerNavItem: function(item) {
|
||||
console.log('[WebUI] 注册导航项:', item);
|
||||
// 实际实现需要与后端通信
|
||||
},
|
||||
|
||||
/**
|
||||
* 加载内容到主内容区
|
||||
* 其他插件可以调用此方法加载内容
|
||||
*/
|
||||
loadContent: function(url) {
|
||||
console.log('[WebUI] 加载内容:', url);
|
||||
// 实际实现需要 AJAX 请求
|
||||
}
|
||||
};
|
||||
|
||||
console.log('NebulaShell WebUI 框架已加载');
|
||||
110
store/@{NebulaShell}/webui/frontend/views/index.html
Normal file
110
store/@{NebulaShell}/webui/frontend/views/index.html
Normal file
@@ -0,0 +1,110 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>NebulaShell - 首页</title>
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/remixicon/4.1.0/remixicon.min.css">
|
||||
<link rel="stylesheet" href="/static/css/main.css">
|
||||
<style>
|
||||
.home-content {
|
||||
padding: 40px;
|
||||
}
|
||||
.welcome-banner {
|
||||
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
||||
color: white;
|
||||
padding: 40px;
|
||||
border-radius: 16px;
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
.welcome-banner h2 {
|
||||
font-size: 32px;
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
.welcome-banner p {
|
||||
font-size: 18px;
|
||||
opacity: 0.9;
|
||||
}
|
||||
.features-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
|
||||
gap: 20px;
|
||||
margin-top: 30px;
|
||||
}
|
||||
.feature-card {
|
||||
background: white;
|
||||
padding: 24px;
|
||||
border-radius: 12px;
|
||||
box-shadow: 0 2px 8px rgba(0,0,0,0.1);
|
||||
}
|
||||
.feature-card h3 {
|
||||
color: #333;
|
||||
margin-bottom: 12px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
}
|
||||
.feature-card p {
|
||||
color: #666;
|
||||
line-height: 1.6;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="app">
|
||||
<aside class="sidebar">
|
||||
<nav class="sidebar-nav">
|
||||
<a href="/" class="nav-item active" title="首页">
|
||||
<i class="ri-home-4-line"></i>
|
||||
</a>
|
||||
<a href="/dashboard" class="nav-item" title="仪表盘">
|
||||
<i class="ri-dashboard-line"></i>
|
||||
</a>
|
||||
<a href="/plugins" class="nav-item" title="插件管理">
|
||||
<i class="ri-puzzle-line"></i>
|
||||
</a>
|
||||
<a href="/settings" class="nav-item" title="设置">
|
||||
<i class="ri-settings-3-line"></i>
|
||||
</a>
|
||||
</nav>
|
||||
<div class="sidebar-footer">
|
||||
<button class="settings-btn" title="设置">
|
||||
<i class="ri-settings-3-line"></i>
|
||||
</button>
|
||||
</div>
|
||||
</aside>
|
||||
|
||||
<main class="content">
|
||||
<div class="content-body">
|
||||
<div class="home-content">
|
||||
<div class="welcome-banner">
|
||||
<h2>👋 欢迎使用 NebulaShell</h2>
|
||||
<p>一切皆为插件的轻量级框架</p>
|
||||
</div>
|
||||
|
||||
<div class="features-grid">
|
||||
<div class="feature-card">
|
||||
<h3><i class="ri-plug-line"></i> 插件化架构</h3>
|
||||
<p>所有功能皆可通过插件扩展,灵活定制您的系统</p>
|
||||
</div>
|
||||
<div class="feature-card">
|
||||
<h3><i class="ri-shield-check-line"></i> 安全隔离</h3>
|
||||
<p>进程级沙箱保护,确保插件运行安全</p>
|
||||
</div>
|
||||
<div class="feature-card">
|
||||
<h3><i class="ri-global-line"></i> 多语言支持</h3>
|
||||
<p>内置国际化框架,支持全球多种语言</p>
|
||||
</div>
|
||||
<div class="feature-card">
|
||||
<h3><i class="ri-box-3-line"></i> 轻松部署</h3>
|
||||
<p>Docker 容器化部署,一键启动服务</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
</div>
|
||||
|
||||
<script src="/static/js/main.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
33
store/@{NebulaShell}/webui/frontend/views/layout.html
Normal file
33
store/@{NebulaShell}/webui/frontend/views/layout.html
Normal file
@@ -0,0 +1,33 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>{{ pageTitle }}</title>
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/remixicon/4.1.0/remixicon.min.css">
|
||||
<link rel="stylesheet" href="/static/css/main.css">
|
||||
<script src="https://cdn.jsdelivr.net/npm/alpinejs@3.13.3/dist/cdn.min.js" defer></script>
|
||||
</head>
|
||||
<body>
|
||||
<div class="app">
|
||||
<aside class="sidebar">
|
||||
<nav class="sidebar-nav">
|
||||
{{ navItems }}
|
||||
</nav>
|
||||
<div class="sidebar-footer">
|
||||
<button class="settings-btn" title="设置">
|
||||
<i class="ri-settings-3-line"></i>
|
||||
</button>
|
||||
</div>
|
||||
</aside>
|
||||
|
||||
<main class="content">
|
||||
<div class="content-body">
|
||||
{{ content }}
|
||||
</div>
|
||||
</main>
|
||||
</div>
|
||||
|
||||
<script src="/static/js/main.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user