Skip to content

Commit

Permalink
feat: add editor
Browse files Browse the repository at this point in the history
  • Loading branch information
haxgun committed Nov 21, 2023
1 parent a6f624c commit 786f155
Show file tree
Hide file tree
Showing 7 changed files with 285 additions and 59 deletions.
55 changes: 0 additions & 55 deletions src/assets/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -34,61 +34,6 @@ main {
align-items: center;
gap: 1.8rem;

.pretitle {
margin: 0;
font-size: 10px;
font-weight: 600;
color: #00c4ff;
padding: 6px 12px;
background: rgba(0, 196, 255, 0.3);
border: 1px solid #00c4ff;
box-shadow: rgb(0 191 255 / 10%) 0 0 40px;
border-radius: 999px;
line-height: 1;
animation: blink 2s linear infinite;
}

@keyframes blink {
0% {
box-shadow: rgb(0 191 255 / 3%) 0 0 40px;
}
50% {
box-shadow: rgb(0 191 255 / 10%) 0 0 40px;
}
100% {
box-shadow: rgb(0 191 255 / 3%) 0 0 40px;
}
}

.title {
margin: 0;
font-family: $logo-family;
font-size: 3rem;
font-weight: 600;
letter-spacing: -0.025em;
line-height: 1;
background-color: $white;
background-image: linear-gradient(to bottom, #fff, #ccc);
background-size: 100%;
background-repeat: repeat;
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}

.description {
margin: 0;
font-size: 1.4rem;
line-height: 1.2;
font-weight: 700;
background-color: $white;
background-image: linear-gradient(to bottom, #fff, #ccc);
background-size: 100%;
background-repeat: repeat;
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
text-align: center;
}

.btn {
$btn-text-color: $white;
align-items: center;
Expand Down
1 change: 0 additions & 1 deletion src/assets/variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,5 @@ $font-family_1:
'Segoe UI Emoji',
Segoe UI Symbol;

$logo-family: 'Russo One', sans-serif;
$background-color: hsl(0 0% 7%);
$white: #fffbf5;
66 changes: 66 additions & 0 deletions src/components/ui/Input.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
<script setup>
defineProps(['modelValue', 'placeholder'])
</script>

<template>
<div class="input">
<label class="label_input" for="text-input">
<input :value="modelValue" :placeholder="placeholder" id="text-input" type="text" />
</label>
</div>
</template>

<style scoped>
.input {
display: flex;
grid-gap: calc(0.25 * 4rem);
gap: calc(0.25 * 4rem);
align-items: center;
.label_input {
--border: hsla(222deg 10% 17% / 1);
--outline: transparent;
--svg: hsla(222deg 5% 56% / 0.75);
--bg: transparent;
height: calc(0.25 * 9rem);
padding-inline: calc(0.25 * 3rem);
display: flex;
align-items: center;
grid-gap: calc(0.25 * 2rem);
gap: calc(0.25 * 2rem);
flex: 1;
cursor: text;
white-space: nowrap;
background-color: var(--bg);
border-radius: 5px;
border: 1px solid var(--border) !important;
outline: 2px solid var(--outline);
outline-offset: 2px;
transition: 0.2s all;
&:focus-within {
--border: hsla(222deg 6% 30% / 1);
--bg: hsla(0deg 0% 100% / 6%);
--svg: hsla(222deg 5% 62% / 1);
--outline: hsla(222deg 5% 62% / 0.15);
z-index: 3;
}
&:hover {
--border: hsla(222deg 6% 30% / 1);
--bg: hsla(0deg 0% 100% / 6%);
}
#text-input {
flex: 1;
background: transparent;
outline: none;
font-size: 0.8125rem;
font-family: inherit;
color: inherit;
line-height: 1.6;
border: none;
}
}
}
</style>
19 changes: 19 additions & 0 deletions src/locales/en.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"languageName": "English",
"landing": {
"pretitle": "STREAM OVERLAY 2.0",
"description": "Grab your audience's attention with real-time VALORANT stats!",
Expand All @@ -12,5 +13,23 @@
"second": "Create your overlay"
},
"footer": "Made with"
},
"editor": {
"header": {
"title": "Overlay with statistics",
"description": "Show your players' statistics in your stream!"
},
"riotId": {
"title": "Riot ID",
"description": "Riot ID is your universal identifier that is used in all Riot Games.",
"random": "Click to substitute an example of Riot ID."
},
"customization": {
"title": "Select options",
"description": "Customize your overlay according to your preferences."
},
"preview": {
"title": "No data found"
}
}
}
19 changes: 19 additions & 0 deletions src/locales/ru.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"languageName": "Русский",
"landing": {
"pretitle": "ОВЕРЛЕЙ ДЛЯ СТРИМА 2.0",
"description": "Привлекайте внимание аудитории статистикой VALORANT!",
Expand All @@ -12,5 +13,23 @@
"second": "Создайте свой оверлей"
},
"footer": "Сделано с"
},
"editor": {
"header": {
"title": "Оверлей со статистикой",
"description": "Покажите свою статистику в программах для потоковой передачи, таких как OBS Studio."
},
"riotId": {
"title": "Riot ID",
"description": "Riot ID – ваш универсальный идентификатор, который используется во всех играх Riot Games.",
"random": "Нажмите, чтобы подставить пример Riot ID."
},
"customization": {
"title": "Выберите опции",
"description": "Настраивайте оверлей в соответствии с вашими предпочтениями."
},
"preview": {
"title": "Данные не найдены"
}
}
}
129 changes: 126 additions & 3 deletions src/views/EditorView.vue
Original file line number Diff line number Diff line change
@@ -1,13 +1,136 @@
<script setup></script>
<script setup>
import Input from '@/components/ui/Input.vue'
import { ref } from 'vue'
const riotId = ref('')
</script>

