Skip to content

Commit

Permalink
Merge pull request #18 from boostksm/feat/#17/touch-improvement
Browse files Browse the repository at this point in the history
터치 환경 개선
  • Loading branch information
boostksm authored Jul 12, 2023
2 parents 641faea + 2cb0be7 commit 977bd35
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 17 deletions.
35 changes: 20 additions & 15 deletions src/components/SongPlayer.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,39 +12,48 @@ const loopDescriptions = [

const SongPlayerLayout = styled.section`
max-width: 500px;
width: 40%;
height: 120px;
width: 60%;
height: 150px;
line-height: initial;
display: grid;
grid-template-rows: repeat(3, 1fr);
align-items: center;
justify-items: center;
@media (max-width: 768px) {
width: 75%;
width: 85%;
height: 120px;
}
.playingSongHeadingBox {
font-size: 1.8rem;
text-align: center;
}
.buttonsBox {
width: 80%;
display: flex;
justify-content: space-between;
}
.progressBox {
overflow: hidden;
width: 100%;
display: flex;
justify-content: space-between;
align-items: center;
.barBox {
overflow: hidden;
display: flex;
height: 10px;
width: 100%;
.progressBarInput {
box-sizing: content-box;
border-top: 15px transparent solid;
border-bottom: 15px transparent solid;
-webkit-appearance: none;
appearance: none;
margin: 0 0;
width: 100%;
height: 10px;
outline: none;
overflow: hidden;
border-radius: 5px;
}
.progressBarInput::-webkit-slider-runnable-track {
height: 10px;
Expand All @@ -63,24 +72,20 @@ const SongPlayerLayout = styled.section`
.loadingBar {
width: 100%;
height: 10px;
border-radius: 5px;
background-color: lightgray;
height: 10px;
border: 1px lightgray solid;
.loadingBarMoving {
position: relative;
width: 50%;
height: 100%;
border-radius: 5px;
background-color: white;
animation: ${moveFromLeftToRight} 0.8s ease-in-out infinite;
}
}
}
.playingSongTimeBox {
display: flex;
justify-content: space-between;
.songTime {
padding: 0 10px;
}
}
`;
Expand Down Expand Up @@ -182,6 +187,7 @@ const SongPlayer = ({
</Button>
</div>
<div className="progressBox">
<div className="songTime">{timeFormatter.getString(currentTime)}</div>
<div className="barBox">
{isLoading ? (
<div className="loadingBar">
Expand All @@ -199,9 +205,8 @@ const SongPlayer = ({
/>
)}
</div>
<div className="playingSongTimeBox">
<div>{timeFormatter.getString(currentTime)}</div>
<div>{timeFormatter.getString(playingSong?.duration || 0)}</div>
<div className="songTime">
{timeFormatter.getString(playingSong?.duration || 0)}
</div>
</div>
</SongPlayerLayout>
Expand Down
6 changes: 4 additions & 2 deletions src/components/common/TabMenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,10 @@ const Button = styled.button`
color: gray;
font-style: italic;
text-decoration: underline;
&:hover {
color: darkgray;
@media (hover: hover) and (pointer: fine) {
&:hover {
color: darkgray;
}
}
${(props) =>
props.$isSelected &&
Expand Down

0 comments on commit 977bd35

Please sign in to comment.