web: Add web page explantation message
Signed-off-by: Ben Aaron Goldberg <ben@benaaron.dev>
This commit is contained in:
parent
5ad04f1427
commit
5aa00e052e
|
@ -15,6 +15,7 @@ use pronouns_today::{InstanceSettings, Pronoun};
|
|||
struct IndexTemplate<'a> {
|
||||
name: Option<String>,
|
||||
short: String,
|
||||
objective: &'a str,
|
||||
pronouns: Vec<(usize, &'a Pronoun)>,
|
||||
}
|
||||
|
||||
|
@ -22,6 +23,7 @@ fn render_page(pronoun: &Pronoun, settings: &InstanceSettings, name: Option<Stri
|
|||
IndexTemplate {
|
||||
name,
|
||||
short: pronoun.render_threeform(),
|
||||
objective: &pronoun.object_pronoun,
|
||||
pronouns: settings.pronoun_list.iter().enumerate().collect(),
|
||||
}
|
||||
.render()
|
||||
|
|
|
@ -11,13 +11,14 @@
|
|||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<h1>
|
||||
{% if name.is_some() %}
|
||||
{{ name.as_ref().unwrap() }}
|
||||
{% else %}
|
||||
My
|
||||
{% endif %}
|
||||
pronouns today are: {{ short }}</h1>
|
||||
<h1>{% if name.is_some() %} {{ name.as_ref().unwrap() }}'s {% else %}
|
||||
My{% endif %} pronouns today are: {{ short }}</h1>
|
||||
|
||||
<p>This page picks a random pronoun from a list of preferred pronouns every
|
||||
day.
|
||||
{% if name.is_some() %} {{ name.as_ref().unwrap() }}{% else %}
|
||||
Whoever linked you to this page{% endif %} would like you to try {{ short }} pronouns for
|
||||
{{ objective }} today.</p>
|
||||
|
||||
<label for="form-toggle">Create your own custom link!</label>
|
||||
<input type="checkbox" id="form-toggle" style="display: none;"/>
|
||||
|
|
Loading…
Reference in a new issue