diff --git a/assets/Icon.png b/assets/Icon.png
new file mode 100644
index 0000000..fb380bb
Binary files /dev/null and b/assets/Icon.png differ
diff --git a/index.css b/index.css
index 3104a4f..f95a8c0 100644
--- a/index.css
+++ b/index.css
@@ -541,6 +541,39 @@ form #type-msg {
margin-bottom: 20px;
}
+/* Pop windows for card */
+
+.pop-up {
+ width: 343px;
+ height: auto;
+ position: fixed;
+ top: 60px;
+ right: 5%;
+ bottom: 0;
+ left: calc(50% - 343px / 2);
+ overflow: scroll;
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ gap: 12px;
+ border-radius: 10px;
+ background-color: #fff;
+}
+
+.top {
+ display: flex;
+ align-items: center;
+ justify-content: space-around;
+ width: 100%;
+ margin-top: 30px;
+}
+
+.top-1 {
+ width: 10px;
+ height: 20px;
+ position: relative;
+}
+
@media only screen and (min-width: 768px) {
.wrapper {
width: auto;
@@ -763,4 +796,16 @@ form #type-msg {
.black-linen {
display: none;
}
+
+ /* pop up */
+
+ /* form validation error */
+
+ .error {
+ background-color: #fff;
+ color: red;
+ margin-top: 20px;
+ text-align: center;
+ border-radius: 5px;
+ }
}
diff --git a/index.html b/index.html
index 67469fc..14c280a 100644
--- a/index.html
+++ b/index.html
@@ -17,6 +17,7 @@
+
-
+
+
+
+
+
+
+
@@ -446,8 +454,8 @@
About Myself
+
diff --git a/index.js b/index.js
index c576d9b..126f659 100644
--- a/index.js
+++ b/index.js
@@ -13,3 +13,215 @@ xMen.addEventListener('click', () => {
menuList.addEventListener('click', () => {
menuList.classList.toggle('nav-active');
});
+
+
+//cards
+
+const projectDetails = [
+ {
+ id: 1,
+ name: 'Tonic',
+ title: 'Canopy',
+ stack: 'Back End Dev',
+ year: '2015',
+ description: 'Experimental content creation feature that allows users to add to an existing stay over the course of a day without spamming their friends',
+ mobileImg: './assets/Snapshoot Portfolio.png',
+ desktopImg: './assets/first-desktop-card.png',
+ live: '#',
+ source: '#',
+ skills: {
+ skill1: 'html',
+ skill2: 'css',
+ skill3: 'javaScript'
+ },
+ },
+
+ {
+ id: 2,
+ name: 'Multi-Post Stories',
+ title: 'Canopy',
+ stack: 'Back End Dev',
+ year: '2015',
+ description: 'A daily selection of privately personalized reads; no accounts or sign-ups required.',
+ mobileImg: './assets/Snapshoot Portfolio 2.png',
+ desktopImg: './assets/second-desktop-card.png',
+ live: '#',
+ source: '#',
+ skills: {
+ skill1: 'html',
+ skill2: 'css',
+ skill3: 'javaScript'
+ },
+ },
+
+ {
+ id: 3,
+ name: 'Tonic',
+ title: 'Canopy',
+ stack: 'Back End Dev',
+ year: '2015',
+ description: 'A daily selection of privately personalized reads; no accounts or sign-ups required.',
+ mobileImg: './assets/Snapshoot Portfolio 3.png',
+ desktopImg: './assets/second-desktop-card.png',
+ live: '#',
+ source: '#',
+ skills: {
+ skill1: 'html',
+ skill2: 'css',
+ skill3: 'javaScript'
+ },
+ },
+
+ {
+ id: 4,
+ name: 'Multi-Post Stories',
+ title: 'Canopy',
+ stack: 'Back End Dev',
+ year: '2015',
+ description: 'Experimental content creation feature that allows users to add to an existing stay over the course of a day without spamming their friends.',
+ mobileImg: './assets/Snapshoot Portfolio 4.png',
+ desktopImg: './assets/fourth-desktop-card.png',
+ live: '#',
+ source: '#',
+ skills: {
+ skill1: 'html',
+ skill2: 'css',
+ skill3: 'javaScript'
+ },
+ },
+
+]
+
+projectDetails.forEach((projects, index) => {
+ const section = document.createElement('div');
+
+ const isSecond = index === 1;
+ const isLast = index === 3;
+ const reverseClass = isSecond ? 'inner-second-containerr' : '';
+ const marginB = isLast ? 'inner-second-containerl' : '';
+
+
+
+ section.innerHTML = `
+
+
+
+

+

+
+
+
+
${projects.name}
+
+
${projects.title}
+
+ - ${projects.stack}
+ - ${projects.year}
+
+
+
+
+
${projects.description}
+
+
+
+ - ${projects.skills.skill1}
+ - ${projects.skills.skill2}
+ - ${projects.skills.skill3}
+
+
+
+
+
+
+
+
+
+
+
+
+ `;
+
+ const sections = document.querySelector('.second-container');
+ sections.append(section);
+
+ const allButton = document.querySelectorAll('.all-button');
+ const pop = document.querySelector('.pop');
+
+ allButton.forEach(btn => {
+ btn.addEventListener('click', e => {
+ let {id} = e.target;
+ id = Number(id);
+
+ if(id === projects.id){
+ pop.innerHTML = `
+
+
+
+
${projects.title}
+
+
${projects.title}
+
+
+
+
+
+
+
+
+
+
+
+

+
+
+
${projects.description}
+
+
+
- ${projects.skills.skill1}
+
- ${projects.skills.skill2}
+
- ${projects.skills.skill3}
+
+
+
+
+
+
+
+
+ `;
+
+ document.querySelector('.top-container').classList.add('overlay');
+ sections.classList.add('overlay');
+
+ const closeBtn = document.querySelector('.close-btn');
+
+ closeBtn.addEventListener('click', e => {
+ e.preventDefault();
+
+ pop.innerHTML = '';
+
+ document.querySelector('.top-container').classList.remove('overlay');
+
+ sections.classList.remove('overlay');
+ });
+ }
+ });
+ });
+});
+
+//Form Validation
+
+
+const form = document.forms[0];
+form.addEventListener('submit', (e) => {
+ const email = form.elements.email.value;
+ const errorMsg = document.querySelector('.error');
+ if (email === email.toLowerCase()) {
+ form.onsubmit();
+ } else {
+ errorMsg.innerHTML = 'Email should be lowercase';
+ errorMsg.classList.remove('hidden');
+ }
+ e.preventDefault();
+});
\ No newline at end of file