Skip to content

Commit ee0f3d9

Browse files
committed
Manage tag selection with JavaScript.
1 parent 16cbfed commit ee0f3d9

File tree

3 files changed

+11
-3
lines changed

3 files changed

+11
-3
lines changed

_layouts/default.html

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,8 +107,7 @@ <h1>OpenSource</h1>
107107

108108

109109
<!-- scripts concatenated and minified via ant build script-->
110-
<script defer src="/public/js/plugins.js"></script>
111-
<script defer src="/public/js/script.js"></script>
110+
<script defer src="/public/js/tags.js"></script>
112111
<!-- end scripts-->
113112

114113

public/js/tags.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
$(function() {
2+
if ($('#tag-list').length) {
3+
var hash = window.location.hash.substr(1);
4+
if (hash != '') {
5+
$('#tag-list > li[id!=' + hash + ']').remove();
6+
$(window).scrollTop(0);
7+
}
8+
}
9+
});

tags.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
title: Pull Request
44
---
55
<h1>Liste des tags</h1>
6-
<ul>
6+
<ul id="tag-list">
77
{% for tag in site.tags %}
88
<li id="{{ tag[0] }}">{{ tag[0] }}:
99
<ul>

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy