Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
4d0a426
Title page change to a unique name
Ol-create Mar 2, 2022
7d06200
Add link/focus to menu icon on the mobile page
Brenda309 Mar 2, 2022
ba28f04
Add more color contrast to placeholder text
Ol-create Mar 2, 2022
968c7b7
Add more color contrast to see-project, get my resume and submit button
Ol-create Mar 2, 2022
2b28f9a
Fix linters err
Ol-create Mar 2, 2022
4b26734
Add show and hide functions to menu
Ol-create Mar 8, 2022
fade1a9
Add style to toggle-menu
Ol-create Mar 8, 2022
c96fa3e
Merge branch 'main' into Create-mobile-menu-with-javascript
Ol-create Mar 8, 2022
fee93e0
Fix linters err
Ol-create Mar 8, 2022
1095937
Initializing the dom file with variable
AbrahaKahsay Mar 8, 2022
eaa09d7
Add function
AbrahaKahsay Mar 8, 2022
b306832
Add hide function for the mobile menu
Ibnballo1 Mar 8, 2022
0f061f5
Add margin to close button
Ol-create Mar 9, 2022
2a83b37
Add style to the error message
AbrahaKahsay Mar 11, 2022
032770e
Create variable for form, email, error message
AbrahaKahsay Mar 11, 2022
f049f9c
update with create-mobile-menu... dom.js
Ol-create Mar 11, 2022
f742fdc
update with create-mobile-menu... index.html
Ol-create Mar 11, 2022
c200670
update with create-mobile-menu... style.css
Ol-create Mar 11, 2022
1f91ad2
Create error function
Ol-create Mar 11, 2022
1bc7990
Create check for validation
Ol-create Mar 11, 2022
1e99cd2
Create prevent submit default
Ol-create Mar 11, 2022
6a0fa35
Add check for lowercase
Ol-create Mar 11, 2022
3c6a74c
Add red color to invalid text
Ol-create Mar 11, 2022
97f57ff
Fix eslint err
Ol-create Mar 11, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"env": {
"browser": true,
"es6": true,
"jest": true
},
"parser": "babel-eslint",
"parserOptions": {
"ecmaVersion": 2018,
"sourceType": "module"
},
"extends": ["airbnb-base"],
"rules": {
"no-shadow": "off",
"no-param-reassign": "off",
"eol-last": "off",
"import/extensions": [ 1, {
"js": "always", "json": "always"
}]
},
"ignorePatterns": [
"dist/",
"build/"
]
}
20 changes: 17 additions & 3 deletions .github/workflows/linters.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
- name: Setup Webhint
run: |
npm install --save-dev hint@6.x
[ -f .hintrc ] || wget https://raw.githubusercontent.com/microverseinc/linters-config/master/html-css/.hintrc
[ -f .hintrc ] || wget https://raw.githubusercontent.com/microverseinc/linters-config/master/html-css-js/.hintrc
- name: Webhint Report
run: npx hint .
stylelint:
Expand All @@ -43,6 +43,20 @@ jobs:
- name: Setup Stylelint
run: |
npm install --save-dev stylelint@13.x stylelint-scss@3.x stylelint-config-standard@21.x stylelint-csstree-validator@1.x
[ -f .stylelintrc.json ] || wget https://raw.githubusercontent.com/microverseinc/linters-config/master/html-css/.stylelintrc.json
[ -f .stylelintrc.json ] || wget https://raw.githubusercontent.com/microverseinc/linters-config/master/html-css-js/.stylelintrc.json
- name: Stylelint Report
run: npx stylelint "**/*.{css,scss}"
run: npx stylelint "**/*.{css,scss}"
eslint:
name: ESLint
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: "12.x"
- name: Setup ESLint
run: |
npm install --save-dev eslint@7.x eslint-config-airbnb-base@14.x eslint-plugin-import@2.x babel-eslint@10.x
[ -f .eslintrc.json ] || wget https://raw.githubusercontent.com/microverseinc/linters-config/master/html-css-js/.eslintrc.json
- name: ESLint Report
run: npx eslint .
34 changes: 17 additions & 17 deletions .hintrc
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
{
"connector": {
"name": "local",
"options": {
"pattern": ["**", "!.git/**", "!node_modules/**"]
}
},
"extends": ["development"],
"formatters": ["stylish"],
"hints": [
"button-type",
"disown-opener",
"html-checker",
"meta-charset-utf-8",
"meta-viewport",
"no-inline-styles:error"
]
}
"connector": {
"name": "local",
"options": {
"pattern": ["**", "!.git/**", "!node_modules/**"]
}
},
"extends": ["development"],
"formatters": ["stylish"],
"hints": [
"button-type",
"disown-opener",
"html-checker",
"meta-charset-utf-8",
"meta-viewport",
"no-inline-styles:error"
]
}
19 changes: 9 additions & 10 deletions .stylelintrc.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
{
"extends": ["stylelint-config-standard"],
"plugins": ["stylelint-scss", "stylelint-csstree-validator"],
"rules": {
"at-rule-no-unknown": null,
"scss/at-rule-no-unknown": true,
"csstree/validator": true
},
"ignoreFiles": ["build/**", "dist/**", "**/reset*.css", "**/bootstrap*.css"]
}

"extends": ["stylelint-config-standard"],
"plugins": ["stylelint-scss", "stylelint-csstree-validator"],
"rules": {
"at-rule-no-unknown": null,
"scss/at-rule-no-unknown": true,
"csstree/validator": true
},
"ignoreFiles": ["build/**", "dist/**", "**/reset*.css", "**/bootstrap*.css", "**/*.js", "**/*.jsx"]
}
56 changes: 56 additions & 0 deletions dom.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
const toggleMenu = document.getElementById('toggle-menu');

