Skip to content

Commit

Permalink
fixing responsiveness
Browse files Browse the repository at this point in the history
  • Loading branch information
Eng-Elias committed Nov 7, 2023
1 parent f3605c9 commit 642a370
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 14 deletions.
10 changes: 6 additions & 4 deletions web_app_36_hours_day/src/components/Clock.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ function Clock(props) {

const { startHour, setPassedTime } = props;

const mobileDifference = 70;

useEffect(() => {
let interval;
(function () {
Expand Down Expand Up @@ -110,7 +112,7 @@ function Clock(props) {
key={i}
style={{
transform: `rotate(${i * 10}deg) translateX(${
isMobile ? 100 - 50 : 100
isMobile ? 100 - mobileDifference : 100
}px)`,
}}
>
Expand All @@ -124,7 +126,7 @@ function Clock(props) {
key={i}
style={{
transform: `rotate(${i * 6}deg) translateX(${
isMobile ? 145 - 50 : 145
isMobile ? 145 - mobileDifference : 145
}px)`,
}}
>
Expand All @@ -138,7 +140,7 @@ function Clock(props) {
key={i}
style={{
transform: `rotate(${i * 6}deg) translateX(${
isMobile ? 195 - 50 : 195
isMobile ? 195 - mobileDifference : 195
}px)`,
}}
>
Expand All @@ -152,7 +154,7 @@ function Clock(props) {
key={i}
style={{
transform: `rotate(${i * 6}deg) translateX(${
isMobile ? 230 - 50 : 230
isMobile ? 230 - mobileDifference : 230
}px)`,
}}
>
Expand Down
20 changes: 10 additions & 10 deletions web_app_36_hours_day/src/styles/clock.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
@import url('https://fonts.googleapis.com/css?family=BenchNine:300,400');

$layout-breakpoint-small: 500px;
$radius-difference-for-small: 50px;
$radius-difference-for-small: 70px;

*, *:after, *:before{
box-sizing: border-box;
Expand Down Expand Up @@ -125,7 +125,7 @@ html{
z-index: 150;
font-size: 20px;
@media (max-width: $layout-breakpoint-small) {
font-size: 10px;
font-size: 6px;
}
font-weight: 400;
span{
Expand Down Expand Up @@ -158,7 +158,7 @@ html{
color: #fff;
font-size: 16px;
@media (max-width: $layout-breakpoint-small) {
font-size: 10px;
font-size: 8px;
}
span:after{
background: #fff;
Expand Down Expand Up @@ -228,8 +228,8 @@ html{
height: 444px;
width: 224px;
@media (max-width: $layout-breakpoint-small) {
height: 344px;
width: 174px;
height: 444px - 2 * $radius-difference-for-small;
width: 224px - $radius-difference-for-small;
}
background: #090909;
left: 18px;
Expand All @@ -245,8 +245,8 @@ html{
height: 400px;
width: 200px;
@media (max-width: $layout-breakpoint-small) {
height: 300px;
width: 150px;
height: 400px - 2 * $radius-difference-for-small;
width: 200px - $radius-difference-for-small;
}
border-radius: 220px 0 0 220px;
left: 25px;
Expand Down Expand Up @@ -279,7 +279,7 @@ html{
border-radius:20px;
box-shadow:0 0 15px #000 inset;
padding: 2px 20px;
font-size: 16px;
font-size: 13px;
}

.date {
Expand All @@ -289,9 +289,9 @@ html{
top: 100px;
color: #fff;
border-radius:20px;
font-size: 16px;
font-size: 14px;
@media (max-width: $layout-breakpoint-small) {
font-size: 13px;
font-size: 9px;
}
box-shadow:0 0 10px #000 inset;
padding: 2px 20px;
Expand Down

0 comments on commit 642a370

Please sign in to comment.