Tweak the admin menu

This commit is contained in:
Thomas Sileo 2018-07-01 23:25:26 +02:00
parent 9332b348eb
commit 0c7c3ccae3
3 changed files with 36 additions and 9 deletions

View file

@ -45,7 +45,30 @@ a:hover {
background: $primary-color; background: $primary-color;
color: $background-color; color: $background-color;
} }
#admin-menu {
list-style-type: none;
display: inline;
padding: 10px;
width: 720px;
margin:0 auto;
background: $color-menu-background;
color: $color-light;
border-radius-bottom-left: 2px;
border-radius-bottom-right: 2px;
.left { float: left; }
.right { float: right; }
li {
a { text-decoration: none; }
.admin-title {
text-transform: uppercase;
font-weight: bold;
}
padding-right:10px;
.selected, a:hover {
color: $primary-color;
}
}
}
#header { #header {
margin-bottom: 70px; margin-bottom: 70px;
@ -69,7 +92,6 @@ a:hover {
padding: 0; padding: 0;
li { li {
float:left; float:left;
padding-right:10px;
margin-bottom:10px; margin-bottom:10px;
} }
} }

View file

@ -19,13 +19,6 @@
<li><a href="/following"{% if request.path == "/following" %} class="selected" {% endif %}>Following <small class="badge">{{ following_count }}</small></a></li> <li><a href="/following"{% if request.path == "/following" %} class="selected" {% endif %}>Following <small class="badge">{{ following_count }}</small></a></li>
<!-- <li><a href="/about"{% if request.path == "/about" %} class="selected" {% endif %}>/about</a></li> <!-- <li><a href="/about"{% if request.path == "/about" %} class="selected" {% endif %}>/about</a></li>
--> -->
{% if logged_in %}
<li><a href="/stream"{% if request.path == "/stream" %} class="selected" {% endif %}>/stream</a></li>
<li><a href="/notifications"{% if request.path == "/notifications" %} class="selected" {% endif %}>/notifs</a></li>
<li><a href="/new"{% if request.path == "/new" %} class="selected" {% endif %}>/new</a></li>
<li><a href="/admin"{% if request.path == "/admin" %} class="selected" {% endif %}>/admin</a></li>
<li><a href="/logout">/logout</a></li>
{% endif %}
</ul> </ul>
</div> </div>
</div> </div>

View file

@ -19,6 +19,18 @@
</style> </style>
</head> </head>
<body> <body>
{% if logged_in %}
<ul id="admin-menu">
<li class="left"><span class="admin-title">Admin</span></li>
<li class="left"><a href="/new"{% if request.path == "/new" %} class="selected" {% endif %}>New</a></li>
<li class="left"><a href="/stream"{% if request.path == "/stream" %} class="selected" {% endif %}>Stream</a></li>
<li class="left"><a href="/notifications"{% if request.path == "/notifications" %} class="selected" {% endif %}>Notifications</a></li>
<li class="left"><a href="/admin"{% if request.path == "/admin" %} class="selected" {% endif %}>Stats</a></li>
<li class="right"><a href="/logout">Logout</a></li>
</ul>
{% endif %}
<div class="base-container"> <div class="base-container">
{% block content %}{% endblock %} {% block content %}{% endblock %}
</div> </div>