2017-01-16 09:57:03 -08:00
|
|
|
<template>
|
2017-11-17 07:24:42 -08:00
|
|
|
<div>
|
2017-11-18 03:13:51 -08:00
|
|
|
<p>{{$t('settings.presets')}}</p>
|
2017-11-17 07:24:42 -08:00
|
|
|
<select v-model="selected" class="style-switcher">
|
|
|
|
<option v-for="style in availableStyles" :value="style">{{style[0]}}</option>
|
|
|
|
</select>
|
2017-11-18 03:13:51 -08:00
|
|
|
<p>{{$t('settings.theme_help')}}</p>
|
2017-11-17 07:24:42 -08:00
|
|
|
<div class="color-container">
|
|
|
|
<div class="color-item">
|
2017-11-18 03:13:51 -08:00
|
|
|
<label for="bgcolor" class="base04">{{$t('settings.background')}}</label>
|
2017-11-21 13:20:28 -08:00
|
|
|
<input id="bgcolor" class="theme-color-in" type="color" v-model="bgColorLocal">
|
2017-11-17 07:24:42 -08:00
|
|
|
</div>
|
|
|
|
<div class="color-item">
|
2017-11-18 03:13:51 -08:00
|
|
|
<label for="fgcolor" class="base04">{{$t('settings.foreground')}}</label>
|
2017-11-21 13:20:28 -08:00
|
|
|
<input id="fgcolor" class="theme-color-in" type="color" v-model="fgColorLocal">
|
2017-11-17 07:24:42 -08:00
|
|
|
</div>
|
|
|
|
<div class="color-item">
|
2017-11-18 03:13:51 -08:00
|
|
|
<label for="textcolor" class="base04">{{$t('settings.text')}}</label>
|
2017-11-21 13:20:28 -08:00
|
|
|
<input id="textcolor" class="theme-color-in" type="color" v-model="textColorLocal">
|
2017-11-17 07:24:42 -08:00
|
|
|
</div>
|
|
|
|
<div class="color-item">
|
2017-11-18 03:13:51 -08:00
|
|
|
<label for="linkcolor" class="base04">{{$t('settings.links')}}</label>
|
2017-11-21 13:20:28 -08:00
|
|
|
<input id="linkcolor" class="theme-color-in" type="color" v-model="linkColorLocal">
|
2017-11-17 07:24:42 -08:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div>
|
|
|
|
<div class="panel">
|
|
|
|
<div class="panel-heading" :style="{ 'background-color': fgColorLocal, 'color': textColorLocal }">Preview</div>
|
|
|
|
<div class="panel-body theme-preview-content" :style="{ 'background-color': bgColorLocal, 'color': textColorLocal }">
|
|
|
|
<h4>Content</h4>
|
|
|
|
<br>
|
|
|
|
A bunch of more content and
|
|
|
|
<a :style="{ 'color': linkColorLocal }">a nice lil' link</a>
|
|
|
|
<br>
|
|
|
|
<button class="btn" :style="{ 'background-color': fgColorLocal, 'color': textColorLocal }">Button</button>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2017-11-18 03:13:51 -08:00
|
|
|
<button class="btn base02-background base04" @click="setCustomTheme">{{$t('general.apply')}}</button>
|
2017-11-17 07:24:42 -08:00
|
|
|
</div>
|
2017-01-16 09:57:03 -08:00
|
|
|
</template>
|
|
|
|
|
|
|
|
<script src="./style_switcher.js"></script>
|
2017-01-17 05:41:13 -08:00
|
|
|
|
|
|
|
<style lang="scss">
|
|
|
|
.style-switcher {
|
|
|
|
margin-right: 1em;
|
|
|
|
}
|
2017-11-17 07:24:42 -08:00
|
|
|
|
|
|
|
.color-container {
|
|
|
|
display: flex;
|
2017-11-18 07:41:43 -08:00
|
|
|
flex-wrap: wrap;
|
2017-11-17 07:24:42 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
.color-item {
|
2017-11-18 07:41:43 -08:00
|
|
|
max-width: 9em;
|
2017-11-17 07:24:42 -08:00
|
|
|
display:flex;
|
|
|
|
flex-wrap:wrap;
|
|
|
|
}
|
|
|
|
|
|
|
|
.theme-color-in {
|
2017-11-18 07:41:43 -08:00
|
|
|
max-width: 8em;
|
2017-11-17 07:24:42 -08:00
|
|
|
border-radius: 2px;
|
|
|
|
border: 0;
|
|
|
|
padding: 5px;
|
|
|
|
margin: 5px 0 5px 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
.theme-preview-content {
|
|
|
|
padding: 20px;
|
|
|
|
}
|
2017-01-17 05:41:13 -08:00
|
|
|
</style>
|