How to use the frontity.styled function in frontity

To help you get started, we’ve selected a few frontity examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github frontity / frontity / packages / twenty-twenty-theme / src / components / post.js View on Github external
{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;
github frontity / frontity / packages / twentytwenty-theme / src / components / post / post.js View on Github external
{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;
github frontity / frontity / packages / twenty-twenty-theme / src / components / list / list-item.js View on Github external
};

// 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;
`;
github frontity / frontity / packages / mars-theme / src / components / list / list-item.js View on Github external
const Title = styled.h1`
  font-size: 2rem;
  color: rgba(12, 17, 43);
  margin: 0;
  padding-top: 24px;
  padding-bottom: 8px;
  box-sizing: border-box;
`;

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);
`;
github frontity / frontity / packages / mars-theme / src / components / header.js View on Github external
display: flex;
  flex-direction: column;
  justify-content: space-around;
`;

const Title = styled.h2`
  margin: 0;
  margin-bottom: 16px;
`;

const Description = styled.h4`
  margin: 0;
  color: rgba(255, 255, 255, 0.7);
`;

const StyledLink = styled(Link)`
  text-decoration: none;
`;
github frontity / frontity / packages / twenty-twenty-theme / src / components / header.js View on Github external
font-size: 1.8rem;
  font-weight: 500;
  display: none;
  letter-spacing: -0.0311em;
  transition: all 0.15s linear;

  @media (min-width: 1000px) {
    margin: 1rem 0 0 2.4rem;
  }

  @media (min-width: 700px) {
    display: block;
  }
`;

const StyledLink = styled(Link)`
  text-decoration: none;
  color: inherit;
  display: block;

  &:hover {
    text-decoration: underline;
  }
`;

const HeaderNavigationWrapper = styled.div`
  display: none;

  @media (min-width: 1000px) {
    align-items: center;
    display: flex;
  }
github frontity / frontity / packages / twenty-twenty-theme / src / components / navigation / navigation.js View on Github external
margin-left: -2.5rem;
  }
`;

const MenuItem = styled.li`
  font-size: inherit;
  line-height: 1.25;
  position: relative;
  margin: 0.8rem 0 0 1.6rem !important;

  @media (min-width: 1220px) {
    margin: 0.8rem 0 0 2.5rem !important;
  }
`;

const MenuLink = styled(Link)`
  display: block;
  line-height: 1.2;
  text-decoration: none;

  &:hover,
  &[aria-current="page"] {
    text-decoration: underline;
  }
`;
github frontity / frontity / packages / twenty-twenty-theme / src / components / search / search-form.js View on Github external
margin-top: 3rem;
`;

const Label = styled.label`
  align-items: stretch;
  display: flex;
  font-size: inherit;
  margin: 0;
  width: 100%;
`;

const SearchInput = styled(Input)`
  margin: 0 0 0.8rem 0.8rem;
`;

const SearchButton = styled(Button)`
  flex-shrink: 0;
  opacity: 1;
  transition: opacity 0.15s linear;
  margin: 0 0 0.8rem 0.8rem;
`;
github frontity / frontity / packages / twentytwenty-theme / src / components / footer.js View on Github external
© {currentYear}{" "}
            {state.frontity.title}
          
          Powered by WordPress & Frontity
        
        
      
    
  );
};

export default connect(Footer);

const SiteFooterInner = styled(SectionContainer)`
  align-items: baseline;
  display: flex;
  justify-content: space-between;
`;

const SiteFooter = styled.footer`
  margin-top: 5rem;
  border-color: #dcd7ca;
  border-style: solid;
  border-width: 0;
  padding: 3rem 0;
  background-color: ${props => props.bg};
  color: #000000;

  @media (min-width: 700px) {
    margin-top: 8rem;
github frontity / frontity / packages / twenty-twenty-theme / src / components / styles / skip-link.js View on Github external
import { styled } from "frontity";
import ScreenReaderText from "./screen-reader";

const SkipLink = styled(ScreenReaderText)`
  left: -9999rem;
  top: 2.5rem;
  z-index: 999999999;
  text-decoration: underline;

  &:focus,
  &:active {
    display: block;
    left: 6px;
    top: 7px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    line-height: normal;
    padding: 15px 23px 14px;
    z-index: 100000;