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> {
|
struct IndexTemplate<'a> {
|
||||||
name: Option<String>,
|
name: Option<String>,
|
||||||
short: String,
|
short: String,
|
||||||
|
objective: &'a str,
|
||||||
pronouns: Vec<(usize, &'a Pronoun)>,
|
pronouns: Vec<(usize, &'a Pronoun)>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -22,6 +23,7 @@ fn render_page(pronoun: &Pronoun, settings: &InstanceSettings, name: Option<Stri
|
||||||
IndexTemplate {
|
IndexTemplate {
|
||||||
name,
|
name,
|
||||||
short: pronoun.render_threeform(),
|
short: pronoun.render_threeform(),
|
||||||
|
objective: &pronoun.object_pronoun,
|
||||||
pronouns: settings.pronoun_list.iter().enumerate().collect(),
|
pronouns: settings.pronoun_list.iter().enumerate().collect(),
|
||||||
}
|
}
|
||||||
.render()
|
.render()
|
||||||
|
|
|
@ -11,13 +11,14 @@
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<h1>
|
<h1>{% if name.is_some() %} {{ name.as_ref().unwrap() }}'s {% else %}
|
||||||
{% if name.is_some() %}
|
My{% endif %} pronouns today are: {{ short }}</h1>
|
||||||
{{ name.as_ref().unwrap() }}
|
|
||||||
{% else %}
|
<p>This page picks a random pronoun from a list of preferred pronouns every
|
||||||
My
|
day.
|
||||||
{% endif %}
|
{% if name.is_some() %} {{ name.as_ref().unwrap() }}{% else %}
|
||||||
pronouns today are: {{ short }}</h1>
|
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>
|
<label for="form-toggle">Create your own custom link!</label>
|
||||||
<input type="checkbox" id="form-toggle" style="display: none;"/>
|
<input type="checkbox" id="form-toggle" style="display: none;"/>
|
||||||
|
|
Loading…
Reference in a new issue