footer work

This commit is contained in:
deflax 2017-06-12 05:12:27 +03:00
parent abc78fdaf6
commit 3ba5d6820d
19 changed files with 126 additions and 93 deletions

View file

@ -42,7 +42,7 @@ def list_items():
@login_required @login_required
@admin_required @admin_required
def list_users(): def list_users():
allusers = User.query.order_by(User.pid.asc()).all() allusers = User.query.order_by(User.last_seen.desc()).all()
return render_template('admin/list_users.html', users=allusers) return render_template('admin/list_users.html', users=allusers)
@admin.route("/charge/<int:user_pid>", methods=['GET', 'POST']) @admin.route("/charge/<int:user_pid>", methods=['GET', 'POST'])

View file

@ -31,7 +31,7 @@ def all():
def latest(): def latest():
graph = GraphAPI(get_fb_token()) graph = GraphAPI(get_fb_token())
page_id = current_app.config['FB_PAGE_ID'] page_id = current_app.config['FB_PAGE_ID']
latest = graph.get(page_id+'/posts?limit=1&fields=id,message,created_time,link', page=True, retry=3) latest = graph.get(page_id+'/posts?limit=2&fields=id,message,created_time,link', page=True, retry=3)
posts = [] posts = []
for data in latest: for data in latest:
posts.append(data) posts.append(data)

View file

