+ Added structure and spell-card component

This commit is contained in:
Alexis
2020-03-07 20:36:17 +01:00
parent 4f9805a541
commit 975174985c
15 changed files with 12978 additions and 0 deletions

38
src/app.vue Normal file
View File

@@ -0,0 +1,38 @@
<template>
<div id="app">
<spellcard
v-bind:name="'Soleil Pourri'"
v-bind:description="[`Le lanceur projette un petit astre vert jusquà 20m autour de lui. Lastre brûle lair environnant, nécrosant rapidement les formes de vies dans un rayon de 100m.`, `Toutes les créatures dans la portée de lastre (sauf le lanceur) doivent réussir un jet de CON avec un malus de -30. Si elles échouent, elles subissent 3D20 dégâts radiants et 2D20 dégâts nécrotiques. Elles perdent également 1D10 PV max.`]"
v-bind:schools="['Lumomancie', 'Nécromancie']"
v-bind:level="'30'"
v-bind:charge="'2'"
v-bind:ingredients="[`Volonté`, `Geste`]"
v-bind:cost="'-90'"
v-bind:variables="[{name: 'x', description: 'lol'}]"
/>
</div>
</template>
<script>
import spellcard from './components/spell-card.vue'
export default {
name: 'app',
components: {
spellcard
}
}
</script>
<style lang="scss">
#app {
font-family: Avenir, Helvetica, Arial, sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
margin-top: 60px;
}
</style>

BIN
src/assets/images/logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

View File

View File

@@ -0,0 +1,46 @@
@import '_variables';
@import '_mixins';
@import '_fonts';
// RESETS
html {
box-sizing: border-box;
font-size: $font-size-root;
-ms-overflow-style: scrollbar;
height: 100%;
-webkit-overflow-scrolling: touch;
line-height: 1.15;
color: $dark-gray;
-ms-text-size-adjust: 100%;
-webkit-text-size-adjust: 100%;
}
html *,
html *::before,
html *::after {
box-sizing: border-box;
}
* {
margin: 0;
padding: 0;
outline: none;
}
@at-root {
@-ms-viewport { width: device-width; }
}
var {
font-style: normal;
}
// BUTTONS
// MISC.
hr {
border: none;
border-top-style: solid;
border-top-width: 1px;
border-top-color: rgba($black, .25);
}

View File

View File

@@ -0,0 +1,16 @@
// COLOURS
$white: #FFF;
$black: #000;
$dark-gray: #222;
$dark-blue: #2c3e50;
$card-border-inner: #f5ebd8;
// FONT FAMILY
$font-family: 'Overpass', sans-serif;
$font-size-root: 15px !default;
$font-size-base: 1.2rem !default;
$line-height-base: 1.3 !default;

View File

@@ -0,0 +1,198 @@
<template>
<article class="spell-card">
<div class="content">
<header>
<h3>{{ name }}</h3>
</header>
<section class="casting-header">
<div class="casting-infos">
<div class="type">
<div class="level">
<div class="label">
<span>LV.</span>
<br>
<span>MIN</span>
</div>
<var>{{ level }}</var>
</div>
<ul class="schools">
<li v-for="school of schools" :key="school">
{{ school }}
</li>
</ul>
</div>
<div class="cost">
<span class="label">Malus</span>
<var>{{ cost }}</var>
</div>
<div class="charge">
<span class="label">Charge</span>
<var>{{ charge }}</var>
</div>
</div>
<div class="casting-ingredients">
<p class="title">Nécessite</p>
<p class="content">
<span v-for="ingredient of ingredients" :key="ingredient">
<span>{{ ingredient }} </span>
</span>
</p>
</div>
</section>
<hr>
<section class="spell-description">
<p v-for="line of description" :key="line">
{{ line }}
</p>
</section>
<hr>
<footer v-if="variables">
<div class="label">Variables</div>
<div class="variables">
<div v-for="variable in variables" :key="variable" class="xyz">
<span>{{ variable.name }}</span>
<var>{{ variable.description }}</var>
</div>
</div>
</footer>
</div>
</article>
</template>
<script>
export default {
name: "spell-card",
props: {
name: String,
description: Array,
level: String,
schools: Array,
ingredients: Array,
charge: String,
cost: String,
variables: Array,
}
}
</script>
<style lang="scss">
.spell-card {
max-width: 35rem;
padding: .5rem;
margin: .5rem auto .5rem;
background: $card-border-inner;
border: solid 1px rgba($dark-blue, .5);
border-radius: .5rem;
box-shadow: .0 .0 .75rem rgba($dark-blue, .25);
> .content {
max-width: 35rem;
height: 100%;
padding: .75rem;
background: $white;
header {
h3 {
padding: .5rem;
text-align: center;
color: $white;
text-transform: uppercase;
background: $black;
}
}
.casting-header {
display: flex;
> * {
width: 50%;
}
.casting-infos {
margin: .75rem 0;
padding-right: .75rem;
border-right: 1px solid rgba($black, .25);
.type {
margin-bottom: .5rem;
display: flex;
> * {
width: 50%;
}
.level {
.label {
margin-right: .25rem;
display: inline-block;
}
var {
display: inline-block;
font-size: 2.3em;
}
}
}
.cost, .charge {
font-size: 0.9rem;
> * {
vertical-align: middle;
}
.label {
display: inline-block;
width: 30%;
text-transform: uppercase;
}
var {
display: inline-block;
}
}
}
.casting-ingredients {
margin: .75rem 0;
padding-left: .75rem;
.title {
margin-bottom: .25rem;
font-size: .9rem;
font-weight: bold;
text-transform: uppercase;
}
.content {
font-size: .85rem;
text-align: justify;
text-align-last: center;
}
}
}
.spell-description {
padding: .75rem 0;
font-size: .85rem;
p {
&:not(:last-of-type) {
margin-bottom: .5rem;
}
}
}
footer {
padding: .75rem 0 0;
display: flex;
align-items: center;
.label {
margin-right: 1rem;
}
.variables {
.xyz {
span {
font-size: 1.1rem;
font-weight: bold;
margin-right: 1rem;
}
}
}
}
}
}
</style>

8
src/main.js Normal file
View File

@@ -0,0 +1,8 @@
import Vue from 'vue'
import App from './app.vue'
Vue.config.productionTip = false
new Vue({
render: h => h(App),
}).$mount('#app')