From 5aa00e052e5ce87753cc5ec0cec636f102f8cb11 Mon Sep 17 00:00:00 2001 From: Ben Aaron Goldberg Date: Sun, 24 Oct 2021 05:19:45 -0400 Subject: [PATCH] web: Add web page explantation message Signed-off-by: Ben Aaron Goldberg --- web/src/main.rs | 2 ++ web/templates/index.html | 15 ++++++++------- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/web/src/main.rs b/web/src/main.rs index 0f1a5ab..24efffc 100644 --- a/web/src/main.rs +++ b/web/src/main.rs @@ -15,6 +15,7 @@ use pronouns_today::{InstanceSettings, Pronoun}; struct IndexTemplate<'a> { name: Option, short: String, + objective: &'a str, pronouns: Vec<(usize, &'a Pronoun)>, } @@ -22,6 +23,7 @@ fn render_page(pronoun: &Pronoun, settings: &InstanceSettings, name: Option -

- {% if name.is_some() %} - {{ name.as_ref().unwrap() }} - {% else %} - My - {% endif %} - pronouns today are: {{ short }}

+

{% if name.is_some() %} {{ name.as_ref().unwrap() }}'s {% else %} + My{% endif %} pronouns today are: {{ short }}

+ +

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.