From 0b9faed3fc575150de4342729c74838386cedce8 Mon Sep 17 00:00:00 2001 From: Lucy Hao <hao.lucyy@gmail.com> Date: Tue, 10 Oct 2023 18:47:17 -0700 Subject: [PATCH] fix font and padding --- app/globals.scss | 2 +- components/ImageText.js | 15 +++++++++++++-- components/Link.js | 23 +++++++++++++---------- 3 files changed, 27 insertions(+), 13 deletions(-) diff --git a/app/globals.scss b/app/globals.scss index 68d4a8c..0f451b1 100644 --- a/app/globals.scss +++ b/app/globals.scss @@ -383,7 +383,7 @@ a { } } p { - font-size: 1.5rem; + font-size: 2vw; @media only screen and (max-width: 768px) { margin-top: 1rem; font-size: 15px; diff --git a/components/ImageText.js b/components/ImageText.js index 508ecb3..40ef56f 100644 --- a/components/ImageText.js +++ b/components/ImageText.js @@ -12,6 +12,17 @@ const Img = styled.img` height: auto; } `; + +const Text = styled.div` + p { + font-size: 2vw; + @media only screen and (max-width: 768px) { + margin-top: 1rem; + font-size: 15px; + } + } +`; + const ImageText = ({ header, text, side, alt, image, pad, gif, component }) => { return ( <div @@ -32,10 +43,10 @@ const ImageText = ({ header, text, side, alt, image, pad, gif, component }) => { triggerOnce={true} duration={1500} > - <div className="landing-text"> + <Text> {header ? header() : ""} {text()} - </div> + </Text> </Slide> <Slide diff --git a/components/Link.js b/components/Link.js index 8cca36b..e8d05fa 100644 --- a/components/Link.js +++ b/components/Link.js @@ -1,14 +1,17 @@ export default function Links({ header, content, contentTitles }) { return ( - <details> - <summary> - <h4>{header}</h4> - </summary> - {content.map((l, i) => ( - <p> - <a href={l}>{contentTitles[i]}</a> - </p> - ))} - </details> + <> + <details> + <summary> + <h4>{header}</h4> + </summary> + {content.map((l, i) => ( + <p> + <a href={l}>{contentTitles[i]}</a> + </p> + ))} + </details> + <br /> + </> ); } -- GitLab