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 >
2018-12-25 22:56:47 +00:00
< header-buttons : links = " [
{ title : 'Add Application' , icon : 'alpha__new-app' , disabled : false } ,
] " > < / header-buttons >
2018-12-23 13:17:39 +00:00
< / div >
2018-12-24 13:34:45 +00:00
< div class = "flex flex-row-reverse flex-1 h-full" >
2018-12-23 13:17:39 +00:00
< 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 12:34:24 +00:00
< application-switcher class = "hidden lg:flex-1 lg:flex lg:justify-end mr-3" :mode = "display" @display-changed ="handleDisplay" > < / application-switcher >
2018-12-24 08:46:33 +00:00
< 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-25 20:01:19 +00:00
< div class = "flex flex-wrap -mx-3 -mb-6" >
2018-12-23 22:42:45 +00:00
< 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"
2018-12-25 22:29:42 +00:00
: class = "[display == 'grid' ? 'lg:w-1/3 xl:w-1/4 mb-6 flex flex-col' : '']"
2018-12-23 22:42:45 +00:00
> < / application-card >
2018-12-23 13:17:39 +00:00
< / div >
< / div >
2018-12-25 22:46:21 +00:00
< sidebar : links = " [
{ title : 'All' , icon : 'alpha__grid' , active : true , disabled : false } ,
{ title : 'Starred' , icon : 'state__starred' , active : false , disabled : false } ,
{ title : 'Recents' , icon : 'objects__recent' , active : false , disabled : false } ,
] " > < / sidebar >
2018-12-23 13:17:39 +00:00
< / 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 >