mirror of
https://github.com/koodiklinikka/koodiklinikka.fi.git
synced 2026-02-12 01:51:50 +00:00
refactored sponsor data into directory data
This commit is contained in:
committed by
Aarni Koskela
parent
76424448ec
commit
125abe45d9
@@ -1,12 +1,12 @@
|
||||
import React from "react";
|
||||
import EmailComponent from "./EmailComponent";
|
||||
|
||||
const SponsorLink = ({ href, id, name }) => (
|
||||
import sponsors from "../data/sponsors"
|
||||
const SponsorLink = ({ href, name }) => (
|
||||
<a href={href} target="_blank" rel="noopener noreferrer">
|
||||
<img
|
||||
src={`/static/images/sponsors/${id}.${id === "nordea" ? "png" : "svg"}`}
|
||||
src={`/static/images/sponsors/${name}.${name === "Nordea" ? "png" : "svg"}`}
|
||||
alt={name}
|
||||
className={`sponsor sponsor__${id}`}
|
||||
className={`sponsor sponsor__${name.toLowerCase()}`}
|
||||
/>
|
||||
</a>
|
||||
);
|
||||
@@ -16,19 +16,7 @@ export function Footer() {
|
||||
<footer>
|
||||
<div className="sponsors">
|
||||
<div className="sponsors__label">Yhteistyössä</div>
|
||||
<SponsorLink
|
||||
id="futurice"
|
||||
name="Futurice"
|
||||
href="http://futurice.com/"
|
||||
/>
|
||||
<SponsorLink
|
||||
id="metosin"
|
||||
name="Metosin"
|
||||
href="http://www.metosin.fi/"
|
||||
/>
|
||||
<SponsorLink id="solita" name="Solita" href="https://www.solita.fi/" />
|
||||
<SponsorLink id="wakeone" name="Wakeone" href="http://wakeone.co/" />
|
||||
<SponsorLink id="nordea" name="Nordea" href="https://www.nordea.com/" />
|
||||
{sponsors.map(sponsor => <SponsorLink key={sponsor.id} {...sponsor} />)}
|
||||
</div>
|
||||
<div className="contacts">
|
||||
<div>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
export const projects = [
|
||||
const projects = [
|
||||
{
|
||||
title: "RE:DOM",
|
||||
description:
|
||||
@@ -25,3 +25,4 @@ export const projects = [
|
||||
image: "/static/images/avain.svg",
|
||||
},
|
||||
];
|
||||
export default projects;
|
||||
23
data/sponsors.js
Normal file
23
data/sponsors.js
Normal file
@@ -0,0 +1,23 @@
|
||||
const sponsors = [
|
||||
{
|
||||
name: "Futurice",
|
||||
href: "http://futurice.com/",
|
||||
},
|
||||
{
|
||||
name: "Metosin",
|
||||
href: "http://www.metosin.fi/",
|
||||
},
|
||||
{
|
||||
name: "Solita",
|
||||
href: "https://www.solita.fi/",
|
||||
},
|
||||
{
|
||||
name: "Wakeone",
|
||||
href: "http://wakeone.co/",
|
||||
},
|
||||
{
|
||||
name: "Nordea",
|
||||
href: "https://www.nordea.fi/",
|
||||
},
|
||||
];
|
||||
export default sponsors;
|
||||
@@ -5,7 +5,7 @@ import Head from "next/head";
|
||||
import InviteForm from "../components/InviteForm";
|
||||
import Members from "../components/Members";
|
||||
import Feed from "../components/Feed";
|
||||
import { projects } from "../data/indexData";
|
||||
import projects from "../data/projects";
|
||||
|
||||
const Hero = () => (
|
||||
<div className="header">
|
||||
|
||||
Reference in New Issue
Block a user