Skip to content

Commit

Permalink
add about section elements
Browse files Browse the repository at this point in the history
  • Loading branch information
HectorVilas committed Apr 23, 2023
1 parent e23c0cf commit 10c8152
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions modules/home.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,26 @@ function hero() {

function about() {
const about = document.createElement('section');
const aboutDiv = document.createElement('div');
const icons = document.createElement('img');
const h2 = document.createElement('h2');
const p = document.createElement('p');
const imageDiv = document.createElement('div');
const image = document.createElement('img');

icons.setAttribute('src', './media/images/home/leaf-and-heart.png');
h2.textContent = 'Find Your Perfect Plant';
p.innerText = 'We handpick every plant in our shop, ensuring that they are healthy and of the highest quality.'
image.setAttribute('src', './media/images/home/home-about.png');

about.classList.add('home-about');
aboutDiv.classList.add('home-about-div');
imageDiv.classList.add('home-about-image-div');

aboutDiv.append(icons, h2, p);

imageDiv.append(image);
about.append(aboutDiv, imageDiv);
return about;
}

Expand Down

0 comments on commit 10c8152

Please sign in to comment.