Skip to content

Commit f821024

Browse files
committed
feat: styling
1 parent 30c1f44 commit f821024

File tree

7 files changed

+83
-56
lines changed

7 files changed

+83
-56
lines changed

jobs/db.sqlite3

0 Bytes
Binary file not shown.

jobs/static/css/app.css

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
.adjust-height {
2+
height: 100%;
3+
}
4+
5+
.top {
6+
margin-top: 20px;
7+
}

jobs/templates/_job.html

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,18 @@
1-
<div>
2-
<h3>
3-
<a href="{{ url_for('job', job_id=job['id']) }}">
4-
{{ job['title'] }}
5-
</a>
6-
</h3>
7-
<div class="description">
8-
<h4>
9-
<a href="{{ url_for('employer', employer_id=job['employer_id']) }}">{{ job['employer_name'] }}</a>
10-
</h4>
11-
<p>
12-
${{ job['salary'] }}<br>
13-
{{ job['description'] }}
1+
<div class="card adjust-height">
2+
<header class="card-header">
3+
<p class="card-header-title">
4+
<a href="{{ url_for('job', job_id=job['id']) }}">
5+
{{ job['title'] }}
6+
</a>
147
</p>
8+
</header>
9+
<div class="card-content">
10+
<div class="content">
11+
<p>
12+
<a href="{{ url_for('employer', employer_id=job['employer_id']) }}">{{ job['employer_name'] }}</a><br>
13+
${{ job['salary'] }}<br>
14+
{{ job['description'] }}
15+
</p>
16+
</div>
1517
</div>
1618
</div>

jobs/templates/admin/index.html

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,23 @@
11
{% extends 'layout.html' %}
22

33
{% block content %}
4+
45
<div class="columns">
56
<div class="column">
67
<h1>Jobs</h1>
78
</div>
89
<div class="column is-one-fifth">
9-
<a href="/admin/create" class="button is-info">New Job</a>
10+
<a href="/admin/create" class="button is-info is-pulled-right">New Job</a>
1011
</div>
1112
</div>
12-
13-
{% for job in jobs %}
14-
{% with job=job %}
15-
{% include "_job.html" %}
16-
{% endwith %}
17-
{% if not loop.last %}
18-
<hr>
19-
{% endif %}
20-
{% endfor %}
13+
<div class="columns is-multiline">
14+
{% for job in jobs %}
15+
<div class="column is-half">
16+
{% with job=job %}
17+
{% include "_job.html" %}
18+
{% endwith %}
19+
</div>
20+
{% endfor %}
21+
</div>
22+
2123
{% endblock %}

jobs/templates/employer.html

Lines changed: 31 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -7,34 +7,42 @@ <h1>{{ employer['name'] }}</h1>
77
<p>{{ employer['description'] }}</p>
88
</div>
99
</div>
10+
1011
<h2>Jobs</h2>
11-
{% for job in jobs %}
12-
{% with job=job %}
13-
{% include "_job.html" %}
14-
{% endwith %}
15-
{% if not loop.last %}
16-
<hr>
17-
{% endif %}
18-
{% endfor %}
12+
<div class="columns is-multiline">
13+
{% for job in jobs %}
14+
<div class="column is-half">
15+
{% with job=job %}
16+
{% include "_job.html" %}
17+
{% endwith %}
18+
</div>
19+
{% endfor %}
20+
</div>
21+
1922
<h2>Reviews</h2>
2023
{% for review in reviews %}
21-
<div>
22-
<h3>{{ review['title'] }}</h3>
23-
<div class="review">
24-
<p>{{ review['date'] }}</p>
25-
{% for _ in range(1, review['rating']): %}
26-
<span class="fa fa-star checked"></span>
27-
{% endfor %}
28-
<p>{{ review['review'] }}</p>
29-
</div>
24+
<div class="box">
25+
<article class="media">
26+
<div class="media-left">
27+
{% for _ in range(1, review['rating']): %}
28+
<span class="fa fa-star checked"></span>
29+
{% endfor %}
30+
</div>
31+
<div class="media-content">
32+
<div class="content">
33+
<p>
34+
<strong>{{ review['title'] }}</strong> <small>{{ review['status'] }} employee</small> <small>{{ review['date'] }}</small>
35+
<br>
36+
{{ review['review'] }}
37+
</p>
38+
</div>
39+
</div>
40+
</article>
3041
</div>
31-
{% if not loop.last %}
32-
<hr>
33-
{% endif %}
3442
{% endfor %}
3543
<div class="columns">
36-
<div class="column is-one-fifth">
37-
<a href="{{ url_for('review', employer_id=employer['id']) }}" class="button is-info">Create Review</a>
44+
<div class="column">
45+
<a href="{{ url_for('review', employer_id=employer['id']) }}" class="button is-info is-pulled-right">Create Review</a>
3846
</div>
3947
</div>
40-
{% endblock %}
48+
{% endblock %}

jobs/templates/index.html

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,21 @@
11
{% extends 'layout.html' %}
22

33
{% block content %}
4-
<h1>Jobs</h1>
5-
{% for job in jobs %}
6-
{% with job=job %}
7-
{% include "_job.html" %}
8-
{% endwith %}
9-
{% if not loop.last %}
10-
<hr>
11-
{% endif %}
12-
{% endfor %}
4+
<div class="columns">
5+
<div class="column">
6+
<h1>Jobs</h1>
7+
</div>
8+
<div class="column is-one-fifth">
9+
<a href="/admin" class="button is-info is-pulled-right">Admin</a>
10+
</div>
11+
</div>
12+
<div class="columns is-multiline">
13+
{% for job in jobs %}
14+
<div class="column is-half">
15+
{% with job=job %}
16+
{% include "_job.html" %}
17+
{% endwith %}
18+
</div>
19+
{% endfor %}
20+
</div>
1321
{% endblock %}

jobs/templates/layout.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
</head>
99
<body>
1010

11-
<div class="container">
11+
<div class="container top">
1212
<div class="content">
1313
{% block content %}
1414
{% endblock %}

0 commit comments

Comments
 (0)