From 6ab995b2e38fe1a44194b0dbc71bb7dee70250dc Mon Sep 17 00:00:00 2001 From: Siddheya Kulkarni Date: Mon, 5 Aug 2024 17:58:45 +0530 Subject: [PATCH 1/2] added event page and some minor fixes --- events.css | 200 ++++++++++++++++++++++++++++++++++++++++++++++++++++ events.html | 117 ++++++++++++++++++++++++++++++ index.html | 1 + styles.css | 16 +++-- 4 files changed, 328 insertions(+), 6 deletions(-) create mode 100644 events.css create mode 100644 events.html diff --git a/events.css b/events.css new file mode 100644 index 00000000..c87a7b3c --- /dev/null +++ b/events.css @@ -0,0 +1,200 @@ +.timeline { + position: relative; + max-width: 1200px; + margin: 0 auto; + padding: 40px 0; +} + +.timeline::after { + content: ''; + position: absolute; + width: 6px; + background-color: #333; + top: 0; + bottom: 0; + left: 50%; + margin-left: -3px; +} + +.timeline-item { + padding: 10px 40px; + position: relative; + width: calc(50% - 40px); + box-sizing: border-box; +} + +.timeline-item::after { + content: ''; + position: absolute; + width: 25px; + height: 25px; + background-color: #333; + border: 4px solid #555; + border-radius: 50%; + z-index: 1; + top: 20px; +} + +.timeline-item:nth-child(odd) { + left: 0; + width: calc(50%); +} + +.timeline-item:nth-child(even) { + left: 50%; + width: calc(50%); +} + +.timeline-item:nth-child(odd)::after { + right: -17px; +} + +.timeline-item:nth-child(even)::after { + left: -17px; +} + +.timeline-content { + padding: 20px 30px; + background-color: #fff; + position: relative; + border-radius: 6px; + box-shadow: 0 4px 8px rgba(0,0,0,0.1); +} + +.timeline-item:nth-child(odd) .timeline-content::after { + content: ''; + position: absolute; + top: 15px; + right: -15px; + width: 0; + height: 0; + border-top: 15px solid transparent; + border-bottom: 15px solid transparent; + border-left: 15px solid #fff; +} + +.timeline-item:nth-child(even) .timeline-content::after { + content: ''; + position: absolute; + top: 15px; + left: -15px; + width: 0; + height: 0; + border-top: 15px solid transparent; + border-bottom: 15px solid transparent; + border-right: 15px solid #fff; +} + +.event-title { + color: #333; + font-size: 24px; + margin-bottom: 10px; +} + +.event-date { + font-style: italic; + color: #888; + margin-bottom: 10px; +} + +.event-description { + margin-bottom: 15px; +} + +.event-link { + display: inline-block; + background-color: #333; + color: #fff; + padding: 8px 15px; + border-radius: 4px; + text-decoration: none; + transition: background-color 0.3s; +} + +.event-link:hover { + background-color: #555; +} + +/* Dark mode styles */ +body.dark-mode .timeline::after{ + background-color: #f0f0f0; +} + +body.dark-mode .timeline-item::after{ + background-color: #ccc; + border: 4px solid #999; +} + +body.dark-mode .timeline-content { + background-color: #444; + color: #f0f0f0; +} + +body.dark-mode .timeline-item:nth-child(odd) .timeline-content::after { + border-left-color: #444; +} + +body.dark-mode .timeline-item:nth-child(even) .timeline-content::after { + border-right-color: #444; +} + +body.dark-mode .event-title { + color: #f0f0f0; +} + +body.dark-mode .event-date { + color: #ccc; +} + +body.dark-mode .event-link { + background-color: #f0f0f0; + color: #333; +} + +body.dark-mode .event-link:hover { + background-color: #ccc; +} + + +/* Responsive design */ +@media screen and (max-width: 768px) { + .timeline::after { + left: 31px; + } + + .timeline-item { + width: 100%; + padding-left: 70px; + padding-right: 25px; + } + + .timeline-item::after { + left: 15px; + } + + .timeline-item:nth-child(odd) { + width: 100%; + } + + .timeline-item:nth-child(even) { + left: 0; + width: 100%; + } + + .timeline-item:nth-child(odd)::after, + .timeline-item:nth-child(even)::after { + left: 15px; + } + + .timeline-item:nth-child(odd) .timeline-content::after, + .timeline-item:nth-child(even) .timeline-content::after { + left: -15px; + border-right: 15px solid #fff; + border-left: none; + } + + body.dark-mode .timeline-item:nth-child(odd) .timeline-content::after, + body.dark-mode .timeline-item:nth-child(even) .timeline-content::after { + border-right-color: #444; + } +} \ No newline at end of file diff --git a/events.html b/events.html new file mode 100644 index 00000000..c4b5b908 --- /dev/null +++ b/events.html @@ -0,0 +1,117 @@ + + + + + + Events | Recode Hive + + + + + + + +
+

Events Timeline

+ +
+ +
+
+

Event Title 1

+

Date: TBA

+

Description of the event goes here.

+ Learn More +
+
+ + +
+
+

Event Title 2

+

Date: TBA

+

Description of the event goes here.

+ Learn More +
+
+ + +
+
+

Event Title 3

+

Date: TBA

+

Description of the event goes here.

+ Learn More +
+
+ + +
+
+ + + + + + + \ No newline at end of file diff --git a/index.html b/index.html index e139ac88..70d0949c 100644 --- a/index.html +++ b/index.html @@ -20,6 +20,7 @@ Recode Hive