39 lines
1.2 KiB
Vue
39 lines
1.2 KiB
Vue
<template>
|
|
<div class="container">
|
|
<h2>Sélectionnez la ligne empruntée</h2>
|
|
<div class="list-group">
|
|
<template v-for="(line, code) in lines">
|
|
<a v-bind:key="code+'0'" v-bind:href="'#/line/'+code+'/'+line.stations[0]"
|
|
class="list-group-item list-group-item-action">
|
|
<img v-bind:src="line.icon" v-bind:alt="line.label" v-bind:title="line.label" />
|
|
{{ stations[line.stations[0]].label }}
|
|
</a>
|
|
<a :key="code+'1'" :href="'#/line/'+code+'/'+line.stations[line.stations.length - 1]"
|
|
class="list-group-item list-group-item-action">
|
|
<img v-bind:src="line.icon" v-bind:alt="line.label" v-bind:title="line.label" />
|
|
{{ stations[line.stations[line.stations.length - 1]].label }}
|
|
</a>
|
|
</template>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
|
|
<script>
|
|
export default {
|
|
name: 'Lines',
|
|
data() {
|
|
return {
|
|
lines: this.$parent.$data.lines,
|
|
stations: this.$parent.$data.stations,
|
|
};
|
|
},
|
|
};
|
|
</script>
|
|
|
|
<style scoped>
|
|
.list-group-item img {
|
|
max-width: 2em;
|
|
margin-right: 1em;
|
|
}
|
|
</style>
|