Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
R
rrpgLink_FrontEnd
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kesaubeeire
rrpgLink_FrontEnd
Commits
0154d47c
Commit
0154d47c
authored
Oct 19, 2023
by
KesaubeEire
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 基础导航栏 & 基础主题切换.
parent
e56f081b
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
220 additions
and
13 deletions
+220
-13
README.md
README.md
+20
-0
favicon.ico
favicon.ico
+0
-0
index.html
index.html
+15
-12
src/App.svelte
src/App.svelte
+150
-1
src/components/card.svelte
src/components/card.svelte
+0
-0
src/components/readme.svelte
src/components/readme.svelte
+0
-0
tailwind.config.cjs
tailwind.config.cjs
+35
-0
No files found.
README.md
0 → 100644
View file @
0154d47c
# rrpg.link 前端
本项目为 rrpg.link 打造, 为更好展示已收藏的 RPGMaker 游戏而建.
## 技术栈
Svelte + daysiUI
## 项目需求
-
[ ] 刮削游戏 (后端部分)
-
[ ] 中日切换
-
[ ] TAG 展示 & 搜索
-
[ ] 主题切换
-
[x] 基础切换
-
[ ] localstorage 记忆
## Bugs
-
[ ]导航栏 Button 连续点击容易失败 (可以考虑换其他 tips 方案)
favicon.ico
0 → 100644
View file @
0154d47c
71.1 KB
index.html
View file @
0154d47c
<!DOCTYPE html>
<html
lang=
"en"
>
<head>
<meta
charset=
"UTF-8"
/>
<link
rel=
"icon"
href=
"/favicon.ico"
/>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1.0"
/>
<title>
Vite App
</title>
</head>
<body>
<div
id=
"app"
></div>
<script
type=
"module"
src=
"/src/main.js"
></script>
</body>
</html>
<html
lang=
"en"
data-theme=
"light"
>
<head>
<meta
charset=
"UTF-8"
/>
<link
rel=
"icon"
href=
"/favicon.ico"
type=
"image/png"
/>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1.0"
/>
<title>
Vite App
</title>
</head>
<body>
<div
id=
"app"
></div>
<script
type=
"module"
src=
"/src/main.js"
></script>
</body>
</html>
\ No newline at end of file
src/App.svelte
View file @
0154d47c
<button class="btn">Hello daisyui</button>
<script>
/**主题*/
const themes = [
'light',
'dark',
'cupcake',
'bumblebee',
'emerald',
'corporate',
'synthwave',
'retro',
'cyberpunk',
'valentine',
'halloween',
'garden',
'forest',
'aqua',
'lofi',
'pastel',
'fantasy',
'wireframe',
'black',
'luxury',
'dracula',
'cmyk',
'autumn',
'business',
'acid',
'lemonade',
'night',
'coffee',
'winter'
];
/**导航栏注入对象*/
const injectText = [
{
id: 'readme',
text: '使用说明',
click: () => {
console.log('TODO: click 弹出使用说明.');
},
hover: () => {
console.log('TODO: hover 弹出使用说明.');
}
},
{
id: 'save',
text: '存档操作',
hint: '导入/导出存档或使用云存档',
click: () => {
console.warn('跳转到存档配置页面.');
// window.open('/save_export/');
}
},
{
id: 'switch',
text: '中日切换',
hint: '切换游戏名称中日文',
click: () => {
console.log('TODO: 中日切换.');
}
},
{
id: 'cheat',
text: '作弊命令',
hint: '常用作弊命令',
click: () => {
console.log('TODO: 常用作弊命令.');
}
}
];
</script>
<!-- <div class="top">决斗编年史</div> -->
<!-- 导航栏 -->
<div class="drawer">
<input id="my-drawer-3" type="checkbox" class="drawer-toggle" />
<div class="drawer-content flex flex-col">
<!-- Navbar -->
<div class="w-full navbar bg-base-300">
<div class="flex-none lg:hidden">
<label for="my-drawer-3" aria-label="open sidebar" class="btn btn-square btn-ghost">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" class="inline-block w-6 h-6 stroke-current">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 6h16M4 12h16M4 18h16" />
</svg>
</label>
</div>
<div class="flex-1 px-2 mx-2">在线RPG分部·里</div>
<div class="flex-none hidden lg:block">
<ul class="menu menu-horizontal">
<!-- Navbar menu content here -->
{#each injectText as Item}
<li>
<div class="tooltip tooltip-left" data-tip={Item.hint}>
<button on:mouseenter={Item.hover} on:click={Item.click}>{Item.text}</button>
</div>
</li>
{/each}
<li>
<!-- svelte-ignore a11y-no-noninteractive-tabindex -->
<div class="dropdown dropdown-left">
<!-- svelte-ignore a11y-label-has-associated-control -->
<label tabindex="0">主题</label>
<ul tabindex="0" class="dropdown-content z-[1] p-2 shadow bg-base-100 rounded-box w-64 h-[70vh] overflow-y-auto">
{#each themes as theme}
<li>
<button
data-theme={theme}
on:click={() => {
document.body.parentElement.setAttribute('data-theme', theme);
console.log('切换主题:\t', theme);
}}
class="rounded my-1 flex justify-between items-center"
>
<div>
{theme}
</div>
<div class="flex h-full flex-shrink-0 flex-wrap gap-1" data-svelte-h="svelte-dkjulf">
<span class="bg-primary w-4 h-4 rounded-box" />
<span class="bg-secondary w-4 h-4 rounded-box" />
<span class="bg-accent w-4 h-4 rounded-box" />
<span class="bg-neutral w-4 h-4 rounded-box" />
</div>
</button>
</li>
{/each}
</ul>
</div>
</li>
</ul>
</div>
</div>
<!-- Page content here -->
Content
</div>
<div class="drawer-side">
<label for="my-drawer-3" aria-label="close sidebar" class="drawer-overlay" />
<ul class="menu p-4 w-80 min-h-full bg-base-200">
<!-- Sidebar content here -->
{#each injectText as Item}
<li>
<button on:click={Item.click}>{Item.text}</button>
</li>
{/each}
</ul>
</div>
</div>
src/components/card.svelte
0 → 100644
View file @
0154d47c
src/components/readme.svelte
0 → 100644
View file @
0154d47c
tailwind.config.cjs
View file @
0154d47c
module.exports = {
content: ['./src/**/*.{svelte,js,ts}'],
plugins: [require('daisyui')],
// 主题
daisyui: {
themes: [
"light",
"dark",
"cupcake",
"bumblebee",
"emerald",
"corporate",
"synthwave",
"retro",
"cyberpunk",
"valentine",
"halloween",
"garden",
"forest",
"aqua",
"lofi",
"pastel",
"fantasy",
"wireframe",
"black",
"luxury",
"dracula",
"cmyk",
"autumn",
"business",
"acid",
"lemonade",
"night",
"coffee",
"winter",
],
},
};
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment