diff --git a/src/pages/dash/home.rs b/src/pages/dash/home.rs index 2a95717..f7523eb 100644 --- a/src/pages/dash/home.rs +++ b/src/pages/dash/home.rs @@ -59,6 +59,7 @@ impl Home { let ctx = RefCell::new(context(settings)); if let Some(sites) = sites { ctx.borrow_mut().insert(PAYLOAD_KEY, sites); + println!("{:#?}", sites) } Self { ctx } } @@ -101,3 +102,52 @@ pub async fn get_home(ctx: AppCtx, id: Identity) -> PageResult -
- - {% for site in payload %} - -
- -
-

- {{ site.info.hostname }} -

-

Deploys from {{ site.info.source_url }}

-
-
- {% if site.last_update %} -
-

Last update {{ site.last_update.time }}

-
- {% endif %} -
- {% endfor %} -
+
+ + {% if payload|length > 0 %} + {% for deployment in payload %} + +
+ {{ deployment.site.hostname }}'s favicon +
+

{{ deployment.site.hostname }}

+

Deploys from {{ deployment.site.repo_url }}

+
+
+ {% if deployment.last_update %} +
+

Last update {{ deployment.last_update.time }}

+
+ {% endif %} +
+ {% endfor %} + {% else %} +

Nothing to show, click here to get started!

+ {% endif %} +
{% endblock main %} - - diff --git a/templates/pages/dash/main.scss b/templates/pages/dash/main.scss index 5ca7e6a..d7ab669 100644 --- a/templates/pages/dash/main.scss +++ b/templates/pages/dash/main.scss @@ -79,3 +79,7 @@ height: 50px; border-radius: 50%; } + +.sites__banner { + text-align: center; +}