| @@ -9,22 +9,22 @@ body { | |||||
| margin: auto; | margin: auto; | ||||
| } | } | ||||
| .categories { | |||||
| .projects { | |||||
| display: flex; /* or inline-flex */ | display: flex; /* or inline-flex */ | ||||
| flex-direction: row; | flex-direction: row; | ||||
| } | } | ||||
| .category { | |||||
| margin: auto; | |||||
| .projects * { | |||||
| margin: auto; | |||||
| } | } | ||||
| .projects { | |||||
| .categories { | |||||
| display: flex; /* or inline-flex */ | display: flex; /* or inline-flex */ | ||||
| flex-direction: row; | flex-direction: row; | ||||
| } | } | ||||
| .projects * { | |||||
| margin: auto; | |||||
| .categories * { | |||||
| margin: auto; | |||||
| } | } | ||||
| h1 { | h1 { | ||||
| @@ -1,4 +1,4 @@ | |||||
| $def with (nav, categories, projects) | |||||
| $def with (nav, categories, open_projects) | |||||
| <head> | <head> | ||||
| <title>Beelance2</title> | <title>Beelance2</title> | ||||
| @@ -13,13 +13,13 @@ $def with (nav, categories, projects) | |||||
| <h1 class="title">Open Projects:</h1> | <h1 class="title">Open Projects:</h1> | ||||
| <div id="categories"> | |||||
| <div class="categories"> | |||||
| $for category in categories: | $for category in categories: | ||||
| <div class="category" onclick="location.href='/?categoryid=$category[0]'">$category[1]</div> | <div class="category" onclick="location.href='/?categoryid=$category[0]'">$category[1]</div> | ||||
| </div> | </div> | ||||
| <div class="projects"> | <div class="projects"> | ||||
| $for project in projects: | |||||
| $for project in open_projects: | |||||
| <div class="project"><h4>$project[3]</h4><p>$project[4]</p></div> | <div class="project"><h4>$project[3]</h4><p>$project[4]</p></div> | ||||
| </div> | </div> | ||||
| @@ -49,7 +49,7 @@ class Index: | |||||
| data = web.input(categoryid=0) | data = web.input(categoryid=0) | ||||
| projects=[] | projects=[] | ||||
| if data.categoryid != 0: | 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) | nav = get_nav_bar(session) | ||||
| categories = get_categories() | categories = get_categories() | ||||
| return render.index(nav, categories, projects) | |||||
| return render.index(nav, categories, open_projects) | |||||