2022-01-03 18:53:38 -05:00
< template >
2022-01-06 02:18:46 -08:00
< div class = "page grid container h-full w-full mx-auto bg-gray-300 px-4" >
< header
class = "text-3xl flex items-center justify-center font-bold bg-gray-600 text-gray-400"
>
Timekeeper
< / header >
< main class = "bg-gray-400 grid w-full" >
2022-01-06 15:22:21 -08:00
< div class = "units p-8 relative bg-gray-300" >
2022-01-06 02:18:46 -08:00
< div class = "units-background absolute top-8 left-0 right-0" > < / div >
< / div >
2022-01-06 15:22:21 -08:00
< div class = "tabs flex flex-row w-full bg-gray-400 text-gray-400" >
2022-01-06 02:18:46 -08:00
< div
v - for = "(tab, index) in tabs"
: key = "index"
2022-01-06 15:22:21 -08:00
class = "tab flex-grow text-center text-2xl font-semibold py-1 mr-px"
: class = " {
'text-gray-600 bg-gray-400 border-gray-600' :
activeTabIndex === index ,
'bg-gray-600 border-gray-600' : activeTabIndex !== index ,
} "
2022-01-06 02:18:46 -08:00
@ click = "activeTabIndex = index"
>
{ { tab . label } }
< / div >
< / div >
< div class = "tab-content p-8" >
Colors and art are purely for example , not recommendations . Background
colors are used to distinguish individual HTML elements .
< / div >
< / main >
< footer class = "text-lg flex items-center pt-4 pb-2 px-4 hidden md:block" >
Created by GrapefruitChili , PK , TNNPe , Vice for New Years Incremental Game
Jam 2022.
< / footer >
2022-01-04 17:41:36 -05:00
< / div >
2022-01-03 18:53:38 -05:00
< / template >
< script >
2022-01-06 02:18:46 -08:00
const TABS = [
{ id : 'instruments' , label : '1' } ,
{ id : 'upgrades' , label : '2' } ,
{ id : 'fathertime' , label : '3' } ,
{ id : 'timemachine' , label : '4' } ,
{ id : 'achievements' , label : '5' } ,
{ id : 'prestige' , label : '6' } ,
]
2022-01-03 18:53:38 -05:00
export default {
name : 'IndexPage' ,
2022-01-06 02:18:46 -08:00
data ( ) {
return {
tabs : TABS ,
activeTabIndex : 0 ,
}
} ,
2022-01-03 18:53:38 -05:00
}
< / script >
2022-01-04 17:41:36 -05:00
2022-01-06 02:18:46 -08:00
< style >
html ,
body ,
# _ _nuxt ,
# _ _layout {
height : 100 % ; /* 100vh is broken on mobile. this is the fix. */
width : 100 vw ;
}
html {
background : # e5e7eb ;
}
< / style >
2022-01-04 17:41:36 -05:00
< style scoped >
2022-01-06 02:18:46 -08:00
. page {
grid - template - rows : 4 rem 1 fr auto ;
2022-01-04 17:41:36 -05:00
}
2022-01-06 02:18:46 -08:00
main {
grid - template - rows : 1 fr auto 2 fr ;
2022-01-04 17:41:36 -05:00
}
2022-01-06 02:18:46 -08:00
. units - background {
background : url ( 'https://freesvg.org/img/johnny_automatic_hourglass.png' ) ;
background - size : contain ;
background - repeat : no - repeat ;
background - position : center ;
opacity : 0.4 ;
height : calc ( 100 % - 4 rem ) ; /* 4rem = top padding + bottom padding */
2022-01-04 17:41:36 -05:00
}
2022-01-06 02:18:46 -08:00
. tabs {
2022-01-04 17:41:36 -05:00
}
< / style >