diff --git a/next.config.js b/next.config.js index 1a0cf7c..8d42db1 100644 --- a/next.config.js +++ b/next.config.js @@ -1,11 +1,22 @@ const FaviconsWebpackPlugin = require("favicons-webpack-plugin"); -const withBundleAnalyzer = require('@next/bundle-analyzer')({ - enabled: process.env.ANALYZE === 'true', +const withBundleAnalyzer = require("@next/bundle-analyzer")({ + enabled: process.env.ANALYZE === "true", }); module.exports = withBundleAnalyzer({ target: "server", + images: { + domains: [ + "api.sika.sik.party", + "api.dev.sik.party", + "static.sika.sik.party", + "sahkoinsinoorikilta.fi", + "api.sahkoinsinoorikilta.fi", + "static.sahkoinsinoorikilta.fi", + "placehold.it" + ], + }, webpack: (config) => { config.plugins.push( new FaviconsWebpackPlugin({ diff --git a/src/components/AddIcon.tsx b/src/components/AddIcon.tsx new file mode 100644 index 0000000..3402e7e --- /dev/null +++ b/src/components/AddIcon.tsx @@ -0,0 +1,15 @@ +import React from "react"; +import Image from "next/image"; + +const Icon = "/img/add-icon.png"; + +const AddIcon: React.FC = () => ( + Add +); + +export default AddIcon; diff --git a/src/components/AddLink.tsx b/src/components/AddLink.tsx index 527cf91..be9ceb0 100644 --- a/src/components/AddLink.tsx +++ b/src/components/AddLink.tsx @@ -2,8 +2,7 @@ import React, { ComponentProps } from "react"; import styled from "styled-components"; import { colors } from "@theme/colors"; import { Link } from "@components/index"; - -const AddIcon = "/img/add-icon.png"; +import AddIcon from "@components/AddIcon"; const StyledLink = styled(Link)` display: flex; @@ -15,10 +14,9 @@ const StyledLink = styled(Link)` color: ${colors.orange2}; } - img { - margin-right: 8px; - margin-top: -2px; - width: 20px; + & > div { + margin-right: 8px !important; + margin-top: -2px !important; } `; @@ -28,7 +26,7 @@ type AddLinkProps = ComponentProps & { const AddLink: React.FC = ({ text, ...props }) => ( - + {text} ); diff --git a/src/components/Card.tsx b/src/components/Card.tsx index 7e8425c..47618df 100644 --- a/src/components/Card.tsx +++ b/src/components/Card.tsx @@ -1,4 +1,5 @@ import React from "react"; +import Image from "next/image"; import styled from "styled-components"; import { colors } from "@theme/colors"; import { Link } from "@components/index"; @@ -19,12 +20,6 @@ const StyledCard = styled.article` margin: 1rem; text-align: center; - img { - width: 100%; - max-height: 300px; - margin-bottom: 1rem; - } - p { font-size: 1rem; text-overflow: ellipsis; @@ -77,7 +72,7 @@ const WrappedCard: React.FC = ({ }; const datetime = new Date(start_time).toLocaleString("fi-FI", options); const img = image ? ( - {imageAlt} + {imageAlt} ) : null; const button = ( diff --git a/src/components/ContactCard.tsx b/src/components/ContactCard.tsx index a16d24c..a2a465f 100644 --- a/src/components/ContactCard.tsx +++ b/src/components/ContactCard.tsx @@ -1,4 +1,5 @@ import React from "react"; +import Image from "next/image"; import styled from "styled-components"; import { colors } from "@theme/colors"; @@ -12,7 +13,7 @@ const Card = styled.article` `; const ImageContainer = styled.div` - padding: 0.5rem; + position: relative; display: flex; flex-shrink: 0; justify-content: center; @@ -20,9 +21,8 @@ const ImageContainer = styled.div` height: 5rem; width: 5rem; - & > img { - width: 100%; - height: 100%; + img { + padding: 0.5rem !important; border-radius: 50%; } `; @@ -60,9 +60,11 @@ const ContactCard: React.FC = ({ {image ? ( - {name} ) : null} diff --git a/src/components/Widgets/SignupQuestionsWidget/SignupQuestionsWidget.tsx b/src/components/Widgets/SignupQuestionsWidget/SignupQuestionsWidget.tsx index bc87bd3..05bf10b 100644 --- a/src/components/Widgets/SignupQuestionsWidget/SignupQuestionsWidget.tsx +++ b/src/components/Widgets/SignupQuestionsWidget/SignupQuestionsWidget.tsx @@ -5,8 +5,7 @@ import { DragDropContext, Droppable } from "react-beautiful-dnd"; import { Question } from "."; import colors from "@theme/colors"; import QuestionList from "./QuestionList"; - -const AddIcon = "/img/add-icon.png"; +import AddIcon from "@components/AddIcon"; const Widget = styled.div` & > button { @@ -18,10 +17,9 @@ const Widget = styled.div` padding: 0; margin: 1rem 0; - & > img { - margin-right: 8px; - margin-top: -2px; - width: 20px; + & > div { + margin-right: 8px !important; + margin-top: -2px !important; } } `; @@ -90,7 +88,7 @@ const SignupQuestionsWidget: React.FC = ({ value, on - + New Question diff --git a/src/views/ActualPage/ActualPageView.tsx b/src/views/ActualPage/ActualPageView.tsx index 903069a..f186738 100644 --- a/src/views/ActualPage/ActualPageView.tsx +++ b/src/views/ActualPage/ActualPageView.tsx @@ -1,5 +1,7 @@ import React from "react"; +import Image from "next/image"; import styled from "styled-components"; +import breakpoints from "@theme/breakpoints"; import { Event } from "@models/Event"; import { Post } from "@models/Feed"; @@ -19,10 +21,12 @@ const Gallery = styled.div` display: flex; flex-flow: row nowrap; - img { - max-width: calc(100% / 3); + @media screen and (max-width: ${breakpoints.mobile}) { + flex-flow: column; + } + + div { flex: 1 0; - object-fit: cover; } `; @@ -45,9 +49,9 @@ const ActualPageView: React.FC = ({ events, feed }) => ( - - - + TODO + TODO + TODO = ({ event }) => {

{event.description_fi}

-
- {event.title_fi} -
+ {event.title_fi}
diff --git a/src/views/FrontPage/FrontPageView.tsx b/src/views/FrontPage/FrontPageView.tsx index 9737e72..f312849 100644 --- a/src/views/FrontPage/FrontPageView.tsx +++ b/src/views/FrontPage/FrontPageView.tsx @@ -1,4 +1,5 @@ import React from "react"; +import Image from "next/image"; import styled from "styled-components"; import { Card, @@ -45,13 +46,9 @@ const SponsorReel = styled.div` & > * { margin: 1rem; + min-width: 200px; } } - - img { - width: 200px; - object-fit: cover; - } a { color: ${colors.blue1}; text-decoration: underline; @@ -122,17 +119,39 @@ const FrontPageView: React.FC = ({ events, feed }) => (
Yhteistyössä:
- - - - - - - - - - - + + ABB + + + Capgemini + + + Caruna + + + Eaton + + + Ensto + + + eSett + + + Fennovoima + + + Fingrid + + + NRCGroup + + + Okmetic + + + Sogeti +
Haluatko kuulla lisää yhteistyöstä kanssamme?