@ -17,7 +17,7 @@ body {
} }
.page_wrap { .page_wrap {
width: 1140px; width: 70%;
margin: 0 auto; margin: 0 auto;
} }
@ -30,13 +30,16 @@ body {
margin-top: 40px; margin-top: 40px;
} }
.one_four { .clear{
float: left; clear:both;
width: 210px;
margin-right: 84px;
} }
.one_four h4 { .footerblock {
max-width: 420px;
margin-right: 0px;
}
.footerblock h4 {
font-size: 18px; font-size: 18px;
color: #FFF; color: #FFF;
background: url(/static/images/footer_cols_divider.png) no-repeat bottom center; background: url(/static/images/footer_cols_divider.png) no-repeat bottom center;
@ -263,8 +266,30 @@ a:active {
border-top-right-radius: 3px; border-top-right-radius: 3px;
} }
.tooltip-inner { .rrd + .tooltip > .tooltip-inner {
max-width: 350px; background-color: #73AD21;
/* If max-width does not work, try using width instead */ color: #FFFFFF;
width: 350px; border: 1px solid green;
padding: 15px;
font-size: 20px;
}
/* Tooltip on top */
.rrd + .tooltip.top > .tooltip-arrow {
border-top: 5px solid green;
}
/* Tooltip on bottom */
.rrd + .tooltip.bottom > .tooltip-arrow {
border-bottom: 5px solid blue;
}
/* Tooltip on left */
.rrd + .tooltip.left > .tooltip-arrow {
border-left: 5px solid red;
}
/* Tooltip on right */
.rrd + .tooltip.right > .tooltip-arrow {
border-right: 5px solid black;
} }

BIN
app/static/images/fb.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 981 B

View file

@ -62,7 +62,7 @@
<td>{{ service.description }}</td> <td>{{ service.description }}</td>
<td>{{ service.price }}</td> <td>{{ service.price }}</td>
<td>{{ service.period }}</td> <td>{{ service.period }}</td>
<td>{{ moment(service.date_last_charge).fromNow() }}</td> <td>{{ moment(service.date_last_charge).format('lll') }}</td>
<td><a href="{{ url_for('admin.dashboard', user_pid=service.user_id) }}">{{ service.owner.email }}</a></td> <td><a href="{{ url_for('admin.dashboard', user_pid=service.user_id) }}">{{ service.owner.email }}</a></td>
</tr> </tr>
{% endfor %} {% endfor %}

View file

@ -29,14 +29,14 @@
<td><span class="glyphicon glyphicon-asterisk"></span></td> <td><span class="glyphicon glyphicon-asterisk"></span></td>
<td>{{ transaction.description }}</td> <td>{{ transaction.description }}</td>
<td>{{ transaction.value }} {{ transaction.currency }}</td> <td>{{ transaction.value }} {{ transaction.currency }}</td>
<td>{{ transaction.date_created.strftime('%d %b %Y - %H:%m') }}</td> <td>{{ moment(transaction.date_created).format('lll') }}</td>
<td><a href="{{ url_for('admin.transaction', user_pid=transaction.owner.pid) }}">{{ transaction.owner.email }}</a></td> <td><a href="{{ url_for('admin.transaction', user_pid=transaction.owner.pid) }}">{{ transaction.owner.email }}</a></td>
{% else %} {% else %}
<tr class="success"> <tr class="success">
<td><span class="glyphicon glyphicon-plus"></span></td> <td><span class="glyphicon glyphicon-plus"></span></td>
<td>{{ transaction.description }}</td> <td>{{ transaction.description }}</td>
<td>{{ transaction.value }} {{ transaction.currency }}</td> <td>{{ transaction.value }} {{ transaction.currency }}</td>
<td>{{ transaction.date_created.strftime('%d %b %Y - %H:%m') }}</td> <td>{{ moment(transaction.date_created).format('lll') }}</td>
<td><a href="{{ url_for('admin.transaction', user_pid=transaction.owner.pid) }}">{{ transaction.owner.email }}</a></td> <td><a href="{{ url_for('admin.transaction', user_pid=transaction.owner.pid) }}">{{ transaction.owner.email }}</a></td>
{% endif %} {% endif %}
</tr> </tr>

View file

@ -24,7 +24,7 @@
<tr> <tr>
<td>{{ usr.pid }}</td> <td>{{ usr.pid }}</td>
<td>{{ usr.email }}</td> <td>{{ usr.email }}</td>
<td>{{ moment(usr.last_seen).fromNow()}}</td> <td>{{ moment(usr.last_seen).format('lll') }}</td>
<td>{{ usr.last_ip }}</td> <td>{{ usr.last_ip }}</td>
<td><a href="{{ url_for('admin.charge', user_pid=usr.pid) }}">{{ usr.wallet }}</a></td> <td><a href="{{ url_for('admin.charge', user_pid=usr.pid) }}">{{ usr.wallet }}</a></td>
<td><a href="{{ url_for('admin.dashboard', user_pid=usr.pid) }}">Dashboard</a></td> <td><a href="{{ url_for('admin.dashboard', user_pid=usr.pid) }}">Dashboard</a></td>

View file

@ -6,11 +6,21 @@
<div class="page-header"> <div class="page-header">
<h1>Forbidden</h1> <h1>Forbidden</h1>
</div> </div>
<b>
<pre> <pre>
ooo, .---. .-------.
o` o / |\________________ / .-----. \
o` 'oooo() | ________ _ _) / / \ \
`oo o` \ |/ | | | | | | | |
`ooo' `---' "-" |_| _| |_______| |_
.' |_| |_| '.
'._____ ___ _____.'
| .'___'. |
'.__.'.' '.'.__.'
'.__ | 403 | __.'
| '.'.___.'.' |
'.____'.___.'____.'
'._______________.'
</pre> </pre>
</b>
{% endblock %} {% endblock %}

View file

@ -4,31 +4,29 @@
{% block page_content %} {% block page_content %}
<div class="page-header"> <div class="page-header">
<h1>Not Found</h1> <h1>Page Not Found</h1>
</div> </div>
<b>
<pre> <pre>
\ SORRY / %%%%
\ / %%%%-(
\ This page does / _%%%%%_/ \ ' /
] not exist yet. [ ,'| _%%%%%%%% - (_) -
] [ / | _%%%%%%%/ \% / , \
]___ ___[ ,' | %%%%%%%%%\\ \_
] ]\ /[ [ |: | %%%%%% \ \\
] ] \ / [ [ |: | ) /\_/
] ] ] [ [ [ |: | /(___. \
] ] ]__ __[ [ [ |: | '----' (
] ] ] ]\ _ /[ [ [ [ |: | / )
] ] ] ] (#) [ [ [ [ :====' ---....____/ (_____ __ _ ___ ___ __ _ _ _____ _ _ ___
] ] ]_].nHn.[_[ [ [ / )---...___ =-= = -_= -=_= _-=_-_ -=- =-_
] ] ] HHHHH. [ [ [ ,' ( ```--.._= -_= -_= _-=- -_= _=-
] ] / `HH("N \ [ [ ,-' ) ``--._=-_ =-=_-= _-= _
]__]/ HHH " \[__[ '-._ '-..___( ``-._=_-=_- =_-=
] NNN [ ``---....__) `-._-=_-_=-
] N/" [ )|)| `-._=-_
] N H [ gnv '-'-.\_ `-.
/ N \
/ q, \
/ \
</pre> </pre>
</b>
{% endblock %} {% endblock %}

View file

@ -6,6 +6,7 @@
<div class="page-header"> <div class="page-header">
<h1>Internal Server Error</h1> <h1>Internal Server Error</h1>
</div> </div>
<b>
<pre> <pre>
.--. .--. .--. .--.
_ ` \ / ` _ _ ` \ / ` _
@ -22,5 +23,5 @@
.' `. .' `.
_,' `,_ _,' `,_
</pre> </pre>
</b>
{% endblock %} {% endblock %}

View file

@ -6,11 +6,17 @@
<div class="page-header"> <div class="page-header">
<h1>{{ reason }}</h1> <h1>{{ reason }}</h1>
</div> </div>
<b>
<pre> <pre>
ooo, .---. ad8888888888ba
o` o / |\________________ dP' `"8b,
o` 'oooo() | ________ _ _) 8 ,aaa, "Y888a ,aaaa, ,aaa, ,aa,
`oo o` \ |/ | | | | 8 8' `8 "8baaaad""""baaaad""""baad""8b
`ooo' `---' "-" |_| 8 8 8 """" """" "" 8b
8 8, ,8 ,aaaaaaaaaaaaaaaaaaaaaaaaddddd88P
8 `"""' ,d8""
Yb, ,ad8" nv
"Y8888888888P"
</pre> </pre>
</b>
{% endblock %} {% endblock %}

View file

@ -1,6 +1,8 @@
<div id="footer_copyright"> <div id="footer_copyright">
<div class="page_wrap"> <div class="page_wrap">
<p class="copyright">&copy; Copyright 2015-2017 <a href="https://deflax.net">deflax.net</a>, All Rights Reserved.</p> <p class="copyright">&copy; Copyright 2017 <a href="https://deflax.net">_sys</a>, All Rights Reserved.</p>
<p class="design_by">Design by _sys</p> <p class="design_by">eof</p>
</div><!--/page wrap--> </div><!--/page wrap-->
</div><!--/footer copyright--> </div><!--/footer copyright-->

View file

@ -1,26 +1,20 @@
<div id="footer_cols"> <div id="footer_cols">
<div class="page_wrap"> <div class="page_wrap">
<div class="one_four"> <div class="footerblock" id="newsmenu" style="float: left;">
<h4>Contact Details</h4> <h4>News</h4>
<!--#include virtual="https://www.datapoint.bg/news/latest" -->
</div>
<div class="footerblock" style="float: right;" align="right">
<h4>Contact</h4>
<p>52 Volga str.<br>4002 Plovdiv, Bulgaria</p> <p>52 Volga str.<br>4002 Plovdiv, Bulgaria</p>
<p>tel: +359 (0) 32 398 295 <br /> email: <a href="mailto:office@datapoint.bg">office@datapoint.bg</a></p> <p>tel: +359 (0) 32 398 295 <br /> email: <a href="mailto:office@datapoint.bg">office@datapoint.bg</a></p>
</div><!--/one four--> <p><a href="https://www.facebook.com/datapoint.bg/" target="_blank"><img src="{{ url_for('static', filename='images/fb.png') }}"></a></p>
</div>
<div class="one_four">
<h4>Datapoint</h4> <div style="clear:both;"></div> <!-- Here we go --><div class="clear"></div>
<p>We are a dedicated team working to bring you the best hosting in the business.
We are passionate about what we do, and why we do it.<br> <a href="#">Read More…</a></p>
</div><!--/one four-->
<div class="one_four">
<h4></h4>
</div><!--/one four-->
<div class="one_four last_col" id="newsmenu">
<!--#include virtual="https://www.datapoint.bg/news/latest" -->
</div><!--/one four-->
</div><!--/page wrap--> </div><!--/page wrap-->
</div><!--/footer cols--> </div><!--/footer cols-->

View file

@ -1,4 +1,4 @@
<div class="page_wrap"> <div class="page_wrap">
<p class="copyright">&copy; Copyright 2015-2017 <a href="https://deflax.net">deflax.net</a>, All Rights Reserved.</p> <p class="copyright">&copy; Copyright 2017 <a href="https://deflax.net">_sys</a>, All Rights Reserved.</p>
<p class="design_by">Design by _sys</p> <p class="design_by"></p>
</div><!--/page wrap--> </div><!--/page wrap-->

View file

@ -20,7 +20,7 @@
<ul class="nav navbar-nav"> <ul class="nav navbar-nav">
{% if not current_user.is_authenticated %} {% if not current_user.is_authenticated %}
<li><a href="#"><span class="glyphicon glyphicon-phone"></span> +359 32 398 295</a></li> <li><a href="#"><span class="glyphicon glyphicon-phone"></span> +359 32 398 295</a></li>
{% endif %} {% endif %}
{% if current_user.is_authenticated %} {% if current_user.is_authenticated %}

View file

@ -1,8 +1,7 @@
{% block page_content %} {% block page_content %}
<h4>News</h4> <h4><a href="/news/all">News</a></h4>
{% for item in result %} {% for item in result %}
<p><a target="_blank" href="{{ item['link'] }}">{{ item['message'] }}</a></p> <p><span class="tweet_day">{{ item['created_time'] }}</span>
<span class="tweet_day">{{ item['created_time'] }}</span> <a target="_blank" href="{{ item['link'] }}">{{ item['message'] }}</a></p>
{% endfor %}<br /> {% endfor %}
<a href="/news/all">>>></a>
{% endblock %} {% endblock %}

View file

@ -2,7 +2,7 @@
<div class="panel-heading">Details</div> <div class="panel-heading">Details</div>
<div class="panel-body"> <div class="panel-body">
<p> <p>
<b>Member Since:</b> {{ moment(current_user.member_since).fromNow() }}<br /> <b>Member Since:</b> {{ moment(current_user.member_since).local().fromNow() }}<br />
<b>Group:</b> {{ current_user.group }}<br /> <b>Group:</b> {{ current_user.group }}<br />
<b>2-Factor:</b> {{ current_user.twofactor }}<br /> <b>2-Factor:</b> {{ current_user.twofactor }}<br />
<a href="/auth/change-password">Change Password</a> <a href="/auth/change-password">Change Password</a>

View file

@ -10,7 +10,7 @@ var ctx = document.getElementById("transchart").getContext('2d');
var myChart = new Chart(ctx, { var myChart = new Chart(ctx, {
type: 'line', type: 'line',
data: { data: {
labels: ["Red", "Blue", "Yellow", "Green", "Purple", "Orange"], labels: {{ labelslist }},
datasets: [{ datasets: [{
label: "History", label: "History",
data: {{ translist }}, data: {{ translist }},
@ -62,13 +62,13 @@ var myChart = new Chart(ctx, {
<td><span class="glyphicon glyphicon-plus"></span></td> <td><span class="glyphicon glyphicon-plus"></span></td>
<td>{{ transaction.description }}</td> <td>{{ transaction.description }}</td>
<td>{{ transaction.value }} {{ transaction.currency }}</td> <td>{{ transaction.value }} {{ transaction.currency }}</td>
<td>{{ transaction.date_created.strftime('%d %b %Y - %H:%m') }}</td> <td>{{ moment(transaction.date_created).format('lll') }}</td>
{% else %} {% else %}
<tr class="danger"> <tr class="danger">
<td><span class="glyphicon glyphicon-minus"></span></td> <td><span class="glyphicon glyphicon-minus"></span></td>
<td>{{ transaction.description }}</td> <td>{{ transaction.description }}</td>
<td>{{ transaction.value }} {{ transaction.currency }}</td> <td>{{ transaction.value }} {{ transaction.currency }}</td>
<td>{{ transaction.date_created.strftime('%d %b %Y - %H:%m') }}</td> <td>{{ moment(transaction.date_created).format('lll') }}</td>
{% endif %} {% endif %}
</tr> </tr>
</tbody> </tbody>
@ -82,8 +82,6 @@ var myChart = new Chart(ctx, {
</div> </div>
</div> </div>
{% endblock %} {% endblock %}

View file

@ -134,11 +134,11 @@ addEventListener("DOMContentLoaded", function() {
<tbody> <tbody>
{% for deploy in inv_deployments %} {% for deploy in inv_deployments %}
<tr> <tr>
<td data-title="Name"><a data-toggle="tooltip" title="ID# {{ deploy.machine_id }}<br />Deployment state: {{ status[deploy.machine_id] }}"><b>{% if status[deploy.machine_id] == 'running' %}<font color="green">{% else %}<font color="red">{% endif %}{{ deploy.machine_alias }}</font></b></a></td> <td data-title="Name"><a class="rrd" data-toggle="tooltip" title="ID# {{ deploy.machine_id }}<br />Deployment state: {{ status[deploy.machine_id] }}"><b>{% if status[deploy.machine_id] == 'running' %}<font color="green">{% else %}<font color="red">{% endif %}{{ deploy.machine_alias }}</font></b></a></td>
<td data-title="CPU"><a data-toggle="tooltip" title="<img src='data:image/png;base64,{{ rrd[deploy.machine_id]['cpu'] }}' />">{{ deploy.machine_cpu }} Cores</a></td> <td data-title="CPU"><a class="rrd" data-toggle="tooltip" title="<img src='data:image/png;base64,{{ rrd[deploy.machine_id]['cpu'] }}' />">{{ deploy.machine_cpu }} Cores</a></td>
<td data-title="Memory"><a data-toggle="tooltip" title="<img src='data:image/png;base64,{{ rrd[deploy.machine_id]['mem'] }}' />">{{ deploy.machine_mem }} MB</a></td> <td data-title="Memory"><a class="rrd" data-toggle="tooltip" title="<img src='data:image/png;base64,{{ rrd[deploy.machine_id]['mem'] }}' />">{{ deploy.machine_mem }} MB</a></td>
<td data-title="Disk"><a data-toggle="tooltip" title="<img src='data:image/png;base64,{{ rrd[deploy.machine_id]['hdd'] }}' />">{{ deploy.machine_hdd }} GB</a></td> <td data-title="Disk"><a class="rrd" data-toggle="tooltip" title="<img src='data:image/png;base64,{{ rrd[deploy.machine_id]['hdd'] }}' />">{{ deploy.machine_hdd }} GB</a></td>
<td data-title="Network">{% for addr in deploy.machine_addresses %}<a data-toggle="tooltip" title="<img src='data:image/png;base64,{{ rrd[deploy.machine_id]['net'] }}' />">{{ addr.ip }}</a><br />{% endfor %}</td> <td data-title="Network">{% for addr in deploy.machine_addresses %}<a class="rrd" data-toggle="tooltip" title="<img src='data:image/png;base64,{{ rrd[deploy.machine_id]['net'] }}' />">{{ addr.ip }}</a><br />{% endfor %}</td>
<td data-title="Control">{% if status[deploy.machine_id] == 'running' %} <td data-title="Control">{% if status[deploy.machine_id] == 'running' %}
<button class="confirm command command-vmshutdown btn btn-default btn-warning" value="vmshutdown" vmid="{{ deploy.machine_id }}"><span class="glyphicon glyphicon-off" aria-hidden="true"></span> Shutdown</button> <button class="confirm command command-vmshutdown btn btn-default btn-warning" value="vmshutdown" vmid="{{ deploy.machine_id }}"><span class="glyphicon glyphicon-off" aria-hidden="true"></span> Shutdown</button>
<button class="confirm command command-vmstop btn btn-default btn-danger" value="vmstop" vmid="{{ deploy.machine_id }}"><span class="glyphicon glyphicon-alert" aria-hidden="true"></span> Force Stop</button> <button class="confirm command command-vmstop btn btn-default btn-danger" value="vmstop" vmid="{{ deploy.machine_id }}"><span class="glyphicon glyphicon-alert" aria-hidden="true"></span> Force Stop</button>
@ -169,7 +169,7 @@ addEventListener("DOMContentLoaded", function() {
<th>Category</th> <th>Category</th>
<th>Description</th> <th>Description</th>
<th>Price</th> <th>Price</th>
<th>Period (In Months)</th> <th>Months</th>
<th>Last Charged</th> <th>Last Charged</th>
</tr> </tr>
<tbody> <tbody>
@ -178,8 +178,8 @@ addEventListener("DOMContentLoaded", function() {
<td data-title="Category">{{ service.category }}</td> <td data-title="Category">{{ service.category }}</td>
<td data-title="Description" >{{ service.description }}</td> <td data-title="Description" >{{ service.description }}</td>
<td data-title="Price">{{ service.price }}</td> <td data-title="Price">{{ service.price }}</td>
<td data-title="Period (In Months)">{{ service.period }}</td> <td data-title="Months">{{ service.period }}</td>
<td data-title="Last Charged">{{ moment(service.date_last_charge).fromNow() }}</td> <td data-title="Last Charged">{{ moment(service.date_last_charge).format('lll') }} ({{ moment(service.date_last_charge).fromNow() }})</td>
</tr> </tr>
{% endfor %} {% endfor %}
</tbody> </tbody>