Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
{/* Desktop navigation links */}
{/* Desktop search button */}
{state.theme.showSearchInHeader && }
{/* Global search modal */}
);
};
// Connect the Header component to get access to the `state` in it's `props`
export default connect(Header);
const TitleGroup = styled.div`
@media (min-width: 1000px) {
align-items: baseline;
display: flex;
flex-wrap: wrap;
justify-content: flex-start;
margin: -1rem 0 0 -2.4rem;
}
`;
const TitleWrapper = styled.div`
align-items: center;
display: flex;
justify-content: center;
padding: 0 4rem;
text-align: center;
width: 100%;
import { styled } from "frontity";
// Header sizes bases on style.css
const maxWidths = {
thin: "58rem",
small: "80rem",
medium: "100rem"
};
const getMaxWidth = props => maxWidths[props.size] || maxWidths["medium"];
const SectionContainer = styled.div`
margin-left: auto;
margin-right: auto;
width: calc(100% - 4rem);
max-width: ${getMaxWidth};
@media (min-width: 700px) {
width: calc(100% - 8rem);
}
`;
export default SectionContainer;
const AuthorName = styled.span`
color: rgba(12, 17, 43, 0.9);
font-size: 0.9em;
`;
const StyledLink = styled(Link)`
padding: 15px 0;
`;
const PublishDate = styled.span`
color: rgba(12, 17, 43, 0.9);
font-size: 0.9em;
`;
const Excerpt = styled.div`
line-height: 1.6em;
color: rgba(12, 17, 43, 0.8);
`;
);
};
export default connect(SearchButton);
const HeaderToggle = styled.div`
display: none;
@media (min-width: 1000px) {
display: flex;
flex-shrink: 0;
margin-right: -3rem;
margin-left: 3rem;
}
@media (min-width: 1220px) {
margin-right: -4rem;
margin-left: 4rem;
}
`;
return (
);
};
export default connect(ThemeSwitcher);
const Switch = styled.div`
overflow: hidden;
border-radius: 3px;
box-shadow: inset var(--color-border) 0 0 0 1px;
display: grid;
grid-template-columns: 1fr 1fr;
width: 90px;
button {
border: 0;
background-color: transparent;
height: 36px;
display: flex;
outline: 0;
svg {
margin: auto;
{isThereLinks &&
menu.map(([name, link]) => (
{name}
))}
);
};
const MenuOverlay = styled.div`
background-color: #1f38c5;
width: 100vw;
height: 100vh;
overflow: hidden auto;
position: fixed;
z-index: 2;
top: 0;
left: 0;
`;
const MenuContent = styled.div`
z-index: 3;
`;
const MenuLink = styled(Link)`
width: 100%;
color: #000000;
text-decoration: none;
display: inline-block;
&:hover {
text-decoration: underline;
}
`;
export const PostInner = styled(SectionContainer)`
padding-top: 5rem;
@media (min-width: 700px) {
padding-top: 8rem;
}
`;
export const EntryContent = styled.div`
line-height: 1.5;
max-width: 58rem;
font-family: "Hoefler Text", Garamond, "Times New Roman", serif;
letter-spacing: normal;
@media (min-width: 700px) {
font-size: 2.1rem;
}
> *:first-of-type {
margin-top: 0;
}
figure {
margin: 2em 0;
max-width: 100%;
position: fixed;
bottom: 0;
left: -9999rem;
top: 0;
transition: opacity 0.2s linear, left 0s 0.2s linear;
width: 100%;
z-index: 999;
&[data-open="true"] {
display: block;
opacity: 1;
left: 0;
}
`;
const ModalInner = styled.div`
box-shadow: 0 0 2rem 0 rgba(0, 0, 0, 0.08);
transform: translateY(0);
background: #fff;
transition: transform 0.25s ease-in-out, box-shadow 0.1s 0.25s linear;
cursor: default;
`;
const SectionInner = styled.div`
margin-left: auto;
margin-right: auto;
max-width: 120rem;
width: calc(100% - 4rem);
display: flex;
justify-content: space-between;
max-width: 168rem;
Categories
{postCategories.map(category => (
{category.name}
))}
);
};
export default connect(PostCategories);
const EntryCategories = styled.div`
line-height: 1.25;
margin-bottom: 2rem;
@media (min-width: 700px) {
margin-bottom: 3rem;
}
`;
const EntryCategoriesInner = styled.div`
justify-content: center;
display: flex;
flex-wrap: wrap;
margin: -0.5rem 0 0 -1rem;
@media (min-width: 700px) {
margin: -1rem 0 0 -2rem;
<div>
{props.children}
</div>
);
}
export default ContentPre;
const getLanguage = (classes = 'brush: text;') => {
return classes.match((/brush: (\w+);/))[1];
}
const Container = styled.div`
--margin-library: 0.5em;
margin: calc(var(--space) - var(--margin-library)) calc(var(--margin-library) * -1);
overflow: auto;
pre {
border-radius: 3px;
}
`;