Skip to content

Commit 5d116dd

Browse files
committed
added root to the style and updated readme files
1 parent 19cd73c commit 5d116dd

File tree

5 files changed

+28
-38
lines changed

5 files changed

+28
-38
lines changed

.vscode/settings.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
"liveServer.settings.port": 5503
2+
"liveServer.settings.port": 5504
33
}

README.md

+13-13
Original file line numberDiff line numberDiff line change
@@ -21,19 +21,19 @@ This repository includes some great tricks with mini samples.
2121

2222
### Slider
2323

24-
| # | Samples |
25-
| :-: | :------------------------------------------------------------------------------------------------------------------------------------- |
26-
| 01 | [Testimonial Slider](https://github.com/ecemgo/mini-samples-great-tricks/tree/main/testimonial-slider-v1) |
27-
| 02 | [Card Effect](https://github.com/ecemgo/mini-samples-great-tricks/tree/main/card-effect) |
28-
| 03 | [Neumorphic Slider](https://github.com/ecemgo/mini-samples-great-tricks/tree/main/neumorphic-slider) |
29-
| 04 | [Responsive Slider with Scrollbar](https://github.com/ecemgo/mini-samples-great-tricks/tree/main/responsive-slider-with-scrollbar) |
30-
| 05 | [Background Slider with The Hero](https://github.com/ecemgo/mini-samples-great-tricks/tree/main/background-slider-with-the-hero) |
31-
| 06 | [Slider with Two Different Sidebars](https://github.com/ecemgo/mini-samples-great-tricks/tree/main/slider-with-two-different-sidebars) |
32-
| 07 | [Animated Slider](https://github.com/ecemgo/mini-samples-great-tricks/tree/main/animated-slider) |
33-
| 08 | [Animated Slider II](https://github.com/ecemgo/mini-samples-great-tricks/tree/main/animated-slider-2) |
34-
| 09 | [Cube Effect Slider](https://github.com/ecemgo/mini-samples-great-tricks/tree/main/cube-effect-slider) |
35-
| 10 | [Music Player with Slider](https://github.com/ecemgo/mini-samples-great-tricks/tree/main/music-player-with-slider) |
36-
| 11 | [Vertical Slider with Clip-Path Animation](https://github.com/ecemgo/mini-samples-great-tricks/tree/main/vertical-slider-with-clip-path-animation) |
24+
| # | Samples |
25+
| :-: | :------------------------------------------------------------------------------------------------------------------------------------------------- |
26+
| 01 | [Responsive Slider with Vanilla Javascript](https://github.com/ecemgo/mini-samples-great-tricks/tree/main/testimonial-slider-v1) |
27+
| 02 | [Card Effect](https://github.com/ecemgo/mini-samples-great-tricks/tree/main/card-effect) |
28+
| 03 | [Neumorphic Slider](https://github.com/ecemgo/mini-samples-great-tricks/tree/main/neumorphic-slider) |
29+
| 04 | [Responsive Slider with Scrollbar](https://github.com/ecemgo/mini-samples-great-tricks/tree/main/responsive-slider-with-scrollbar) |
30+
| 05 | [Background Slider with The Hero](https://github.com/ecemgo/mini-samples-great-tricks/tree/main/background-slider-with-the-hero) |
31+
| 06 | [Slider with Two Different Sidebars](https://github.com/ecemgo/mini-samples-great-tricks/tree/main/slider-with-two-different-sidebars) |
32+
| 07 | [Animated Slider](https://github.com/ecemgo/mini-samples-great-tricks/tree/main/animated-slider) |
33+
| 08 | [Animated Slider II](https://github.com/ecemgo/mini-samples-great-tricks/tree/main/animated-slider-2) |
34+
| 09 | [Cube Effect Slider](https://github.com/ecemgo/mini-samples-great-tricks/tree/main/cube-effect-slider) |
35+
| 10 | [Music Player with Slider](https://github.com/ecemgo/mini-samples-great-tricks/tree/main/music-player-with-slider) |
36+
| 11 | [Vertical Slider with Clip-Path Animation](https://github.com/ecemgo/mini-samples-great-tricks/tree/main/vertical-slider-with-clip-path-animation) |
3737

3838
<br>
3939

testimonial-slider-v1/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## <img src="https://user-images.githubusercontent.com/13468728/233831804-0f5c7ee5-d654-4c13-9c77-a5bd6dc4fe74.jpg" title="great tricks" alt="great tricks" width="50" height="50"/> Testimonial Slider
1+
## <img src="https://user-images.githubusercontent.com/13468728/233831804-0f5c7ee5-d654-4c13-9c77-a5bd6dc4fe74.jpg" title="great tricks" alt="great tricks" width="50" height="50"/> Responsive Slider with Vanilla Javascript
22

33
#### Tools used in this solution:
44

@@ -13,7 +13,7 @@
1313
### Screenshot
1414

1515
<div align="left">
16-
<img src="https://github.com/ecemgo/frontend-mentor-challenges/assets/13468728/1b7be84d-47db-4946-afac-154a431bdab5" title="testimonial slider" alt="testimonial slider" width="750" height="500"/>
16+
<img src="https://github.com/ecemgo/frontend-mentor-challenges/assets/13468728/1b7be84d-47db-4946-afac-154a431bdab5" title="responsive slider" alt="responsive slider" width="750" height="500"/>
1717
</div>
1818

1919
### Inspiration

testimonial-slider-v1/index.html

+1-6
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,7 @@
55
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
66
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
77
<link rel="stylesheet" href="style.css" />
8-
<link rel="preconnect" href="https://fonts.googleapis.com" />
9-
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
10-
<link
11-
href="https://fonts.googleapis.com/css2?family=Sen:wght@400;700;800&display=swap"
12-
rel="stylesheet" />
13-
<title>Testimonial Slider</title>
8+
<title>Responsive Slider with Vanilla Javascript</title>
149
</head>
1510
<body>
1611
<main>

testimonial-slider-v1/style.css

+11-16
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@400;600&display=swap");
22

3+
:root {
4+
--x: 800px;
5+
}
6+
37
* {
48
box-sizing: border-box;
59
margin: 0;
@@ -34,7 +38,7 @@ body {
3438
}
3539

3640
main {
37-
width: 800px;
41+
width: var(--x);
3842
}
3943

4044
main h1 {
@@ -46,13 +50,13 @@ main h1 {
4650

4751
.slide-row {
4852
display: flex;
49-
width: 3200px;
53+
width: calc(4 * var(--x));
5054
transition: 0.5s;
5155
}
5256

5357
.slide-col {
5458
position: relative;
55-
width: 800px;
59+
width: var(--x);
5660
height: 400px;
5761
}
5862

@@ -130,16 +134,11 @@ main h1 {
130134
}
131135

132136
@media (max-width: 850px) {
133-
main {
134-
width: 500px;
135-
}
136-
137-
.slide-row {
138-
width: 2000px;
137+
:root {
138+
--x: 500px;
139139
}
140140

141141
.slide-col {
142-
width: 500px;
143142
height: 250px;
144143
}
145144

@@ -164,12 +163,8 @@ main h1 {
164163
}
165164

166165
@media (max-width: 550px) {
167-
main {
168-
width: 300px;
169-
}
170-
171-
.slide-row {
172-
width: 1200px;
166+
:root {
167+
--x: 300px;
173168
}
174169

175170
.slide-col {

0 commit comments

Comments
 (0)