From cffaf74cb2a5853cef8f7de8635630aa8b7dee8f Mon Sep 17 00:00:00 2001 From: Aarni Halinen Date: Thu, 1 Apr 2021 16:26:48 +0300 Subject: [PATCH 01/22] fix event card image alt --- src/components/Card.tsx | 15 ++++++++------- src/views/FrontPage/FrontPageView.tsx | 5 ++++- src/views/InEnglishPage/InEnglishPageView.tsx | 5 ++++- 3 files changed, 16 insertions(+), 9 deletions(-) diff --git a/src/components/Card.tsx b/src/components/Card.tsx index a23c86c..4d90970 100644 --- a/src/components/Card.tsx +++ b/src/components/Card.tsx @@ -10,8 +10,10 @@ interface WrappedCardProps { start_time: string; text: string; link: string; - image?: string; - imageAlt?: string; + image?: { + src: string; + alt: string; + }; buttonOnClick?: () => void; } @@ -67,7 +69,7 @@ const StyledCard = styled.article` `; const WrappedCard: React.FC = ({ - title, text, link, image, imageAlt, start_time, buttonOnClick, ...props + title, text, link, image, start_time, buttonOnClick, ...props }) => { const options: Intl.DateTimeFormatOptions = { day: "numeric", @@ -77,9 +79,6 @@ const WrappedCard: React.FC = ({ minute: "2-digit", }; const datetime = new Date(start_time).toLocaleString("fi-FI", options); - const img = image ? ( - {imageAlt} - ) : null; const button = ( @@ -91,7 +90,9 @@ const WrappedCard: React.FC = ({ return ( - {img} + {image && ( + {image.alt} + )}

{datetime}

{title}

{text}

diff --git a/src/views/FrontPage/FrontPageView.tsx b/src/views/FrontPage/FrontPageView.tsx index 87444f8..400e968 100644 --- a/src/views/FrontPage/FrontPageView.tsx +++ b/src/views/FrontPage/FrontPageView.tsx @@ -75,7 +75,10 @@ const FrontPageView: React.FC = ({ events, feed }) => ( start_time={event.start_time} text={event.description_fi} link={`/events/${event.id}`} - image={event.image || event.tags[0].icon} + image={{ + src: event.image || event.tags[0].icon, + alt: event.title_fi, + }} buttonOnClick={noop} data-e2e="event-card" /> diff --git a/src/views/InEnglishPage/InEnglishPageView.tsx b/src/views/InEnglishPage/InEnglishPageView.tsx index 3fc4d5f..0d894bb 100644 --- a/src/views/InEnglishPage/InEnglishPageView.tsx +++ b/src/views/InEnglishPage/InEnglishPageView.tsx @@ -201,7 +201,10 @@ const InEnglishPageView: React.FC = ({ events, feed }) = start_time={event.start_time} text={event.description_en} link={`/events/${event.id}`} - image={event.image || event.tags[0].icon} + image={{ + src: event.image || event.tags[0].icon, + alt: event.title_en, + }} buttonOnClick={noop} data-e2e="event-card" /> From af069e152f3fcb8356095f85df944cd04916cf8e Mon Sep 17 00:00:00 2001 From: Aarni Halinen Date: Thu, 1 Apr 2021 16:32:44 +0300 Subject: [PATCH 02/22] fix links on in english page --- src/views/InEnglishPage/InEnglishPageView.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/views/InEnglishPage/InEnglishPageView.tsx b/src/views/InEnglishPage/InEnglishPageView.tsx index 0d894bb..fcf2e75 100644 --- a/src/views/InEnglishPage/InEnglishPageView.tsx +++ b/src/views/InEnglishPage/InEnglishPageView.tsx @@ -120,9 +120,9 @@ const InEnglishPageView: React.FC = ({ events, feed }) =

Balance your studies and get connected

Build everything related to electronics
-

Elepaja is an electronics workshop run by the guild, where students get to apply skills they have learned at school in practical projects. Over time, students have built diverse projects in the workshop, such as their first LED flashlights, tesla windings, robots and radio transmitters. If you are interested in building electronics or you need help with a project, then come visit the workshop located at Otakaari 1 h023b. The workshop is equipped with basic tools such as circuit boards, etching tools, soldering tools, various components, column drill and a wide range of measuring equipment. You can join elepaja's Telegram group here

+

Elepaja is an electronics workshop run by the guild, where students get to apply skills they have learned at school in practical projects. Over time, students have built diverse projects in the workshop, such as their first LED flashlights, tesla windings, robots and radio transmitters. If you are interested in building electronics or you need help with a project, then come visit the workshop located at Otakaari 1 h023b. The workshop is equipped with basic tools such as circuit boards, etching tools, soldering tools, various components, column drill and a wide range of measuring equipment. You can join elepaja's Telegram group here.

Sports events
-

The committee of Well Being runs many things in our guild. One of these is providing sports events to the guild members. In cooperation with other guilds, we regularly organize opportunities to play floorball and other sports. Sports tryouts are available throughout the year and are organized in co-operation with various sports organizations in Otaniemi. Keep your eyes open in the events section and join the sports Telegram group.

+

The committee of Well Being runs many things in our guild. One of these is providing sports events to the guild members. In cooperation with other guilds, we regularly organize opportunities to play floorball and other sports. Sports tryouts are available throughout the year and are organized in co-operation with various sports organizations in Otaniemi. Keep your eyes open in the events section and join the sports Telegram group.

Culture from culinarism to theater

In addition to sports events, the committee of Well Being also organizes cultural events for guild members. These cultural events include various types of events such as theater and museum visits. You can see the upcoming cutrural events from the events section.

Cooperation with companies
From 289c7bc832a7f2b0d7f59b67d0749581698cdb74 Mon Sep 17 00:00:00 2001 From: Aarni Halinen Date: Thu, 1 Apr 2021 16:43:08 +0300 Subject: [PATCH 03/22] add title for map iframe --- src/components/Footer/FooterContent.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/components/Footer/FooterContent.tsx b/src/components/Footer/FooterContent.tsx index bce1497..9ed71b4 100644 --- a/src/components/Footer/FooterContent.tsx +++ b/src/components/Footer/FooterContent.tsx @@ -93,6 +93,7 @@ const FooterContent: React.FC = () => (