<template>
<main>
<div class="main__body">
<div class="main__container">
<h1>:(</h1>
<div class="editor">
<div class="editor__body">
<div class="editor__container">
<div class="editor__container__header">
<h1 class="title">{{ $t('editor.header.title') }}</h1>
<p class="description">
{{ $t('editor.header.description') }}
</p>
</div>
<div class="editor__container__body">
<div class="editor__settings">
<div class="editor__settings__header">
<h1 class="title">{{ $t('editor.riotId.title') }}</h1>
<p class="description">
{{ $t('editor.riotId.description') }}
</p>
</div>
<Input v-model="riotId" placeholder="Riot ID" />
<span @click="riotId = 'MAGICX#1337'" class="random">{{
$t('editor.riotId.random')
}}</span>
</div>
</div>
<div class="editor__container__body">
<div class="editor__settings">
<div class="editor__settings__header">
<h1 class="title">{{ $t('editor.customization.title') }}</h1>
<p class="description">
{{ $t('editor.customization.description') }}
</p>
</div>
</div>
</div>
</div>
<div class="preview">
<div class="preview__container">
<div class="preview__component">
<div>{{ $t('editor.preview.title') }}</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</main>
</template>

<style scoped></style>
<style lang="scss" scoped>
.editor {
width: 60vw;
height: fit-content;
background: hsl(0, 0%, 8%);
border-radius: 8px;
border: 1px solid hsla(222deg 6% 30% / 0.25);
overflow: hidden;
color: #fffbf5;
h1,
p {
margin: 0;
}
.editor__body {
display: flex;
align-items: stretch;
.editor__container {
flex: 1;
.editor__container__header,
.editor__settings {
padding: calc(0.25 * 6rem);
border-bottom: 1px solid hsla(222deg 6% 30% / 0.25);
display: flex;
flex-direction: column;
gap: 12px;
.editor__settings__header {
display: flex;
flex-direction: column;
gap: 12px;
}
.title {
font-weight: 600;
font-size: calc(0.25 * 4.5rem);
}
.description {
color: hsla(222deg 5% 62% / 1);
font-size: 0.875rem;
line-height: 1.5;
}
.random {
color: rgb(0, 143, 253);
font-size: 0.875rem;
line-height: 1.5;
cursor: pointer;
}
}
}
.preview {
flex: 1;
.preview__container {
width: 100%;
height: 100%;
padding: calc(0.25 * 6rem);
background-image: url('@/assets/previews/breeze.webp');
background-position: center;
background-size: cover;
background-repeat: no-repeat;
display: flex;
align-items: center;
justify-content: center;
.preview__component {
width: auto;
}
}
}
}
}
</style>
55 changes: 55 additions & 0 deletions src/views/HomeView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,61 @@ import Button from '@/components/ui/Button.vue'
gap: 18px;
}
.title {
margin: 0;
font-family: 'Russo One', sans-serif;
font-size: 3rem;
font-weight: 600;
letter-spacing: -0.025em;
line-height: 1;
background-color: #fffbf5;
background-image: linear-gradient(to bottom, #fff, #ccc);
background-size: 100%;
background-repeat: repeat;
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}
.description {
margin: 0;
font-size: 1.4rem;
line-height: 1.2;
font-weight: 700;
background-color: #fffbf5;
background-image: linear-gradient(to bottom, #fff, #ccc);
background-size: 100%;
background-repeat: repeat;
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
text-align: center;
}
.pretitle {
margin: 0;
font-size: 10px;
font-weight: 600;
color: #00c4ff;
padding: 6px 12px;
background: rgba(0, 196, 255, 0.3);
border: 1px solid #00c4ff;
box-shadow: rgb(0 191 255 / 10%) 0 0 40px;
border-radius: 999px;
line-height: 1;
animation: blink 2s linear infinite;
}
@keyframes blink {
0% {
box-shadow: rgb(0 191 255 / 3%) 0 0 40px;
}
50% {
box-shadow: rgb(0 191 255 / 10%) 0 0 40px;
}
100% {
box-shadow: rgb(0 191 255 / 3%) 0 0 40px;
}
}
.features {
display: grid;
gap: 12px;
Expand Down

0 comments on commit 786f155

Please sign in to comment.