Highlight current page in lexicon sidebar
This commit is contained in:
parent
cace76ff0d
commit
9c41b3863e
|
@ -65,6 +65,12 @@ div#sidebar table a {
|
||||||
table a:hover {
|
table a:hover {
|
||||||
background-color: #cccccc;
|
background-color: #cccccc;
|
||||||
}
|
}
|
||||||
|
div#sidebar table a.current-page {
|
||||||
|
background-color: #bbbbbb;
|
||||||
|
}
|
||||||
|
div#sidebar table a.current-page:hover {
|
||||||
|
background-color: #bbbbbb;
|
||||||
|
}
|
||||||
div#sidebar table td {
|
div#sidebar table td {
|
||||||
padding: 0px; margin: 3px 0;
|
padding: 0px; margin: 3px 0;
|
||||||
border-bottom: 8px solid transparent;
|
border-bottom: 8px solid transparent;
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
{% extends "lexicon/lexicon.html" %}
|
{% extends "lexicon/lexicon.html" %}
|
||||||
|
{% set current_page = "contents" %}
|
||||||
{% block title %}Index | {{ lexicon_title }}{% endblock %}
|
{% block title %}Index | {{ lexicon_title }}{% endblock %}
|
||||||
|
|
||||||
{% block main %}
|
{% block main %}
|
||||||
|
|
|
@ -11,11 +11,24 @@
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block sb_logo %}{% endblock %}
|
{% block sb_logo %}{% endblock %}
|
||||||
{% block sb_home %}<a href="{{ url_for('home.home') }}">Home</a>{% endblock %}
|
{% block sb_home %}<a href="{{ url_for('home.home') }}">Home</a>
|
||||||
{% block sb_contents %}<a href="{{ url_for('lexicon.contents', name=g.lexicon.name) }}">Contents</a>{% endblock %}
|
{% endblock %}
|
||||||
{% block sb_rules %}<a href="{{ url_for('lexicon.rules', name=g.lexicon.name) }}">Rules</a>{% endblock %}
|
{% block sb_contents %}<a
|
||||||
{% block sb_session %}<a href="{{ url_for('lexicon.session', name=g.lexicon.name) }}">Session</a>{% endblock %}
|
{% if current_page == "contents" %}class="current-page"
|
||||||
{% block sb_stats %}<a href="{{ url_for('lexicon.stats', name=g.lexicon.name) }}">Statistics</a>{% endblock %}
|
{% else %}href="{{ url_for('lexicon.contents', name=g.lexicon.name) }}"
|
||||||
|
{% endif %}>Contents</a>{% endblock %}
|
||||||
|
{% block sb_rules %}<a
|
||||||
|
{% if current_page == "rules" %}class="current-page"
|
||||||
|
{% else %}href="{{ url_for('lexicon.rules', name=g.lexicon.name) }}"
|
||||||
|
{% endif %}>Rules</a>{% endblock %}
|
||||||
|
{% block sb_session %}<a
|
||||||
|
{% if current_page == "session" %}class="current-page"
|
||||||
|
{% else %}href="{{ url_for('lexicon.session', name=g.lexicon.name) }}"
|
||||||
|
{% endif %}>Session</a>{% endblock %}
|
||||||
|
{% block sb_stats %}<a
|
||||||
|
{% if current_page == "statistics" %}class="current-page"
|
||||||
|
{% else %}href="{{ url_for('lexicon.stats', name=g.lexicon.name) }}"
|
||||||
|
{% endif %}>Statistics</a>{% endblock %}
|
||||||
|
|
||||||
{% set template_sidebar_rows = [
|
{% set template_sidebar_rows = [
|
||||||
self.sb_logo(),
|
self.sb_logo(),
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
{% extends "lexicon/lexicon.html" %}
|
{% extends "lexicon/lexicon.html" %}
|
||||||
|
{% set current_page = "rules" %}
|
||||||
{% block title %}Rules | {{ lexicon_title }}{% endblock %}
|
{% block title %}Rules | {{ lexicon_title }}{% endblock %}
|
||||||
|
|
||||||
{% block main %}
|
{% block main %}
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
{% extends "lexicon/lexicon.html" %}
|
{% extends "lexicon/lexicon.html" %}
|
||||||
|
{% set current_page = "session" %}
|
||||||
{% block title %}Session | {{ lexicon_title }}{% endblock %}
|
{% block title %}Session | {{ lexicon_title }}{% endblock %}
|
||||||
|
|
||||||
{% block main %}
|
{% block main %}
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
{% extends "lexicon/lexicon.html" %}
|
{% extends "lexicon/lexicon.html" %}
|
||||||
|
{% set current_page = "statistics" %}
|
||||||
{% block title %}Session | {{ lexicon_title }}{% endblock %}
|
{% block title %}Session | {{ lexicon_title }}{% endblock %}
|
||||||
|
|
||||||
{% block main %}
|
{% block main %}
|
||||||
|
|
Loading…
Reference in New Issue