Commit 7e1d47a6 authored by  JosephK's avatar JosephK
Browse files

️ vuefs

parent fcfd14ea
......@@ -32,7 +32,7 @@
}
},
"rules": {
"filenames/match-regex": [2, "^[a-z0-9_]+$"],
"filenames/match-regex": "off",// [2, "^[a-z0-9_]+$"],
"import/no-commonjs": "error",
"no-multiple-empty-lines": ["error", { "max": 1 }],
"promise/catch-or-return": "error",
......@@ -45,6 +45,7 @@
},
"svg": "always",
"math": "always"
}]
}],
"vue/no-v-html": "off"
}
}
......@@ -7,7 +7,7 @@ test:
stage: test
script:
- npm install -g yaml-lint
- for f in $(find ./app/ -name "*.yml" -type f);do yamllint $f;done;
- for f in $(find ./app/ -name "*.yml" -type f);do echo $f; yamllint $f;done;
pages:
stage: deploy
......@@ -22,6 +22,15 @@ pages:
cache:
paths:
- node_modules/
only:
refs:
- master
except:
variables:
- $DEPLOYEMENT_KEY
- $DEPLOYEMENT_KNOWN_HOSTS
- $DEPLOYEMENT_USER
- $DEPLOYEMENT_HOST
production:
stage: deploy
......
[![](https://upload.wikimedia.org/wikipedia/commons/thumb/1/18/GitLab_Logo.svg/48px-GitLab_Logo.svg.png)](https://framagit.org)
![English:](https://upload.wikimedia.org/wikipedia/commons/thumb/a/ae/Flag_of_the_United_Kingdom.svg/20px-Flag_of_the_United_Kingdom.svg.png) **Framasoft uses GitLab** for the development of its free softwares. Our Github repositories are only mirrors.
🇬🇧 **Framasoft uses GitLab** for the development of its free softwares. Our Github repositories are only mirrors.
If you want to work with us, **fork us on [framagit.org](https://framagit.org)**. (no registration needed, you can sign in with your Github account)
![Français :](https://upload.wikimedia.org/wikipedia/commons/thumb/c/c3/Flag_of_France.svg/20px-Flag_of_France.svg.png) **Framasoft utilise GitLab** pour le développement de ses logiciels libres. Nos dépôts Github ne sont que des miroirs.
🇫🇷 **Framasoft utilise GitLab** pour le développement de ses logiciels libres. Nos dépôts Github ne sont que des miroirs.
Si vous souhaitez travailler avec nous, **forkez-nous sur [framagit.org](https://framagit.org)**. (l'inscription n'est pas nécessaire, vous pouvez vous connecter avec votre compte Github)
* * *
......
<template>
<div id="app" class="container ombre">
<div
id="app"
class="container ombre"
>
<vue-headful
:title="meta.title"
:description="meta.description"
......@@ -20,47 +23,56 @@
'meta[name^=twitter][name$=image]': {content: meta.img},
'meta[name^=twitter][name$=description]': {content: meta.description},
'meta[name=author]': {content: meta.author},
'meta[name=author]': {content: meta.author},
}"
/>
<header-component></header-component>
<router-view></router-view>
<header-component />
<router-view />
</div>
</template>
<script>
import HeaderComponent from './components/partials/Header.vue'
import HeaderComponent from './components/partials/Header.vue';
export default {
name: 'app',
name: 'App',
components: {
HeaderComponent,
},
created() {
if (this.$route.meta.lang !== undefined
&& this.$i18n.locale !== this.$route.meta.lang) {
this.$i18n.locale = this.$route.meta.lang;
}
},
data() {
const title = this.$te(`meta.${this.$route.meta.id}.title`)
? this.$t(`meta.${this.$route.meta.id}.title`)
: this.$t(`meta.title`, '-t');
const description = this.$te(`meta.${this.$route.meta.id}.description`)
? this.$t(`meta.${this.$route.meta.id}.description`)
: this.$t(`meta.description`, '-t');
: this.$t('meta.description', '-t');
let title = this.$t('meta.title', '-t'); // Main title
if (this.$te(`${this.$route.meta.id}.title`)) {
// Main title - Page title
title = `${title} - ${this.$t(`${this.$route.meta.id}.title`, '-t')}`;
}
if (this.$te(`meta.${this.$route.meta.id}.title`)) {
// Custom title
title = this.$t(`meta.${this.$route.meta.id}.title`, '-t');
}
return {
meta: {
title,
description,
author: this.$te('meta.author') ? this.$t('meta.author') : '',
img: `${this.$t('baseurl').replace(/\/$/, '')}/img/opengraph/${this.$route.meta.id}.jpg`,
url: `${this.$t('meta.canonical').replace(/\/$/, '')}${this.$route.path}`,
favicon: `${this.$t('baseurl').replace(/\/$/, '')}/icons/favicon.png`,
appleicon: `${this.$t('baseurl').replace(/\/$/, '')}/icons/apple-touch-icon.png`,
img: `${this.$t('baseurl')}img/opengraph/${this.$route.meta.id}.jpg`,
url: `${this.$t('meta.canonical')}${this.$route.path}`,
favicon: `${this.$t('baseurl')}icons/favicon.png`,
appleicon: `${this.$t('baseurl')}icons/apple-touch-icon.png`,
},
i18n: process.env.NODE_ENV === 'development' ? this.$i18n.messages : ''
i18n: process.env.NODE_ENV === 'development' ? this.$i18n.messages : '',
};
},
created() {
if (this.$route.meta.lang !== undefined
&& this.$i18n.locale !== this.$route.meta.lang) {
this.$i18n.locale = this.$route.meta.lang;
}
}
}
},
};
</script>
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment