Skip to content

Commit

Permalink
Merge pull request #3 from aaronlamz/dev
Browse files Browse the repository at this point in the history
chore: node version compatibility& add footer
  • Loading branch information
aaronlamz authored Aug 22, 2024
2 parents a854570 + 0178c9f commit 57bd0f8
Show file tree
Hide file tree
Showing 6 changed files with 51 additions and 16 deletions.
8 changes: 4 additions & 4 deletions navpress.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ export default {
github: 'https://github.com/aaronlamz/navpress',
base:'/navpress/',
meta: {
title: 'My Custom Title',
description: 'This is a description for SEO.',
keywords: 'static site, generator, SEO',
author: 'Author Name',
title: 'My Navpress',
description: 'Navpress - a simple static site generator with configurable navigation',
keywords: 'static site, generator, navpress, vue',
author: 'aaronlamz',
},
sidebar: [
{
Expand Down
12 changes: 8 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "navpress",
"version": "1.0.0-beta.4",
"version": "1.0.0-beta.5",
"description": "Easy navigation website generator",
"main": "index.js",
"type": "module",
Expand All @@ -18,9 +18,13 @@
"type": "git",
"url": "git+https://github.com/aaronlamz/nav-generator.git"
},
"keywords": [],
"author": "",
"license": "ISC",
"keywords": ["navpress"],
"author": "aaronlamz",
"engines": {
"node": ">=20"
},
"engineStrict": true,
"license": "MIT",
"bugs": {
"url": "https://github.com/aaronlamz/nav-generator/issues"
},
Expand Down
5 changes: 4 additions & 1 deletion src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<Sidebar :sidebar="config.sidebar" class="sidebar-container bg-gray-100 dark:bg-gray-800" />
<div class="content-container flex-1 overflow-y-auto p-6 dark:bg-gray-900">
<router-view />
<FooterComponent />
</div>
</div>
</div>
Expand All @@ -13,11 +14,13 @@
<script>
import Navbar from './components/Navbar.vue'
import Sidebar from './components/Sidebar.vue'
import FooterComponent from './components/FooterComponent.vue';
export default {
components: {
Navbar,
Sidebar
Sidebar,
FooterComponent
},
data() {
return {
Expand Down
23 changes: 23 additions & 0 deletions src/components/FooterComponent.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<template>
<footer class="bg-gray-100 dark:bg-gray-800 text-center py-4 mt-4">
<span class="text-gray-500 dark:text-gray-400">
Powered by
<a href="https://github.com/aaronlamz/navpress" target="_blank" class="text-blue-500 hover:text-blue-700"> Navpress</a>
</span>
<a href="https://github.com/aaronlamz/navpress" target="_blank" class="inline-flex items-center ml-2">
<i class="fab fa-github text-gray-500 hover:text-gray-700 w-5 h-5"></i>
</a>
</footer>
</template>

<script>
export default {
name: 'FooterComponent',
};
</script>

<style scoped>
footer {
margin-top: auto;
}
</style>
15 changes: 8 additions & 7 deletions src/components/Navbar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,11 @@
</ul> -->
<div class="flex items-center">
<a v-if="config.github" :href="config.github" target="_blank" rel="noopener noreferrer" class="ml-4">
<svg class="w-6 h-6 text-gray-900 dark:text-gray-300 hover:text-blue-500 dark:hover:text-blue-400" fill="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
<path d="M12 0a12 12 0 00-3.8 23.4c.6.1.8-.3.8-.6V21.5c-3.3.7-4-1.6-4-1.6-.5-1.4-1.2-1.8-1.2-1.8-.9-.7.1-.7.1-.7 1 .1 1.5 1 1.5 1 .9 1.5 2.3 1.1 2.9.8.1-.7.3-1.1.5-1.4-2.6-.3-5.4-1.3-5.4-5.9 0-1.3.5-2.4 1.2-3.2-.1-.3-.5-1.5.1-3.1 0 0 1-.3 3.3 1.2a11.3 11.3 0 016 0c2.2-1.5 3.3-1.2 3.3-1.2.6 1.6.2 2.8.1 3.1.7.8 1.2 1.8 1.2 3.2 0 4.6-2.8 5.6-5.4 5.9.3.3.6.8.6 1.6v2.4c0 .4.2.7.8.6A12 12 0 0012 0"></path>
<svg class="w-6 h-6 text-gray-900 dark:text-gray-300 hover:text-blue-500 dark:hover:text-blue-400"
fill="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
<path
d="M12 0a12 12 0 00-3.8 23.4c.6.1.8-.3.8-.6V21.5c-3.3.7-4-1.6-4-1.6-.5-1.4-1.2-1.8-1.2-1.8-.9-.7.1-.7.1-.7 1 .1 1.5 1 1.5 1 .9 1.5 2.3 1.1 2.9.8.1-.7.3-1.1.5-1.4-2.6-.3-5.4-1.3-5.4-5.9 0-1.3.5-2.4 1.2-3.2-.1-.3-.5-1.5.1-3.1 0 0 1-.3 3.3 1.2a11.3 11.3 0 016 0c2.2-1.5 3.3-1.2 3.3-1.2.6 1.6.2 2.8.1 3.1.7.8 1.2 1.8 1.2 3.2 0 4.6-2.8 5.6-5.4 5.9.3.3.6.8.6 1.6v2.4c0 .4.2.7.8.6A12 12 0 0012 0">
</path>
</svg>
</a>
<button @click="toggleDarkMode" class="ml-4 text-gray-900 dark:text-gray-300">
Expand All @@ -32,13 +35,13 @@ export default {
props: {
nav: {
type: Array,
required: true
default: () => []
}
},
data() {
return {
isDarkMode: false,
config:__USER_CONFIG__
config: __USER_CONFIG__
}
},
mounted() {
Expand All @@ -57,6 +60,4 @@ export default {
}
</script>

<style scoped>
/* 添加需要的额外样式 */
</style>
<style scoped>/* 添加需要的额外样式 */</style>
4 changes: 4 additions & 0 deletions src/node/prerender.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -69,4 +69,8 @@ async function prerender() {
}
}

if (require.main === module) {
prerender().catch(err => console.error(err));
}

module.exports = { prerender };

0 comments on commit 57bd0f8

Please sign in to comment.