NUXT 程式與圖片
BIN
進階_NUXT框架/img/圖片1.png
Normal file
After Width: | Height: | Size: 6.8 KiB |
BIN
進階_NUXT框架/img/圖片10.png
Normal file
After Width: | Height: | Size: 97 KiB |
BIN
進階_NUXT框架/img/圖片11.png
Normal file
After Width: | Height: | Size: 11 KiB |
BIN
進階_NUXT框架/img/圖片12.png
Normal file
After Width: | Height: | Size: 106 KiB |
BIN
進階_NUXT框架/img/圖片13.png
Normal file
After Width: | Height: | Size: 14 KiB |
BIN
進階_NUXT框架/img/圖片14.png
Normal file
After Width: | Height: | Size: 20 KiB |
BIN
進階_NUXT框架/img/圖片15.png
Normal file
After Width: | Height: | Size: 13 KiB |
BIN
進階_NUXT框架/img/圖片16.png
Normal file
After Width: | Height: | Size: 15 KiB |
BIN
進階_NUXT框架/img/圖片17.png
Normal file
After Width: | Height: | Size: 2.3 KiB |
BIN
進階_NUXT框架/img/圖片18.png
Normal file
After Width: | Height: | Size: 21 KiB |
BIN
進階_NUXT框架/img/圖片19.png
Normal file
After Width: | Height: | Size: 24 KiB |
BIN
進階_NUXT框架/img/圖片2.png
Normal file
After Width: | Height: | Size: 3.3 KiB |
BIN
進階_NUXT框架/img/圖片20.png
Normal file
After Width: | Height: | Size: 12 KiB |
BIN
進階_NUXT框架/img/圖片3.png
Normal file
After Width: | Height: | Size: 40 KiB |
BIN
進階_NUXT框架/img/圖片4.png
Normal file
After Width: | Height: | Size: 103 KiB |
BIN
進階_NUXT框架/img/圖片5.png
Normal file
After Width: | Height: | Size: 47 KiB |
BIN
進階_NUXT框架/img/圖片6.png
Normal file
After Width: | Height: | Size: 28 KiB |
BIN
進階_NUXT框架/img/圖片7.png
Normal file
After Width: | Height: | Size: 7.7 KiB |
BIN
進階_NUXT框架/img/圖片8.png
Normal file
After Width: | Height: | Size: 27 KiB |
BIN
進階_NUXT框架/img/圖片9.png
Normal file
After Width: | Height: | Size: 10 KiB |
24
進階_NUXT框架/nuxt-demo/.gitignore
vendored
Normal file
@ -0,0 +1,24 @@
|
||||
# Nuxt dev/build outputs
|
||||
.output
|
||||
.data
|
||||
.nuxt
|
||||
.nitro
|
||||
.cache
|
||||
dist
|
||||
|
||||
# Node dependencies
|
||||
node_modules
|
||||
|
||||
# Logs
|
||||
logs
|
||||
*.log
|
||||
|
||||
# Misc
|
||||
.DS_Store
|
||||
.fleet
|
||||
.idea
|
||||
|
||||
# Local env files
|
||||
.env
|
||||
.env.*
|
||||
!.env.example
|
75
進階_NUXT框架/nuxt-demo/README.md
Normal file
@ -0,0 +1,75 @@
|
||||
# Nuxt Minimal Starter
|
||||
|
||||
Look at the [Nuxt documentation](https://nuxt.com/docs/getting-started/introduction) to learn more.
|
||||
|
||||
## Setup
|
||||
|
||||
Make sure to install dependencies:
|
||||
|
||||
```bash
|
||||
# npm
|
||||
npm install
|
||||
|
||||
# pnpm
|
||||
pnpm install
|
||||
|
||||
# yarn
|
||||
yarn install
|
||||
|
||||
# bun
|
||||
bun install
|
||||
```
|
||||
|
||||
## Development Server
|
||||
|
||||
Start the development server on `http://localhost:3000`:
|
||||
|
||||
```bash
|
||||
# npm
|
||||
npm run dev
|
||||
|
||||
# pnpm
|
||||
pnpm dev
|
||||
|
||||
# yarn
|
||||
yarn dev
|
||||
|
||||
# bun
|
||||
bun run dev
|
||||
```
|
||||
|
||||
## Production
|
||||
|
||||
Build the application for production:
|
||||
|
||||
```bash
|
||||
# npm
|
||||
npm run build
|
||||
|
||||
# pnpm
|
||||
pnpm build
|
||||
|
||||
# yarn
|
||||
yarn build
|
||||
|
||||
# bun
|
||||
bun run build
|
||||
```
|
||||
|
||||
Locally preview production build:
|
||||
|
||||
```bash
|
||||
# npm
|
||||
npm run preview
|
||||
|
||||
# pnpm
|
||||
pnpm preview
|
||||
|
||||
# yarn
|
||||
yarn preview
|
||||
|
||||
# bun
|
||||
bun run preview
|
||||
```
|
||||
|
||||
Check out the [deployment documentation](https://nuxt.com/docs/getting-started/deployment) for more information.
|
119
進階_NUXT框架/nuxt-demo/layouts/default.vue
Normal file
@ -0,0 +1,119 @@
|
||||
<template>
|
||||
<div>
|
||||
<nav class="sb-topnav navbar navbar-expand navbar-dark bg-dark">
|
||||
<!-- Navbar Brand-->
|
||||
<a class="navbar-brand ps-3" href="/">Start Bootstrap</a>
|
||||
<!-- Sidebar Toggle-->
|
||||
<button class="btn btn-link btn-sm order-1 order-lg-0 me-4 me-lg-0" id="sidebarToggle" href="#!"><i
|
||||
class="fas fa-bars"></i></button>
|
||||
<!-- Navbar Search-->
|
||||
<form class="d-none d-md-inline-block form-inline ms-auto me-0 me-md-3 my-2 my-md-0">
|
||||
<div class="input-group">
|
||||
<input class="form-control" type="text" placeholder="Search for..." aria-label="Search for..."
|
||||
aria-describedby="btnNavbarSearch" />
|
||||
<button class="btn btn-primary" id="btnNavbarSearch" type="button"><i
|
||||
class="fas fa-search"></i></button>
|
||||
</div>
|
||||
</form>
|
||||
<!-- Navbar-->
|
||||
<ul class="navbar-nav ms-auto ms-md-0 me-3 me-lg-4">
|
||||
<li class="nav-item dropdown">
|
||||
<a class="nav-link dropdown-toggle" id="navbarDropdown" href="#" role="button"
|
||||
data-bs-toggle="dropdown" aria-expanded="false"><i class="fas fa-user fa-fw"></i></a>
|
||||
<ul class="dropdown-menu dropdown-menu-end" aria-labelledby="navbarDropdown">
|
||||
<li><a class="dropdown-item" href="#!">Settings</a></li>
|
||||
<li><a class="dropdown-item" href="#!">Activity Log</a></li>
|
||||
<li>
|
||||
<hr class="dropdown-divider" />
|
||||
</li>
|
||||
<li><a class="dropdown-item" href="#!">Logout</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
<div id="layoutSidenav">
|
||||
<div id="layoutSidenav_nav">
|
||||
<nav class="sb-sidenav accordion sb-sidenav-dark" id="sidenavAccordion">
|
||||
<div class="sb-sidenav-menu">
|
||||
<div class="nav">
|
||||
<div class="sb-sidenav-menu-heading">Core</div>
|
||||
<a class="nav-link" href="/">
|
||||
<div class="sb-nav-link-icon"><i class="fas fa-tachometer-alt"></i></div>
|
||||
Dashboard
|
||||
</a>
|
||||
|
||||
<a class="nav-link collapsed" href="#" data-bs-toggle="collapse"
|
||||
data-bs-target="#collapsePages" aria-expanded="false" aria-controls="collapsePages">
|
||||
<div class="sb-nav-link-icon"><i class="fas fa-book-open"></i></div>
|
||||
Pages
|
||||
<div class="sb-sidenav-collapse-arrow"><i class="fas fa-angle-down"></i></div>
|
||||
</a>
|
||||
<div class="collapse" id="collapsePages" aria-labelledby="headingTwo"
|
||||
data-bs-parent="#sidenavAccordion">
|
||||
<nav class="sb-sidenav-menu-nested nav accordion" id="sidenavAccordionPages">
|
||||
|
||||
<a class="nav-link collapsed" href="#" data-bs-toggle="collapse"
|
||||
data-bs-target="#pagesCollapseError" aria-expanded="false"
|
||||
aria-controls="pagesCollapseError">
|
||||
TTEST_FILE_1
|
||||
<div class="sb-sidenav-collapse-arrow"><i class="fas fa-angle-down"></i></div>
|
||||
</a>
|
||||
<div class="collapse" id="pagesCollapseError" aria-labelledby="headingOne"
|
||||
data-bs-parent="#sidenavAccordionPages">
|
||||
<nav class="sb-sidenav-menu-nested nav">
|
||||
<a class="nav-link" href="/test_file_1/user-vip125-n-LEO">LEO_PAGE</a>
|
||||
<a class="nav-link" href="/test_file_1">test_file_1</a>
|
||||
</nav>
|
||||
</div>
|
||||
</nav>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sb-sidenav-footer">
|
||||
<div class="small">Logged in as:</div>
|
||||
Start Bootstrap
|
||||
</div>
|
||||
</nav>
|
||||
</div>
|
||||
<div id="layoutSidenav_content">
|
||||
<NuxtPage></NuxtPage>
|
||||
<footer class="py-4 bg-light mt-auto">
|
||||
<div class="container-fluid px-4">
|
||||
<div class="d-flex align-items-center justify-content-between small">
|
||||
<div class="text-muted">Copyright © Your Website 2022</div>
|
||||
<div>
|
||||
<a href="#">Privacy Policy</a>
|
||||
·
|
||||
<a href="#">Terms & Conditions</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { useHead } from '#app'
|
||||
|
||||
useHead({
|
||||
title: 'Static Navigation - SB Admin',
|
||||
meta: [
|
||||
{ charset: 'utf-8' },
|
||||
{ 'http-equiv': 'X-UA-Compatible', content: 'IE=edge' },
|
||||
{ name: 'viewport', content: 'width=device-width, initial-scale=1, shrink-to-fit=no' },
|
||||
{ name: 'description', content: '' },
|
||||
{ name: 'author', content: '' }
|
||||
],
|
||||
link: [
|
||||
{ rel: 'stylesheet', href: '/css/styles.css' } // 確保 `styles.css` 位於 public/css 資料夾中
|
||||
],
|
||||
script: [
|
||||
{ src: 'https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js', crossorigin: 'anonymous' },
|
||||
{ src: '/js/scripts.js' }
|
||||
]
|
||||
})
|
||||
</script>
|
5
進階_NUXT框架/nuxt-demo/nuxt.config.ts
Normal file
@ -0,0 +1,5 @@
|
||||
// https://nuxt.com/docs/api/configuration/nuxt-config
|
||||
export default defineNuxtConfig({
|
||||
compatibilityDate: '2024-04-03',
|
||||
devtools: { enabled: true }
|
||||
})
|
9671
進階_NUXT框架/nuxt-demo/package-lock.json
generated
Normal file
17
進階_NUXT框架/nuxt-demo/package.json
Normal file
@ -0,0 +1,17 @@
|
||||
{
|
||||
"name": "nuxt-app",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"build": "nuxt build",
|
||||
"dev": "nuxt dev",
|
||||
"generate": "nuxt generate",
|
||||
"preview": "nuxt preview",
|
||||
"postinstall": "nuxt prepare"
|
||||
},
|
||||
"dependencies": {
|
||||
"nuxt": "^3.13.2",
|
||||
"vue": "latest",
|
||||
"vue-router": "latest"
|
||||
}
|
||||
}
|
12
進階_NUXT框架/nuxt-demo/pages/index.vue
Normal file
@ -0,0 +1,12 @@
|
||||
<template>
|
||||
<div>
|
||||
<NuxtRouteAnnouncer />
|
||||
<NuxtWelcome />
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
layout: 'default_t1', // 或者你可以指定其他自定義的佈局
|
||||
|
||||
}
|
||||
</script>
|
9
進階_NUXT框架/nuxt-demo/pages/test_file_1/index.vue
Normal file
@ -0,0 +1,9 @@
|
||||
<template>
|
||||
<div>
|
||||
test_file_1 的首頁
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
|
||||
</script>
|
12
進階_NUXT框架/nuxt-demo/pages/test_file_1/user-[id]-n-[name].vue
Normal file
@ -0,0 +1,12 @@
|
||||
<template>
|
||||
<div>
|
||||
<p>id: {{ $route.params.id }}</p>
|
||||
<p>name: {{ $route.params.name }}</p>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
const route = useRoute()
|
||||
console.log(route.params.id)
|
||||
console.log(route.params.name)
|
||||
</script>
|
54
進階_NUXT框架/nuxt-demo/public/assets/demo/chart-area-demo.js
Normal file
@ -0,0 +1,54 @@
|
||||
// Set new default font family and font color to mimic Bootstrap's default styling
|
||||
Chart.defaults.global.defaultFontFamily = '-apple-system,system-ui,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif';
|
||||
Chart.defaults.global.defaultFontColor = '#292b2c';
|
||||
|
||||
// Area Chart Example
|
||||
var ctx = document.getElementById("myAreaChart");
|
||||
var myLineChart = new Chart(ctx, {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: ["Mar 1", "Mar 2", "Mar 3", "Mar 4", "Mar 5", "Mar 6", "Mar 7", "Mar 8", "Mar 9", "Mar 10", "Mar 11", "Mar 12", "Mar 13"],
|
||||
datasets: [{
|
||||
label: "Sessions",
|
||||
lineTension: 0.3,
|
||||
backgroundColor: "rgba(2,117,216,0.2)",
|
||||
borderColor: "rgba(2,117,216,1)",
|
||||
pointRadius: 5,
|
||||
pointBackgroundColor: "rgba(2,117,216,1)",
|
||||
pointBorderColor: "rgba(255,255,255,0.8)",
|
||||
pointHoverRadius: 5,
|
||||
pointHoverBackgroundColor: "rgba(2,117,216,1)",
|
||||
pointHitRadius: 50,
|
||||
pointBorderWidth: 2,
|
||||
data: [10000, 30162, 26263, 18394, 18287, 28682, 31274, 33259, 25849, 24159, 32651, 31984, 38451],
|
||||
}],
|
||||
},
|
||||
options: {
|
||||
scales: {
|
||||
xAxes: [{
|
||||
time: {
|
||||
unit: 'date'
|
||||
},
|
||||
gridLines: {
|
||||
display: false
|
||||
},
|
||||
ticks: {
|
||||
maxTicksLimit: 7
|
||||
}
|
||||
}],
|
||||
yAxes: [{
|
||||
ticks: {
|
||||
min: 0,
|
||||
max: 40000,
|
||||
maxTicksLimit: 5
|
||||
},
|
||||
gridLines: {
|
||||
color: "rgba(0, 0, 0, .125)",
|
||||
}
|
||||
}],
|
||||
},
|
||||
legend: {
|
||||
display: false
|
||||
}
|
||||
}
|
||||
});
|
46
進階_NUXT框架/nuxt-demo/public/assets/demo/chart-bar-demo.js
Normal file
@ -0,0 +1,46 @@
|
||||
// Set new default font family and font color to mimic Bootstrap's default styling
|
||||
Chart.defaults.global.defaultFontFamily = '-apple-system,system-ui,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif';
|
||||
Chart.defaults.global.defaultFontColor = '#292b2c';
|
||||
|
||||
// Bar Chart Example
|
||||
var ctx = document.getElementById("myBarChart");
|
||||
var myLineChart = new Chart(ctx, {
|
||||
type: 'bar',
|
||||
data: {
|
||||
labels: ["January", "February", "March", "April", "May", "June"],
|
||||
datasets: [{
|
||||
label: "Revenue",
|
||||
backgroundColor: "rgba(2,117,216,1)",
|
||||
borderColor: "rgba(2,117,216,1)",
|
||||
data: [4215, 5312, 6251, 7841, 9821, 14984],
|
||||
}],
|
||||
},
|
||||
options: {
|
||||
scales: {
|
||||
xAxes: [{
|
||||
time: {
|
||||
unit: 'month'
|
||||
},
|
||||
gridLines: {
|
||||
display: false
|
||||
},
|
||||
ticks: {
|
||||
maxTicksLimit: 6
|
||||
}
|
||||
}],
|
||||
yAxes: [{
|
||||
ticks: {
|
||||
min: 0,
|
||||
max: 15000,
|
||||
maxTicksLimit: 5
|
||||
},
|
||||
gridLines: {
|
||||
display: true
|
||||
}
|
||||
}],
|
||||
},
|
||||
legend: {
|
||||
display: false
|
||||
}
|
||||
}
|
||||
});
|
16
進階_NUXT框架/nuxt-demo/public/assets/demo/chart-pie-demo.js
Normal file
@ -0,0 +1,16 @@
|
||||
// Set new default font family and font color to mimic Bootstrap's default styling
|
||||
Chart.defaults.global.defaultFontFamily = '-apple-system,system-ui,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif';
|
||||
Chart.defaults.global.defaultFontColor = '#292b2c';
|
||||
|
||||
// Pie Chart Example
|
||||
var ctx = document.getElementById("myPieChart");
|
||||
var myPieChart = new Chart(ctx, {
|
||||
type: 'pie',
|
||||
data: {
|
||||
labels: ["Blue", "Red", "Yellow", "Green"],
|
||||
datasets: [{
|
||||
data: [12.21, 15.58, 11.25, 8.32],
|
||||
backgroundColor: ['#007bff', '#dc3545', '#ffc107', '#28a745'],
|
||||
}],
|
||||
},
|
||||
});
|
@ -0,0 +1,4 @@
|
||||
// Call the dataTables jQuery plugin
|
||||
$(document).ready(function() {
|
||||
$('#dataTable').DataTable();
|
||||
});
|
After Width: | Height: | Size: 6.0 KiB |
11701
進階_NUXT框架/nuxt-demo/public/css/styles.css
Normal file
BIN
進階_NUXT框架/nuxt-demo/public/favicon.ico
Normal file
After Width: | Height: | Size: 4.2 KiB |
9
進階_NUXT框架/nuxt-demo/public/js/datatables-simple-demo.js
Normal file
@ -0,0 +1,9 @@
|
||||
window.addEventListener('DOMContentLoaded', event => {
|
||||
// Simple-DataTables
|
||||
// https://github.com/fiduswriter/Simple-DataTables/wiki
|
||||
|
||||
const datatablesSimple = document.getElementById('datatablesSimple');
|
||||
if (datatablesSimple) {
|
||||
new simpleDatatables.DataTable(datatablesSimple);
|
||||
}
|
||||
});
|
26
進階_NUXT框架/nuxt-demo/public/js/scripts.js
Normal file
@ -0,0 +1,26 @@
|
||||
/*!
|
||||
* Start Bootstrap - SB Admin v7.0.5 (https://startbootstrap.com/template/sb-admin)
|
||||
* Copyright 2013-2022 Start Bootstrap
|
||||
* Licensed under MIT (https://github.com/StartBootstrap/startbootstrap-sb-admin/blob/master/LICENSE)
|
||||
*/
|
||||
//
|
||||
// Scripts
|
||||
//
|
||||
|
||||
window.addEventListener('DOMContentLoaded', event => {
|
||||
|
||||
// Toggle the side navigation
|
||||
const sidebarToggle = document.body.querySelector('#sidebarToggle');
|
||||
if (sidebarToggle) {
|
||||
// Uncomment Below to persist sidebar toggle between refreshes
|
||||
// if (localStorage.getItem('sb|sidebar-toggle') === 'true') {
|
||||
// document.body.classList.toggle('sb-sidenav-toggled');
|
||||
// }
|
||||
sidebarToggle.addEventListener('click', event => {
|
||||
event.preventDefault();
|
||||
document.body.classList.toggle('sb-sidenav-toggled');
|
||||
localStorage.setItem('sb|sidebar-toggle', document.body.classList.contains('sb-sidenav-toggled'));
|
||||
});
|
||||
}
|
||||
|
||||
});
|
1
進階_NUXT框架/nuxt-demo/public/robots.txt
Normal file
@ -0,0 +1 @@
|
||||
|
3
進階_NUXT框架/nuxt-demo/server/tsconfig.json
Normal file
@ -0,0 +1,3 @@
|
||||
{
|
||||
"extends": "../.nuxt/tsconfig.server.json"
|
||||
}
|
4
進階_NUXT框架/nuxt-demo/tsconfig.json
Normal file
@ -0,0 +1,4 @@
|
||||
{
|
||||
// https://nuxt.com/docs/guide/concepts/typescript
|
||||
"extends": "./.nuxt/tsconfig.json"
|
||||
}
|