-
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.
Merge pull request #128 from softeerbootcamp4th/feature/124-a11y
[feat] 인터랙션 키보드 접근성 개선
- Loading branch information
Showing
28 changed files
with
525 additions
and
171 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
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
Binary file not shown.
Binary file not shown.
Binary file not shown.
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,20 @@ | ||
@font-face { | ||
font-family: "hdsans"; | ||
src: url("/font/HyundaiSansTextKROTFBold.woff2") format("woff2"); | ||
font-weight: bold; | ||
font-display: swap; | ||
} | ||
|
||
@font-face { | ||
font-family: "hdsans"; | ||
src: url("/font/HyundaiSansTextKROTFMedium.woff2") format("woff2"); | ||
font-weight: 500; | ||
font-display: swap; | ||
} | ||
|
||
@font-face { | ||
font-family: "hdsans"; | ||
src: url("/font/HyundaiSansTextKROTFRegular.woff2") format("woff2"); | ||
font-weight: 400; | ||
font-display: swap; | ||
} |
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
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
11 changes: 5 additions & 6 deletions
11
...nteractions/distanceDriven/AnswerText.jsx → ...ractions/distanceDriven/useDeviceRatio.js
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 |
---|---|---|
@@ -1,19 +1,18 @@ | ||
import { useState, useEffect } from "react"; | ||
import throttleRaf from "@common/throttleRaf.js"; | ||
|
||
const MAX_ANSWER = 800; | ||
|
||
function AnswerText({ distance }) { | ||
function useDeviceRatio() { | ||
const [ratio, setRatio] = useState(1); | ||
useEffect(() => { | ||
setRatio(Math.hypot(window.innerWidth, window.innerHeight) / 2); | ||
const onResize = throttleRaf(() => { | ||
setRatio(Math.hypot(window.innerWidth, window.innerHeight) / (2 * MAX_ANSWER)); | ||
setRatio(Math.hypot(window.innerWidth, window.innerHeight) / 2); | ||
}); | ||
window.addEventListener("resize", onResize); | ||
return () => window.removeEventListener("resize", onResize); | ||
}, []); | ||
|
||
return <>{Math.round(distance / ratio)}</>; | ||
return ratio; | ||
} | ||
|
||
export default AnswerText; | ||
export default useDeviceRatio; |
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
Oops, something went wrong.