2018-12-23 13:17:39 +00:00
< template >
< div >
< navbar > < / navbar >
< div class = "px-4 py-5 border-b-2 border-grey flex justify-between items-center" >
< div class = "w-full md:w-auto flex flex-col" >
< div class = "text-2xl font-hairline mr-2" > Applications < / div >
< / div >
< div class = "hidden md:block" >
< ul class = "list-reset flex" >
< li >
< button type = "button" class = "text-xs text-blue-dark no-underline hover:underline flex flex-col items-center justify-center" >
< svg class = "h-6 w-6 text-blue-dark fill-current mb-2" role = "presentation" > < use xlink :href = "/img/icons.symbol.svg#alpha__new-app" > < / use > < / svg >
Add Application
< / button >
< / li >
< / ul >
< / div >
< / div >
< div class = "flex flex-row-reverse h-full" >
< div class = "flex-1 p-4 lg:p-12" >
< div class = "mb-6" >
< div class = "lg:flex lg:items-baseline mb-12" >
< div class = "mr-16 mb-4 lg:mb-0" >
< h1 class = "text-4xl font-hairline mb-2" > Applications < / h1 >
< / div >
2018-12-24 08:46:33 +00:00
< application-switcher class = "flex-1 flex justify-end mr-3" :mode = "display" @display-changed ="handleDisplay" > < / application-switcher >
< div class = "lg:flex lg:flex-row-reverse justify-between items-baseline" >
< div class = "w-full" >
2018-12-23 13:17:39 +00:00
< form action = "#" >
< input type = "text" placeholder = "Filter applications" class = "w-full py-2 px-3 border border-grey-darker rounded" >
< / form >
< / div >
< / div >
< / div >
< / div >
2018-12-23 22:42:45 +00:00
< div class = "flex flex-wrap -mx-3 w-full" >
< application-card
v - for = "application in applications"
: id = "application.id"
: application = "application"
: key = "application.id"
2018-12-24 08:46:33 +00:00
: display = "display"
class = "px-3 w-full"
: class = "[display == 'grid' ? 'lg:w-1/3 mb-6 rounded' : '']"
2018-12-23 22:42:45 +00:00
> < / application-card >
2018-12-23 13:17:39 +00:00
< / div >
< / div >
< div class = "w-auto lg:w-64 bg-grey-darkest text-white antialiased" >
< div >
< ul class = "list-reset" >
< li class = "border-r-6 border-b border-grey-darker" >
< a href = "#0" class = "flex items-center text-white no-underline hover:underline focus:underline border-l-6 border-blue px-4 py-5 bg-grey-darker" >
< svg class = "h-6 w-6 text-white fill-current" role = "presentation" > < use xlink :href = "/img/icons.symbol.svg#alpha__grid" > < / use > < / svg >
< span class = "hidden lg:block lg:ml-4" > All < / span >
< / a >
< / li >
< li class = "border-r-6 border-b border-grey-darker" >
< a href = "#0" class = "flex items-center text-white no-underline hover:underline focus:underline border-l-6 border-transparent px-4 py-5" >
< svg class = "h-6 w-6 text-white fill-current" role = "presentation" > < use xlink :href = "/img/icons.symbol.svg#state__starred" > < / use > < / svg >
< span class = "hidden lg:block lg:ml-4" > Starred < / span >
< / a >
< / li >
< li class = "border-r-6 border-b border-grey-darker" >
< a href = "#0" class = "flex items-center text-white no-underline hover:underline focus:underline border-l-6 border-transparent px-4 py-5" >
< svg class = "h-6 w-6 text-white fill-current" role = "presentation" > < use xlink :href = "/img/icons.symbol.svg#objects__recent" > < / use > < / svg >
< span class = "hidden lg:block lg:ml-4" > Recents < / span >
< / a >
< / li >
< / ul >
< / div >
< / div >
< / div >
< / div >
< / template >
< script >
import ApplicationCard from '@/components/ApplicationCard'
2018-12-24 08:46:33 +00:00
import ApplicationSwitcher from '@/components/ApplicationSwitcher'
2018-12-23 13:17:39 +00:00
import data from '@/data.json'
export default {
components : {
ApplicationCard ,
2018-12-24 08:46:33 +00:00
ApplicationSwitcher ,
2018-12-23 13:17:39 +00:00
} ,
data ( ) {
return {
applications : data . applications ,
2018-12-24 08:46:33 +00:00
display : 'grid' ,
2018-12-23 13:17:39 +00:00
}
} ,
2018-12-24 08:46:33 +00:00
methods : {
handleDisplay ( mode ) {
this . display = mode
}
}
2018-12-23 13:17:39 +00:00
}
< / script >