Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
@media (min-width: 700px) {
font-size: 2.4rem;
padding: 2.5rem 0;
}
&:hover,
&:focus {
text-decoration: underline;
}
/* styles for active link */
&[aria-current="page"] {
text-decoration: underline;
}
`;
export default connect(MobileMenuModal);
const cleanTitle = postTitle.replace(/<\/?[^>]+(>|$)/g, "");
// 3. Render the proper title.
title = `${cleanTitle} - ${state.frontity.title}`;
} else if (data.is404) {
// Add titles to 404's.
title = `404 Not Found - ${state.frontity.title}`;
}
return (
<title>{title}</title>
);
};
export default connect(Title);
{/* 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;
{post.content && (
{/* If the post has tags, render it */}
{post.tags && }
)}
) : null;
};
export default connect(Post);
const Header = styled(PostHeader)`
background-color: #fff;
margin: 0;
padding: 4rem 0;
@media (min-width: 700px) {
padding: 8rem 0;
}
`;
const PostArticle = styled(ArticlePost)`
padding-top: 0 !important;
`;
const FeaturedImage = styled(FeaturedMedia)`
margin-top: 0 !important;
position: relative;
{post.content && (
{/* If the post has tags, render it */}
{post.tags && }
)}
) : null;
};
export default connect(Post);
const Header = styled(PostHeader)`
background-color: #fff;
margin: 0;
padding: 4rem 0;
@media (min-width: 700px) {
padding: 8rem 0;
}
`;
const PostArticle = styled(_Post)`
padding-top: 0 !important;
`;
const FeaturedImage = styled(FeaturedMedia)`
margin-top: 0 !important;
position: relative;
};
// Connect the Item to gain access to `state` as a prop
export default connect(Item);
const EntryTitle = styled.h1`
margin: 0;
@media (min-width: 700px) {
font-size: 6.4rem;
}
@media (min-width: 1200px) {
font-size: 8.4rem;
}
`;
const EntryTitleLink = styled(Link)`
color: #000000;
text-decoration: none;
&:hover {
text-decoration: underline;
}
`;
const AuthorName = styled.span`
color: rgba(12, 17, 43, 0.9);
font-size: 0.9em;
`;
const PublishDate = styled.span`
color: rgba(12, 17, 43, 0.9);
font-size: 0.9em;
`;
const getWpUrl = (api: string, isWpCom: boolean): URL => {
const apiUrl = new URL(api);
if (isWpCom) {
const { pathname } = apiUrl;
return new URL(pathname.replace(/^\/wp\/v2\/sites\//, "https://"));
}
// Get API subdirectory.
const apiSubdir = apiUrl.pathname.replace(/\/wp-json\/?$/, "/");
return new URL(apiSubdir, apiUrl);
};
const getWpUrl = (api: string, isWpCom: boolean): URL => {
const apiUrl = new URL(api);
if (isWpCom) {
const { pathname } = apiUrl;
return new URL(pathname.replace(/^\/wp\/v2\/sites\//, "https://"));
}
// Get API subdirectory.
const apiSubdir = apiUrl.pathname.replace(/\/wp-json\/?$/, "/");
return new URL(apiSubdir, apiUrl);
};
const getWpUrl = (api: string, isWpCom: boolean): URL => {
const apiUrl = new URL(api);
if (isWpCom) {
const { pathname } = apiUrl;
return new URL(pathname.replace(/^\/wp\/v2\/sites\//, "https://"));
}
// Get API subdirectory.
const apiSubdir = apiUrl.pathname.replace(/\/wp-json\/?$/, "/");
return new URL(apiSubdir, apiUrl);
};