Skip to content

Commit

Permalink
tweaking transition and layout
Browse files Browse the repository at this point in the history
  • Loading branch information
marcolarosa committed Oct 26, 2024
1 parent f855885 commit 721c148
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 12 deletions.
18 changes: 9 additions & 9 deletions src/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ layout: home
},
]"
:auto-play="true"
:interval="6000"
:interval="8000"
:initial-delay=0
/>

Expand Down Expand Up @@ -133,8 +133,8 @@ layout: home
]"
documentation="/docs/guide/vocabulary.html"
:auto-play="true"
:interval="6000"
:initial-delay=3000
:interval="8000"
:initial-delay=1600
/>

<InfoPanelComponent>
Expand Down Expand Up @@ -220,8 +220,8 @@ layout: home
]"
documentation="/docs/guide/transcribing-content.html"
:auto-play="true"
:interval="6000"
:initial-delay=6000
:interval="8000"
:initial-delay=3200
/>

<!-- <InfoPanelComponent layout="rtl">
Expand Down Expand Up @@ -269,8 +269,8 @@ layout: home
]"
documentation="/docs/guide/assistant-supported-discovery.html"
:auto-play="true"
:interval="6000"
:initial-delay=1500
:interval="8000"
:initial-delay=4800
/>

<!-- <InfoPanelComponent>
Expand Down Expand Up @@ -316,8 +316,8 @@ layout: home
]"
documentation="/docs/guide/visualising-the-structure.html"
:auto-play="true"
:interval="6000"
:initial-delay=4500
:interval="8000"
:initial-delay=6400
/>

</div>
Expand Down
10 changes: 7 additions & 3 deletions src/vue-components/InfoPanelCarousel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@

<script setup>
import { faBook } from "@fortawesome/free-solid-svg-icons";
import { ref, computed, onMounted, onBeforeUnmount } from "vue";
import { ref, computed, onMounted, onBeforeUnmount, onBeforeMount } from "vue";
const props = defineProps({
panels: {
Expand Down Expand Up @@ -331,9 +331,13 @@ const preloadImages = () => {
});
};
onMounted(() => {
onBeforeMount(() => {
preloadImages();
smallDevice.value = window.innerWidth < 900;
});
onMounted(() => {
preloadImages();
if (props.autoPlay) {
// Set initial timeout before starting the regular interval
setTimeout(() => {
Expand All @@ -354,7 +358,7 @@ circle {
.fade-enter-active,
.fade-leave-active {
transition: opacity 1s ease;
transition: opacity 0.7s ease;
}
.fade-enter-from,
Expand Down

0 comments on commit 721c148

Please sign in to comment.