[+] Add title to style

This commit is contained in:
Hykilpikonna
2019-12-22 22:48:15 -05:00
parent 98a9f0536d
commit 601328db2b
2 changed files with 7 additions and 3 deletions
-1
View File
@@ -9,7 +9,6 @@
<!-- Element --> <!-- Element -->
<link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css"> <link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
<script src="https://unpkg.com/element-ui/lib/index.js"></script>
</head> </head>
<body style="margin: 0"> <body style="margin: 0">
<noscript> <noscript>
+7 -2
View File
@@ -1,6 +1,6 @@
<template> <template>
<div id="app"> <div id="app">
<div id="title" :style="`height: ${config.title.height}vh`"> <div id="title" :style="titleStyle">
<div>{{config.title.text}}</div> <div>{{config.title.text}}</div>
</div> </div>
</div> </div>
@@ -25,6 +25,12 @@
// Set title // Set title
document.title = config.title.text; document.title = config.title.text;
} }
get titleStyle()
{
return `height: ${config.title.height}vh;`
+ `background: url(${require('./assets/' + config.title.background)})`;
}
} }
</script> </script>
@@ -40,6 +46,5 @@
#title #title
{ {
background: lightblue;
} }
</style> </style>