diff options
| author | HJ <spam@hjkos.com> | 2018-12-11 20:35:19 +0000 |
|---|---|---|
| committer | HJ <spam@hjkos.com> | 2018-12-11 20:35:19 +0000 |
| commit | a8acba8cb2c639a3de3764df4226960458f996b8 (patch) | |
| tree | 50c4d353576cc419eeea4f45c4497309222cf360 /src/components/font_control/font_control.vue | |
| parent | fb5261b926adfb5b9bbe1bf55e36fe8b5f4eb57f (diff) | |
| parent | 8fcc4c67667b0951d6c0d28cec320bd4b2f8f107 (diff) | |
Merge branch 'feature/theming2' into 'develop'
Themes v2
See merge request pleroma/pleroma-fe!377
Diffstat (limited to 'src/components/font_control/font_control.vue')
| -rw-r--r-- | src/components/font_control/font_control.vue | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/src/components/font_control/font_control.vue b/src/components/font_control/font_control.vue new file mode 100644 index 00000000..ed36b280 --- /dev/null +++ b/src/components/font_control/font_control.vue @@ -0,0 +1,54 @@ +<template> +<div class="font-control style-control" :class="{ custom: isCustom }"> + <label :for="preset === 'custom' ? name : name + '-font-switcher'" class="label"> + {{label}} + </label> + <input + v-if="typeof fallback !== 'undefined'" + class="opt exlcude-disabled" + type="checkbox" + :id="name + '-o'" + :checked="present" + @input="$emit('input', typeof value === 'undefined' ? fallback : undefined)"> + <label v-if="typeof fallback !== 'undefined'" class="opt-l" :for="name + '-o'"></label> + <label :for="name + '-font-switcher'" class="select" :disabled="!present"> + <select + :disabled="!present" + v-model="preset" + class="font-switcher" + :id="name + '-font-switcher'"> + <option v-for="option in availableOptions" :value="option"> + {{ option === 'custom' ? $t('settings.style.fonts.custom') : option }} + </option> + </select> + <i class="icon-down-open"/> + </label> + <input + v-if="isCustom" + class="custom-font" + type="text" + :id="name" + v-model="family"> +</div> +</template> + +<script src="./font_control.js" ></script> + +<style lang="scss"> +@import '../../_variables.scss'; +.font-control { + input.custom-font { + min-width: 10em; + } + &.custom { + .select { + border-top-right-radius: 0; + border-bottom-right-radius: 0; + } + .custom-font { + border-top-left-radius: 0; + border-bottom-left-radius: 0; + } + } +} +</style> |
