mirror of https://github.com/01-edu/public.git
Updated the subject. (#614)
This commit is contained in:
parent
f2d9fba5ca
commit
4b0d348230
|
@ -7,15 +7,19 @@ Tired of staying home for too long, you decide to develop a page to index ideas
|
|||
Write the function `explore` which creates a page displaying the list of `places` provided in the data file below:
|
||||
|
||||
- sort the `places` from the Northest to the Southest
|
||||
- display a fullscreen-size `<section>` for each place ; use the pics hosted [here](/public/subjects/where-do-we-go/images) as `background` images
|
||||
- display a location indicator with the class `location`, displaying as text strings separated by `\n`, the `name` and the `coordinates` of the current place featured in the image, using the corresponding `color` as text color, which updates on scroll when the top of the next image reaches the middle of the screen height
|
||||
- display a compass indicating the latitude direction ; North if the user is scrolling up, South if he's scrolling down
|
||||
- when clicking on the page, open a link redirecting to the Google Maps' coordinates of the place currently displayed.
|
||||
- display a fullscreen-size `<section>` for each place ; use the pics hosted [here](/public/subjects/where-do-we-go/images) to set the `background` attribute with the corresponding image url
|
||||
- display a location indicator as a `<a>` tag in the middle of the screen which:
|
||||
- has the class `location`
|
||||
- displays as text strings separated by `\n`, the `name` and the `coordinates` of the current place featured in the image
|
||||
- using the corresponding `color` as text color
|
||||
- updates the `name`, `coordinates` and `color` on scroll, when the top of the next image reaches the middle of the screen height
|
||||
- has the `href` attribute set to open a new tab redirecting to a Google Maps' URL with the coordinates of the place currently displayed
|
||||
- display a compass indicating the latitude direction ; `N` for North if the user is scrolling up, `S` for South if he's scrolling down
|
||||
|
||||
### Notions
|
||||
|
||||
- [Wheel event](https://developer.mozilla.org/en-US/docs/Web/API/Element/wheel_event): [`deltaY`](https://developer.mozilla.org/en-US/docs/Web/API/WheelEvent/deltaY)
|
||||
- [`window`](https://developer.mozilla.org/en-US/docs/Web/API/Window): [`innerHeight`](https://developer.mozilla.org/en-US/docs/Web/API/Window/innerHeight), [`scrollY`](https://developer.mozilla.org/en-US/docs/Web/API/Window/scrollY), [`open()`](https://developer.mozilla.org/en-US/docs/Web/API/Window/open)
|
||||
- [`window`](https://developer.mozilla.org/en-US/docs/Web/API/Window): [`innerHeight`](https://developer.mozilla.org/en-US/docs/Web/API/Window/innerHeight), [`scrollY`](https://developer.mozilla.org/en-US/docs/Web/API/Window/scrollY)
|
||||
- Take a look at the [DMS coordinates system](https://en.wikipedia.org/wiki/Geographic_coordinate_system#Degrees:_a_measurement_of_angle)
|
||||
|
||||
### Provided files
|
||||
|
|
|
@ -30,6 +30,10 @@ section {
|
|||
width: 100vw;
|
||||
}
|
||||
|
||||
a {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.location {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
|
|
Loading…
Reference in New Issue