picocrank 1.2.0 → 1.2.2
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.
- package/index.html +2 -0
- package/package.json +2 -2
- package/vue/components/Header.vue +18 -1
- package/vue/components/Sidebar.vue +18 -1
- package/vue/views/App.vue +7 -1
package/index.html
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "picocrank",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.2",
|
|
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": {
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"@hugeicons/core-free-icons": "^1.0.16",
|
|
20
20
|
"@hugeicons/vue": "^1.0.3",
|
|
21
21
|
"@vitejs/plugin-vue": "^6.0.1",
|
|
22
|
-
"femtocrank": "^2.3.
|
|
22
|
+
"femtocrank": "^2.3.2",
|
|
23
23
|
"unplugin-vue-components": "^29.0.0",
|
|
24
24
|
"vite": "^7.1.3",
|
|
25
25
|
"vue": "^3.5.19",
|
|
@@ -1,8 +1,14 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<header>
|
|
3
|
-
<div class = "image-and-title flex-row" id = "sidebar-button">
|
|
3
|
+
<div class = "image-and-title flex-row" id = "sidebar-button" @click = "emit('toggleSidebar')">
|
|
4
4
|
<img src = "/logo.png" alt = "Logo" class = "logo" />
|
|
5
5
|
<h1>PicoCrank</h1>
|
|
6
|
+
|
|
7
|
+
<div class = "fg1" />
|
|
8
|
+
|
|
9
|
+
<button id = "sidebar-toggler-button" aria-label = "Open sidebar navigation" aria-pressed = "false" aria-haspopup = "menu" class = "neutral">
|
|
10
|
+
<HugeiconsIcon :icon = "Menu01Icon" width = "1em" height = "1em" />
|
|
11
|
+
</button>
|
|
6
12
|
</div>
|
|
7
13
|
|
|
8
14
|
<Breadcrumbs v-if="breadcrumbs" />
|
|
@@ -16,6 +22,11 @@
|
|
|
16
22
|
</template>
|
|
17
23
|
|
|
18
24
|
<script setup>
|
|
25
|
+
import { HugeiconsIcon } from "@hugeicons/vue";
|
|
26
|
+
import { Menu01Icon } from "@hugeicons/core-free-icons";
|
|
27
|
+
|
|
28
|
+
const emit = defineEmits(["toggleSidebar"]);
|
|
29
|
+
|
|
19
30
|
const props = defineProps({
|
|
20
31
|
breadcrumbs: {
|
|
21
32
|
type: Boolean,
|
|
@@ -27,3 +38,9 @@
|
|
|
27
38
|
},
|
|
28
39
|
});
|
|
29
40
|
</script>
|
|
41
|
+
|
|
42
|
+
<style scoped>
|
|
43
|
+
button {
|
|
44
|
+
color: #bbb;
|
|
45
|
+
}
|
|
46
|
+
</style>
|
|
@@ -163,6 +163,7 @@ li {
|
|
|
163
163
|
margin: 0;
|
|
164
164
|
padding: 0;
|
|
165
165
|
}
|
|
166
|
+
|
|
166
167
|
.navigation-links a,
|
|
167
168
|
.supplemental-links a {
|
|
168
169
|
display: flex;
|
|
@@ -189,9 +190,25 @@ li {
|
|
|
189
190
|
margin-top: 1rem;
|
|
190
191
|
}
|
|
191
192
|
|
|
193
|
+
@media (prefers-color-scheme: dark) {
|
|
194
|
+
.navigation-links a,
|
|
195
|
+
.supplemental-links a {
|
|
196
|
+
color: #f8f9fa;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
.navigation-links a:hover,
|
|
200
|
+
.supplemental-links a:hover {
|
|
201
|
+
background: #343a40;
|
|
202
|
+
color: #007bff;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
.supplemental-links {
|
|
206
|
+
border-top: 1px solid #444;
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
|
|
192
210
|
@media (max-width: 768px) {
|
|
193
211
|
.sidebar {
|
|
194
|
-
width: 100%;
|
|
195
212
|
left: -100%;
|
|
196
213
|
}
|
|
197
214
|
|
package/vue/views/App.vue
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<Header username = "Guest" breadcrumbs />
|
|
2
|
+
<Header username = "Guest" breadcrumbs @toggleSidebar="toggleSidebar" />
|
|
3
3
|
<div id = "layout">
|
|
4
4
|
<Sidebar ref = "sidebar" />
|
|
5
5
|
|
|
@@ -21,6 +21,12 @@
|
|
|
21
21
|
|
|
22
22
|
const sidebar = ref(null);
|
|
23
23
|
|
|
24
|
+
function toggleSidebar() {
|
|
25
|
+
if (sidebar.value) {
|
|
26
|
+
sidebar.value.toggle();
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
24
30
|
onMounted(() => {
|
|
25
31
|
sidebar.value.addNavigationLink({
|
|
26
32
|
id: 'welcome',
|