2022-02-23 15:04:24 +00:00
|
|
|
{% extends 'gistbase' %}
|
|
|
|
{% block gist_main %}
|
2022-02-27 14:44:53 +00:00
|
|
|
<form class="gist__new" action={{ page.gist.new }} method="POST" accept-charset="utf-8">
|
2022-02-23 15:04:24 +00:00
|
|
|
{% include "error_comp" %}
|
2022-02-27 14:44:53 +00:00
|
|
|
<label class="form__label" for="description">
|
2022-02-23 15:04:24 +00:00
|
|
|
Gist description
|
|
|
|
<input
|
|
|
|
class="form__input"
|
|
|
|
name="description"
|
|
|
|
autofocus
|
|
|
|
id="description"
|
|
|
|
type="text"
|
|
|
|
{% if payload.description %}
|
|
|
|
value={{ payload.description }}
|
|
|
|
{% endif %}
|
|
|
|
/>
|
|
|
|
</label>
|
2022-02-27 14:44:53 +00:00
|
|
|
{% for fieldname in fieldnames%}
|
|
|
|
{% set content = payload | nth(n=(loop.index - 1)) %}
|
2022-02-23 15:04:24 +00:00
|
|
|
<legend class="gist__file">
|
2022-02-27 14:44:53 +00:00
|
|
|
<label class="form__label" for={{ fieldname.filename }}>
|
2022-02-23 15:04:24 +00:00
|
|
|
File name with extension
|
|
|
|
<input
|
|
|
|
required
|
|
|
|
class="form__input"
|
2022-02-27 14:44:53 +00:00
|
|
|
name={{ fieldname.filename }}
|
2022-02-23 15:04:24 +00:00
|
|
|
autofocus
|
2022-02-27 14:44:53 +00:00
|
|
|
id={{ fieldname.filename }}
|
2022-02-23 15:04:24 +00:00
|
|
|
type="text"
|
2022-02-27 14:44:53 +00:00
|
|
|
value="{{ content.filename }}"
|
2022-02-23 15:04:24 +00:00
|
|
|
/>
|
|
|
|
</label>
|
2022-02-27 14:44:53 +00:00
|
|
|
<label class="form__label" for={{ fieldname.content }}>
|
2022-02-23 15:04:24 +00:00
|
|
|
<textarea
|
|
|
|
required
|
|
|
|
class="gist__file-content"
|
2022-02-27 14:44:53 +00:00
|
|
|
name={{ fieldname.content }}
|
|
|
|
id={{ fieldname.content }}
|
2022-02-23 15:04:24 +00:00
|
|
|
type="text"
|
2022-02-27 14:44:53 +00:00
|
|
|
>{{ content.content }}</textarea>
|
2022-02-23 15:04:24 +00:00
|
|
|
</label>
|
|
|
|
</legend>
|
|
|
|
{% endfor %}
|
2022-02-27 14:44:53 +00:00
|
|
|
<div class="gist__radio-group">
|
|
|
|
<label class="gist__radio-label" for={{ visibility_public }}>
|
|
|
|
<input
|
|
|
|
required
|
|
|
|
class="gist__radio-btn"
|
|
|
|
name="visibility"
|
|
|
|
id={{ visibility_public }}
|
|
|
|
type="radio"
|
|
|
|
value={{ visibility_public }}
|
|
|
|
/>
|
|
|
|
Public
|
|
|
|
</label>
|
|
|
|
|
|
|
|
<label class="gist__radio-label" for={{ visibility_unlisted }}>
|
|
|
|
<input
|
|
|
|
class="gist__radio-btn"
|
|
|
|
name="visibility"
|
|
|
|
id={{ visibility_unlisted }}
|
|
|
|
type="radio"
|
|
|
|
value={{ visibility_unlisted }}
|
|
|
|
/>
|
|
|
|
Unlisted
|
|
|
|
</label>
|
2022-02-23 15:04:24 +00:00
|
|
|
|
2022-02-27 14:44:53 +00:00
|
|
|
<label class="gist__radio-label" for={{ visibility_private }}>
|
|
|
|
<input
|
|
|
|
class="gist__radio-btn"
|
|
|
|
name="visibility"
|
|
|
|
id={{ visibility_private }}
|
|
|
|
type="radio"
|
|
|
|
value={{ visibility_private }}
|
|
|
|
/>
|
|
|
|
Private
|
|
|
|
</label>
|
|
|
|
</div>
|
|
|
|
<div class="gist__button-group">
|
|
|
|
<div class="gist__button-container">
|
|
|
|
<button
|
|
|
|
class="form__submit--secondary"
|
|
|
|
name="add_file"
|
|
|
|
value="true"
|
|
|
|
type="submit"
|
|
|
|
>Add File</button>
|
|
|
|
</div>
|
|
|
|
<div class="gist__button-container">
|
|
|
|
<button class="form__submit" type="submit">Create Gist</button>
|
|
|
|
</div>
|
|
|
|
</div>
|
2022-02-23 15:04:24 +00:00
|
|
|
</form>
|
|
|
|
{% endblock %}
|