- Store files
This commit is contained in:
307
client/src/components/timeline/timeline.vue
Normal file
307
client/src/components/timeline/timeline.vue
Normal file
@@ -0,0 +1,307 @@
|
||||
<template>
|
||||
<ul class="timeline">
|
||||
<li class="timeline-item period first">
|
||||
<div class="timeline-info"></div>
|
||||
<div class="timeline-content">
|
||||
<h2 class="timeline-title">LE RENOUVEAU</h2>
|
||||
</div>
|
||||
</li>
|
||||
<li class="timeline-item">
|
||||
<div class="timeline-info">
|
||||
<span>March 12, 2016</span>
|
||||
</div>
|
||||
<div class="timeline-marker"></div>
|
||||
<div class="timeline-content">
|
||||
<h3 class="timeline-title">Event Title</h3>
|
||||
<p>Nullam vel sem. Nullam vel sem. Integer ante arcu, accumsan a, consectetuer eget, posuere ut, mauris. Donec orci lectus, aliquam ut, faucibus non, euismod id, nulla. Donec vitae sapien ut libero venenatis faucibus. ullam dictum felis eu pede mollis pretium. Pellentesque ut neque.</p>
|
||||
</div>
|
||||
</li>
|
||||
<li class="timeline-item">
|
||||
<div class="timeline-info">
|
||||
<span>March 23, 2016</span>
|
||||
</div>
|
||||
<div class="timeline-marker"></div>
|
||||
<div class="timeline-content">
|
||||
<h3 class="timeline-title">Event Title</h3>
|
||||
<p>Nullam vel sem. Nullam vel sem. Integer ante arcu, accumsan a, consectetuer eget, posuere ut, mauris. Donec orci lectus, aliquam ut, faucibus non, euismod id, nulla. Donec vitae sapien ut libero venenatis faucibus. ullam dictum felis eu pede mollis pretium. Pellentesque ut neque. </p>
|
||||
</div>
|
||||
</li>
|
||||
<li class="timeline-item period">
|
||||
<div class="timeline-info"></div>
|
||||
<div class="timeline-marker"></div>
|
||||
<div class="timeline-content">
|
||||
<h2 class="timeline-title">April 2016</h2>
|
||||
</div>
|
||||
</li>
|
||||
<li class="timeline-item">
|
||||
<div class="timeline-info">
|
||||
<span>April 02, 2016</span>
|
||||
</div>
|
||||
<div class="timeline-marker"></div>
|
||||
<div class="timeline-content">
|
||||
<h3 class="timeline-title">Event Title</h3>
|
||||
<p>Nullam vel sem. Nullam vel sem. Integer ante arcu, accumsan a, consectetuer eget, posuere ut, mauris. Donec orci lectus, aliquam ut, faucibus non, euismod id, nulla. Donec vitae sapien ut libero venenatis faucibus. ullam dictum felis eu pede mollis pretium. Pellentesque ut neque. </p>
|
||||
</div>
|
||||
</li>
|
||||
<li class="timeline-item">
|
||||
<div class="timeline-info">
|
||||
<span>April 28, 2016</span>
|
||||
</div>
|
||||
<div class="timeline-marker"></div>
|
||||
<div class="timeline-content">
|
||||
<h3 class="timeline-title">Event Title</h3>
|
||||
<p>Nullam vel sem. Nullam vel sem. Integer ante arcu, accumsan a, consectetuer eget, posuere ut, mauris. Donec orci lectus, aliquam ut, faucibus non, euismod id, nulla. Donec vitae sapien ut libero venenatis faucibus. ullam dictum felis eu pede mollis pretium. Pellentesque ut neque. </p>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'timeline',
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
/*==================================
|
||||
TIMELINE
|
||||
==================================*/
|
||||
|
||||
/*-- GENERAL STYLES
|
||||
------------------------------*/
|
||||
.timeline {
|
||||
margin: 0;
|
||||
padding-top: 25px;
|
||||
width: 100%;
|
||||
line-height: 1.4em;
|
||||
list-style: none;
|
||||
h1, h2, h3, h4, h5, h6 {
|
||||
line-height: inherit;
|
||||
}
|
||||
}
|
||||
|
||||
/*----- TIMELINE ITEM -----*/
|
||||
|
||||
.timeline-item {
|
||||
padding-left: 40px;
|
||||
position: relative;
|
||||
&:last-child {
|
||||
padding-bottom: 0;
|
||||
}
|
||||
}
|
||||
|
||||
/*----- TIMELINE INFO -----*/
|
||||
|
||||
.timeline-info {
|
||||
font-size: 12px;
|
||||
font-weight: 700;
|
||||
letter-spacing: 3px;
|
||||
margin: 0 0 .5em 0;
|
||||
text-transform: uppercase;
|
||||
white-space: nowrap;
|
||||
}
|
||||
/*----- TIMELINE MARKER -----*/
|
||||
|
||||
.timeline-marker {
|
||||
position: absolute;
|
||||
top: 0; bottom: 0; left: 0;
|
||||
width: 15px;
|
||||
&:before {
|
||||
background: $primary-blue;
|
||||
border: 3px solid transparent;
|
||||
border-radius: 100%;
|
||||
content: "";
|
||||
display: block;
|
||||
height: 15px;
|
||||
position: absolute;
|
||||
top: 4px; left: 0;
|
||||
width: 15px;
|
||||
transition: background 0.3s ease-in-out, border 0.3s ease-in-out;
|
||||
}
|
||||
&:after {
|
||||
content: "";
|
||||
width: 3px;
|
||||
background: #CCD5DB;
|
||||
display: block;
|
||||
position: absolute;
|
||||
top: 24px; bottom: 0; left: 6px;
|
||||
}
|
||||
.timeline-item:last-child &:after {
|
||||
content: none;
|
||||
}
|
||||
}
|
||||
.timeline-item:not(.period):hover .timeline-marker:before {
|
||||
background: transparent;
|
||||
border: 3px solid $primary-blue;
|
||||
}
|
||||
|
||||
/*----- TIMELINE CONTENT -----*/
|
||||
|
||||
.timeline-content {
|
||||
padding-bottom: 40px;
|
||||
p:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
}
|
||||
|
||||
/*----- TIMELINE PERIOD -----*/
|
||||
|
||||
.period {
|
||||
padding: 0;
|
||||
.timeline-info {
|
||||
display: none;
|
||||
}
|
||||
.timeline-marker {
|
||||
&:before {
|
||||
background: transparent;
|
||||
content: "";
|
||||
width: 15px;
|
||||
height: auto;
|
||||
border: none;
|
||||
border-radius: 0;
|
||||
top: 0;
|
||||
bottom: 30px;
|
||||
position: absolute;
|
||||
border-top: 3px solid #CCD5DB;
|
||||
border-bottom: 3px solid #CCD5DB;
|
||||
}
|
||||
&:after {
|
||||
content: "";
|
||||
height: 32px;
|
||||
top: auto;
|
||||
}
|
||||
}
|
||||
&:not(.first) {
|
||||
.timeline-content {
|
||||
padding: 40px 0 70px;
|
||||
}
|
||||
}
|
||||
.timeline-title {
|
||||
margin: 0;
|
||||
font-family: 'Playfair Display', sans-serif;
|
||||
font-weight: $bold;
|
||||
}
|
||||
}
|
||||
|
||||
/*----------------------------------------------
|
||||
MOD: TIMELINE SPLIT
|
||||
----------------------------------------------*/
|
||||
|
||||
.timeline-split {
|
||||
@media (min-width: 768px) {
|
||||
.timeline {
|
||||
display: table;
|
||||
}
|
||||
.timeline-item {
|
||||
display: table-row;
|
||||
padding: 0;
|
||||
}
|
||||
.timeline-info,
|
||||
.timeline-marker,
|
||||
.timeline-content,
|
||||
.period .timeline-info {
|
||||
display: table-cell;
|
||||
vertical-align: top;
|
||||
}
|
||||
.timeline-marker {
|
||||
position: relative;
|
||||
}
|
||||
.timeline-content {
|
||||
padding-left: 30px;
|
||||
}
|
||||
.timeline-info {
|
||||
padding-right: 30px;
|
||||
}
|
||||
.period .timeline-title {
|
||||
position: relative;
|
||||
left: -45px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*----------------------------------------------
|
||||
MOD: TIMELINE CENTERED
|
||||
----------------------------------------------*/
|
||||
|
||||
.timeline-centered {
|
||||
@extend .timeline-split;
|
||||
@media (min-width: 992px) {
|
||||
&,
|
||||
.timeline-item,
|
||||
.timeline-info,
|
||||
.timeline-marker,
|
||||
.timeline-content {
|
||||
display: block;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
.timeline-item {
|
||||
padding-bottom: 40px;
|
||||
overflow: hidden;
|
||||
}
|
||||
.timeline-marker {
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
margin-left: -7.5px;
|
||||
}
|
||||
.timeline-info,
|
||||
.timeline-content {
|
||||
width: 50%;
|
||||
}
|
||||
> .timeline-item:nth-child(odd) .timeline-info {
|
||||
float: left;
|
||||
text-align: right;
|
||||
padding-right: 30px;
|
||||
}
|
||||
> .timeline-item:nth-child(odd) .timeline-content {
|
||||
float: right;
|
||||
text-align: left;
|
||||
padding-left: 30px;
|
||||
}
|
||||
> .timeline-item:nth-child(even) .timeline-info {
|
||||
float: right;
|
||||
text-align: left;
|
||||
padding-left: 30px;
|
||||
}
|
||||
> .timeline-item:nth-child(even) .timeline-content {
|
||||
float: left;
|
||||
text-align: right;
|
||||
padding-right: 30px;
|
||||
}
|
||||
> .timeline-item.period .timeline-content {
|
||||
float: none;
|
||||
padding: 0;
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
}
|
||||
.timeline-item.period {
|
||||
padding: 50px 0 90px;
|
||||
}
|
||||
.period .timeline-marker:after {
|
||||
height: 30px;
|
||||
bottom: 0;
|
||||
top: auto;
|
||||
}
|
||||
.period .timeline-title {
|
||||
left: auto;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*----------------------------------------------
|
||||
MOD: MARKER OUTLINE
|
||||
----------------------------------------------*/
|
||||
|
||||
.marker-outline {
|
||||
.timeline-marker {
|
||||
&:before {
|
||||
background: transparent;
|
||||
border-color: $primary-blue;
|
||||
}
|
||||
}
|
||||
.timeline-item:hover .timeline-marker:before {
|
||||
background: $primary-blue;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
19
client/src/store/index.js
Normal file
19
client/src/store/index.js
Normal file
@@ -0,0 +1,19 @@
|
||||
import Vue from 'vue';
|
||||
import Vuex from 'vuex';
|
||||
|
||||
import VueCookies from 'vue-cookies';
|
||||
Vue.use(VueCookies);
|
||||
Vue.$cookies.config('30d','','');
|
||||
|
||||
Vue.use(Vuex);
|
||||
|
||||
import user from './modules/user.store';
|
||||
|
||||
const debug = process.env.NODE_ENV !== 'production';
|
||||
|
||||
export default new Vuex.Store({
|
||||
modules: {
|
||||
user
|
||||
},
|
||||
strict: debug
|
||||
});
|
||||
23
client/src/store/modules/spell.store.js
Normal file
23
client/src/store/modules/spell.store.js
Normal file
@@ -0,0 +1,23 @@
|
||||
const state = {
|
||||
|
||||
}
|
||||
|
||||
const getters = {
|
||||
|
||||
}
|
||||
|
||||
const actions = {
|
||||
|
||||
}
|
||||
|
||||
const mutations = {
|
||||
|
||||
}
|
||||
|
||||
export default {
|
||||
namespaced: true,
|
||||
state,
|
||||
getters,
|
||||
actions,
|
||||
mutations,
|
||||
}
|
||||
59
client/src/store/modules/user.store.js
Normal file
59
client/src/store/modules/user.store.js
Normal file
@@ -0,0 +1,59 @@
|
||||
// API
|
||||
import { RepositoryFactory } from "~/api/repositories"
|
||||
const Users = RepositoryFactory.get('users')
|
||||
|
||||
export const namespaced = true
|
||||
|
||||
const state = {
|
||||
status: {
|
||||
logged: false,
|
||||
user_token: null,
|
||||
}
|
||||
};
|
||||
|
||||
const getters = {
|
||||
getUserToken: state => {
|
||||
if (state.status.logged) {
|
||||
return state.status.user_token
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
const mutations = {
|
||||
loginUser(state, user_token) {
|
||||
state.status.user_token = user_token;
|
||||
state.status.logged = true;
|
||||
},
|
||||
logoutUser(state) {
|
||||
state.status.user_token = null;
|
||||
state.status.logged = false;
|
||||
}
|
||||
};
|
||||
|
||||
const actions = {
|
||||
user_login ({ commit }, data) {
|
||||
return new Promise((resolve, reject) => {
|
||||
Users.login(data)
|
||||
.then(v => {
|
||||
let user_token = v.data.token;
|
||||
commit('loginUser', user_token);
|
||||
resolve(user_token);
|
||||
})
|
||||
.catch(() => {
|
||||
reject();
|
||||
});
|
||||
})
|
||||
},
|
||||
user_logout ({ commit }) {
|
||||
commit('logoutUser');
|
||||
}
|
||||
};
|
||||
|
||||
export default {
|
||||
state,
|
||||
getters,
|
||||
actions,
|
||||
mutations,
|
||||
};
|
||||
Reference in New Issue
Block a user