Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Fukász Rómeó Ervin
/
cloud
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
3fdecc2a
authored
Jul 10, 2014
by
Kálmán Viktor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dashboard: create a base template html
parent
a245f33d
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
367 additions
and
143 deletions
+367
-143
circle/dashboard/static/template.css
+221
-0
circle/dashboard/templates/base.html
+48
-57
circle/dashboard/templates/dashboard/base.html
+57
-0
circle/network/templates/network/base.html
+41
-86
No files found.
circle/dashboard/static/template.css
0 → 100644
View file @
3fdecc2a
/* Move down content because we have a fixed navbar that is 50px tall */
body
{
padding-top
:
50px
;
padding-bottom
:
20px
;
margin-bottom
:
30px
;
/* sticky footer */
}
html
{
position
:
relative
;
min-height
:
100%
;
}
/* Set widths on the navbar form inputs since otherwise they're 100% wide */
.navbar-form
input
[
type
=
"text"
],
.navbar-form
input
[
type
=
"password"
]
{
width
:
180px
;
}
/* Wrapping element */
/* Set some basic padding to keep content from hitting the edges */
.body-content
{
padding-left
:
15px
;
padding-right
:
15px
;
}
/* values for 45px tall navbar */
.navbar
{
min-height
:
45px
;
}
.navbar-brand
{
height
:
45px
;
padding
:
12.5px
12.5px
;
}
.navbar-toggle
{
margin-top
:
5.5px
;
margin-bottom
:
5.5px
;
}
.navbar-form
{
margin-top
:
5.5px
;
margin-bottom
:
5.5px
;
}
.navbar-btn
{
margin-top
:
5.5px
;
margin-bottom
:
5.5px
;
}
.navbar-btn.btn-sm
{
margin-top
:
7.5px
;
margin-bottom
:
7.5px
;
}
.navbar-btn.btn-xs
{
margin-top
:
11.5px
;
margin-bottom
:
11.5px
;
}
.navbar-text
{
margin-top
:
12.5px
;
margin-bottom
:
12.5px
;
}
/* --- */
/* Responsive: Portrait tablets and up */
@media
screen
and
(
min-width
:
768px
)
{
/* Let the jumbotron breathe */
.container
>
:first-child
{
margin-top
:
20px
;
}
/* Remove padding from wrapping element since we kick in the grid classes here */
.body-content
{
padding
:
0
;
}
.navbar-nav
>
li
>
a
{
padding-top
:
12.5px
;
padding-bottom
:
12.5px
;
}
}
.no-margin
{
margin
:
0
!important
;
}
.list-group
.list-group-footer
{
padding-top
:
5px
;
padding-bottom
:
5px
;
}
.big
{
font-size
:
2em
;
}
.bigbig
{
font-size
:
3em
;
}
/* small buttons for tags, copied from Bootstraps input-sm, bnt-sm */
.btn-tags
,
.btn-traits
{
padding
:
3px
6px
;
font-size
:
11px
;
line-height
:
1.5
;
border-radius
:
3px
;
}
.input-tags
,
.input-tratis
{
height
:
22px
;
padding
:
2px
8px
;
font-size
:
11px
;
line-height
:
1.5
;
border-radius
:
3px
;
}
/* font awesome font */
.font-awesome-font
{
font-family
:
"FontAwesome"
;
}
.nojs-dropdown-menu
{
position
:
absolute
;
display
:
none
;
z-index
:
1
;
}
.nojs-dropdown-toggle
:focus
+
.nojs-dropdown-menu
{
display
:
block
;
}
.nojs-dropdown-toggle
:focus
{
outline
:
none
;
}
.nojs-dropdown-menu
:hover
{
display
:
block
;
}
.notification-messages
{
padding
:
10px
8px
;
width
:
350px
;
}
.notification-message
{
margin-bottom
:
10px
;
padding
:
0
0
4px
0
;
border-bottom
:
1px
dotted
#D3D3D3
;
}
.notification-messages
.notification-message
:last-child
{
margin-bottom
:
0px
;
padding
:
0px
;
border-bottom
:
none
;
}
.notification-message-text
{
padding
:
8px
15px
;
display
:
none
;
}
.notification-message
.notification-message-subject
{
cursor
:
pointer
;
}
/* footer */
footer
{
position
:
absolute
;
bottom
:
0
;
width
:
100%
;
/* Set the fixed height of the footer here */
height
:
30px
;
background-color
:
#101010
;
color
:
white
;
font-size
:
13px
;
padding
:
5px
5px
0
5px
;
box-shadow
:
0
0
30px
rgba
(
0
,
0
,
0
,
0.4
);
text-align
:
center
;
}
footer
a
,
footer
a
:hover
,
footer
a
:visited
{
color
:
white
;
text-decoration
:
underline
;
}
.table-sorting
{
display
:
none
;
}
#notifications-button
{
margin
:
0
;
}
/* 2px border bottom for all bootstrap tables */
.table
thead
>
tr
>
th
{
border-bottom
:
1px
;
}
.badge-pulse
{
-webkit-animation-name
:
'pulse_animation'
;
-webkit-animation-duration
:
1000ms
;
-webkit-transform-origin
:
70%
70%
;
-webkit-animation-iteration-count
:
infinite
;
-webkit-animation-timing-function
:
linear
;
}
@-webkit-keyframes
pulse_animation
{
0
%
{
-webkit-transform
:
scale
(
1
);
}
30
%
{
-webkit-transform
:
scale
(
1
);
}
40
%
{
-webkit-transform
:
scale
(
1.18
);
}
50
%
{
-webkit-transform
:
scale
(
1
);
}
60
%
{
-webkit-transform
:
scale
(
1
);
}
70
%
{
-webkit-transform
:
scale
(
1.08
);
}
80
%
{
-webkit-transform
:
scale
(
1
);
}
100
%
{
-webkit-transform
:
scale
(
1
);
}
}
.btn-toolbar
{
margin-bottom
:
5px
;
}
circle/dashboard/templates/base.html
View file @
3fdecc2a
{% load i18n %}
<!DOCTYPE html>
{% load i18n %}
<!DOCTYPE html>
<html
lang=
"{{lang}}"
>
<head>
<meta
charset=
"utf-8"
>
...
...
@@ -9,83 +10,73 @@
<title>
{% block title %}{% block title-page %}{% endblock %} | {% block title-site %}CIRCLE{% endblock %}{% endblock %}
</title>
<script
src=
"//code.jquery.com/jquery-1.11.1.min.js"
></script>
<link
rel=
"stylesheet"
href=
"//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css"
>
<script
src=
"//netdna.bootstrapcdn.com/bootstrap/3.0.0/js/bootstrap.min.js"
></script>
<link
rel=
"stylesheet"
href=
"//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap-theme.min.css"
>
<link
href=
"//netdna.bootstrapcdn.com/font-awesome/3.2.1/css/font-awesome.css"
rel=
"stylesheet"
>
<script
src=
"{{ STATIC_URL }}dashboard/js/jquery.knob.js"
></script>
<script
src=
"{{ STATIC_URL}}dashboard/bootstrap-slider/bootstrap-slider.js"
></script>
<link
rel=
"stylesheet"
href=
"{{ STATIC_URL }}dashboard/bootstrap-slider/slider.css"
/>
<link
href=
"{{ STATIC_URL }}dashboard/bootstrap-tour.min.css"
rel=
"stylesheet"
>
<link
href=
"{{ STATIC_URL }}dashboard/dashboard.css"
rel=
"stylesheet"
>
<script
src=
"{{ STATIC_URL }}dashboard/dashboard.js"
></script>
<script
src=
"{{ STATIC_URL }}jsi18n/{{ LANGUAGE_CODE }}/djangojs.js"
></script>
<link
rel=
"stylesheet"
href=
"{{ STATIC_URL }}/template.css"
>
<!-- HTML5 shim, for IE6-8 support of HTML5 elements -->
<!--[if lt IE 9]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
{% block extra_link %}{% endblock %}
{% block extra_css %}{% endblock %}
</head>
<body>
<div
class=
"navbar navbar-inverse navbar-fixed-top"
>
<div
class=
"navbar-header"
>
<a
class=
"navbar-brand"
href=
"{% url "
dashboard
.
index
"
%}"
style=
"padding: 10px 15px;"
>
<img
src=
"{{ STATIC_URL}}dashboard/img/logo.png"
style=
"height: 25px;"
/>
</a>
<button
type=
"button"
class=
"navbar-toggle"
data-toggle=
"collapse"
data-target=
".navbar-collapse"
>
<span
class=
"icon-bar"
></span>
<span
class=
"icon-bar"
></span>
<span
class=
"icon-bar"
></span>
</button>
</div>
<!-- .navbar-header -->
<div
class=
"collapse navbar-collapse"
>
<ul
class=
"nav navbar-nav pull-right"
>
<li
class=
"dropdown"
id=
"notification-button"
>
<a
href=
"{% url "
dashboard
.
views
.
notifications
"
%}"
style=
"color: white; font-size: 12px;"
class=
"dropdown-toggle"
data-toggle=
"dropdown"
>
{% trans "Notifications" %}{% if NEW_NOTIFICATIONS_COUNT > 0 %}
<span
class=
"badge badge-pulse"
>
{{ NEW_NOTIFICATIONS_COUNT }}
</span>
{% endif %}
</a>
<ul
class=
"dropdown-menu notification-messages"
>
<li>
{% trans "Loading..." %}
</li>
</ul>
</li>
</ul>
{% if user.is_authenticated and user.pk %}
<a
class=
"navbar-brand pull-right"
href=
"{% url "
logout
"
%}?
next=
{%
url
"
login
"
%}"
style=
"color: white; font-size: 10px;"
><i
class=
"icon-signout icon-sign-out"
></i>
{% trans "Log out" %}
</a>
<a
class=
"navbar-brand pull-right"
href=
"{% url "
dashboard
.
views
.
profile-preferences
"
%}"
title=
"{% trans "
User
profile
"
%}"
style=
"color: white; font-size: 10px;"
>
<i
class=
"icon-user"
></i>
{% include "dashboard/_display-name.html" with user=user show_org=True %}
</a>
{% if user.is_superuser %}
<a
class=
"navbar-brand pull-right"
href=
"/network/"
style=
"color: white; font-size: 10px;"
><i
class=
"icon-globe"
></i>
{% trans "Network" %}
</a>
<a
class=
"navbar-brand pull-right"
href=
"/admin/"
style=
"color: white; font-size: 10px;"
><i
class=
"icon-cogs"
></i>
{% trans "Admin" %}
</a>
{% endif %}
{% else %}
<a
class=
"navbar-brand pull-right"
href=
"{% url "
login
"
%}?
next=
{%
url
"
dashboard
.
index
"
%}"
style=
"color: white; font-size: 10px;"
><i
class=
"icon-sign-in"
></i>
{% trans "Log in " %}
</a>
{% endif %}
</div>
<!-- .collapse .navbar-collapse -->
<div
class=
"navbar-header"
>
{% block navbar-brand %}{% endblock %}
<button
type=
"button"
class=
"navbar-toggle"
data-toggle=
"collapse"
data-target=
".navbar-collapse"
>
<span
class=
"icon-bar"
></span>
<span
class=
"icon-bar"
></span>
<span
class=
"icon-bar"
></span>
</button>
</div>
<!-- .navbar-header -->
<div
class=
"collapse navbar-collapse"
>
{% block navbar %}{% endblock %}
</div>
<!-- .collapse .navbar-collapse -->
</div>
<!-- navbar navbar-inverse navbar-fixed-top -->
<div
class=
"container"
>
{% block messages %}
<div
class=
"messagelist"
>
{% if messages %}
{% for message in messages %}
<div
class=
"alert
{% if message.tags %} alert-{% if message.tags == "
error
"
%}
danger
{%
else
%}{{
message
.
tags
}}{%
endif
%}{%
endif
%}"
>
<div
class=
"messagelist"
>
{% if messages %}
{% for message in messages %}
<div
class=
"alert
{% if message.tags %} alert-{% if message.tags == "
error
"
%}
danger
{%
else
%}{{
message
.
tags
}}{%
endif
%}{%
endif
%}"
>
{{ message|safe }}
</div>
{% endfor %}
{% endif %}
</div>
{% endfor %}
{% endif %}
</div>
{% endblock messages %}
{% block content %}
<h1
class=
"alert alert-error"
>
Please override "content" block.
</h1>
{% endblock %}
</div>
<!-- /container -->
<footer>
<a
href=
"#"
>
{% trans "Legal notice" %}
</a>
|
<a
href=
"#"
>
{% trans "Policy" %}
</a>
|
<a
href=
"#"
>
{% trans "Help" %}
</a>
|
<a
href=
"#"
>
{% trans "Legal notice" %}
</a>
|
<a
href=
"#"
>
{% trans "Policy" %}
</a>
|
<a
href=
"#"
>
{% trans "Help" %}
</a>
|
<a
href=
"#"
>
{% trans "Support" %}
</a>
<span
class=
"pull-right"
>
{{ COMPANY_NAME }}
</span>
</footer>
</body>
{% block extra_js %}
{% endblock %}
<script
src=
"//code.jquery.com/jquery-1.11.1.min.js"
></script>
<script
src=
"//netdna.bootstrapcdn.com/bootstrap/3.0.0/js/bootstrap.min.js"
></script>
<script
src=
"{{ STATIC_URL }}jsi18n/{{ LANGUAGE_CODE }}/djangojs.js"
></script>
{% block extra_script %}
{% endblock %}
{% block extra_js %}
{% endblock %}
{% block extra_etc %}
{% endblock %}
</html>
circle/dashboard/templates/dashboard/base.html
View file @
3fdecc2a
...
...
@@ -2,3 +2,60 @@
{% load i18n %}
{% block title-site %}Dashboard | CIRCLE{% endblock %}
{% block extra_link %}
<link
rel=
"stylesheet"
href=
"{{ STATIC_URL }}dashboard/bootstrap-slider/slider.css"
/>
<link
href=
"{{ STATIC_URL }}dashboard/bootstrap-tour.min.css"
rel=
"stylesheet"
>
<link
href=
"{{ STATIC_URL }}dashboard/dashboard.css"
rel=
"stylesheet"
>
{% endblock %}
{% block navbar-brand %}
<a
class=
"navbar-brand"
href=
"{% url "
dashboard
.
index
"
%}"
style=
"padding: 10px 15px;"
>
<img
src=
"{{ STATIC_URL}}dashboard/img/logo.png"
style=
"height: 25px;"
/>
</a>
{% endblock %}
{% block navbar %}
<ul
class=
"nav navbar-nav pull-right"
>
<li
class=
"dropdown"
id=
"notification-button"
>
<a
href=
"{% url "
dashboard
.
views
.
notifications
"
%}"
style=
"color: white; font-size: 12px;"
class=
"dropdown-toggle"
data-toggle=
"dropdown"
>
{% trans "Notifications" %}
{% if NEW_NOTIFICATIONS_COUNT > 0 %}
<span
class=
"badge badge-pulse"
>
{{ NEW_NOTIFICATIONS_COUNT }}
</span>
{% endif %}
</a>
<ul
class=
"dropdown-menu notification-messages"
>
<li>
{% trans "Loading..." %}
</li>
</ul>
</li>
</ul>
{% if user.is_authenticated and user.pk %}
<a
class=
"navbar-brand pull-right"
href=
"{% url "
logout
"
%}?
next=
{%
url
"
login
"
%}"
style=
"color: white; font-size: 10px;"
>
<i
class=
"icon-signout icon-sign-out"
></i>
{% trans "Log out" %}
</a>
<a
class=
"navbar-brand pull-right"
href=
"{% url "
dashboard
.
views
.
profile-preferences
"
%}"
title=
"{% trans "
User
profile
"
%}"
style=
"color: white; font-size: 10px;"
>
<i
class=
"icon-user"
></i>
{% include "dashboard/_display-name.html" with user=user show_org=True %}
</a>
{% if user.is_superuser %}
<a
class=
"navbar-brand pull-right"
href=
"/network/"
style=
"color: white; font-size: 10px;"
><i
class=
"icon-globe"
></i>
{% trans "Network" %}
</a>
<a
class=
"navbar-brand pull-right"
href=
"/admin/"
style=
"color: white; font-size: 10px;"
><i
class=
"icon-cogs"
></i>
{% trans "Admin" %}
</a>
{% endif %}
{% else %}
<a
class=
"navbar-brand pull-right"
href=
"{% url "
login
"
%}?
next=
{%
url
"
dashboard
.
index
"
%}"
style=
"color: white; font-size: 10px;"
><i
class=
"icon-sign-in"
></i>
{% trans "Log in " %}
</a>
{% endif %}
{% endblock %}
{% block extra_script %}
<script
src=
"{{ STATIC_URL }}dashboard/js/jquery.knob.js"
></script>
<script
src=
"{{ STATIC_URL}}dashboard/bootstrap-slider/bootstrap-slider.js"
></script>
<script
src=
"{{ STATIC_URL }}dashboard/dashboard.js"
></script>
{% endblock %}
circle/network/templates/network/base.html
View file @
3fdecc2a
{% extends "base.html" %}
{% load i18n %}
{% load l10n %}
{% load staticfiles %}
{% get_current_language as lang %}
<!DOCTYPE html>
<html
lang=
"{{lang}}"
>
<head>
<meta
charset=
"utf-8"
>
<title>
{% block title %}Firewall GUI{% endblock %}
</title>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1.0"
>
<link
href=
'//fonts.googleapis.com/css?family=Source+Sans+Pro:200,400&subset=latin,latin-ext'
rel=
'stylesheet'
type=
'text/css'
>
<link
rel=
"stylesheet"
href=
"//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css"
>
<link
rel=
"stylesheet"
href=
"//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap-theme.min.css"
>
<link
href=
"//netdna.bootstrapcdn.com/font-awesome/3.2.1/css/font-awesome.css"
rel=
"stylesheet"
/>
<link
href=
"{% static "
network
/
network
.
css
"
%}"
rel=
"stylesheet"
>
<style
type=
"text/css"
>
body
{
padding-top
:
40px
;
}
/* note: this doesn't really work */
a
i
:hover
{
text-decoration
:
none
;
}
{% block extra_link %}
<link
href=
'//fonts.googleapis.com/css?family=Source+Sans+Pro:200,400&subset=latin,latin-ext'
rel=
'stylesheet'
type=
'text/css'
>
<link
href=
"{% static "
network
/
network
.
css
"
%}"
rel=
"stylesheet"
>
{% endblock %
}
footer
{
margin-top
:
45px
;
}
{% block extra_css %}
<style
type=
"text/css"
>
body
{
padding-top
:
40px
;
}
.messagelist
{
margin-top
:
25px
;
}
</style>
/* note: this doesn't really work */
a
i
:hover
{
text-decoration
:
none
;
}
<!-- HTML5 shim, for IE6-8 support of HTML5 elements -->
<!--[if lt IE 9]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
{% block extra_css %}{% endblock %}
</head>
<body>
<div
class=
"navbar navbar-inverse navbar-fixed-top"
>
<div
class=
"navbar-header"
>
<a
class=
"navbar-brand"
href=
"{% url "
network
.
index
"
%}"
>
CIRCLE Network
</a>
<button
type=
"button"
class=
"navbar-toggle"
data-toggle=
"collapse"
data-target=
".navbar-collapse"
>
<span
class=
"icon-bar"
></span>
<span
class=
"icon-bar"
></span>
<span
class=
"icon-bar"
></span>
</button>
</div>
<!-- .navbar-header -->
<div
class=
"collapse navbar-collapse"
>
<ul
class=
"nav navbar-nav"
>
{% include "network/menu.html" %}
</ul>
<a
class=
"navbar-brand pull-right"
href=
"{% url "
dashboard
.
index
"
%}"
style=
"color: white; font-size: 10px;"
><i
class=
"icon-dashboard"
></i>
{% trans "dashboard" %}
</a>
</div>
<!-- .collapse .navbar-collapse -->
</div>
<!-- navbar navbar-inverse navbar-fixed-top -->
<div
class=
"container"
>
{% block messages %}
{% if messages %}
<div
class=
"messagelist"
>
{% for message in messages %}
<div
class=
"alert
{% if message.tags %} alert-{% if message.tags == "
error
"
%}
danger
{%
else
%}{{
message
.
tags
}}{%
endif
%}{%
endif
%}"
>
{{ message }}
</div>
{% endfor %}
</div>
{% endif %}
{% endblock messages %}
{% block content %}
<div
class=
"alert-block"
>
This is an abstract base template.
</div>
{% endblock %}
</div>
<!-- .container -->
footer
{
margin-top
:
45px
;
}
<div
class=
"footer-container container"
>
<footer>
<p
class=
"pull-right"
><a
href=
"#"
>
Vissza az oldal tetejére
</a></p>
<p>
©
{{ COMPANY_NAME }}
</footer>
</div>
<!-- .footer-container .container -->
.messagelist
{
margin-top
:
25px
;
}
</style>
{% endblock %}
<script
src=
"//code.jquery.com/jquery-latest.js"
></script>
<script
src=
"{{ STATIC_URL }}jsi18n/{{ LANGUAGE_CODE }}/djangojs.js"
></script>
<script
src=
"//netdna.bootstrapcdn.com/bootstrap/3.0.0/js/bootstrap.min.js"
></script>
<script
src=
"{% static "
js
/
bootbox
.
min
.
js
"
%}"
></script>
<script
src=
"{% static "
js
/
network
.
js
"
%}"
></script>
<script>
{
%
block
extra_js
%
}
{
%
endblock
%
}
</script>
{% block extra_etc %}
{% endblock %}
</body>
</html>
{% block navbar-brand %}
<a
class=
"navbar-brand"
href=
"{% url "
network
.
index
"
%}"
>
CIRCLE Network
</a>
{% endblock %}
{% block navbar %}
<ul
class=
"nav navbar-nav"
>
{% include "network/menu.html" %}
</ul>
<a
class=
"navbar-brand pull-right"
href=
"{% url "
dashboard
.
index
"
%}"
style=
"color: white; font-size: 10px;"
>
<i
class=
"icon-dashboard"
></i>
{% trans "dashboard" %}
</a>
{% endblock %}
{% block extra_script %}
<script
src=
"{% static "
js
/
bootbox
.
min
.
js
"
%}"
></script>
<script
src=
"{% static "
js
/
network
.
js
"
%}"
></script>
{% endblock %}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment