mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-13 13:54:23 +00:00
accourse stickyNav: insert a component, replace deprecated anchor name by id
This commit is contained in:
parent
ee3776288b
commit
f93c13234a
@ -80,7 +80,7 @@ export default {
|
|||||||
left: -22px;
|
left: -22px;
|
||||||
top: 4px;
|
top: 4px;
|
||||||
}
|
}
|
||||||
a[name^="section"] {
|
a[id^="section"] {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: -2.5em; // reference for stickNav
|
top: -2.5em; // reference for stickNav
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="vue-component">
|
<div class="vue-component">
|
||||||
<h2><a name="section-80"></a>{{ $t('comment.title') }}</h2>
|
<h2><a id="section-90"></a>{{ $t('comment.title') }}</h2>
|
||||||
|
|
||||||
<!--div class="error flash_message" v-if="errors.length > 0">
|
<!--div class="error flash_message" v-if="errors.length > 0">
|
||||||
{{ errors[0] }}
|
{{ errors[0] }}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="vue-component">
|
<div class="vue-component">
|
||||||
<h2><a name="section-90"></a>
|
<h2><a id="section-100"></a>
|
||||||
{{ $t('confirm.title') }}
|
{{ $t('confirm.title') }}
|
||||||
</h2>
|
</h2>
|
||||||
<div>
|
<div>
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="vue-component">
|
<div class="vue-component">
|
||||||
<h2><a name="section-20"></a>
|
<h2><a id="section-20"></a>
|
||||||
{{ $t('courselocation.title') }}
|
{{ $t('courselocation.title') }}
|
||||||
</h2>
|
</h2>
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="vue-component">
|
<div class="vue-component">
|
||||||
<h2><a name="section-30"></a>{{ $t('origin.title') }}</h2>
|
<h2><a id="section-30"></a>{{ $t('origin.title') }}</h2>
|
||||||
|
|
||||||
<div class="mb-4">
|
<div class="mb-4">
|
||||||
<label for="selectOrigin">
|
<label for="selectOrigin">
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="vue-component">
|
<div class="vue-component">
|
||||||
<h2><a name="section-10"></a>{{ $t('persons_associated.title')}}</h2>
|
<h2><a id="section-10"></a>{{ $t('persons_associated.title')}}</h2>
|
||||||
|
|
||||||
<div v-if="currentParticipations.length > 0">
|
<div v-if="currentParticipations.length > 0">
|
||||||
<label class="col-form-label">{{ $tc('persons_associated.counter', counter) }}</label>
|
<label class="col-form-label">{{ $tc('persons_associated.counter', counter) }}</label>
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="vue-component">
|
<div class="vue-component">
|
||||||
<h2><a name="section-60"></a>{{ $t('referrer.title') }}</h2>
|
<h2><a id="section-70"></a>{{ $t('referrer.title') }}</h2>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<label class="col-form-label" for="selectReferrer">
|
<label class="col-form-label" for="selectReferrer">
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="vue-component">
|
<div class="vue-component">
|
||||||
|
|
||||||
<h2><a name="section-40"></a>{{ $t('requestor.title') }}</h2>
|
<h2><a id="section-40"></a>{{ $t('requestor.title') }}</h2>
|
||||||
|
|
||||||
<div v-if="accompanyingCourse.requestor" class="flex-table">
|
<div v-if="accompanyingCourse.requestor" class="flex-table">
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="vue-component">
|
<div class="vue-component">
|
||||||
|
|
||||||
<h2><a name="section-70"></a>{{ $t('resources.title')}}</h2>
|
<h2><a id="section-80"></a>{{ $t('resources.title')}}</h2>
|
||||||
|
|
||||||
<div v-if="resources.length > 0">
|
<div v-if="resources.length > 0">
|
||||||
<label class="col-form-label">{{ $tc('resources.counter', counter) }}</label>
|
<label class="col-form-label">{{ $tc('resources.counter', counter) }}</label>
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="vue-component">
|
<div class="vue-component">
|
||||||
<h2><a name="section-65"></a>{{ $t('scopes.title') }}</h2>
|
<h2><a id="section-60"></a>{{ $t('scopes.title') }}</h2>
|
||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
<li v-for="s in scopes">
|
<li v-for="s in scopes">
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="vue-component">
|
<div class="vue-component">
|
||||||
<h2><a name="section-50"></a>{{ $t('social_issue.title') }}</h2>
|
<h2><a id="section-50"></a>{{ $t('social_issue.title') }}</h2>
|
||||||
|
|
||||||
<div class="my-4">
|
<div class="my-4">
|
||||||
<!--label for="field">{{ $t('social_issue.label') }}</label
|
<!--label for="field">{{ $t('social_issue.label') }}</label
|
||||||
|
@ -62,7 +62,7 @@ export default {
|
|||||||
// load datas DOM when mounted ready
|
// load datas DOM when mounted ready
|
||||||
this.container = document.querySelector("#content");
|
this.container = document.querySelector("#content");
|
||||||
this.stickyNav = document.querySelector('#navmap');
|
this.stickyNav = document.querySelector('#navmap');
|
||||||
this.anchors = document.querySelectorAll("h2 a[name^='section']");
|
this.anchors = document.querySelectorAll("h2 a[id^='section']");
|
||||||
this.initItemsMap();
|
this.initItemsMap();
|
||||||
|
|
||||||
// TODO resizeObserver not supports IE !
|
// TODO resizeObserver not supports IE !
|
||||||
@ -82,8 +82,8 @@ export default {
|
|||||||
this.items.push({
|
this.items.push({
|
||||||
pos: null,
|
pos: null,
|
||||||
active: false,
|
active: false,
|
||||||
key: parseInt(anchor.name.slice(8).slice(0, -1)),
|
key: parseInt(anchor.id.slice(8).slice(0, -1)),
|
||||||
name: '#' + anchor.name
|
id: '#' + anchor.id
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<a
|
<a
|
||||||
v-if="item.key <= 7"
|
v-if="item.key <= 8"
|
||||||
:href="item.name"
|
:href="item.id"
|
||||||
:class="{ 'active': isActive }"
|
:class="{ 'active': isActive }"
|
||||||
>
|
>
|
||||||
<i class="fa fa-fw fa-square"></i>
|
<i class="fa fa-fw fa-square"></i>
|
||||||
@ -9,7 +9,7 @@
|
|||||||
</a>
|
</a>
|
||||||
<a
|
<a
|
||||||
v-else-if="step === 'DRAFT'"
|
v-else-if="step === 'DRAFT'"
|
||||||
:href="item.name"
|
:href="item.id"
|
||||||
:class="{ 'active': isActive }"
|
:class="{ 'active': isActive }"
|
||||||
>
|
>
|
||||||
<i class="fa fa-fw fa-square"></i>
|
<i class="fa fa-fw fa-square"></i>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user