File tree 11 files changed +153
-22
lines changed
11 files changed +153
-22
lines changed Original file line number Diff line number Diff line change 11
11
"ol" : " ^6.1.1" ,
12
12
"proj4" : " ^2.6.0" ,
13
13
"vue" : " ^2.6.10" ,
14
+ "vue-burger-menu" : " ^2.0.3" ,
14
15
"vue-code-highlight" : " ^0.7.4" ,
15
16
"vue-router" : " ^3.1.3"
16
17
},
Original file line number Diff line number Diff line change 9
9
/* Base layout in App.vue */
10
10
# app {
11
11
display : grid;
12
- grid-template-columns : 1 fr 1fr 1 fr 1 fr 1 fr ;
12
+ grid-template-columns : repeat ( 5 , 1fr ) ;
13
13
grid-template-rows : auto;
14
14
grid-template-areas :
15
15
"header header header header header"
16
16
"navbar map map map map"
17
17
}
18
18
19
-
20
19
.header {
21
20
grid-area : header;
22
21
background-color : black;
30
29
}
31
30
32
31
.header h1 {
33
- font-size : 2 vw ;
32
+ font-size : larger ;
34
33
padding : 10px ;
35
34
}
36
35
80
79
.navbar-item {
81
80
color : white;
82
81
text-decoration : none; /* Remove underline from links */
83
- font-size : 1vw
82
+ font-size : 1vw ;
84
83
}
85
84
86
85
.router-link-active {
94
93
margin : auto;
95
94
}
96
95
96
+
97
+
97
98
/* Higthliting code */
98
99
.map-code {
99
100
width : 80% ;
@@ -105,7 +106,7 @@ body {
105
106
padding : 2em 0 2em 0 ;
106
107
width : 80% ;
107
108
margin : auto;
108
- font-size : 1 vw ;
109
+ font-size : medium ;
109
110
line-height : 1.3 ;
110
111
}
111
112
@@ -130,3 +131,41 @@ body {
130
131
.openlayers-link {
131
132
color : # d63200 ;
132
133
}
134
+
135
+ /*responsive design*/
136
+ @media (max-width : 1024px ) {
137
+ # app {
138
+ display : grid;
139
+ grid-template-columns : repeat (5 , 1fr );
140
+ grid-template-rows : auto;
141
+ grid-template-areas :
142
+ "header header header header header"
143
+ "map map map map map"
144
+ }
145
+
146
+ # map {
147
+ width : 95% ;
148
+ margin : auto;
149
+ height : 20em ;
150
+ }
151
+
152
+ .description {
153
+ padding : 2em 0 2em 0 ;
154
+ width : 90% ;
155
+ font-size : small;
156
+ margin : auto;
157
+ }
158
+
159
+ .map-code {
160
+ width : 100% ;
161
+ margin : auto;
162
+ font-size : small;
163
+ }
164
+
165
+ .header {
166
+ height : 2em ;
167
+ }
168
+ .header h1 {
169
+ font-size : small;
170
+ }
171
+ }
Original file line number Diff line number Diff line change 1
1
<template >
2
2
<div >
3
+ <Slide right >
4
+ <router-link class =" navbar-item" :to =" {name: 'home'}" >Accueil</router-link >
5
+ <router-link class =" navbar-item" :to =" {name: 'firstMap'}" >Afficher une carte</router-link >
6
+ <router-link class =" navbar-item" :to =" {name: 'changeView'}" >Centrer la carte</router-link >
7
+ <router-link class =" navbar-item" :to =" {name: 'projections'}" >Utiliser des projections différentes</router-link >
8
+ <router-link class =" navbar-item" :to =" {name: 'controles'}" >Afficher les contrôles disponibles</router-link >
9
+ <router-link class =" navbar-item" :to =" {name: 'tileMap'}" >Les sources de couche OpenLayers</router-link >
10
+ <router-link class =" navbar-item" :to =" {name: 'rasterTiles'}" >Les tuiles raster OpenStreetMap</router-link >
11
+ <router-link class =" navbar-item" :to =" {name: 'mapEvent'}" >Les évènements liés à la carte</router-link >
12
+ <router-link class =" navbar-item" :to =" {name: 'vectorGeometry'}" >Créer des géométries</router-link >
13
+ <router-link class =" navbar-item" :to =" {name: 'vectorFile'}" >Charger des fichiers de données</router-link >
14
+ <router-link class =" navbar-item" :to =" {name: 'vectorData'}" >Manipuler des données vectorielles</router-link >
15
+ <router-link class =" navbar-item" :to =" {name: 'overlays'}" >Afficher un overlay</router-link >
16
+ <router-link class =" navbar-item" :to =" {name: 'multipleOverlays'}" >Afficher plusieurs overlays</router-link >
17
+ <router-link class =" navbar-item" :to =" {name: 'popup'}" >Afficher des infos dans une popup</router-link >
18
+ </Slide >
3
19
<h1 ><span class =" vue" >Vue.js</span > + <span class =" openlayers" >OpenLayers 6</span > 🌍</h1 >
4
20
</div >
5
21
</template >
6
22
7
23
<script >
24
+ import { Slide } from ' vue-burger-menu'
25
+ import TheNavBar from ' ./TheNavBar'
8
26
export default {
9
-
27
+ components: {
28
+ Slide,
29
+ TheNavBar
30
+ },
10
31
}
11
- </script >
32
+ </script >
33
+
34
+ <style >
35
+ .bm-burger-bars {
36
+ background-color :white ;
37
+ }
38
+ .bm-burger-button {
39
+ width : 1em ;
40
+ height : 1em ;
41
+ left : 0px ;
42
+ top : 5px ;
43
+ }
44
+ .bm-item-list a {
45
+ font-size : small ;
46
+ }
47
+ </style >
Original file line number Diff line number Diff line change 58
58
i {
59
59
font-size : 1.5em ;
60
60
}
61
+
62
+ @media (max-width : 1024px ) {
63
+ .backdrop-home {
64
+ font-size : smaller ;
65
+ width : 70% ;
66
+ }
67
+ }
61
68
</style >
Original file line number Diff line number Diff line change @@ -90,7 +90,7 @@ export default {
90
90
target: ' map' ,
91
91
view: new View ({
92
92
center: [0 , 0 ],
93
- zoom: 2
93
+ zoom: 0
94
94
})
95
95
})
96
96
@@ -121,6 +121,13 @@ export default {
121
121
margin : auto ;
122
122
}
123
123
124
+ @media (max-width : 1024px ) {
125
+ #map {
126
+ width : 95% ;
127
+ margin : auto ;
128
+ }
129
+ }
130
+
124
131
.mount {
125
132
width : 15px ;
126
133
height : 15px ;
Original file line number Diff line number Diff line change @@ -77,6 +77,13 @@ export default {
77
77
margin : auto ;
78
78
}
79
79
80
+ @media (max-width : 1024px ) {
81
+ #map {
82
+ width : 95% ;
83
+ margin : auto ;
84
+ }
85
+ }
86
+
80
87
#marker {
81
88
width : 20px ;
82
89
height : 20px ;
Original file line number Diff line number Diff line change @@ -139,11 +139,6 @@ export default {
139
139
</script >
140
140
141
141
<style scoped>
142
- #map {
143
- height : 80vh ;
144
- width : 80% ;
145
- margin : auto ;
146
- }
147
142
148
143
.ol-popup {
149
144
position : absolute ;
Original file line number Diff line number Diff line change @@ -71,12 +71,4 @@ export default {
71
71
}
72
72
}
73
73
74
- </script >
75
-
76
- <style scoped>
77
- #map {
78
- height : 80vh ;
79
- width : 80% ;
80
- margin : auto ;
81
- }
82
- </style >
74
+ </script >
Original file line number Diff line number Diff line change @@ -219,4 +219,24 @@ h2 {
219
219
padding-bottom : 1.5em ;
220
220
font-size : 1.5em ;
221
221
}
222
+
223
+ @media (max-width : 1024px ) {
224
+ .content {
225
+ display : block ;
226
+ }
227
+ h2 {
228
+ padding-bottom : 0 ;
229
+ font-size : small ;
230
+ }
231
+ .sidebar {
232
+ font-size : small ;
233
+ padding : 0em 0em 0em 1em ;
234
+ }
235
+ #map {
236
+ width : 95% ;
237
+ margin : auto ;
238
+ height : 20em ;
239
+ }
240
+ }
241
+
222
242
</style >
Original file line number Diff line number Diff line change @@ -194,4 +194,23 @@ h2 {
194
194
margin : auto ;
195
195
}
196
196
197
+ @media (max-width : 1024px ) {
198
+ .content {
199
+ display : block ;
200
+ }
201
+ h2 {
202
+ padding-bottom : 0 ;
203
+ font-size : small ;
204
+ }
205
+ .sidebar {
206
+ font-size : small ;
207
+ padding : 0em 0em 0em 1em ;
208
+ }
209
+ #map {
210
+ width : 95% ;
211
+ margin : auto ;
212
+ height : 20em ;
213
+ }
214
+ }
215
+
197
216
</style >
You can’t perform that action at this time.
0 commit comments