Skip to content

Commit

Permalink
css updates
Browse files Browse the repository at this point in the history
  • Loading branch information
meghsohor committed Oct 15, 2020
1 parent 679878a commit f94cf69
Show file tree
Hide file tree
Showing 9 changed files with 67 additions and 29 deletions.
8 changes: 7 additions & 1 deletion src/components/accordion/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,5 +47,11 @@ Accordion.Header = function AccordionHeader({ children, ...restProps }) {
Accordion.Body = function AccordionBody({ children, ...restProps }) {
const { toggleShow } = useContext(ToggleContext);

return toggleShow ? <Body {...restProps}>{children}</Body> : null;
/* return toggleShow ? <Body {...restProps}>{children}</Body> : null; */

return (
<Body className={toggleShow ? 'open' : 'closed'} {...restProps}>
<span>{children}</span>
</Body>
);
};
27 changes: 22 additions & 5 deletions src/components/accordion/styles/accordion.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,17 @@ export const Title = styled.h1`

export const Item = styled.div`
color: white;
margin-bottom: 10px;
margin: auto;
max-width: 670px;
margin-bottom: 10px;
max-width: 728px;
width: 100%;
&:first-of-type {
margin-top: 3em;
}
&:last-of-type {
margin-bottom: 0;
}
`;

export const Header = styled.div`
Expand All @@ -57,6 +60,7 @@ export const Header = styled.div`
img {
filter: brightness(0) invert(1);
width: 24px;
user-select: none;
@media (max-width: 600px) {
width: 16px;
Expand All @@ -69,15 +73,28 @@ export const Header = styled.div`
`;

export const Body = styled.div`
max-height: 1200px;
transition: max-height 0.25s cubic-bezier(0.5, 0, 0.1, 1);
font-size: 26px;
font-weight: normal;
line-height: normal;
background: #303030;
padding: 0.8em 2.2em 0.8em 1.2em;
white-space: pre-wrap;
user-select: none;
overflow: hidden;
&.closed {
max-height: 0;
overflow: hidden;
transition: max-height 0.25s cubic-bezier(0.5, 0, 0.1, 1);
}
&.open {
max-height: 1200px;
transition: max-height 0.25s cubic-bezier(0.5, 0, 0.1, 1);
}
span {
display: block;
padding: 0.8em 2.2em 0.8em 1.2em;
}
@media (max-width: 600px) {
font-size: 16px;
Expand Down
9 changes: 4 additions & 5 deletions src/components/card/styles/card.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ export const Container = styled.div`
display: flex;
flex-direction: column;
margin-bottom: 50px;
box-sizing: border-box;
> ${Title} {
@media (max-width: 1000px) {
Expand All @@ -34,7 +33,7 @@ export const Group = styled.div`
> ${Container}:first-of-type {
@media (min-width: 1100px) {
margin-top: -150px;
margin-top: -100px;
}
}
`;
Expand Down Expand Up @@ -187,10 +186,10 @@ export const Content = styled.div`
`;

export const Maturity = styled.div`
background-color: ${({ rating }) => (rating >= 15 ? 'red' : 'green')};
background-color: ${({ rating }) => (rating >= 15 ? '#f44336' : '#2f9600')};
border-radius: 15px;
width: 20px;
padding: 5px;
width: 28px;
line-height: 28px;
text-align: center;
color: white;
font-weight: bold;
Expand Down
2 changes: 1 addition & 1 deletion src/components/footer/styles/footer.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import styled from 'styled-components/macro';

export const Container = styled.div`
display: flex;
padding: 70px 56px;
padding: 70px 0;
margin: auto;
max-width: 1000px;
flex-direction: column;
Expand Down
1 change: 0 additions & 1 deletion src/components/form/styles/form.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ export const Container = styled.div`
min-height: 660px;
background-color: rgba(0, 0, 0, 0.75);
border-radius: 5px;
box-sizing: border-box;
width: 100%;
margin: auto;
max-width: 450px;
Expand Down
30 changes: 22 additions & 8 deletions src/components/header/styles/header.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { Link as ReachRouterLink } from 'react-router-dom';
export const Background = styled.div`
display: flex;
flex-direction: column;
background: url(${({ src }) => (src ? `../images/misc/${src}.jpg` : '../images/misc/home-bg.jpg')}) top left / cover
background: linear-gradient(to bottom, rgba(0, 0, 0, 0.35), rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.35)), url(${({ src }) => (src ? `../images/misc/${src}.jpg` : '../images/misc/home-bg.jpg')}) top left / cover
no-repeat;
@media (max-width: 1100px) {
Expand All @@ -15,8 +15,7 @@ export const Background = styled.div`
export const Container = styled.div`
display: flex;
margin: 0 56px;
height: 64px;
padding: 18px 0;
height: 100px;
justify-content: space-between;
align-items: center;
Expand Down Expand Up @@ -51,16 +50,21 @@ export const Group = styled.div`
`;

export const SearchInput = styled.input`
background-color: #44444459;
background-color: rgba(64, 64, 64, 0.5);
color: white;
border: 1px solid white;
transition: width 0.5s;
height: 30px;
font-size: 14px;
border-radius: 4px;
margin-left: ${({ active }) => (active === true ? '10px' : '0')};
padding: ${({ active }) => (active === true ? '0 10px' : '0')};
opacity: ${({ active }) => (active === true ? '1' : '0')};
width: ${({ active }) => (active === true ? '200px' : '0px')};
&:focus {
background-color: rgba(0, 0, 0, 0.8);
}
`;

export const Search = styled.div`
Expand All @@ -81,6 +85,13 @@ export const SearchIcon = styled.button`
cursor: pointer;
background-color: transparent;
border: 0;
outline: 0;
height: 32px;
width: 32px;
padding: 0;
display: flex;
align-items: center;
justify-content: center;
img {
filter: brightness(0) invert(1);
Expand All @@ -100,7 +111,6 @@ export const ButtonLink = styled(ReachRouterLink)`
padding: 8px 17px;
cursor: pointer;
text-decoration: none;
box-sizing: border-box;
&:hover {
background: #f40612;
Expand Down Expand Up @@ -136,7 +146,11 @@ export const Dropdown = styled.div`
margin-bottom: 0;
}
${Link}, ${Picture} {
${Link} {
cursor: pointer;
}
${Picture} {
cursor: default;
}
}
Expand Down Expand Up @@ -196,8 +210,8 @@ export const Text = styled.p`
`;

export const Logo = styled.img`
height: 32px;
width: 108px;
height: 36px;
width: 134px;
margin-right: 40px;
@media (min-width: 1449px) {
Expand Down
1 change: 0 additions & 1 deletion src/components/opt-form/styles/opt-form.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ export const Break = styled.div`
export const Button = styled.button`
display: flex;
align-items: center;
height: 100%;
height: 70px;
background: #e50914;
color: white;
Expand Down
2 changes: 1 addition & 1 deletion src/components/player/styles/player.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export const Overlay = styled.div`
left: 0;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.5);
background: rgba(0, 0, 0, 0.75);
margin: 0 20px;
`;

Expand Down
16 changes: 10 additions & 6 deletions src/global-styles.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
import { createGlobalStyle } from 'styled-components';

export const GlobalStyles = createGlobalStyle`
*, *:before, *:after {
box-sizing: border-box;
}
html, body {
font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
background-color: #000000;
color: #333333;
font-size: 16px;
height: 100%;
font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
background-color: #000000;
color: #333333;
font-size: 16px;
}`;

0 comments on commit f94cf69

Please sign in to comment.