diff --git a/src/components/Card.tsx b/src/components/Card.tsx new file mode 100644 index 0000000..7199742 --- /dev/null +++ b/src/components/Card.tsx @@ -0,0 +1,119 @@ +import React from "react"; +import styled from "styled-components"; +import { colors } from "@theme/colors"; +import Anchor from "@components/Anchor"; + +interface WrappedCardProps { + title: string; + start_time: string; + text: string; + link: string; + image?: string; + imageAlt?: string; + buttonOnClick?: () => void; +} + +interface CardProps { + title: string; + start_time: string; + text: string; + img: JSX.Element; + button: JSX.Element; +} + +const StyledCard = styled.article` + color: ${colors.black}; + margin: 1rem; + text-align: center; + + img { + width: 100%; + max-height: 300px; + margin-bottom: 1rem; + } + + p { + font-size: 16px; + text-overflow: ellipsis; + margin: 0 0 0.5rem; + font-weight: 200; + line-height: 22px; + } + + p:first-of-type { + color: ${colors.orange1}; + font-size: 0.9rem !important; + font-weight: 600 !important; + + @media screen and (max-width: 1200px) { + margin: 0.5rem 0; + font-size: 16px; + } + } + + + h3 { + padding: 0.5rem; + font-size: 1.5rem; + font-weight: 300; + } + + button { + cursor: pointer; + + padding: 0.8rem 2rem; + margin: 0.5rem; + font-size: 13px; + background: none; + text-transform: uppercase; + background-color: ${colors.blue1}; + color: ${colors.white}; + font-weight: 800; + letter-spacing: 1.5px; + border: none; + } +`; + +const Card: React.FC = ({ title, start_time, text, img, button }) => ( + + {img} +

{start_time}

+

{title}

+

{text}

+ {button} +
+); + +const WrappedCard: React.FC = ({ title, text, link, image, imageAlt, start_time, buttonOnClick }) => { + const options = { + day: "numeric", + month: "numeric", + year: "numeric", + hour: "numeric", + minute: "2-digit" + }; + const datetime = new Date(start_time).toLocaleString("fi-FI", options); + const img = image ? ( + {imageAlt} + ) : null; + + const button = ( + + + + ); + + return ( + + ); +} + +export default WrappedCard; diff --git a/src/components/Card/index.ts b/src/components/Card/index.ts deleted file mode 100644 index af0084f..0000000 --- a/src/components/Card/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -import Card from "./Card"; -export default Card; diff --git a/src/components/Footer/Footer.tsx b/src/components/Footer/Footer.tsx index 059dad5..74b56b5 100644 --- a/src/components/Footer/Footer.tsx +++ b/src/components/Footer/Footer.tsx @@ -30,23 +30,46 @@ const StyledFooter = styled.footer` const Content = styled.div` display: flex; - & > div { - flex: 2; + + & > div:first-of-type { padding: 48px 0; + flex: 2 1; - h4 { - color: ${colors.lightBlue}; - padding: 24px 0; - } - - & > div { - display: flex; - flex-direction: row; - justify-content: space-between; + & > * { + padding: 0 24px; } } + + h4 { + color: ${colors.lightBlue}; + padding: 24px 0; + } `; +const MarginSpace = styled.div` + max-width: 600px; + margin: auto; +`; + +const Columns = styled.div` + display: flex; + justify-content: space-between; + & > div > div { + margin-bottom: 1rem; + } +`; + +const Map = styled.div` + flex: 1; + @media screen and (max-width: 600px) { + display: none; + } + iframe { + border: none; + } +`; + + const CopyRight = styled.div` display: flex; flex-flow: row nowrap; @@ -60,50 +83,47 @@ const CopyRight = styled.div` padding: 0.5rem 1rem; } - @media screen and (max-width: 600px - 1px) { + @media screen and (max-width: 600px) { flex-flow: column nowrap; } `; -const Map = styled.iframe` - border: none; - flex: 1; - - @media screen and (max-width: 1200px - 1px) { - display: none; - } -`; - const Footer: React.FC = () => (
-

Aalto-yliopiston Sähköinsinöörikilta ry

-
-
-

TUAS-Talo

-

Maarintie 8

-

PL 15500, 00076 Aalto

-

-

-

Y-tunnus: 1627010-1

-

sik-hallitus@list.ayy.fi

- Yhteystiedot -
- -
- Jäseneksi - Palaute - Arkisto - Materiaalipankki -
-
+ +

Aalto-yliopiston Sähköinsinöörikilta ry

+ +
+
+

TUAS-Talo

+

Maarintie 8

+

PL 15500, 00076 Aalto

+
+
+

Y-tunnus: 1627010-1

+

sik-hallitus@list.ayy.fi

+ Yhteystiedot +
+
+
+ Jäseneksi + Palaute + Arkisto + Materiaalipankki +
+
+
- + +