Skip to content

Commit

Permalink
Updated index & about
Browse files Browse the repository at this point in the history
  • Loading branch information
amirymax committed Mar 15, 2024
1 parent 73a7522 commit 7b70572
Show file tree
Hide file tree
Showing 6 changed files with 1,552 additions and 167 deletions.
6 changes: 4 additions & 2 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@
"browser": true,
"es2021": true
},
"extends": "google",
"extends": "eslint-config-standard",
"parserOptions": {
"ecmaVersion": "latest"
},
"rules": {}
"rules": {
"operator-linebreak": ["error", "none"]
}
}
4 changes: 2 additions & 2 deletions about.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<link rel="stylesheet" href="css/style.css" />
<link
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css"
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css"
/>

<title>About Me</title>
Expand All @@ -17,7 +17,7 @@
<button id="toggle-dark-mode">🌙</button>
<h1>Cristiano Ronaldo</h1>
<nav>
<a href="/index.html" class="nav-link">Home</a>
<a href="2023-fall-lab-portfolio-amiri-z.-f./index.html" class="nav-link">Home</a>
<a href="about.html" class="nav-link">About</a>
<button id="toggle-dark-mode-nav">🌙</button>
</nav>
Expand Down
5 changes: 2 additions & 3 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<button id="toggle-dark-mode">🌙</button>
<h1>Cristiano Ronaldo</h1>
<nav>
<a href="/index.html" class="nav-link">Home</a>
<a href="2023-fall-lab-portfolio-amiri-z.-f./index.html" class="nav-link">Home</a>
<a href="about.html" class="nav-link">About</a>
<button id="toggle-dark-mode-nav">🌙</button>
</nav>
Expand All @@ -26,8 +26,7 @@ <h1>Cristiano Ronaldo</h1>
</main>
<footer class="page-wrapper">
<p>&copy; 2024 Zikrullo Amiri</p>
<script src="js/script.js"></script>
</footer>
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
<script src="js/script.js"></script>
</body>
</html>
47 changes: 23 additions & 24 deletions js/script.js
Original file line number Diff line number Diff line change
@@ -1,32 +1,31 @@
document.addEventListener('DOMContentLoaded', function() {
const videoSection = document.getElementById('video-section');
if (videoSection!=null) {
videoSection.innerHTML =
'<p><b>The best goal ever! It was better than everything!</b></p> <iframe width="560" height="315" src="https://www.youtube.com/embed/ZC_XihZGPEg?si=KAz7HItciZuP2wU3" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe>';
document.addEventListener('DOMContentLoaded', function () {
const videoSection = document.getElementById('video-section')
if (videoSection != null) {
videoSection.innerHTML = '<p><b>The best goal ever! It was better than everything!</b></p> <iframe width="560" height="315" src="https://www.youtube.com/embed/ZC_XihZGPEg?si=KAz7HItciZuP2wU3" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe>'
}
document.getElementById('toggle-menu').addEventListener('click', function() {
const nav = document.querySelector('nav');
nav.classList.toggle('show-menu');
});
document.getElementById('toggle-menu').addEventListener('click', function () {
const nav = document.querySelector('nav')
nav.classList.toggle('show-menu')
})

document
.getElementById('toggle-dark-mode')
.addEventListener('click', function() {
const body = document.body;
body.classList.toggle('dark-mode');
});
.getElementById('toggle-dark-mode')
.addEventListener('click', function () {
const body = document.body
body.classList.toggle('dark-mode')
})

document
.getElementById('toggle-dark-mode-nav')
.addEventListener('click', function() {
const body = document.body;
body.classList.toggle('dark-mode');
});
.getElementById('toggle-dark-mode-nav')
.addEventListener('click', function () {
const body = document.body
body.classList.toggle('dark-mode')
})

document.addEventListener('click', function(event) {
const nav = document.querySelector('nav');
document.addEventListener('click', function (event) {
const nav = document.querySelector('nav')
if (!event.target.closest('nav') && event.target.id !== 'toggle-menu') {
nav.classList.remove('show-menu');
nav.classList.remove('show-menu')
}
});
});
})
})
Loading

0 comments on commit 7b70572

Please sign in to comment.