mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-13 05:44:24 +00:00
create new app vue homepage_widget, with store
This commit is contained in:
parent
320d11671a
commit
0e2772336f
@ -0,0 +1,16 @@
|
|||||||
|
import { createApp } from 'vue';
|
||||||
|
import { _createI18n } from 'ChillMainAssets/vuejs/_js/i18n';
|
||||||
|
import { appMessages } from 'ChillMainAssets/vuejs/HomepageWidget/js/i18n';
|
||||||
|
import { store } from 'ChillMainAssets/vuejs/HomepageWidget/js/store';
|
||||||
|
import App from 'ChillMainAssets/vuejs/HomepageWidget/App';
|
||||||
|
|
||||||
|
const i18n = _createI18n(appMessages);
|
||||||
|
|
||||||
|
const app = createApp({
|
||||||
|
template: `<app></app>`,
|
||||||
|
})
|
||||||
|
.use(store)
|
||||||
|
.use(i18n)
|
||||||
|
.component('app', App)
|
||||||
|
.mount('#homepage_widget')
|
||||||
|
;
|
@ -0,0 +1,46 @@
|
|||||||
|
<template>
|
||||||
|
|
||||||
|
<ul class="nav nav-tabs">
|
||||||
|
<li class="nav-item">
|
||||||
|
<a class="nav-link active" aria-current="page" href="#">
|
||||||
|
<i class="fa fa-home"></i>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-item">
|
||||||
|
<a class="nav-link" href="#">
|
||||||
|
Actions d'accompagnement
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-item">
|
||||||
|
<a class="nav-link" href="#">
|
||||||
|
Évaluations
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-item">
|
||||||
|
<a class="nav-link" href="#">
|
||||||
|
Tâches
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-item">
|
||||||
|
<a class="nav-link" href="#">
|
||||||
|
Parcours
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-item">
|
||||||
|
<a class="nav-link" href="#">
|
||||||
|
Notifications
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: "App"
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
</style>
|
@ -0,0 +1,11 @@
|
|||||||
|
const appMessages = {
|
||||||
|
fr: {
|
||||||
|
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
Object.assign(appMessages.fr);
|
||||||
|
|
||||||
|
export {
|
||||||
|
appMessages
|
||||||
|
};
|
@ -0,0 +1,14 @@
|
|||||||
|
import 'es6-promise/auto';
|
||||||
|
import { createStore } from 'vuex';
|
||||||
|
|
||||||
|
const debug = process.env.NODE_ENV !== 'production';
|
||||||
|
|
||||||
|
const store = createStore({
|
||||||
|
strict: debug,
|
||||||
|
state: {},
|
||||||
|
getters: {},
|
||||||
|
mutations: {},
|
||||||
|
actions: {},
|
||||||
|
});
|
||||||
|
|
||||||
|
export { store };
|
@ -3,44 +3,13 @@
|
|||||||
{# vue component #}
|
{# vue component #}
|
||||||
<div id="homepage_widget"></div>
|
<div id="homepage_widget"></div>
|
||||||
|
|
||||||
<ul class="nav nav-tabs">
|
|
||||||
<li class="nav-item">
|
|
||||||
<a class="nav-link active" aria-current="page" href="#">
|
|
||||||
<i class="fa fa-home"></i>
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
<li class="nav-item">
|
|
||||||
<a class="nav-link" href="#">
|
|
||||||
Actions d'accompagnement
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
<li class="nav-item">
|
|
||||||
<a class="nav-link" href="#">
|
|
||||||
Évaluations
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
<li class="nav-item">
|
|
||||||
<a class="nav-link" href="#">
|
|
||||||
Tâches
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
<li class="nav-item">
|
|
||||||
<a class="nav-link" href="#">
|
|
||||||
Parcours
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
<li class="nav-item">
|
|
||||||
<a class="nav-link" href="#">
|
|
||||||
Notifications
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
{% include '@ChillMain/Homepage/sticky_button.html.twig' %}
|
{% include '@ChillMain/Homepage/sticky_button.html.twig' %}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{% block css %}
|
{% block css %}
|
||||||
|
{{ encore_entry_link_tags('page_homepage_widget') }}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block js %}
|
{% block js %}
|
||||||
|
{{ encore_entry_script_tags('page_homepage_widget') }}
|
||||||
{% endblock %}
|
{% endblock %}
|
@ -53,6 +53,7 @@ module.exports = function(encore, entries)
|
|||||||
encore.addEntry('page_login', __dirname + '/Resources/public/page/login/index.js');
|
encore.addEntry('page_login', __dirname + '/Resources/public/page/login/index.js');
|
||||||
encore.addEntry('page_location', __dirname + '/Resources/public/page/location/index.js');
|
encore.addEntry('page_location', __dirname + '/Resources/public/page/location/index.js');
|
||||||
encore.addEntry('page_workflow_show', __dirname + '/Resources/public/page/workflow-show/index.js');
|
encore.addEntry('page_workflow_show', __dirname + '/Resources/public/page/workflow-show/index.js');
|
||||||
|
encore.addEntry('page_homepage_widget', __dirname + '/Resources/public/page/homepage_widget/index.js');
|
||||||
|
|
||||||
buildCKEditor(encore);
|
buildCKEditor(encore);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user