From cbbff6427342724ee06802f205d82004f534670c Mon Sep 17 00:00:00 2001 From: Tal Koren Date: Tue, 16 May 2023 22:26:53 +0300 Subject: [PATCH 1/3] Add styling to create event page Signed-off-by: Tal Koren --- event/templates/event/create_event.html | 31 +++++++++---- static_home_page/static/web_page_css.css | 56 +++++++++++++++++++++++- 2 files changed, 77 insertions(+), 10 deletions(-) diff --git a/event/templates/event/create_event.html b/event/templates/event/create_event.html index 380e2c3..591bf5a 100644 --- a/event/templates/event/create_event.html +++ b/event/templates/event/create_event.html @@ -1,11 +1,24 @@ {% extends 'base.html' %} {% block content %} -

Create Event

-
- {% csrf_token %} {{ form.as_p }} - - {% if error %} - - {% endif %} -
-{% endblock %} +
+

Create Event

+
+
+
+ {% csrf_token %} + {% for field in form %} +
+ {{ field.label_tag }} + {{ field }} +
+ {% endfor %} +
+ +
+ + {% if error %} + + {% endif %} +
+
+{% endblock %} \ No newline at end of file diff --git a/static_home_page/static/web_page_css.css b/static_home_page/static/web_page_css.css index f927eee..2e838fb 100644 --- a/static_home_page/static/web_page_css.css +++ b/static_home_page/static/web_page_css.css @@ -108,6 +108,7 @@ form { flex-direction: column; max-width: 400px; margin: auto; + } form label { @@ -115,7 +116,9 @@ form label { margin-bottom: 0.5rem; } -p { font-size: 26px; } +p { + font-size: 26px; +} .logo { border-radius: 50%; @@ -127,3 +130,54 @@ p { font-size: 26px; } box-shadow: 0 0 5px rgba(0, 0, 0, 0.3); transition: all 0.2s ease-in-out; } + +.create-event-form-header { + margin: 15px; +} + +.create-event-form-container { + margin: 20px; +} + +.create-event-form {} + +.create-event-form>div { + display: flex; + justify-content: space-between; + margin-bottom: 5px; + align-items: center; +} + +.create-event-form>div>label { + font-weight: normal; + font-size: 14px; + margin: 0; +} + +.create-event-form>div>input { + width: 200px; +} + +.create-event-form>div>select { + width: 200px; +} + +.create-event-form>.btn-container { + justify-content: center; +} + +.create-event-form>.btn-container>button { + width: 200px; +} + +.create-event-form>.error-label { + color: red; +} + +.create-event-form #field_is_private { + justify-content: flex-start; +} + +.create-event-form #field_is_private>input[type='checkbox'] { + width: 20px; +} \ No newline at end of file From 6f7846f5b3952d5729cc5e8f686a1ecfb8a2e4c8 Mon Sep 17 00:00:00 2001 From: Tal Koren Date: Tue, 16 May 2023 22:48:48 +0300 Subject: [PATCH 2/3] Add styling to event info page Signed-off-by: Tal Koren --- event/templates/event/create_event.html | 3 +-- event/templates/event/event_info.html | 18 ++++++++++++------ static_home_page/static/web_page_css.css | 17 +++++++++++++++-- 3 files changed, 28 insertions(+), 10 deletions(-) diff --git a/event/templates/event/create_event.html b/event/templates/event/create_event.html index 591bf5a..0198e68 100644 --- a/event/templates/event/create_event.html +++ b/event/templates/event/create_event.html @@ -15,10 +15,9 @@

Create Event

- {% if error %} {% endif %} -{% endblock %} \ No newline at end of file +{% endblock %} diff --git a/event/templates/event/event_info.html b/event/templates/event/event_info.html index ddaa928..21018ab 100644 --- a/event/templates/event/event_info.html +++ b/event/templates/event/event_info.html @@ -1,11 +1,17 @@ {% extends 'base.html' %} {% block content %} -

{{event.name}} Event

-
  • Category: {{event.category.name}}
  • -
  • Location: {{event.location.city}}
  • -
  • Starts At: {{event.start_time}}
  • -
  • Ends At: {{event.end_time}}
  • -
  • Participants : {{event.participants_num}}/{{event.max_participants}}
  • +
    +

    {{event.name}} Event

    +
    +
    +
      +
    • Category: {{event.category.name}}
    • +
    • Location: {{event.location.city}}
    • +
    • Starts At: {{event.start_time}}
    • +
    • Ends At: {{event.end_time}}
    • +
    • Participants : {{event.participants_num}}/{{event.max_participants}}
    • +
    +
    {% endblock %} {% block poll_info %}{% endblock %} {% block teams_info %}{% endblock %} diff --git a/static_home_page/static/web_page_css.css b/static_home_page/static/web_page_css.css index 2e838fb..ef100f0 100644 --- a/static_home_page/static/web_page_css.css +++ b/static_home_page/static/web_page_css.css @@ -139,8 +139,6 @@ p { margin: 20px; } -.create-event-form {} - .create-event-form>div { display: flex; justify-content: space-between; @@ -180,4 +178,19 @@ p { .create-event-form #field_is_private>input[type='checkbox'] { width: 20px; +} + +.event-info-header { + margin: 15px; +} + +.event-info-container { + margin: 20px; + display: flex; + justify-content: center; +} + +.event-info-container>ul>li { + margin: 3px 0; + padding: 3px 0; } \ No newline at end of file From c8dcffc47849817e668a2db3488b829b42d5c90a Mon Sep 17 00:00:00 2001 From: Tal Koren Date: Wed, 17 May 2023 10:17:39 +0300 Subject: [PATCH 3/3] Add new line to css file This commit will be sqaushed when the add style to event pages PR will be approved Signed-off-by: Tal Koren --- static_home_page/static/web_page_css.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/static_home_page/static/web_page_css.css b/static_home_page/static/web_page_css.css index ef100f0..8ac0d7c 100644 --- a/static_home_page/static/web_page_css.css +++ b/static_home_page/static/web_page_css.css @@ -193,4 +193,4 @@ p { .event-info-container>ul>li { margin: 3px 0; padding: 3px 0; -} \ No newline at end of file +}