32
loading...
This website collects cookies to deliver better user experience
// This component will be sent props for the image Source, alt text, and title.
// It will return a HTML image tag (img) with the sourced image, some alt text
// with the name for the technology the image represents, and a title tag which adds
// a hover effect for people to identify the name of the technology by hovering
function Skill({source, alt, title}) {
return <img src={source} alt={alt} title={title}/>
}
export default Skill
// import the Skill component as Skill for use in this component
import Skill from './Skill'
function Skills() {
return (
<div className="skills">
{* heading for title *}
<h2>I have experience with these technologies</h2>
{* Create a div and give it a class of skillsGrid for styling *}
<div className="skillsGrid">
{* Let's render multiple copies of the Skill component. Make sure you update *}the source, alt, and title for each icon
<Skill source="https://cdn.jsdelivr.net/gh/devicons/devicon/icons/react/react-original-wordmark.svg" alt="The logo icon for react" title="React"/>
<Skill source="https://cdn.jsdelivr.net/gh/devicons/devicon/icons/html5/html5-original-wordmark.svg" alt="The logo icon for HTML 5" title="HTML 5"/>
<Skill source="https://cdn.jsdelivr.net/gh/devicons/devicon/icons/css3/css3-original-wordmark.svg" alt="The logo icon for CSS3" title="CSS 3"/>
<Skill source="https://cdn.jsdelivr.net/gh/devicons/devicon/icons/tailwindcss/tailwindcss-original-wordmark.svg" alt="The logo icon for TailwindCSS" title="Twilwind CSS"/>
<Skill source="https://cdn.jsdelivr.net/gh/devicons/devicon/icons/github/github-original-wordmark.svg" alt="The logo icon for GitHub" title="GitHub"/>
<Skill source="https://cdn.jsdelivr.net/gh/devicons/devicon/icons/npm/npm-original-wordmark.svg" alt="The logo icon for NPM" title="NPM"/>
<Skill source="https://cdn.jsdelivr.net/gh/devicons/devicon/icons/nodejs/nodejs-original-wordmark.svg" alt="The logo icon for NodeJS" title="Node JS"/>
</div>
</div>
)
}
export default Skills
App.js
file and placing my component here. You can choose to import these components anywhere that you see fit.import Skills from "./Components/Skills";
const App = () => {
return (
<div className="App">
// Nav, Header, and other components should be here. I'm only importing my Skills component for styling.
<Skills />
</div>
);
};
export default App;
/* Small Screens max width 640px */
@media screen and (max-width: 640px) {
.skillsGrid{
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 20px;
grid-auto-rows: auto;
height: auto;
}
.skillsGrid img {
height: 75px;
width: 75px;
}
.skills{
background-color: whitesmoke;
display: flex;
flex-direction: column;
margin-left: auto;
margin-right: auto;
text-align: center;
justify-content: center;
align-items: center;
}
}
/* Medium Screens min width 641px change to 4 columns */
@media screen and (min-width: 641px) {
.skillsGrid{
display: grid;
grid-template-columns: repeat(4, 1fr);
gap: 30px;
grid-auto-rows: auto;
height: auto;
}
.skillsGrid img {
height: 100px;
width: 100px;
}
.skills{
background-color: whitesmoke;
display: flex;
flex-direction: column;
margin-left: auto;
margin-right: auto;
text-align: center;
justify-content: center;
align-items: center;
}
}
@media screen and (min-width: 1080px) {
.skillsGrid{
display: grid;
grid-template-columns: repeat(6, 1fr);
gap: 50px;
grid-auto-rows: auto;
height: auto
}
.skillsGrid img {
height: 150px;
width: 150px;
}
.skills{
background-color: whitesmoke;
display: flex;
flex-direction: column;
margin-left: auto;
margin-right: auto;
text-align: center;
justify-content: center;
align-items: center;
height: 100vh;
}
}