Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
SWIFTweb
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
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
SWIFT
SWIFTweb
Commits
4dcfae8c
Commit
4dcfae8c
authored
7 years ago
by
Josh Borrow
Browse files
Options
Downloads
Patches
Plain Diff
Added mobile navbar and required javascript
parent
4908efda
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
javascript/navbar.js
+15
-0
15 additions, 0 deletions
javascript/navbar.js
stylesheets/stylesheet.css
+16
-1
16 additions, 1 deletion
stylesheets/stylesheet.css
templates/base.html
+1
-0
1 addition, 0 deletions
templates/base.html
templates/helpers.html
+6
-3
6 additions, 3 deletions
templates/helpers.html
with
38 additions
and
4 deletions
javascript/navbar.js
0 → 100644
+
15
−
0
View file @
4dcfae8c
var
showhide
=
document
.
getElementById
(
'
showhide
'
)
showhide
.
style
.
cursor
=
'
pointer
'
var
leftnav
=
document
.
getElementById
(
'
left-nav
'
)
var
rightnav
=
document
.
getElementById
(
'
right-nav
'
)
showhide
.
onclick
=
function
()
{
if
((
leftnav
.
style
.
display
==
"
none
"
)
||
(
leftnav
.
style
.
display
==
""
))
{
leftnav
.
style
.
display
=
"
inline
"
rightnav
.
style
.
display
=
"
inline
"
}
else
{
leftnav
.
style
.
display
=
"
none
"
;
rightnav
.
style
.
display
=
"
none
"
;
}
};
\ No newline at end of file
This diff is collapsed.
Click to expand it.
stylesheets/stylesheet.css
+
16
−
1
View file @
4dcfae8c
...
...
@@ -138,6 +138,17 @@ h1, h2, h3, h4, h5, h6 {
text-decoration
:
none
;
}
.navbutton
{
display
:
none
;
width
:
100%
;
}
.navbutton
i
{
float
:
right
;
padding
:
1em
;
color
:
white
;
}
/* We only want a border on all but the last element to act as a separator */
.rightborder
{
border-right
:
1px
solid
white
;
...
...
@@ -170,12 +181,16 @@ h1, h2, h3, h4, h5, h6 {
max-height
:
15%
;
}
/* Media Queries */
@media
screen
and
(
max-width
:
768px
)
{
.navbutton
{
display
:
block
;
}
.left-nav
,
.right-nav
{
width
:
100%
;
display
:
none
;
}
.left-nav
ul
,
.right-nav
ul
{
...
...
This diff is collapsed.
Click to expand it.
templates/base.html
+
1
−
0
View file @
4dcfae8c
...
...
@@ -16,6 +16,7 @@
<body>
{% block content %}{% endblock %}
{% block js %}{% endblock %}
<script
src=
"navbar.js"
></script>
</body>
</html>
...
...
This diff is collapsed.
Click to expand it.
templates/helpers.html
+
6
−
3
View file @
4dcfae8c
...
...
@@ -17,7 +17,10 @@
link is simply the link to the codebase (this is stored in a data file rather than the template).
#}
<div
class=
'nav mono'
>
<div
class=
'left-nav'
>
<div
class=
"navbutton"
id=
"showhide"
>
<i
class=
"fa fa-bars"
aria-hidden=
"true"
></i>
</div>
<div
class=
"left-nav"
id=
"left-nav"
>
<ul>
{% for item in items %}
<li
class=
"{{ item[2] }}"
>
...
...
@@ -29,9 +32,9 @@
</ul>
</div>
<div
class=
'
right-nav
'
>
<div
class=
"right-nav"
id=
"
right-nav
"
>
<ul>
<li
class=
'
btn-orange code
'
>
<li
class=
"
btn-orange code
"
>
<a
href=
"{{ link }}"
><i
class=
"fa fa-gitlab"
aria-hidden=
"true"
></i>
Code
</a>
</li>
</ul>
...
...
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