diff --git a/src/components/Card/Card.tsx b/src/components/Card/Card.tsx index 9f2e377..9958adf 100644 --- a/src/components/Card/Card.tsx +++ b/src/components/Card/Card.tsx @@ -1,53 +1,57 @@ import React from "react"; import "./Card.scss"; import Anchor from "../Anchor"; +import { Button } from "@components/index"; -export interface CardProps { +interface CardProps { title: string; start_time: string; text: string; link?: string; image?: string; - button?: JSX.Element; + buttonText?: string; + buttonOnClick?: () => void; } -export interface CardState { } -class Card extends React.Component { - render() { - const { title, text, link, image, button } = this.props; - const options = { - day: "numeric", - month: "numeric", - year: "numeric", - hour: "numeric", - minute: "2-digit" - }; - const datetime = new Date(this.props.start_time).toLocaleString("fi-FI", options); +const Card: React.FC = ({ title, text, link, image, buttonText, 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 imageElem = image ? ( -
- ) : null; - if (link) { - return ( - - {imageElem} -
{datetime}
-
{title}
-
{text}
-
{button}
-
- ); - } + const imageElem = image ? ( +
+ ) : null; + if (link) { return ( -
+ {imageElem}
{datetime}
{title}
{text}
- {button} -
+
+ +
+ ); } + return ( +
+ {imageElem} +
{datetime}
+
{title}
+
{text}
+ +
+ ); } export default Card; diff --git a/src/components/Divider.tsx b/src/components/Divider.tsx index 797e3fc..1093cdd 100644 --- a/src/components/Divider.tsx +++ b/src/components/Divider.tsx @@ -3,7 +3,8 @@ import { colors } from "@theme/colors"; const Divider = styled.hr` width: 98%; - border-color: ${colors.blue1}; + border: 0; + border-bottom: 2px solid ${colors.blue1}; margin: 0 auto; `; diff --git a/src/components/Footer/Footer.scss b/src/components/Footer/Footer.scss deleted file mode 100644 index 2def50a..0000000 --- a/src/components/Footer/Footer.scss +++ /dev/null @@ -1,90 +0,0 @@ -@import "../../assets/scss/globals"; - - -.footer { - display: flex; - flex-direction: column; - - &__content { - display: flex; - padding: 16px; - } - - h4 { - color: color(light-blue); - padding: 1.5rem 0; - } - - & a { - color: color(white1); - text-decoration: underline; - padding: 0.4rem 0; - font-size: 14px; - } - - & p { - color: color(white1); - margin: 0; - padding: 0.4rem 0; - font-size: 14px; - } - - &__info { - display: flex; - flex-direction: column; - flex-basis: 100%; - align-items: center; - - &__block { - padding: 1rem 0; - } - } - - &__contacts { - display: flex; - justify-content: space-between; - flex-flow: row nowrap; - font-weight: 200; - - @media screen and (max-width: 600px - 1px) { - flex-flow: column nowrap; - } - } - - &__text { - display: flex; - flex-flow: column; - min-width: 180px; - - @media screen and (min-width: 600px) { - padding-right: 3rem; - } - } - - &__links { - display: flex; - flex-flow: column; - - @media screen and (max-width: 600px - 1px) { - margin-top: 2rem; - } - } - - &__copyright { - display: flex; - flex-flow: row nowrap; - background-color: color(black1); - text-align: center; - justify-content: center; - font-size: 12px; - padding: 1rem 0; - - p { - padding: 0.5rem 1rem; - } - - @media screen and (max-width: 600px - 1px) { - flex-flow: column nowrap; - } - } -} diff --git a/src/components/Footer/Footer.tsx b/src/components/Footer/Footer.tsx index c816204..059dad5 100644 --- a/src/components/Footer/Footer.tsx +++ b/src/components/Footer/Footer.tsx @@ -1,48 +1,115 @@ import React from "react"; -import FooterMap from "../FooterMap"; +import styled from "styled-components"; import Anchor from "../Anchor"; -import "./Footer.scss"; +import { colors } from "@theme/colors"; -export interface FooterProps { } -export interface FooterState { } +const StyledFooter = styled.footer` + display: flex; + flex-direction: column; + background-color: ${colors.darkBlue}; -class Footer extends React.Component { - render() { - return -
-
-
-
-

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 -
-
-
+ a { + color: ${colors.white}; + display: block; + text-decoration: underline; + padding: 0.4rem 0; + font-size: 14px; + + &:hover { + text-decoration: none; + } + } + + p { + color: ${colors.white}; + margin: 0; + padding: 0.4rem 0; + font-size: 14px; + } +`; + +const Content = styled.div` + display: flex; + & > div { + flex: 2; + padding: 48px 0; + + h4 { + color: ${colors.lightBlue}; + padding: 24px 0; + } + + & > div { + display: flex; + flex-direction: row; + justify-content: space-between; + } + } +`; + +const CopyRight = styled.div` + display: flex; + flex-flow: row nowrap; + background-color: ${colors.black}; + text-align: center; + justify-content: center; + font-size: 12px; + padding: 1rem 0; + + p { + padding: 0.5rem 1rem; + } + + @media screen and (max-width: 600px - 1px) { + 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

-

webmaster: sik-vtmk@list.ayy.fi

- ; - } -} + +
+ +

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

+ webmaster: sik-vtmk@list.ayy.fi +
+
+) export default Footer; diff --git a/src/components/FooterMap/FooterMap.scss b/src/components/FooterMap/FooterMap.scss deleted file mode 100644 index 09a3654..0000000 --- a/src/components/FooterMap/FooterMap.scss +++ /dev/null @@ -1,13 +0,0 @@ -@import "../../assets/scss/globals"; - -.footer-map { - display: flex; - - @media screen and (max-width: 1200px - 1px) { - display: none; - } - - iframe { - border: none; - } -} diff --git a/src/components/FooterMap/FooterMap.tsx b/src/components/FooterMap/FooterMap.tsx index bddca1a..4ede894 100644 --- a/src/components/FooterMap/FooterMap.tsx +++ b/src/components/FooterMap/FooterMap.tsx @@ -1,26 +1,16 @@ import React from "react"; -import "./FooterMap.scss"; +import styled from "styled-components"; -const AnyReactComponent = ({ text }) =>
{text}
; +const IFrame = styled.iframe` -export interface FooterMapProps {} +`; -export interface FooterMapState {} - -class FooterMap extends React.Component { - render() { - return ( -
- -
- - ); - } -} +const FooterMap: React.FC = () => ( +