From e990c70014b141e16d24fa86d1869c251eab7d95 Mon Sep 17 00:00:00 2001 From: jakobsn Date: Thu, 7 Nov 2019 12:53:38 +0100 Subject: [PATCH] checkpoint rework --- src/app/static/stylesheet.css | 12 ++++++------ src/app/templates/index.html | 6 +++--- src/app/views/index.py | 4 ++-- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/app/static/stylesheet.css b/src/app/static/stylesheet.css index 4bff02b..0bd389f 100644 --- a/src/app/static/stylesheet.css +++ b/src/app/static/stylesheet.css @@ -9,22 +9,22 @@ body { margin: auto; } -.categories { +.projects { display: flex; /* or inline-flex */ flex-direction: row; } -.category { - margin: auto; +.projects * { + margin: auto; } -.projects { +.categories { display: flex; /* or inline-flex */ flex-direction: row; } -.projects * { - margin: auto; +.categories * { + margin: auto; } h1 { diff --git a/src/app/templates/index.html b/src/app/templates/index.html index ffc65bd..c6d7134 100644 --- a/src/app/templates/index.html +++ b/src/app/templates/index.html @@ -1,4 +1,4 @@ -$def with (nav, categories, projects) +$def with (nav, categories, open_projects) Beelance2 @@ -13,13 +13,13 @@ $def with (nav, categories, projects)

Open Projects:

-
+
$for category in categories:
$category[1]
- $for project in projects: + $for project in open_projects:

$project[3]

$project[4]

diff --git a/src/app/views/index.py b/src/app/views/index.py index 7b48187..d7ccf95 100644 --- a/src/app/views/index.py +++ b/src/app/views/index.py @@ -49,7 +49,7 @@ class Index: data = web.input(categoryid=0) projects=[] if data.categoryid != 0: - projects = get_projects_by_status_and_category(data.categoryid, "open") + open_projects = get_projects_by_status_and_category(data.categoryid, "open") nav = get_nav_bar(session) categories = get_categories() - return render.index(nav, categories, projects) + return render.index(nav, categories, open_projects)