Received: from mail.cmpwn.com (mail.cmpwn.com [45.56.77.53]) by mail-b.sr.ht (Postfix) with ESMTPS id AB703FF0A9 for <~emersion/alps-dev@lists.sr.ht>; Wed, 20 May 2020 17:26:40 +0000 (UTC) Authentication-Results: mail-b.sr.ht; dkim=pass (1024-bit key) header.d=cmpwn.com header.i=@cmpwn.com header.b=D6Hhv7lU DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=cmpwn.com; s=cmpwn; t=1589995600; bh=BJYTYAxuHjHztnH7kd3jgHeGltyulpbzqKrTh0mBtZw=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=D6Hhv7lUcyB6Jw3eace4frq17KFLPrHBPPUqvSVv6COJgx7TBSKaPVbKlA9KS5fSv 9l9wgUiCWqdWYL67BWjmj4CxaGhsQQ1K5bC5MV4gwIn34QhJP/1BaFSyPZApREOJV8 C9YHwck9u/tx7Wcmu+tpQ0/sMTOjON1HJ0UKhgR4= From: Drew DeVault To: ~emersion/alps-dev@lists.sr.ht Cc: Drew DeVault Subject: [PATCH v2 1/3] alps theme: add layout for calendar event update Date: Wed, 20 May 2020 13:26:36 -0400 Message-Id: <20200520172638.105113-2-sir@cmpwn.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200520172638.105113-1-sir@cmpwn.com> References: <20200520172638.105113-1-sir@cmpwn.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable --- plugins/caldav/routes.go | 2 ++ themes/alps/assets/style.css | 34 +++++++++++++++++++--------- themes/alps/update-event.html | 42 +++++++++++++++++++++++++++++++++++ 3 files changed, 67 insertions(+), 11 deletions(-) create mode 100644 themes/alps/update-event.html diff --git a/plugins/caldav/routes.go b/plugins/caldav/routes.go index d7c31f7..1ae8f02 100644 --- a/plugins/caldav/routes.go +++ b/plugins/caldav/routes.go @@ -38,6 +38,7 @@ type EventRenderData struct { =20 type UpdateEventRenderData struct { alps.BaseRenderData + Calendar *caldav.Calendar CalendarObject *caldav.CalendarObject // nil if creating a new contact Event *ical.Event } @@ -299,6 +300,7 @@ func registerRoutes(p *alps.GoPlugin, u *url.URL) { =20 return ctx.Render(http.StatusOK, "update-event.html", &UpdateEventRend= erData{ BaseRenderData: *alps.NewBaseRenderData(ctx), + Calendar: calendar, CalendarObject: co, Event: event, }) diff --git a/themes/alps/assets/style.css b/themes/alps/assets/style.css index 5225b9d..789e04c 100644 --- a/themes/alps/assets/style.css +++ b/themes/alps/assets/style.css @@ -158,30 +158,38 @@ aside a.new.active { =20 aside a.new.active, main.compose, -main.new-contact { +main.new-contact, +main.new-event { background-color: #f6fff6; } =20 main.compose, -main.new-contact { flex: 1 auto; padding: 1rem; } +main.new-contact, +main.new-event{ flex: 1 auto; padding: 1rem; } =20 main.compose form, -main.new-contact form { flex: 1 auto; display: flex; flex-direction: col= umn; } +main.new-contact form, +main.new-event form{ flex: 1 auto; display: flex; flex-direction: column= ; } =20 main.compose form label, -main.new-contact form label { margin-top: 5px; } +main.new-contact form label, +main.new-event form label{ margin-top: 5px; } =20 main.compose form label span, /* TODO: CSS grid this */ -main.new-contact form label span { display: inline-block; font-weight: b= old; min-width: 150px; } +main.new-contact form label span, +main.new-event form label span { display: inline-block; font-weight: bol= d; min-width: 150px; } =20 main.compose form input, -main.new-contact form input { width: 80%; } +main.new-contact form input, +main.new-event form input { width: 80%; } =20 main.compose form textarea, -main.new-contact form textarea { flex: 1 auto; resize: none; margin-top:= 1rem; } +main.new-contact form textarea, +main.new-event form textarea { flex: 1 auto; resize: none; margin-top: 1= rem; } =20 -main.compose h1 { margin: 0; } +main.compose h1, +main.new-event h1 { margin: 0; } =20 main table { border-collapse: collapse; width: 100%; border: 1px solid #= eee; } main table td { white-space: nowrap; padding: 0.3rem; color: #757373; @@ -239,7 +247,8 @@ main.contact dl { } =20 main.compose .actions, -main.new-contact .actions { +main.new-contact .actions +main.new-event .actions { display: flex; flex-direction: row; align-items: center; @@ -251,13 +260,16 @@ main.new-contact .actions { main.compose .actions button, main.compose .actions .button-link, main.new-contact .actions button, -main.new-contact .actions .button-link { +main.new-contact .actions .button-link, +main.new-event .actions button, +main.new-event .actions .button-link { padding: 0.4rem 1rem 0.35rem; font-weight: bold; } =20 main.compose .actions > *:not(:last-child), -main.new-contact .actions > *:not(:last-child) { +main.new-contact .actions > *:not(:last-child), +main.new-event .actions > *:not(:last-child) { margin-right: 1rem; } =20 diff --git a/themes/alps/update-event.html b/themes/alps/update-event.htm= l new file mode 100644 index 0000000..7672a7b --- /dev/null +++ b/themes/alps/update-event.html @@ -0,0 +1,42 @@ +{{template "head.html" .}} +{{template "nav.html" .}} + +
+ + +
+
+
+ + + + + + + + +
+ + Cancel +
+
+
+
+
+ +{{template "foot.html"}} --=20 2.26.2