Style sidebar according to context
This commit is contained in:
@@ -6,6 +6,24 @@ body
|
||||
bottom: 0
|
||||
background-color: $color-background-light
|
||||
|
||||
&[data-context="task"]
|
||||
nav.sidebar .navbar-item.tasks
|
||||
background-color: $color-background-nav
|
||||
box-shadow: inset 3px 0 0 $color-primary
|
||||
color: white
|
||||
|
||||
&[data-context="shot"]
|
||||
nav.sidebar .navbar-item.shots
|
||||
background-color: $color-background-nav
|
||||
box-shadow: inset 3px 0 0 $color-primary
|
||||
color: white
|
||||
|
||||
&[data-context="dashboard"]
|
||||
nav.sidebar .navbar-item.attract
|
||||
background-color: $color-background-nav
|
||||
box-shadow: inset 3px 0 0 $color-primary
|
||||
color: white
|
||||
|
||||
#app-main
|
||||
display: flex
|
||||
align-items: stretch
|
||||
|
@@ -1,4 +1,5 @@
|
||||
| {% extends 'attract/layout.html' %}
|
||||
| {% block bodyattrs %}{{ super() }} data-context='dashboard'{% endblock %}
|
||||
| {% block page_title %}Attract{% endblock %}
|
||||
|
||||
| {% block body %}
|
||||
|
@@ -27,20 +27,20 @@ html(lang="en")
|
||||
nav.sidebar(role="navigation")
|
||||
ul
|
||||
li
|
||||
a.navbar-item(href="{{ url_for('attract.index') }}",
|
||||
a.navbar-item.attract(href="{{ url_for('attract.index') }}",
|
||||
title='Attract')
|
||||
i.pi-attract
|
||||
| {% if project %}
|
||||
li
|
||||
a.navbar-item(href="{{ url_for('attract.tasks.perproject.index', project_url=project.url) }}",
|
||||
a.navbar-item.tasks(href="{{ url_for('attract.tasks.perproject.index', project_url=project.url) }}",
|
||||
title='Tasks for project {{ project.name }}') T
|
||||
li
|
||||
a.navbar-item(href="{{ url_for('attract.shots.perproject.index', project_url=project.url) }}",
|
||||
a.navbar-item.shots(href="{{ url_for('attract.shots.perproject.index', project_url=project.url) }}",
|
||||
title='Shots for project {{ project.name }}') S
|
||||
| {% else %}
|
||||
| {% if current_user.is_authenticated %}
|
||||
li
|
||||
a.navbar-item(href="{{ url_for('attract.tasks.index') }}",
|
||||
a.navbar-item.tasks(href="{{ url_for('attract.tasks.index') }}",
|
||||
title='Your tasks') T
|
||||
| {% endif %}
|
||||
| {% endif %}
|
||||
|
Reference in New Issue
Block a user