-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Partially fixes #37 * add optional color picker component * update react query lib * Lock camera when the create new modal is visible* add translation labels * Remove redundant Suspense * Restructure pebble creation form * remove react-helmet entirely * fix useFrame in Pebbles component when labelRef is not loaded * add extra modals for info and confirmation * add storyItem component in the Hero modals * add specific translatable message for non validated pebbles * add cameraLeapHandle event listener (still todo) * add infobutton on the pebble tooltip * add showLanguages flag on StoryItem to delete StoryItemSmall component * fix className on SrollIcon * Update overlay.css * Update modal.css * add delay in Overlay component * add action to show modal info * Update hero.css * add redirects for netlify
- Loading branch information
1 parent
afbe33c
commit cf41074
Showing
27 changed files
with
543 additions
and
207 deletions.
There are no files selected for viewing
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 |
---|---|---|
|
@@ -28,4 +28,4 @@ setupProxy.log | |
|
||
# Local Netlify folder | ||
.netlify | ||
netlify.toml | ||
# netlify.toml |
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,22 @@ | ||
[[redirects]] | ||
force = true | ||
from = "/api/*" | ||
to = "https://memorialshoah.lu/api/:splat" | ||
status = 200 | ||
|
||
[[redirects]] | ||
force = true | ||
from = "/media/*" | ||
to = "https://memorialshoah.lu/media/:splat" | ||
status = 200 | ||
|
||
[[redirects]] | ||
force = true | ||
from = "/pagefind/*" | ||
to = "https://memorialshoah.lu/pagefind/:splat" | ||
status = 200 | ||
|
||
[[redirects]] | ||
from = "/*" | ||
to = "/index.html" | ||
status = 200 |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
.ColorPicker { | ||
display: flex; | ||
flex-direction: row; | ||
align-items: center; | ||
justify-content: space-around; | ||
} | ||
.ColorPicker .btn { | ||
height: 40px; | ||
width: 40px; | ||
border-radius: 40px; | ||
} | ||
|
||
.ColorPicker .btn:hover { | ||
box-shadow: 0 0 0 3px rgba(7, 58, 49, 0.5); | ||
} | ||
|
||
.ColorPicker .btn.active { | ||
box-shadow: 0 0 0 3px rgba(7, 58, 49, 0.5); | ||
} |
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,33 @@ | ||
import { useState } from 'react' | ||
import { PebbleColors } from '../../../constants' | ||
import './ColorPicker.css' | ||
import PropTypes from 'prop-types' | ||
|
||
const ColorPicker = ({ options = PebbleColors, className = '', onChange }) => { | ||
const [selectedColorIdx, setSelectedColorIdx] = useState( | ||
Math.round(Math.random() * (options.length - 1)), | ||
) | ||
return ( | ||
<div className={`ColorPicker ${className}`}> | ||
{PebbleColors.map((c, i) => ( | ||
<button | ||
className={`btn btn-sm ${selectedColorIdx === i ? 'active' : ''}`} | ||
style={{ backgroundColor: c }} | ||
key={c} | ||
onClick={() => { | ||
console.debug('[ColorPicker] @click \n - selected color:', c, '\n - idx:', i) | ||
setSelectedColorIdx(i) | ||
onChange(c, i) | ||
}} | ||
></button> | ||
))} | ||
</div> | ||
) | ||
} | ||
ColorPicker.propTypes = { | ||
options: PropTypes.arrayOf(PropTypes.string), | ||
className: PropTypes.string, | ||
onChange: PropTypes.func.isRequired, | ||
} | ||
|
||
export default ColorPicker |
Oops, something went wrong.