Úprava souboru index.html

This commit is contained in:
janrippl 2025-02-09 23:24:51 +01:00
parent feec3001aa
commit 02fe3483a9
3 changed files with 118 additions and 11 deletions

View file

@ -168,7 +168,7 @@
<!-- BREADCRUMBS -->
<section class="breadcrumbs_block clearfix parallax">
<div class="container center">
<h2><big><i class="fl-gitea"></i></big> Gitea <b>RSS</b> <i class="fa fa-rss"></i></h2>
<h2>Gitea <big><i class="fl-gitea"></i></big> <b>RSS</b> <i class="fa fa-rss"></i></h2>
<p>RSS kanály u repozitářů...</p>
</div>
</section><!-- //BREADCRUMBS -->
@ -196,9 +196,9 @@
<div class="blog_post_date">8 ÚNOR 2025 | 16:25</div>
<a class="blog_post_title" href="blog-post.html" >JavaScript pro detekci typu zařízení a změna zobrazení webové stránky...</a>
<ul class="blog_post_info">
<li><a href="javascript:void(0);" >Admin</a></li>
<li><a href="javascript:void(0);" >Creative</a></li>
<li><a href="javascript:void(0);" >3 Comments</a></li>
<li><a href="javascript:void(0);" >A51</a></li>
<li><a href="javascript:void(0);" ><big><i class="fl-gitea"></i></big> Gitea</a></li>
<li><a href="javascript:void(0);" >RSS <i class="fa fa-rss"></i></a></li>
</ul>
<hr>
<div class="blog_post_content">The best way to describe Adam Selman would be simply to say that he is the epitome of cool. So its only fitting that his first runway collection was made for the ultimate cool girl.</div>
@ -293,9 +293,10 @@
<!-- PAGINATION -->
<ul class="pagination clearfix">
<li class="active"><a href="javascript:void(0);" >0</a></li>
<li><a href="javascript:void(0);" >1</a></li>
<li><a href="javascript:void(0);" >2</a></li>
<li class="active"><a href="javascript:void(0);" >3</a></li>
<li><a href="javascript:void(0);" >3</a></li>
<li><a href="javascript:void(0);" >4</a></li>
<li><a href="javascript:void(0);" >5</a></li>
<li><a href="javascript:void(0);" >. . .</a></li>
@ -310,11 +311,11 @@
<!-- META WIDGET -->
<div class="sidepanel widget_meta">
<ul>
<li><a href="javascript:void(0);" >Nudista</a></li>
<li><a href="javascript:void(0);" >Fashion & Trends</a></li>
<li><a href="javascript:void(0);" >Media Projects</a></li>
<li><a href="javascript:void(0);" >Small Business</a></li>
<li><a href="javascript:void(0);" >Creative</a></li>
<li><a href="javascript:void(0);" >HTML<i class='bx bxl-html5' ></i> + CSS<i class='bx bxl-css3' ></i></a></li>
<li><a href="javascript:void(0);" >PHP <i class='bx bxl-php'></i></a></li>
<li><a href="javascript:void(0);" >JavaScript <i class='bx bxl-javascript' ></i></a></li>
<li><a href="javascript:void(0);" >Linux <i class="fl-ubuntu"></i> <i class="fl-debian"></i> <i class="fl-gnome"></i></a></li>
<li><a href="javascript:void(0);" >Render <big><i class='bx bxl-blender' ></i></big></a></li>
</ul>
</div><!-- //META WIDGET -->

63
pokus.html Normal file
View file

@ -0,0 +1,63 @@
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
</head>
<body>
<div id="pagination">
<button id="prev">Předchozí</button>
<span id="currentPage">1</span>
<button id="next">Další</button>
</div>
<div id="content"></div>
<script>
const pagination = document.getElementById('pagination');
const content = document.getElementById('content');
const prevButton = document.getElementById('prev');
const nextButton = document.getElementById('next');
const currentPageSpan = document.getElementById('currentPage');
const data = [
"Položka 1", "Položka 2", "Položka 3", "Položka 4", "Položka 5",
"Položka 6", "Položka 7", "Položka 8", "Položka 9", "Položka 10"
];
const itemsPerPage = 3;
let currentPage = 1;
function displayItems() {
const startIndex = (currentPage - 1) * itemsPerPage;
const endIndex = startIndex + itemsPerPage;
const pageItems = data.slice(startIndex, endIndex);
content.innerHTML = '';
pageItems.forEach(item => {
const itemElement = document.createElement('p');
itemElement.textContent = item;
content.appendChild(itemElement);
});
}
function updatePagination() {
currentPageSpan.textContent = currentPage;
prevButton.disabled = currentPage === 1;
nextButton.disabled = currentPage * itemsPerPage >= data.length;
}
displayItems();
updatePagination();
prevButton.addEventListener('click', () => {
currentPage--;
displayItems();
updatePagination();
});
nextButton.addEventListener('click', () => {
currentPage++;
displayItems();
updatePagination();
});
</script>
</body>
</html>

43
pokus2.html Normal file
View file

@ -0,0 +1,43 @@
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
</head>
<body>
<div id="pagination">
<a href="#" data-page="1">1</a>
<a href="#" data-page="2">2</a>
<a href="#" data-page="3">3</a>
<a href="#" data-page="4">4</a>
<a href="#" data-page="5">5</a>
</div>
<div id="content">
<div data-page="1">
<h1>Stránka 1</h1>
<p>Obsah stránky 1.</p>
</div>
<div data-page="2" style="display: none;">
<h1>Stránka 2</h1>
<p>Obsah stránky 2.</p>
</div>
</div>
<script>
const pagination = document.getElementById('pagination');
const content = document.getElementById('content');
const pages = content.querySelectorAll('[data-page]');
pagination.addEventListener('click', (event) => {
const pageNumber = event.target.dataset.page;
// Skryjeme všechny stránky
pages.forEach(page => page.style.display = 'none');
// Zobrazíme vybranou stránku
const selectedPage = content.querySelector(`[data-page="${pageNumber}"]`);
selectedPage.style.display = 'block';
});
</script>
</body>
</html>