-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c322f79
commit a7ebf4e
Showing
6 changed files
with
62 additions
and
49 deletions.
There are no files selected for viewing
48 changes: 48 additions & 0 deletions
48
src/app/carte-base-adresse-nationale/components/Map/MapPlaceholder.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
'use client' | ||
|
||
import styled, { css, keyframes } from 'styled-components' | ||
|
||
const bgColor = `var(--background-default-grey)` | ||
const bgColorMain = `var(--text-default-grey)` | ||
|
||
const INIT_BG_SIZE = '40%' | ||
|
||
const animate = keyframes` | ||
0%, 100% { | ||
background-position: left top; | ||
background-size: ${INIT_BG_SIZE}; | ||
} | ||
25%{ | ||
background-position: right bottom; | ||
background-size: 60%; | ||
} | ||
50% { | ||
background-position: left bottom; | ||
background-size: 50%; | ||
} | ||
75% { | ||
background-position: right top; | ||
background-size: 35%; | ||
} | ||
` | ||
|
||
const MapPlaceholder = styled.div` | ||
flex: 1; | ||
background-color: ${bgColor}; | ||
background: url('/img/map-bg-pattern.svg'), | ||
radial-gradient(circle, transparent 20%, ${bgColor} 20%, ${bgColor} 80%, transparent 80%, transparent), | ||
radial-gradient(circle, transparent 20%, ${bgColor} 20%, ${bgColor} 80%, transparent 80%, transparent) 27.5px 27.5px, | ||
linear-gradient(${bgColorMain} 2.2px, transparent 2.2px) 0 -1.1px, | ||
linear-gradient(90deg, ${bgColorMain} 2.2px, ${bgColor} 2.2px) -1.1px 0; | ||
background-image: url('/img/map-bg-pattern.svg'); | ||
background-size: ${INIT_BG_SIZE}, 55px, 55px 55px, 27.5px 27.5px, 27.5px 27.5px; | ||
animation: ${animate} 20s ease-in-out 5 1s; | ||
animation-play-state: paused; | ||
&.loading { | ||
animation-play-state: running; | ||
} | ||
` | ||
|
||
export default MapPlaceholder |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters