mirror of
https://github.com/zyllian/webdog.git
synced 2025-05-10 02:26:42 -07:00
rewrite html to remove previously required html templating, resolves #4
This commit is contained in:
parent
4c6064a5a1
commit
6c31ccb9d5
4 changed files with 34 additions and 80 deletions
|
@ -19,55 +19,7 @@ all templates are given the following variables:
|
|||
|
||||
### `title`
|
||||
|
||||
the page's title. this should be rendered in the `<head>` html element like so:
|
||||
|
||||
```html
|
||||
<head>
|
||||
<title>{{ title }}</title>
|
||||
</head>
|
||||
```
|
||||
|
||||
this variable will no longer be required to set the page title before the first crates.io release.
|
||||
|
||||
### `head`
|
||||
|
||||
the page's extra head data. this should be rendered in the `<head>` html element like so:
|
||||
|
||||
```html
|
||||
<head>
|
||||
{{ head | safe }}
|
||||
</head>
|
||||
```
|
||||
|
||||
this variable will be removed before the first crates.io release.
|
||||
|
||||
### `scripts`
|
||||
|
||||
the page's extra scripts. this should be rendered in the `<head>` html element like so:
|
||||
|
||||
```html
|
||||
<head>
|
||||
{% for script in scripts %}
|
||||
<script type="text/javascript" src="{{script}}" defer></script>
|
||||
{% endfor %}
|
||||
</head>
|
||||
```
|
||||
|
||||
this variable will be removed before the first crates.io release.
|
||||
|
||||
### `styles`
|
||||
|
||||
the page's extra stylesheets. this should be rendered in the `<head>` html element like so:
|
||||
|
||||
```html
|
||||
<head>
|
||||
{% for style in styles %}
|
||||
<link rel="stylesheet" href="/styles/{{style}}" />
|
||||
{% endfor %}
|
||||
</head>
|
||||
```
|
||||
|
||||
this variable will be removed before the first crates.io release.
|
||||
the page's full title, as shown in the browser tab.
|
||||
|
||||
### `page`
|
||||
|
||||
|
|
|
@ -5,14 +5,6 @@
|
|||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta name="referrer" content="no-referrer">
|
||||
<link rel="stylesheet" href="/styles/index.css">
|
||||
<title>{{ title }}</title>
|
||||
{{ head | safe }}
|
||||
{% for script in scripts %}
|
||||
<script type="text/javascript" src="{{script}}" defer></script>
|
||||
{% endfor %}
|
||||
{% for style in styles %}
|
||||
<link rel="stylesheet" href="/styles/{{style}}">
|
||||
{% endfor %}
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue