Merge 64c2616a80
into c92b0bc3a8
commit
8a31d89bbb
@ -1,19 +1,22 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<link rel="stylesheet" href="style.css" />
|
||||
<title>Auto Text Effect</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1 id="text">Starting...</h1>
|
||||
|
||||
<div>
|
||||
<label for="speed">Speed:</label>
|
||||
<input type="number" name="speed" id="speed" value="1" min="1" max="10" step="1">
|
||||
</div>
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<link rel="stylesheet" href="style.css" />
|
||||
<title>Auto Text Effect</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<h1 id="text">Starting...</h1>
|
||||
|
||||
<div>
|
||||
<label for="speed">Speed:</label>
|
||||
<input type="number" name="speed" id="speed" value="5" min="1" max="10" step="1">
|
||||
</div>
|
||||
|
||||
<script src="script.js"></script>
|
||||
</body>
|
||||
|
||||
<script src="script.js"></script>
|
||||
</body>
|
||||
</html>
|
@ -1,22 +1,21 @@
|
||||
const textEl = document.getElementById('text')
|
||||
const speedEl = document.getElementById('speed')
|
||||
const text = 'We Love Programming!'
|
||||
let idx = 1
|
||||
let speed = 300 / speedEl.value
|
||||
const textEl = document.getElementById('text');
|
||||
const speedEl = document.getElementById('speed');
|
||||
const text = 'xAI is an AI company with the mission of advancing scientific discovery and gaining a deeper understanding of our universe.';
|
||||
let idx = 1;
|
||||
let speed = 300 / speedEl.value;
|
||||
|
||||
writeText()
|
||||
writeText();
|
||||
|
||||
function writeText() {
|
||||
textEl.innerText = text.slice(0, idx)
|
||||
textEl.innerText = text.slice(0, idx);
|
||||
|
||||
idx++
|
||||
idx++;
|
||||
|
||||
if(idx > text.length) {
|
||||
idx = 1
|
||||
idx = 1;
|
||||
}
|
||||
|
||||
setTimeout(writeText, speed)
|
||||
setTimeout(writeText, speed);
|
||||
}
|
||||
|
||||
|
||||
speedEl.addEventListener('input', (e) => speed = 300 / e.target.value)
|
||||
speedEl.addEventListener('input', (e) => speed = 300 / e.target.value);
|
@ -1,31 +1,39 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<link rel="stylesheet" href="style.css" />
|
||||
<title>Expanding Cards</title>
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<div class="panel active" style="background-image: url('https://images.unsplash.com/photo-1558979158-65a1eaa08691?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=1350&q=80')">
|
||||
<h3>Explore The World</h3>
|
||||
</div>
|
||||
<div class="panel" style="background-image: url('https://images.unsplash.com/photo-1572276596237-5db2c3e16c5d?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=1350&q=80')">
|
||||
<h3>Wild Forest</h3>
|
||||
</div>
|
||||
<div class="panel" style="background-image: url('https://images.unsplash.com/photo-1507525428034-b723cf961d3e?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=1353&q=80')">
|
||||
<h3>Sunny Beach</h3>
|
||||
</div>
|
||||
<div class="panel" style="background-image: url('https://images.unsplash.com/photo-1551009175-8a68da93d5f9?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=1351&q=80')">
|
||||
<h3>City on Winter</h3>
|
||||
</div>
|
||||
<div class="panel" style="background-image: url('https://images.unsplash.com/photo-1549880338-65ddcdfd017b?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=1350&q=80')">
|
||||
<h3>Mountains - Clouds</h3>
|
||||
</div>
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<link rel="stylesheet" href="style.css" />
|
||||
<title>Expanding Cards</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="container">
|
||||
<div class="panel active"
|
||||
style="background-image: url('https://images.unsplash.com/photo-1558979158-65a1eaa08691?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=1350&q=80')">
|
||||
<h3>Explore The World</h3>
|
||||
</div>
|
||||
<div class="panel"
|
||||
style="background-image: url('https://images.unsplash.com/photo-1572276596237-5db2c3e16c5d?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=1350&q=80')">
|
||||
<h3>Wild Forest</h3>
|
||||
</div>
|
||||
<div class="panel"
|
||||
style="background-image: url('https://images.unsplash.com/photo-1507525428034-b723cf961d3e?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=1353&q=80')">
|
||||
<h3>Sunny Beach</h3>
|
||||
</div>
|
||||
<div class="panel"
|
||||
style="background-image: url('https://images.unsplash.com/photo-1551009175-8a68da93d5f9?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=1351&q=80')">
|
||||
<h3>City on Winter</h3>
|
||||
</div>
|
||||
<div class="panel"
|
||||
style="background-image: url('https://images.unsplash.com/photo-1549880338-65ddcdfd017b?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=1350&q=80')">
|
||||
<h3>Mountains - Clouds</h3>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<script src="script.js"></script>
|
||||
</body>
|
||||
|
||||
<script src="script.js"></script>
|
||||
</body>
|
||||
</html>
|
@ -1,24 +1,27 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<link rel="stylesheet" href="style.css" />
|
||||
<title>Progress Steps</title>
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<div class="progress-container">
|
||||
<div class="progress" id="progress"></div>
|
||||
<div class="circle active">1</div>
|
||||
<div class="circle">2</div>
|
||||
<div class="circle">3</div>
|
||||
<div class="circle">4</div>
|
||||
</div>
|
||||
|
||||
<button class="btn" id="prev" disabled>Prev</button>
|
||||
<button class="btn" id="next">Next</button>
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<link rel="stylesheet" href="style.css">
|
||||
<title>Progress Steps</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="container">
|
||||
<div class="progress-container">
|
||||
<div class="progress" id="progress"></div>
|
||||
<div class="circle active">1</div>
|
||||
<div class="circle">2</div>
|
||||
<div class="circle">3</div>
|
||||
<div class="circle">4</div>
|
||||
</div>
|
||||
<script src="script.js"></script>
|
||||
</body>
|
||||
|
||||
<button class="btn" id="prev" disabled>Prev</button>
|
||||
<button class="btn" id="next">Next</button>
|
||||
</div>
|
||||
<script src="script.js"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
@ -1,49 +1,44 @@
|
||||
const progress = document.getElementById('progress')
|
||||
const prev = document.getElementById('prev')
|
||||
const next = document.getElementById('next')
|
||||
const circles = document.querySelectorAll('.circle')
|
||||
const progress = document.getElementById('progress');
|
||||
const prev = document.getElementById('prev');
|
||||
const next = document.getElementById('next');
|
||||
const circles = document.querySelectorAll('.circle');
|
||||
|
||||
let currentActive = 1
|
||||
let currentActive = 1;
|
||||
|
||||
next.addEventListener('click', () => {
|
||||
currentActive++
|
||||
|
||||
if(currentActive > circles.length) {
|
||||
currentActive = circles.length
|
||||
currentActive++;
|
||||
if (currentActive > circles.length) {
|
||||
currentActive = circles.length;
|
||||
}
|
||||
|
||||
update()
|
||||
update();
|
||||
})
|
||||
|
||||
prev.addEventListener('click', () => {
|
||||
currentActive--
|
||||
|
||||
if(currentActive < 1) {
|
||||
currentActive = 1
|
||||
currentActive--;
|
||||
if (currentActive < 1) {
|
||||
currentActive = 1;
|
||||
}
|
||||
|
||||
update()
|
||||
update();
|
||||
})
|
||||
|
||||
function update() {
|
||||
circles.forEach((circle, idx) => {
|
||||
if(idx < currentActive) {
|
||||
circle.classList.add('active')
|
||||
if (idx < currentActive) {
|
||||
circle.classList.add('active');
|
||||
} else {
|
||||
circle.classList.remove('active')
|
||||
circle.classList.remove('active');
|
||||
}
|
||||
})
|
||||
|
||||
const actives = document.querySelectorAll('.active')
|
||||
|
||||
progress.style.width = (actives.length - 1) / (circles.length - 1) * 100 + '%'
|
||||
const actives = document.querySelectorAll('.active');
|
||||
progress.style.width = ((actives.length - 1) / (circles.length - 1)) * 100 + '%';
|
||||
|
||||
if(currentActive === 1) {
|
||||
prev.disabled = true
|
||||
} else if(currentActive === circles.length) {
|
||||
next.disabled = true
|
||||
if (currentActive === 1) {
|
||||
prev.disabled = true;
|
||||
} else if (currentActive === circles.length) {
|
||||
next.disabled = true;
|
||||
} else {
|
||||
prev.disabled = false
|
||||
next.disabled = false
|
||||
prev.disabled = false;
|
||||
next.disabled = false;
|
||||
}
|
||||
}
|
@ -1,43 +1,51 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.14.0/css/all.min.css" integrity="sha512-1PKOgIY59xJ8Co8+NE6FZ+LOAZKjy+KY8iq0G4B3CyeY6wYHN3yt9PW0XpSriVlkMXe40PTKnXrLnZ9+fkDaog==" crossorigin="anonymous" />
|
||||
<link rel="stylesheet" href="style.css" />
|
||||
<title>Rotating Navigation</title>
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<div class="circle-container">
|
||||
<div class="circle">
|
||||
<button id="close">
|
||||
<i class="fas fa-times"></i>
|
||||
</button>
|
||||
<button id="open">
|
||||
<i class="fas fa-bars"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="content">
|
||||
<h1>Amazing Article</h1>
|
||||
<small>Florin Pop</small>
|
||||
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Accusantium quia in ratione dolores cupiditate, maxime aliquid impedit dolorem nam dolor omnis atque fuga labore modi veritatis porro laborum minus, illo, maiores recusandae cumque ipsa quos. Tenetur, consequuntur mollitia labore pariatur sunt quia harum aut. Eum maxime dolorem provident natus veritatis molestiae cumque quod voluptates ab non, tempore cupiditate? Voluptatem, molestias culpa. Corrupti, laudantium iure aliquam rerum sint nam quas dolor dignissimos in error placeat quae temporibus minus optio eum soluta cupiditate! Cupiditate saepe voluptates laudantium. Ducimus consequuntur perferendis consequatur nobis exercitationem molestias fugiat commodi omnis. Asperiores quia tenetur nemo ipsa.</p>
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.14.0/css/all.min.css"
|
||||
integrity="sha512-1PKOgIY59xJ8Co8+NE6FZ+LOAZKjy+KY8iq0G4B3CyeY6wYHN3yt9PW0XpSriVlkMXe40PTKnXrLnZ9+fkDaog=="
|
||||
crossorigin="anonymous" />
|
||||
<link rel="stylesheet" href="style.css" />
|
||||
<title>Rotating Navigation</title>
|
||||
</head>
|
||||
|
||||
<h3>My Dog</h3>
|
||||
<img src="https://images.unsplash.com/photo-1507146426996-ef05306b995a?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=2100&q=80" alt="doggy" />
|
||||
<p>Lorem, ipsum dolor sit amet consectetur adipisicing elit. Sit libero deleniti rerum quo, incidunt vel consequatur culpa ullam. Magnam facere earum unde harum. Ea culpa veritatis magnam at aliquid. Perferendis totam placeat molestias illo laudantium? Minus id minima doloribus dolorum fugit deserunt qui vero voluptas, ut quia cum amet temporibus veniam ad ea ab perspiciatis, enim accusamus asperiores explicabo provident. Voluptates sint, neque fuga cum illum, tempore autem maxime similique laborum odio, magnam esse. Aperiam?</p>
|
||||
<body>
|
||||
<div class="container">
|
||||
<div class="circle-container">
|
||||
<div class="circle">
|
||||
<button id="close">
|
||||
<i class="fas fa-times"></i>
|
||||
</button>
|
||||
<button id="open">
|
||||
<i class="fas fa-bars"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<nav>
|
||||
<ul>
|
||||
<li><i class="fas fa-home"></i><a href="#"> Home</a></li>
|
||||
<li><i class="fas fa-user-alt"></i><a href="#"> About</a></li>
|
||||
<li><i class="fas fa-envelope"></i><a href="#"> Contact</a></li>
|
||||
</ul>
|
||||
</nav>
|
||||
<script src="script.js"></script>
|
||||
</body>
|
||||
<div class="content">
|
||||
<h1>GitHub</h1>
|
||||
<small>Wikipedia</small>
|
||||
<p>GitHub is a proprietary developer platform that allows developers to create, store, manage, and share their code. It uses Git to provide distributed version control and GitHub itself provides access control, bug tracking, software feature requests, task management, continuous integration, and wikis for every project. Headquartered in California, it has been a subsidiary of Microsoft since 2018.
|
||||
</p>
|
||||
|
||||
<h3>GitHub Invertocat logo</h3>
|
||||
<img
|
||||
src="https://upload.wikimedia.org/wikipedia/commons/thumb/c/c2/GitHub_Invertocat_Logo.svg/800px-GitHub_Invertocat_Logo.svg.png"
|
||||
alt="GitHub" height="100px", width="100px">
|
||||
<p>It is commonly used to host open source software development projects. As of January 2023, GitHub reported having over 100 million developers and more than 420 million repositories, including at least 28 million public repositories. It is the world's largest source code host as of June 2023. Over five billion developer contributions were made to more than 500 million open source projects in 2024.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<nav>
|
||||
<ul>
|
||||
<li><i class="fas fa-home"></i><a href="#"> Home</a></li>
|
||||
<li><i class="fas fa-user-alt"></i><a href="#"> About</a></li>
|
||||
<li><i class="fas fa-envelope"></i><a href="#"> Contact</a></li>
|
||||
</ul>
|
||||
</nav>
|
||||
<script src="script.js"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
Loading…
Reference in new issue