function hide() {
toggleMenu.style.display = 'none';
}

document.querySelectorAll('.mylinks').forEach((n) => n.addEventListener('click', () => {
hide();
}));

function openNav() {
toggleMenu.style.display = 'block';
}

function closeNav() {
toggleMenu.style.display = 'none';
}

document.getElementById('openMenu').addEventListener('click', () => {
openNav();
});

document.getElementById('close').addEventListener('click', () => {
closeNav();
});

// Form Validation

// Create variable for form, email, error message.
const form = document.querySelector('#form');
const idEmail = form.email;
const errorMessage = document.getElementById('invalidText');

// Check for lowercase
function isLower(str) {
return !/[A-Z]/.test(str) && /[a-z]/.test(str);
}

// Create error function
function errMsg() {
errorMessage.innerText = 'email has to be in lower case';
}

// Check for validation
form.addEventListener('change', (e) => {
const validEmail = isLower(idEmail.value);
if (!validEmail) {
errMsg(e.target.name);
} else {
errorMessage.innerText = '';
}
});
// Prevent submit default
form.addEventListener('submit', (e) => {
if (!isLower(idEmail.value)) { e.preventDefault(); }
});
Binary file added image/blur-background.JPG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions image/close-btn.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added image/close-btn2.JPG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
57 changes: 33 additions & 24 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
<html lang="en">

<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Oluyemi Paul Portfolio</title>
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-DQYJK8ZFFX"></script>
<script>
Expand All @@ -11,17 +15,14 @@

gtag('config', 'G-DQYJK8ZFFX');
</script>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Oluyemi Portfolio</title>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link
href="https://fonts.googleapis.com/css2?family=Crete+Round&family=Poppins:wght@100;200&family=Roboto:wght@100;200&display=swap"
rel="stylesheet">
<script src="https://kit.fontawesome.com/746ba03926.js" crossorigin="anonymous"></script>
<link rel="stylesheet" href="style.css">

</head>

<body>
Expand All @@ -30,19 +31,31 @@
<nav id="navbar">
<p id="profileName"><a href="#"> Paul, Oluyemi</a></p>
<ul id="desktop-nav">
<li><a id="portfolio" href="#">Portfolio</a></li>
<li><a id="about" href="#">About </a></li>
<li><a id="contact" href="#"> Contact</a></li>
<li><a href="#"> <i class="far fa-envelope"></i></a></li>

<li><a href="#portfolio">Portfolio</a></li>
<li><a href="#about">About </a></li>
<li><a href="#contact"> Contact</a></li>
<li><a id="email" href="#"> <i class="far fa-envelope"></i></a></li>
</ul>
<div id="bars">
<div class="bar1"></div>
<div id="openMenu" >
<a href="#"><div class="bar1"></div>
<div class="bar2"></div>
<div class="bar3"></div>
</a>
</div>
</nav>
</header>

<div id="hideMe">
<div id="toggle-menu">
<img src="./image/close-btn2.JPG" alt="" id="close">
<ul>
<li class="mylinks"><a href="#portfolio" >Portfolio</a></li>
<li class="mylinks"><a href="#about">About</a></li>
<li class="mylinks"><a href="#contact" >Contact</a></li>
</ul>
<div></div>
</div>
</div>
<main id="container" class="flex-b">
<section class="first-page">
<h1 class="greetText">Hey There.<br>
Expand All @@ -68,7 +81,7 @@ <h2 class="jobTitle">I am a Software Developer</h2>
</main>

<!-- Project/works Section -->
<div class="content-flex flex-c">
<div class="content-flex flex-c" id="portfolio">
<div id="topic">
<h2>My Recent Works</h2>
<hr>
Expand All @@ -93,8 +106,6 @@ <h2 id="story">Multi-Post Stories</h2>
</div>
</div>



<div class="flex-d">

<div class="content_1 content-flex ">
Expand Down Expand Up @@ -144,7 +155,6 @@ <h3 class="title-post">Profesional Art Printing Data More</h3>

</div>


<div class="flex-e">
<div class="content_1 content-flex">
<div class="img04">
Expand Down Expand Up @@ -193,9 +203,7 @@ <h3 class="title-post">Profesional Art Printing Data More</h3>
</div>

<!-- About-me Section -->

<section class="about_me_grid flex-f">

<section class="about_me_grid flex-f" id="about" >
<div class="flex-f1">
<img id="about_img" width="586" height="354" src="./image/about-img-bg.png" alt="">
<h2 id="about-title">About me</h2>
Expand Down Expand Up @@ -251,18 +259,18 @@ <h2 id="about-title">About me</h2>
</div>

</section>

<section class="flex-g">
<section class="flex-g" id="contact">
<div class="flex-g1">
<h4 id="intrest-text">I'm always interested in hearing about new projects,
so if you'd like to chat please get in touch.</h4>
<form action="https://formspree.io/f/mknyregg" method="post">
<form action="https://formspree.io/f/mknyregg" method="post" id="form">
<div class="flex">
<input type="text" class="input-text" id="name" name="client_name" maxlength="30"
placeholder="Full name" required>
<input type="email" class="input-text" id="email" name="client_email" maxlength="30"
<input type="email" class="input-text" id="eml" name="email" maxlength="30"
placeholder="Email address" required>
<textarea id="msg" name="client_comment" maxlength="500" placeholder="Enter text here"
<p id="invalidText"></p>
<textarea id="msg" name="msg" maxlength="500" placeholder="Enter text here"
required></textarea>
<button class="button" type="submit">Get in touch</button>
</div>
Expand All @@ -282,7 +290,8 @@ <h4 id="intrest-text">I'm always interested in hearing about new projects,
</div>
<div id="footer-bar"></div>
</section>
</div>
</div>
<script src="dom.js"></script>
</body>

</html>
Loading