mirror of
https://github.com/Acamaeda/The-Modding-Tree.git
synced 2024-11-21 16:13:55 +00:00
Infoboxes are now stylish
This commit is contained in:
parent
79c5aad414
commit
d94b225a6f
2 changed files with 9 additions and 6 deletions
|
@ -43,7 +43,10 @@ addLayer("c", {
|
|||
},
|
||||
infoboxes:{
|
||||
coolInfo: {
|
||||
text: "momo"
|
||||
title: "Lore",
|
||||
titleStyle: {'color': '#FE0000'},
|
||||
body: "DEEP LORE!",
|
||||
bodyStyle: {'background-color': "#0000EE"}
|
||||
}
|
||||
},
|
||||
milestones: {
|
||||
|
|
10
js/v.js
10
js/v.js
|
@ -57,7 +57,7 @@ function loadVue() {
|
|||
Vue.component('column', {
|
||||
props: ['layer', 'data'],
|
||||
template: `
|
||||
<div class="upgTable instant" >
|
||||
<div class="upgTable instant">
|
||||
<div class="upgCol">
|
||||
<div v-for="item in data">
|
||||
<div v-if="!Array.isArray(item)" v-bind:is="item" :layer= "layer" v-bind:style="tmp[layer].componentStyles[item]"></div>
|
||||
|
@ -72,14 +72,14 @@ function loadVue() {
|
|||
Vue.component('infobox', {
|
||||
props: ['layer', 'data'],
|
||||
template: `
|
||||
<div class="story instant" v-if="tmp[layer].infoboxes && tmp[layer].infoboxes[data]!== undefined && tmp[layer].infoboxes[data].unlocked" v-bind:style="{'border-color': tmp[layer].color, 'border-radius': player.infoboxes[layer][data] ? 0 : '8px'}">
|
||||
<button class="story-title" v-bind:style="{'background-color': tmp[layer].color}"
|
||||
<div class="story instant" v-if="tmp[layer].infoboxes && tmp[layer].infoboxes[data]!== undefined && tmp[layer].infoboxes[data].unlocked" v-bind:style="{'border-color': tmp[layer].color, 'border-radius': player.infoboxes[layer][data] ? 0 : '8px'}, tmp[layer].infoboxes[data].style">
|
||||
<button class="story-title" v-bind:style="[{'background-color': tmp[layer].color}, tmp[layer].infoboxes[data].titleStyle]"
|
||||
v-on:click="player.infoboxes[layer][data] = !player.infoboxes[layer][data]">
|
||||
<span class="story-toggle">{{player.infoboxes[layer][data] ? "+" : "-"}}</span>
|
||||
<span v-html="tmp[layer].infoboxes[data].title ? tmp[layer].infoboxes[data].title : (tmp[layer].name)"></span>
|
||||
</button>
|
||||
<div v-if="!player.infoboxes[layer][data]" class="story-text">
|
||||
<span v-html="tmp[layer].infoboxes[data].text ? tmp[layer].infoboxes[data].text : 'Blah'"></span>
|
||||
<div v-if="!player.infoboxes[layer][data]" class="story-text" v-bind:style="tmp[layer].infoboxes[data].bodyStyle">
|
||||
<span v-html="tmp[layer].infoboxes[data].body ? tmp[layer].infoboxes[data].body : 'Blah'"></span>
|
||||
</div>
|
||||
</div>
|
||||
`
|
||||
|
|
Loading…
Reference in a new issue