Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit db17672

Browse files
author
visualdennis
committed
testimonials
1 parent b1f8ce3 commit db17672

File tree

22 files changed

+581
-15
lines changed

22 files changed

+581
-15
lines changed

β€Žsrc/App.jsβ€Ž

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ import GithubUser from './components/junior/githubUser/GithubUser';
2121
import Error from './Error';
2222
import ExpChart from './components/junior/ExpChart/ExpChart';
2323
import Pricing from './components/junior/priceColumns/Pricing';
24+
import Testimonials from './components/junior/testimonials/Testimonials';
2425

2526
const App = () => {
2627

@@ -49,6 +50,7 @@ AOS.init({
4950
<Route path='/components/github-user' element={<GithubUser></GithubUser>}/>
5051
<Route path='/components/expense-chart' element={<ExpChart></ExpChart>}/>
5152
<Route path='/components/pricing-toggle' element={<Pricing></Pricing>}/>
53+
<Route path='/components/testimonials' element={<Testimonials></Testimonials>}/>
5254

5355
{/* Pages */}
5456
<Route path='/pages' element={<Pages></Pages>}/>

β€Žsrc/components/data.jsβ€Ž

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,4 +107,13 @@ export const componentCardData = [
107107
type: "component",
108108
link:"/components/advice-gen",
109109
},
110+
{
111+
id:"13",
112+
title: "Testimonials grid section",
113+
desc: "Multiple complex layouts for different device sizes with CSS Grid",
114+
img: "https://res.cloudinary.com/dz209s6jk/image/upload/Challenges/h05k6b7pqcylnhsw8pqs.jpg",
115+
category:"junior",
116+
type: "component",
117+
link:"/components/testimonials",
118+
},
110119
]

β€Žsrc/components/junior/priceColumns/Pricing.cssβ€Ž

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,8 @@
1919
}
2020

2121
.pricing-container {
22-
/* border: 2px solid green; */
2322
width: 100%;
2423
max-width: 1000px;
25-
/* display: flex;
26-
flex-direction: column;
27-
align-items: center; */
2824
}
2925

3026
/* HEADER */
@@ -210,17 +206,6 @@
210206
outline: 1px solid white;
211207
}
212208

