HTML development for the proposal overview page

This commit is contained in:
Sander Ferdinand 2018-08-18 23:41:31 +02:00
parent e839934dd3
commit 0c9c0cd5a5
7 changed files with 61 additions and 19 deletions

View File

@ -210,7 +210,8 @@ def proposals(status, page, cat):
proposals = { proposals = {
'proposed': Proposal.find_by_args(status=1, limit=10), 'proposed': Proposal.find_by_args(status=1, limit=10),
'funding': Proposal.find_by_args(status=2, limit=10), 'funding': Proposal.find_by_args(status=2, limit=10),
'wip': Proposal.find_by_args(status=3, limit=5)} 'wip': Proposal.find_by_args(status=3, limit=10),
'completed': Proposal.find_by_args(status=4, limit=10)}
return make_response(render_template('proposal/overview.html', proposals=proposals)) return make_response(render_template('proposal/overview.html', proposals=proposals))
try: try:

View File

@ -136,7 +136,7 @@ body {
.table th, .table td { .table th, .table td {
border-top: 1px solid #008926; border-top: 1px solid #008926;
padding-top: .4rem; padding-top: .3rem;
} }
.table-tilted{ .table-tilted{
@ -167,6 +167,15 @@ body {
.table thead th { .table thead th {
border-bottom: 1px solid #008926 !important; border-bottom: 1px solid #008926 !important;
border-top: none; border-top: none;
font-size: 14px;
}
.table tbody td.date {
max-width: 100px;
}
.table tbody td.user {
font-size: 14px;
} }
.table tbody td{ .table tbody td{
@ -321,7 +330,7 @@ nav .nav-link .active{
} }
#point-wow-left{ #point-wow-left{
float: right; display: inline;
} }
@media only screen and (max-width: 600px) { @media only screen and (max-width: 600px) {
@ -551,3 +560,19 @@ ul.b {
src: local('Roboto'), local('Roboto-Regular'), url(/static/fonts/roboto-7.woff2) format('woff2'); src: local('Roboto'), local('Roboto-Regular'), url(/static/fonts/roboto-7.woff2) format('woff2');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
} }
.proposal-overview .table-proposal[data-status="4"] {
opacity: 0.4;
}
.proposal-overview .table-proposal[data-status="4"] thead th {
border-bottom: 1px solid #4b4b4b !important;
}
.proposal-overview .table-proposal[data-status="4"] td {
border-top: 1px solid #4b4b4b;
}
.proposal-overview .table-proposal[data-status="4"], .proposal-overview .table-proposal[data-status="4"] a {
color: #4b4b4b;
}

View File

@ -1,4 +1,4 @@
<div class="col-lg-8" style="padding-bottom: 0px;"> <div class="col-lg-8" style="padding-bottom: 0px; display:none;">
<div class="row"> <div class="row">
<div class="form-group" style="text-align: center;"> <div class="form-group" style="text-align: center;">
<div> <div>

View File

@ -1,8 +1,8 @@
{% macro proposal_table(title, _proposals) %} {% macro proposal_table(title, status, _proposals) %}
<table class="table table-proposal table-hover" style="margin-bottom:6px;"> <table class="table table-proposal table-hover" data-status="{{ status }}" style="margin-bottom:6px;">
<thead> <thead>
<tr> <tr>
<th style="font-size: x-large;">{{title}}</th> <th style="font-size: 20px;">{{title}}</th>
<th>Username</th> <th>Username</th>
<th id="date">Date</th> <th id="date">Date</th>
{% if _proposals and _proposals[0].status >= 2 %} {% if _proposals and _proposals[0].status >= 2 %}
@ -18,10 +18,10 @@
<tbody> <tbody>
{% for p in _proposals %} {% for p in _proposals %}
<tr> <tr>
<td><b><a href="/proposal/{{ p.id }}">{{ p.headline }}</a></b></td> <td class="id"><b><a href="/proposal/{{ p.id }}">{{ p.headline }}</a></b></td>
<td><a href="/user/{{ p.user.username }}">{{ p.user.username }}</a></td> <td class="user"><a href="/user/{{ p.user.username }}">{{ p.user.username }}</a></td>
<td id="date"><small>{{ p.date_added.strftime('%Y-%m-%d %H:%M') }}</small></td> <td class="date"><small>{{ p.date_added.strftime('%Y-%m-%d %H:%M') }}</small></td>
<td> <td class="funds">
<span style="float:right;"> <span style="float:right;">
{% if p.funds_progress >= 0.1 and p.status >= 2 %} {% if p.funds_progress >= 0.1 and p.status >= 2 %}
{{p.funds_progress|int}}% {{p.funds_progress|int}}%

View File

@ -2,7 +2,7 @@
{% block content %} {% block content %}
{% from 'proposal/macros/table.html' import proposal_table %} {% from 'proposal/macros/table.html' import proposal_table %}
<div class="container" style="margin-top:8px;"> <div class="container proposal-overview" style="margin-top:25px;">
{% include 'proposal/macros/navbar.html' %} {% include 'proposal/macros/navbar.html' %}
<div class="row"> <div class="row">
@ -10,23 +10,32 @@
<div class="row"> <div class="row">
<div class="col-lg-12"> <div class="col-lg-12">
{% if proposals['proposed'] %} {% if proposals['proposed'] %}
{{ proposal_table(title='Proposals', _proposals=proposals['proposed']) }} {{ proposal_table(title='Proposals', status=1, _proposals=proposals['proposed']) }}
<hr> <br>
{% endif %} {% endif %}
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<div class="col-lg-12"> <div class="col-lg-12">
{% if proposals['funding'] %} {% if proposals['funding'] %}
{{ proposal_table(title='Funding required', _proposals=proposals['funding']) }} {{ proposal_table(title='Funding required', status=2, _proposals=proposals['funding']) }}
<hr> <br>
{% endif %} {% endif %}
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<div class="col-lg-12"> <div class="col-lg-12">
{% if proposals['wip'] %} {% if proposals['wip'] %}
{{ proposal_table(title='WIP / Help needed', _proposals=proposals['wip']) }} {{ proposal_table(title='WIP / Help needed', status=3, _proposals=proposals['wip']) }}
<br>
{% endif %}
</div>
</div>
<div class="row">
<div class="col-lg-12">
{% if proposals['completed'] %}
{{ proposal_table(title='Completed', status=4, _proposals=proposals['completed']) }}
<br>
{% endif %} {% endif %}
</div> </div>
</div> </div>

View File

@ -9,7 +9,14 @@
<!-- Post Content Column --> <!-- Post Content Column -->
<div class="col-lg-12"> <div class="col-lg-12">
<!-- Title --> <!-- Title -->
<h1 class="mt-4" style="margin-bottom: 0.1rem;">{{ proposal.headline }}</h1> <h1 class="mt-4" style="margin-bottom: 0.1rem;">
{{ proposal.headline }}
<div id="point-wow-left">
<img src="/static/point-left.png" style="margin-left: 10px;width: 60px;">
<span style="color: #fc4dff;font-size: 16px;font-style: italic;font-weight: bold;margin-left: 6px;">wow</span>
</div>
</h1>
<p> <p>
<span style="color:grey;"> <span style="color:grey;">

View File

@ -8,7 +8,7 @@
<div class="row"> <div class="row">
<div class="col-lg-8"> <div class="col-lg-8">
{% if proposals %} {% if proposals %}
{{ proposal_table(title='', _proposals=proposals) }} {{ proposal_table(title='', status=status, _proposals=proposals) }}
{% else %} {% else %}
No proposals here yet. No proposals here yet.
{% endif %} {% endif %}