Skip to content

Commit 607a36d

Browse files
committed
docs: formattings
1 parent 91b27c7 commit 607a36d

File tree

2 files changed

+100
-55
lines changed

2 files changed

+100
-55
lines changed

scratch_tasks.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
## 1.5 - Create Employer and Job Templates
2+
3+
@pytest.mark.detail-templates In the root of the `templates` folder, create two files one called `employer.html` and the other called `job.html`.
4+
5+
## 1.6 - Create Detail Routes
6+
7+
@pytest.mark.app-create-detail-routes We need routes for individual employers and jobs. In `app.py` create two functions one called `employer` and the other called `job`. Add route decorators to bind these functions with the appropriate URLs:
8+
- `/employer` to the `employer` function
9+
- `/job` to the `job `function.
10+
11+
In the body of each function return a call to `render_template()` passing the appropriate template.
12+
13+
14+
## 2.3 - Create Template Files
15+
16+
@pytest.mark.create-template-files We need to create some additional template files. In the `templates` folder create the following files:
17+
- `_job.html`
18+
- `job.html`
19+
- `employer.html`
20+
- `review.html`
21+
22+
Next, create a new folder called `admin` in the `templates` folder, then create the following files:
23+
- `index.html`
24+
- `create.html`
25+
26+
## 2.4 - Template Files HTML
27+
@pytest.mark.template-files-html Locate the `templates.html` file in the root of the project. To prevent having to write all HTML from scratch the HTML structure of several of the template files is given here. Each block has a comment that describes what HTML file, the HTML block, needs to be copied too. Copy each block to the correct file.
28+
29+
## 2.5 - Extend Base Layout
30+
31+
@pytest.mark.extend-base-layout Each of the files listed below needs to extend the base layout. This can be done by adding an `extends` directive with `{% %}` template syntax to the top of each file.
32+
33+
- `job.html`
34+
- `employer.html`
35+
- `review.html`
36+
- `admin/index.html`
37+
- `admin/create.html`
38+
39+
## 2.6 - Navigation
40+
41+
@pytest.mark.navigation We want to allow the user to navigate to the admin from the front page. In the `index.html` template file create a link to the main admin page by creating an `<a>` tag nested in the `<div>` with the two classes `columns` and `is-one-fifth`. The `<a>` tag should have an `href` with the value `/admin` and the classes `button`, `is-info`, and `is-pulled-right`. In the admin we allow the user to create a new job. In the `admin/index.html` template file create a link to the new job form by creating an `<a>` tag nested in the `<div>` with the two classes `columns` and `is-one-fifth`. The `<a>` tag should have an `href` with the value `/admin/create` and the classes `button`, `is-info`, and `is-pulled-right`.

0 commit comments

Comments
 (0)