File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11<template >
22 <div class =" app" >
33 <header >
4- <section class =" project" >
4+ <div ref =" projectMount" ></div >
5+ <section v-if =" showProject" class =" project" >
56 <h2 class =" credits" >
67 Background art by
78 <template v-if =" project .author_url " >
1213 </template >
1314 </h2 >
1415 <div class =" display" >
15- <iframe :style =" { transform: `scale(${project.scale})` }" :src =" project.url" >
16- </iframe >
16+ <iframe :style =" { transform: `scale(${project.scale})` }" :src =" project.url" />
1717 </div >
1818 </section >
1919 <svg width =" 49" height =" 65" viewBox =" 0 0 49 65" fill =" none" xmlns =" http://www.w3.org/2000/svg" class =" logo" >
3434import projects from ' assets/projects' ;
3535import links from ' assets/links' ;
3636
37+ const showProject = ref (false )
3738const projectIndex = useCookie (' projectIndex' , {
3839 default : () => Math .floor (Math .random () * projects .length ),
3940})
40- projectIndex .value += 1
41- projectIndex .value %= projects .length
4241const project = ref (projects[projectIndex .value ])
43- // project.value = projects[projectIndex.value]
44-
4542provide (' project' , project)
43+ onMounted (() => {
44+ projectIndex .value += 1
45+ projectIndex .value %= projects .length
46+ project .value = projects[projectIndex .value ]
47+ showProject .value = true
48+ })
4649
4750const route = useRoute ()
4851onMounted (() => {
126129 z-index : 0 ;
127130 min-height : 100vh ;
128131
129- & .black {
130- --foreground : white ;
131- --background : black ;
132- }
133-
134132 @media screen and (min-width : 800px ) {
135133 display : flex ;
136134 }
You can’t perform that action at this time.
0 commit comments