213-
/* ### Primary
214-
215-
- Linear Gradient: hsl(236, 72%, 79%) to hsl(237, 63%, 64%)
216-
217-
### Neutral
218-
219-
- Very Light Grayish Blue: hsl(240, 78%, 98%)
220-
- Light Grayish Blue: hsl(234, 14%, 74%)
221-
- Grayish Blue: hsl(233, 13%, 49%)
222-
- Dark Grayish Blue: hsl(232, 13%, 33%) */
223-
224209
@media only screen and (max-width: 900px) {
225210
.pricing {
226211
padding: 60px 20px;
Lines changed: 160 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,160 @@
1+
@import url('https://fonts.googleapis.com/css2?family=Barlow+Semi+Condensed:wght@500;600&display=swap');
2+
3+
.testimonials {
4+
min-height: 100vh;
5+
font-family: 'Barlow Semi Condensed', sans-serif;
6+
font-weight: 13px;
7+
background-color: hsl(0, 0%, 81%);
8+
padding: 1.5rem;
9+
}
10+
11+
.testimonials-container {
12+
width: min(95%, 70em);
13+
display: grid;
14+
gap: 1.5rem;
15+
grid-auto-columns: 1fr;
16+
grid-template-areas:
17+
'one'
18+
'two'
19+
'three'
20+
'four'
21+
'five';
22+
}
23+
24+
/* TESTIMONIAL */
25+
26+
.testimonial-item {
27+
display: flex;
28+
flex-direction: column;
29+
padding: 25px 30px 25px;
30+
border-radius: 10px;
31+
box-shadow: rgba(0, 0, 0, 0.1) 0px 20px 25px -5px,
32+
rgba(0, 0, 0, 0.04) 0px 10px 10px -5px;
33+
}
34+
35+
/* AUTHOR */
36+
37+
.testimonial-author {
38+
display: flex;
39+
align-items: center;
40+
margin-bottom: 25px;
41+
}
42+
43+
.testimonial-avatar {
44+
width: 35px;
45+
height: 35px;
46+
border-radius: 50%;
47+
border: 1px solid hsl(0, 0%, 81%);
48+
margin-right: 15px;
49+
}
50+
51+
.testimonial-author-info {
52+
}
53+
54+
.testimonial-author-name {
55+
font-size: 0.9em;
56+
margin-bottom: 3px;
57+
}
58+
59+
.testimonial-author-desc {
60+
font-size: 0.7em;
61+
opacity: 0.5;
62+
}
63+
64+
/* CONTENT */
65+
66+
.testimonial-title {
67+
margin-bottom: 20px;
68+
font-size: 1.2em;
69+
}
70+
.testimonial-text {
71+
opacity: 0.7;
72+
font-size: 0.9em;
73+
}
74+
75+
.testimonial-item:nth-of-type(1) {
76+
grid-area: one;
77+
background-color: hsl(263, 55%, 52%);
78+
color: white;
79+
}
80+
.testimonial-item:nth-of-type(2) {
81+
grid-area: two;
82+
background-color: hsl(217, 19%, 35%);
83+
color: white;
84+
}
85+
.testimonial-item:nth-of-type(3) {
86+
grid-area: three;
87+
background-color: white;
88+
}
89+
.testimonial-item:nth-of-type(4) {
90+
grid-area: four;
91+
background-color: hsl(219, 29%, 14%);
92+
color: white;
93+
}
94+
.testimonial-item:nth-of-type(5) {
95+
grid-area: five;
96+
background-color: white;
97+
}
98+
99+
.testimonial-item:nth-of-type(3),
100+
.testimonial-item:nth-of-type(5) {
101+
color: hsl(219, 29%, 14%);
102+
}
103+
104+
/* ### Primary
105+
106+
Moderate violet: hsl(263, 55%, 52%)
107+
Very dark grayish blue: hsl(217, 19%, 35%)
108+
Very dark blackish blue: hsl(219, 29%, 14%)
109+
White: hsl(0, 0%, 100%)
110+
111+
### Neutral
112+
113+
Light gray: hsl(0, 0%, 81%)
114+
Light grayish blue: hsl(210, 46%, 95%) */
115+
116+
@media only screen and (min-width: 1100px) {
117+
.testimonials-container {
118+
grid-template-areas:
119+
'one one two five'
120+
'three four four five';
121+
max-height: 600px;
122+
}
123+
}
124+
125+
@media screen and (min-width: 33em) {
126+
.testimonials-container {
127+
grid-template-areas:
128+
'one one'
129+
'two three'
130+
'five five'
131+
'four four';
132+
}
133+
}
134+
135+
@media screen and (min-width: 38em) {
136+
.testimonials-container {
137+
grid-template-areas:
138+
'one one'
139+
'two five'
140+
'three five'
141+
'four four';
142+
}
143+
}
144+
145+
@media screen and (min-width: 54em) {
146+
.testimonials-container {
147+
grid-template-areas:
148+
'one one two'
149+
'five five five'
150+
'three four four';
151+
}
152+
}
153+
154+
@media screen and (min-width: 75em) {
155+
.testimonials-container {
156+
grid-template-areas:
157+
'one one two five'
158+
'three four four five';
159+
}
160+
}
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
import React from 'react'
2+
import './Testimonials.css'
3+
import {testimonials} from './data.js'
4+
5+
const Testimonials = () => {
6+
return (
7+
<div className='testimonials df'>
8+
<div className="testimonials-container">
9+
{testimonials.map((item)=>(
10+
<article className="testimonial-item">
11+
<div className="testimonial-author">
12+
<img src={item.img} alt="" className="testimonial-avatar"/>
13+
<div className="testimonial-author-info">
14+
<p className="testimonial-author-name">{item.author}</p>
15+
<p className="testimonial-author-desc">{item.authorInfo}</p>
16+
</div>
17+
</div>
18+
<h3 className="testimonial-title">
19+
{item.title}
20+
</h3>
21+
<p className="testimonial-text">{item.testimonial}</p>
22+
</article>
23+
))}
24+
</div>
25+
</div>
26+
)
27+
}
28+
29+
export default Testimonials
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Avoid accidental Sketch file upload
2+
###############################################
3+
## Please do not remove line 5 - thanks! πŸ™‚ ##
4+
###############################################
5+
*.sketch
6+
7+
# Avoid accidental XD or Figma upload if you convert the design file
8+
#######################################################
9+
## Please do not remove lines 11 and 12 - thanks! πŸ™‚ ##
10+
#######################################################
11+
*.xd
12+
*.fig
13+
14+
# Avoid your project being littered with annoying .DS_Store files!
15+
.DS_Store
16+
17+
.prettierignore
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"liveServer.settings.port": 5501
3+
}
Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
# Frontend Mentor - Testimonials grid section solution
2+
3+
This is a solution to the [Testimonials grid section challenge on Frontend Mentor](https://www.frontendmentor.io/challenges/testimonials-grid-section-Nnw6J7Un7). Frontend Mentor challenges help you improve your coding skills by building realistic projects.
4+
5+
## Table of contents
6+
7+
- [Overview](#overview)
8+
- [The challenge](#the-challenge)
9+
- [Screenshot](#screenshot)
10+
- [Links](#links)
11+
- [My process](#my-process)
12+
- [Built with](#built-with)
13+
- [What I learned](#what-i-learned)
14+
- [Continued development](#continued-development)
15+
- [Useful resources](#useful-resources)
16+
- [Author](#author)
17+
- [Acknowledgments](#acknowledgments)
18+
19+
**Note: Delete this note and update the table of contents based on what sections you keep.**
20+
21+
## Overview
22+
23+
### The challenge
24+
25+
Users should be able to:
26+
27+
- View the optimal layout for the site depending on their device's screen size
28+
29+
### Screenshot
30+
31+
![](./screenshot.jpg)
32+
33+
Add a screenshot of your solution. The easiest way to do this is to use Firefox to view your project, right-click the page and select "Take a Screenshot". You can choose either a full-height screenshot or a cropped one based on how long the page is. If it's very long, it might be best to crop it.
34+
35+
Alternatively, you can use a tool like [FireShot](https://getfireshot.com/) to take the screenshot. FireShot has a free option, so you don't need to purchase it.
36+
37+
Then crop/optimize/edit your image however you like, add it to your project, and update the file path in the image above.
38+
39+
**Note: Delete this note and the paragraphs above when you add your screenshot. If you prefer not to add a screenshot, feel free to remove this entire section.**
40+
41+
### Links
42+
43+
- Solution URL: [Add solution URL here](https://your-solution-url.com)
44+
- Live Site URL: [Add live site URL here](https://your-live-site-url.com)
45+
46+
## My process
47+
48+
### Built with
49+
50+
- Semantic HTML5 markup
51+
- CSS custom properties
52+
- Flexbox
53+
- CSS Grid
54+
- Mobile-first workflow
55+
- [React](https://reactjs.org/) - JS library
56+
- [Next.js](https://nextjs.org/) - React framework
57+
- [Styled Components](https://styled-components.com/) - For styles
58+
59+
**Note: These are just examples. Delete this note and replace the list above with your own choices**
60+
61+
### What I learned
62+
63+
Use this section to recap over some of your major learnings while working through this project. Writing these out and providing code samples of areas you want to highlight is a great way to reinforce your own knowledge.
64+
65+
To see how you can add code snippets, see below:
66+
67+
```html
68+
<h1>Some HTML code I'm proud of</h1>
69+
```
70+
```css
71+
.proud-of-this-css {
72+
color: papayawhip;
73+
}
74+
```
75+
```js
76+
const proudOfThisFunc = () => {
77+
console.log('πŸŽ‰')
78+
}
79+
```
80+
81+
If you want more help with writing markdown, we'd recommend checking out [The Markdown Guide](https://www.markdownguide.org/) to learn more.
82+
83+
**Note: Delete this note and the content within this section and replace with your own learnings.**
84+
85+
### Continued development
86+
87+
Use this section to outline areas that you want to continue focusing on in future projects. These could be concepts you're still not completely comfortable with or techniques you found useful that you want to refine and perfect.
88+
89+
**Note: Delete this note and the content within this section and replace with your own plans for continued development.**
90+
91+
### Useful resources
92+
93+
- [Example resource 1](https://www.example.com) - This helped me for XYZ reason. I really liked this pattern and will use it going forward.
94+
- [Example resource 2](https://www.example.com) - This is an amazing article which helped me finally understand XYZ. I'd recommend it to anyone still learning this concept.
95+
96+
**Note: Delete this note and replace the list above with resources that helped you during the challenge. These could come in handy for anyone viewing your solution or for yourself when you look back on this project in the future.**
97+
98+
## Author
99+
100+
- Website - [Add your name here](https://www.your-site.com)
101+
- Frontend Mentor - [@yourusername](https://www.frontendmentor.io/profile/yourusername)
102+
- Twitter - [@yourusername](https://www.twitter.com/yourusername)
103+
104+
**Note: Delete this note and add/remove/edit lines above based on what links you'd like to share.**
105+
106+
## Acknowledgments
107+
108+
This is where you can give a hat tip to anyone who helped you out on this project. Perhaps you worked in a team or got some inspiration from someone else's solution. This is the perfect place to give them some credit.
109+
110+
**Note: Delete this note and edit this section's content as necessary. If you completed this challenge by yourself, feel free to delete this section entirely.**

0 commit comments

Comments
(0)

AltStyle γ«γ‚ˆγ£γ¦ε€‰ζ›γ•γ‚ŒγŸγƒšγƒΌγ‚Έ (->γ‚ͺγƒͺγ‚ΈγƒŠγƒ«) /