Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
W
website
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Container registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Video AG Infrastruktur
website
Commits
6799b488
Commit
6799b488
authored
8 years ago
by
Andreas Valder
Committed by
Andreas Valder
8 years ago
Browse files
Options
Downloads
Patches
Plain Diff
redid navbar, it is now posible to use fa glyphs in the navbar, closes #32
parent
2f239edc
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
server.py
+6
-3
6 additions, 3 deletions
server.py
static/style.css
+7
-0
7 additions, 0 deletions
static/style.css
templates/base.html
+79
-69
79 additions, 69 deletions
templates/base.html
with
92 additions
and
72 deletions
server.py
+
6
−
3
View file @
6799b488
...
@@ -54,11 +54,14 @@ def mod_required(func):
...
@@ -54,11 +54,14 @@ def mod_required(func):
return
decorator
return
decorator
app
.
jinja_env
.
globals
[
'
navbar
'
]
=
[]
app
.
jinja_env
.
globals
[
'
navbar
'
]
=
[]
def
register_navbar
(
name
,
icon
=
None
):
# iconlib can be 'bootstrap'
# ( see: http://getbootstrap.com/components/#glyphicons )
# or 'fa'
# ( see: http://fontawesome.io/icons/ )
def
register_navbar
(
name
,
iconlib
=
'
bootstrap
'
,
icon
=
None
):
def
wrapper
(
func
):
def
wrapper
(
func
):
endpoint
=
func
.
__name__
endpoint
=
func
.
__name__
app
.
jinja_env
.
globals
[
'
navbar
'
].
append
((
endpoint
,
name
,
icon
,
app
.
jinja_env
.
globals
[
'
navbar
'
].
append
((
endpoint
,
name
,
iconlib
,
icon
,
not
endpoint
in
mod_endpoints
))
not
endpoint
in
mod_endpoints
))
return
func
return
func
return
wrapper
return
wrapper
...
...
This diff is collapsed.
Click to expand it.
static/style.css
+
7
−
0
View file @
6799b488
...
@@ -8,3 +8,10 @@
...
@@ -8,3 +8,10 @@
.table-top-aligned
tr
{
vertical-align
:
top
;
}
.table-top-aligned
tr
{
vertical-align
:
top
;
}
.mejs-controls
label
{
font-weight
:
normal
;
margin-bottom
:
0px
;
}
.mejs-controls
label
{
font-weight
:
normal
;
margin-bottom
:
0px
;
}
.mejs-speed-selector
{
top
:
-130px
!important
;
height
:
130px
!important
;
}
.mejs-speed-selector
{
top
:
-130px
!important
;
height
:
130px
!important
;
}
.footer
{
position
:
fixed
;
bottom
:
0
;
width
:
100%
;
height
:
30px
;
background-color
:
#f5f5f5
;
}
This diff is collapsed.
Click to expand it.
templates/base.html
+
79
−
69
View file @
6799b488
...
@@ -27,40 +27,43 @@
...
@@ -27,40 +27,43 @@
{% block navbar %}
{% block navbar %}
<nav
class=
"navbar navbar-default navbar-static-top"
>
<nav
class=
"navbar navbar-default navbar-static-top"
>
<div
class=
"container-fluid"
>
<div
class=
"container-fluid"
>
<div
class=
"row"
>
<div
class=
"navbar-header"
>
<div
class=
"col-xs-1 hidden-xs hidden-sm"
>
<button
type=
"button"
class=
"navbar-toggle"
data-toggle=
"collapse"
<a
href=
"/"
><img
src=
"{{url_for('static', filename='logo.png')}}"
style=
"width: 80px; padding: 5px"
></a>
data-target=
".navbar-collapse"
>
</div>
<span
class=
"sr-only"
>
Toggle navigation
</span>
<div
class=
"col-xs-12 col-md-11"
>
<span
class=
"icon-bar"
></span>
<div
class=
"row"
>
<span
class=
"icon-bar"
></span>
<ul
class=
"list-inline col-xs-12"
>
<span
class=
"icon-bar"
></span>
<li>
</button>
<a
href=
"#"
>
Vampir
</a>
<a
class=
"navbar-brand"
href=
"/"
style=
"padding: 3px;"
>
</li>
<img
alt=
"Brand"
src=
"{{url_for('static', filename='logo.png')}}"
style=
"height: 100%;"
>
<li>
</a>
<a
href=
"#"
>
Youtube
</a>
</li>
<li>
<a
href=
"#"
>
Fachschaft
</a>
</li>
<li>
<a
href=
"#"
>
Facebook
</a>
</li>
<li>
<a
href=
"#"
>
Twitter
</a>
</li>
</ul>
</div>
</div>
<div
class=
"row"
>
<div
class=
"collapse navbar-collapse"
>
<div
class=
"col-xs-12 col-sm-8"
>
<ul
class=
"nav nav-pills"
style=
"margin-top: 5px;"
>
<ul
class=
"nav nav-pills"
>
{% for endpoint, caption, gly, iconlib, visible in navbar if visible or ismod() %}
{% for endpoint, caption, gly, visible in navbar %}
{% if visible or ismod() %}
<li
{%
if
endpoint =
=
request.endpoint
%}
class=
"active"
{%
endif
%}
>
<li
{%
if
endpoint =
=
request.endpoint
%}
class=
"active"
{%
endif
%}
>
<a
href=
"{{ url_for(endpoint) }}"
>
{% if gly != '' %}
<span
class=
"glyphicon glyphicon-{{ gly }}"
></span>
{% endif %}{{ caption }}
</a>
<a
href=
"{{ url_for(endpoint) }}"
>
</li>
{% if gly != '' %}
{% if iconlib == 'bootstrap' %}
<span
aria-hidden=
"true"
class=
"glyphicon glyphicon-{{ gly }}"
></span>
{% elif iconlib == 'fa' %}
<span
aria-hidden=
"true"
class=
"fa fa-{{ gly }}"
></span>
{% endif %}
{{ caption }}
{% endif %}
{% endif %}
</a>
</li>
{% endfor %}
{% endfor %}
<li
class=
"col-xs-12 col-sm-4 pull-right"
>
<form
action=
"{{ url_for('search') }}"
role=
"search"
>
<div
class=
"input-group"
>
<input
class=
"form-control"
type=
"text"
name=
"q"
placeholder=
"Search"
value=
"{{ searchtext }}"
width=
"100px"
>
<span
class=
"input-group-btn"
><button
class=
"btn btn-secondary"
type=
"submit"
><span
class=
"glyphicon glyphicon-search"
></span>
</button></span>
</div>
</form>
</li>
<li
class=
"navbar-right"
>
<li
class=
"navbar-right"
>
{% if not ismod() %}
{% if not ismod() %}
<a
id=
"loginpopover"
data-container=
"body"
data-toggle=
"popover"
data-placement=
"bottom"
>
<a
id=
"loginpopover"
data-container=
"body"
data-toggle=
"popover"
data-placement=
"bottom"
>
...
@@ -84,23 +87,10 @@
...
@@ -84,23 +87,10 @@
</li>
</li>
</ul>
</ul>
</div>
</div>
<div
class=
"col-xs-12 col-sm-4"
>
<form
action=
"{{ url_for('search') }}"
>
<div
class=
"input-group"
>
<input
class=
"form-control"
type=
"text"
name=
"q"
placeholder=
"Search"
value=
"{{ searchtext }}"
>
<span
class=
"input-group-btn"
><button
class=
"btn btn-secondary"
type=
"submit"
><span
class=
"glyphicon glyphicon-search"
></span>
</button></span>
</div>
</form>
</div>
</div>
<div
class=
"row"
>
</div>
</div>
</div>
</div>
</div>
</nav>
</nav>
{% endblock %}
{% endblock %}
<div
class=
"container-fluid"
>
<div
class=
"container-fluid"
style=
"margin-bottom: 30px;"
>
<div
class=
"row"
>
<div
class=
"row"
>
{% if page_border == 0 %}
{% if page_border == 0 %}
<div
class=
"col-xs-12"
>
<div
class=
"col-xs-12"
>
...
@@ -133,5 +123,25 @@
...
@@ -133,5 +123,25 @@
</div>
</div>
</div>
</div>
</div>
</div>
<footer
class=
"footer"
>
<div
class=
"container-fluid"
>
<ul
class=
"list-inline col-xs-12"
>
<li>
<a
href=
"#"
>
Vampir
</a>
</li>
<li>
<a
href=
"#"
>
Youtube
</a>
</li>
<li>
<a
href=
"#"
>
Fachschaft
</a>
</li>
<li>
<a
href=
"#"
>
Facebook
</a>
</li>
<li>
<a
href=
"#"
>
Twitter
</a>
</li>
</div>
</footer>
</body>
</body>
</html>
</html>
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment