Update index.html

- Dynamic hashtags via URL
This commit is contained in:
Ralf Stockmann 2023-05-17 23:57:40 +02:00 committed by GitHub
parent 323abef86d
commit 638c216eb4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -9,10 +9,8 @@
<body> <body>
<nav class="navbar navbar-light d-flex"> <nav class="navbar navbar-light d-flex">
<span class="navbar-brand mb-0 h1"> <span class="navbar-brand mb-0 h1" id="hashtag-container">
<span class="hashtag">#bibliocon23</span> <!-- hashtags will be inserted here -->
<span class="hashtag">#111bibliocon</span>
<span class="hashtag">#bibliocon</span>
</span> </span>
<span class="navbar-info mb-0 h3"> <span class="navbar-info mb-0 h3">
<span class="hashtag">Mastowall V0.1 - written by ChatGPT4 - Prompting: Ralf Stockmann (rstockm)</span> <span class="hashtag">Mastowall V0.1 - written by ChatGPT4 - Prompting: Ralf Stockmann (rstockm)</span>
@ -23,5 +21,10 @@
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script> <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/masonry/4.2.2/masonry.pkgd.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/masonry/4.2.2/masonry.pkgd.min.js"></script>
<script src="script.js"></script> <script src="script.js"></script>
<script>
// insert hashtags into the navbar
let hashtagContainer = document.getElementById('hashtag-container');
hashtagContainer.innerHTML = hashtagsArray.map(hashtag => `<span class="hashtag">#${hashtag}</span>`).join(' &nbsp; ');
</script>
</body> </body>
</html> </html>