Commit 16291efd authored by KS Support 2's avatar KS Support 2
Browse files

adding quickLinks

parent 6a504c70
import React from 'react'
import {connect} from 'frontity'
import Switch from '@frontity/components/switch'
import React from "react";
import { connect } from "frontity";
import Switch from "@frontity/components/switch";
import HeroSlideshow from './home/hero-slideshow'
import Hours from './home/hours'
import HeroSlideshow from "./home/hero-slideshow";
import Hours from "./home/hours";
import LinksContainer from "./home/linksContainer";
const Home = ({state}) => {
const data = state.source.get(state.router.link)
const post = state.source[data.type][data.id]
const Home = ({ state }) => {
const data = state.source.get(state.router.link);
const post = state.source[data.type][data.id];
console.log(post.acf.hours)
console.log(post.acf.hours);
const text = {
title: "titlellee",
description: "opis",
};
console.log(post.acf.quick_links);
return (
<>
<HeroSlideshow heroSlideshow={post.acf.hero_slideshow} />
<Hours hours={post.acf.hours} />
<LinksContainer quick_links={post.acf.quick_links} />
{/* {post.acf.content.map((section, index) =>
<Switch key={index}>
......@@ -24,7 +32,7 @@ const Home = ({state}) => {
</Switch>
)} */}
</>
)
}
);
};
export default connect(Home)
\ No newline at end of file
export default connect(Home);
import React from "react";
import { connect, styled } from "frontity";
import Link from "@frontity/components/link";
const LinksContainer = ({ quick_links, state }) => {
const colors = state.theme.colors;
const use_colors = [colors.green, colors.orange, colors.blue];
console.log(use_colors);
return (
<TextContainer>
{quick_links.map(({ link, description }, index) => {
return (
<SingleLinkContainer key={index}>
<Link link="#" style={{ color: use_colors[index] }}>
{link.title}
</Link>
<p>{description}</p>
</SingleLinkContainer>
);
})}
</TextContainer>
);
};
export default connect(LinksContainer);
const TextContainer = styled.section`
width: 100%;
padding: 3rem 1rem;
background: white;
position: relative;
z-index: 100;
display: flex;
justify-content: streach;
`;
const SingleLinkContainer = styled.section`
padding: 0 2rem;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
text-align: center;
height: 100%;
`;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment