picocrank 1.6.2 → 1.6.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,53 @@
1
+ name: Deploy to GitHub Pages
2
+
3
+ on:
4
+ push:
5
+ branches: [ main ]
6
+ workflow_dispatch:
7
+
8
+ permissions:
9
+ contents: read
10
+ pages: write
11
+ id-token: write
12
+
13
+ concurrency:
14
+ group: "pages"
15
+ cancel-in-progress: false
16
+
17
+ jobs:
18
+ build:
19
+ runs-on: ubuntu-latest
20
+ steps:
21
+ - name: Checkout
22
+ uses: actions/checkout@v4
23
+
24
+ - name: Setup Node.js
25
+ uses: actions/setup-node@v4
26
+ with:
27
+ node-version: "lts/*"
28
+ cache: 'npm'
29
+
30
+ - name: Install dependencies
31
+ run: npm ci
32
+
33
+ - name: Build
34
+ run: npm run build
35
+
36
+ - name: Setup Pages
37
+ uses: actions/configure-pages@v4
38
+
39
+ - name: Upload artifact
40
+ uses: actions/upload-pages-artifact@v3
41
+ with:
42
+ path: './dist'
43
+
44
+ deploy:
45
+ environment:
46
+ name: github-pages
47
+ url: ${{ steps.deployment.outputs.page_url }}
48
+ runs-on: ubuntu-latest
49
+ needs: build
50
+ steps:
51
+ - name: Deploy to GitHub Pages
52
+ id: deployment
53
+ uses: actions/deploy-pages@v4
package/index.html CHANGED
@@ -6,8 +6,6 @@
6
6
 
7
7
  <meta name = "viewport" content = "width=device-width, initial-scale=1.0, user-scalable=no" />
8
8
 
9
- <link rel = "stylesheet" href = "node_modules/femtocrank/style.css" />
10
- <link rel = "stylesheet" href = "node_modules/femtocrank/dark.css" media = "(prefers-color-scheme: dark)" />
11
9
  </head>
12
10
 
13
11
  <body>
package/package.json CHANGED
@@ -1,9 +1,11 @@
1
1
  {
2
2
  "name": "picocrank",
3
- "version": "1.6.2",
3
+ "version": "1.6.4",
4
4
  "description": "A set of zero dependency Vue components built on the Femtocrank global CSS theme.",
5
5
  "main": "vite.config.js",
6
6
  "scripts": {
7
+ "build": "vite build",
8
+ "preview": "vite preview",
7
9
  "test": "echo \"Error: no test specified\" && exit 1"
8
10
  },
9
11
  "repository": {
@@ -19,7 +21,7 @@
19
21
  "@hugeicons/core-free-icons": "^1.0.16",
20
22
  "@hugeicons/vue": "^1.0.3",
21
23
  "@vitejs/plugin-vue": "^6.0.1",
22
- "femtocrank": "^2.4.3",
24
+ "femtocrank": "^2.4.4",
23
25
  "unplugin-vue-components": "^29.0.0",
24
26
  "vite": "^7.1.3",
25
27
  "vue": "^3.5.19",
package/styles.css ADDED
@@ -0,0 +1,3 @@
1
+ /* Import femtocrank styles */
2
+ @import 'femtocrank/style.css';
3
+ @import 'femtocrank/dark.css';
package/vite.config.js CHANGED
@@ -3,6 +3,24 @@ import vue from '@vitejs/plugin-vue'
3
3
  import Components from 'unplugin-vue-components/vite'
4
4
 
5
5
  export default defineConfig({
6
+ base: '/picocrank/',
7
+ build: {
8
+ outDir: 'dist',
9
+ rollupOptions: {
10
+ external: [],
11
+ output: {
12
+ assetFileNames: (assetInfo) => {
13
+ if (assetInfo.name === 'style.css') {
14
+ return 'assets/femtocrank-[hash].css'
15
+ }
16
+ if (assetInfo.name === 'dark.css') {
17
+ return 'assets/femtocrank-dark-[hash].css'
18
+ }
19
+ return 'assets/[name]-[hash].[ext]'
20
+ }
21
+ }
22
+ }
23
+ },
6
24
  server: {
7
25
  proxy: {
8
26
  '/api': {
package/vue/views/App.vue CHANGED
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <Header username = "Guest" @toggleSidebar="toggleSidebar" title = "PicoCrank" >
2
+ <Header username = "Guest" @toggleSidebar="toggleSidebar" title = "PicoCrank" :logoUrl="logoUrl" >
3
3
  <template #toolbar>
4
4
  <QuickSearch
5
5
  ref="quickSearchRef"
@@ -19,7 +19,7 @@
19
19
  </main>
20
20
 
21
21
  <footer>
22
- <span>PicoCrank</span>
22
+ <span><a href = "https://github.com/jamesread/picocrank">PicoCrank</a></span>
23
23
  </footer>
24
24
  </div>
25
25
  </div>
@@ -31,6 +31,8 @@
31
31
  import { Pin02Icon } from '@hugeicons/core-free-icons'
32
32
 
33
33
  import QuickSearch from './../components/QuickSearch.vue'
34
+ import '../../styles.css'
35
+ import logoUrl from '/logo.png';
34
36
 
35
37
  const quickSearchRef = ref(null)
36
38
  const router = useRouter();