picocrank 1.18.3 → 1.19.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "picocrank",
3
- "version": "1.18.3",
3
+ "version": "1.19.0",
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": {
@@ -2,7 +2,7 @@
2
2
  <header>
3
3
  <div
4
4
  :id = "sidebarEnabled ? 'sidebar-button' : null"
5
- :class="['image-and-title', 'flex-row', { 'disabled-branding': !showBranding }]"
5
+ :class="['image-and-title', 'flex-row', { 'disabled-branding': !showBranding, 'logo-home-link': !sidebarEnabled && showBranding }]"
6
6
  @click = "onImageAndTitleClick"
7
7
  >
8
8
  <img v-if="showBranding" :src = "logoUrl" alt = "Logo" class = "logo" />
@@ -111,6 +111,15 @@ button:hover {
111
111
  width: auto;
112
112
  }
113
113
 
114
+ .logo-home-link {
115
+ cursor: pointer;
116
+ }
117
+
118
+ .logo-home-link:hover {
119
+ background-color: var(--header-hover-background-color);
120
+ color: var(--header-hover-text-color);
121
+ }
122
+
114
123
  .user-info span {
115
124
  padding-right: 0.5rem;
116
125
  }
package/vue/views/App.vue CHANGED
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <Header username = "Guest" @toggleSidebar="toggleSidebar" title = "PicoCrank" :logoUrl="logoUrl" :sidebarEnabled="sidebarEnabled" :navigation="navigation" :topBarEnabled="topBarEnabled" :showBranding="brandingEnabled" :breadcrumbs="breadcrumbsEnabled">
2
+ <Header username = "Guest" @toggleSidebar="toggleSidebar" @logoClick="goToIndex" title = "PicoCrank" :logoUrl="logoUrl" :sidebarEnabled="sidebarEnabled" :navigation="navigation" :topBarEnabled="topBarEnabled" :showBranding="brandingEnabled" :breadcrumbs="breadcrumbsEnabled">
3
3
  <template #toolbar>
4
4
  <QuickSearch
5
5
  v-if="quickSearchEnabled"
@@ -32,6 +32,7 @@
32
32
 
33
33
  <script setup>
34
34
  import { ref, onMounted, provide } from 'vue';
35
+ import { useRouter } from 'vue-router';
35
36
  import { Pin02Icon } from '@hugeicons/core-free-icons'
36
37
 
37
38
  import QuickSearch from './../components/QuickSearch.vue'
@@ -41,6 +42,7 @@
41
42
  import '../composables/useTheme.js'
42
43
  import logoUrl from '/logo.png';
43
44
 
45
+ const router = useRouter();
44
46
  const quickSearchRef = ref(null)
45
47
  const sidebar = ref(null);
46
48
  const navigation = ref(null);
@@ -56,6 +58,10 @@
56
58
  }
57
59
  }
58
60
 
61
+ function goToIndex() {
62
+ router.push({ name: 'Welcome' });
63
+ }
64
+
59
65
  function toggleSidebarEnabled() {
60
66
  sidebarEnabled.value = !sidebarEnabled.value;
61
67
  }