Pārlūkot izejas kodu

checkpoint rework

https
jakobsn pirms 6 gadiem
vecāks
revīzija
e990c70014
3 mainītis faili ar 11 papildinājumiem un 11 dzēšanām
  1. +6
    -6
      src/app/static/stylesheet.css
  2. +3
    -3
      src/app/templates/index.html
  3. +2
    -2
      src/app/views/index.py

+ 6
- 6
src/app/static/stylesheet.css Parādīt failu

@@ -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 {


+ 3
- 3
src/app/templates/index.html Parādīt failu

@@ -1,4 +1,4 @@
$def with (nav, categories, projects)
$def with (nav, categories, open_projects)

<head>
<title>Beelance2</title>
@@ -13,13 +13,13 @@ $def with (nav, categories, projects)
<h1 class="title">Open Projects:</h1>
<div id="categories">
<div class="categories">
$for category in categories:
<div class="category" onclick="location.href='/?categoryid=$category[0]'">$category[1]</div>
</div>

<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>



+ 2
- 2
src/app/views/index.py Parādīt failu

@@ -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)

Notiek ielāde…
Atcelt
Saglabāt