Skip to content

Commit

Permalink
début de la création du site
Browse files Browse the repository at this point in the history
  • Loading branch information
xgui4 committed Jun 22, 2024
1 parent 322e9d6 commit 305c519
Show file tree
Hide file tree
Showing 5 changed files with 53 additions and 3 deletions.
Binary file removed NOTE_INSTALLATION.docx
Binary file not shown.
Empty file added css/tbd
Empty file.
Empty file added doc/tbd
Empty file.
7 changes: 4 additions & 3 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-QWTKZyjpPEjISv5WaRU9OFeRpok6YctnYmDr5pNlyT2bRjXh0JMhjY6hW+ALEwIH" crossorigin="anonymous">
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" integrity="sha384-YvpcrYf0tY3lHB60NNkmXc5s9fDVZLESaAA55NDzOxhy9GkcIdslK1eN7N6jIeHz" crossorigin="anonymous"></script>
<title>Radium Launcher</title>
</head>
<body>
Ce site est en construction.

Pour la documentation wip - > <a href="Radium-Launcher/doc/html/index.html"> Cliquer ici</a>
<nav id="navbar" class="navbar navbar-expand-lg bg-body-tertiary"> </nav>
<script src="js/navbar.js"></script>
</body>
</html>
49 changes: 49 additions & 0 deletions js/navbar.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
const TITLE = "Radium Launcher"

/**
* Obtenir une string qui sert d'affichage pour le menu de navigation
* @returns str (string d'affichage des pages de navigation)
*/
function displayPage()
{
return pages.map(page => `
<li class="nav-item">
<a class="nav-link ${page.disabled ? 'disabled' : 'active'}" aria-disabled=${page.disabled} href=${page.url}>${page.title}</a>
</li>
`).join('')
}

const page = {
title : "Page 1",
url : "#",
disabled : true,
}

const page2 = {
title : "Page 2",
url : "#",
disabled : true,
}

const page3 = {
title : "Page 3",
url : "#",
disabled : true
}

let pages = [page, page2, page3];
let nav = document.getElementById('navbar');

nav.innerHTML = `
<div class="container-fluid">
<a class="navbar-brand" href="#">${TITLE}</a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarNav">
<ul class="navbar-nav">
${displayPage()}
</ul>
</div>
</div>
`

0 comments on commit 305c519

Please sign in to comment.