Skip to content

Commit

Permalink
fix: font styling
Browse files Browse the repository at this point in the history
  • Loading branch information
ahong75 committed Oct 30, 2023
1 parent 3d78384 commit 2a63e10
Show file tree
Hide file tree
Showing 27 changed files with 167 additions and 43 deletions.
9 changes: 8 additions & 1 deletion src/components/AddStandard/AddStandardForm.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,14 @@ const AddStandardForm = () => {
{({ handleSubmit, values }) => (
<Box p={14} pb={14} w="full" as="form" onSubmit={handleSubmit}>
<HStack>
<Heading as="h1" size="xl" color="Grey" textAlign="left" my={2}>
<Heading
as="h1"
size="xl"
color="#515254"
textAlign="left"
my={2}
fontFamily="Roboto Slab"
>
Add a New Standard
</Heading>

Expand Down
3 changes: 2 additions & 1 deletion src/components/AddStandard/CreateTag.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ const CreateTag = () => {
<Box mb={4}>
<FormLabel
fontSize="xl"
color="#8C8C8C"
color="#51524"
fontFamily="'Europa-Bold', sans-serif"
fontWeight="bold"
textAlign="left"
mb={1}
Expand Down
9 changes: 5 additions & 4 deletions src/components/AddStandard/EditAddStandard.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,15 @@ const EditAddStandard = ({ handleSubmit }) => {
capitalizeAndRemoveDash(buildingType.name)
);
return (
<Box>
<Box fontFamily="'Europa-Regular', sans-serif">
<Box w="50%">
<MassUpload name="massUpload" />

<FormLabel
fontSize="xl"
fontSize="2xl"
fontWeight="bold"
color="#8C8C8C"
fontFamily="'Europa-Bold', sans-serif"
color="#515254"
mb={1}
mt={5}
>
Expand Down Expand Up @@ -76,7 +77,7 @@ const EditAddStandard = ({ handleSubmit }) => {
/>
</Box>

<FormLabel fontSize="xl" fontWeight="bold" color="#8C8C8C" mb={1} mt={5}>
<FormLabel fontSize="xl" fontWeight="bold" color="#515254" mb={1} mt={5}>
Tags
</FormLabel>

Expand Down
8 changes: 7 additions & 1 deletion src/components/ArchivedReportView/ArchivedReportView.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,13 @@ const ArchivedReportView = () => {
console.log(archivedReports);
return (
<>
<Heading fontSize="1.5em">Completed Reports</Heading>
<Heading
fontSize="1.5em"
fontFamily="'Roboto Slab'
, serif"
>
Completed Reports
</Heading>
{user?.isLoggedIn && (
<Link
href="/archived-reports"
Expand Down
6 changes: 5 additions & 1 deletion src/components/FormComponents/Error.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@ const Error = ({ name }) => {
const {
meta: { error },
} = useField(name, { subscription: { error: true } });
return <FormErrorMessage>{error}</FormErrorMessage>;
return (
<FormErrorMessage fontFamily="'Europa-Regular', sans-serif">
{error}
</FormErrorMessage>
);
};

export default Error;
8 changes: 7 additions & 1 deletion src/components/FormComponents/InputControl.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,12 @@ const InputControl = ({ name, label, type, ...props }) => {
return (
<Control name={name}>
<HStack>
<FormLabel htmlFor={name} m={0} color="Grey">
<FormLabel
htmlFor={name}
m={0}
color="Grey"
fontFamily="'Europa-Regular', sans-serif"
>
{label}
</FormLabel>
<Error name={name} />
Expand All @@ -20,6 +25,7 @@ const InputControl = ({ name, label, type, ...props }) => {
isInvalid={meta.error && meta.touched}
id={name}
type={type}
fontFamily="'Europa-Regular', sans-serif"
/>
</Control>
);
Expand Down
3 changes: 2 additions & 1 deletion src/components/FormComponents/Multiselect.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ const Multiselect = ({ name, label, entries }) => {
m={0}
fontSize="xl"
fontWeight="bold"
color="#8C8C8C"
fontFamily="'Europa-Bold', sans-serif"
color="#515254"
>
{label}
</FormLabel>
Expand Down
15 changes: 13 additions & 2 deletions src/components/FormComponents/TextareaControl.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,23 @@ const AdaptedTextarea = ({ input, meta, ...rest }) => (
const TextareaControl = ({ name, label, ...props }) => (
<Control name={name}>
<HStack>
<FormLabel htmlFor={name} m={0} color="Grey">
<FormLabel
htmlFor={name}
m={0}
color="Grey"
fontFamily="'Europa-Regular', sans-serif"
>
{label}
</FormLabel>
<Error name={name} />
</HStack>
<Field name={name} component={AdaptedTextarea} id={name} {...props} />
<Field
name={name}
component={AdaptedTextarea}
id={name}
fontFamily="'Europa-Regular', sans-serif"
{...props}
/>
</Control>
);

Expand Down
18 changes: 15 additions & 3 deletions src/components/Login/LoginComponent/LoginComponent.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,14 @@ const LoginComponent = () => {
};

return (
<Flex direction="column" height="65%" width="60%" gap="1em">
<Text fontSize="3xl" as="b">
<Flex
direction="column"
height="65%"
width="60%"
gap="1em"
fontFamily="Europa-Regular"
>
<Text fontSize="3xl" as="b" fontFamily="Roboto Slab">
Login
</Text>
<Box>
Expand All @@ -46,7 +52,13 @@ const LoginComponent = () => {
/>
</FormControl>
</Box>
<Button width="100%" height="2.3em" variant="Blue" onClick={handleSubmit}>
<Button
width="100%"
height="2.3em"
variant="Blue"
onClick={handleSubmit}
fontFamily="Europa-Bold"
>
Log In
</Button>
{/* <Center gap="0.3em">
Expand Down
10 changes: 8 additions & 2 deletions src/components/Modals/BuildingTypeModal/BuildingTypeModal.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,15 @@ const BuildingTypeModal = ({ isOpen, onClose }) => {
size={{ base: "xs", md: "2xl", lg: "4xl" }}
>
<ModalOverlay />
<ModalContent rounded={14}>
<ModalContent rounded={14} fontFamily="Europa-Regular">
<ModalCloseButton right={2} top={0} m={4} />
<ModalHeader mt={8} mx={6} fontSize="4xl" color="#6D6E70">
<ModalHeader
mt={8}
mx={6}
fontSize="4xl"
color="#6D6E70"
fontFamily="Roboto Slab"
>
Add A New Building Type
</ModalHeader>
<Form
Expand Down
11 changes: 9 additions & 2 deletions src/components/Modals/CardModal/CardModal.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ const CardModal = ({
size={{ base: "xs", md: "2xl", lg: "4xl" }}
>
<ModalOverlay />
<ModalContent rounded={14}>
<ModalContent rounded={14} fontFamily="'Europa-Regular', sans-serif">
<ModalCloseButton right={2} top={0} m={4} />
<ModalHeader mt={10} mx={6}>
<Flex
Expand All @@ -266,7 +266,9 @@ const CardModal = ({
{editing ? (
<InputControl name="title" size="lg"></InputControl>
) : (
<Heading mb={2}>{card.title}</Heading>
<Heading mb={2} fontFamily="'Roboto Slab', serif" color="#515254">
{card.title}
</Heading>
)}
{user?.isAdmin ? (
!editing ? (
Expand Down Expand Up @@ -296,6 +298,7 @@ const CardModal = ({
whiteSpace="nowrap"
width="auto"
onClick={onDiscardChangesOpen}
fontFamily="Europa-Bold"
>
Discard Changes
</Button>
Expand All @@ -310,6 +313,7 @@ const CardModal = ({
_active={{ bgColor: "#057b8f" }}
onClick={onSaveChangesOpen}
isDisabled={form.hasValidationErrors}
fontFamily="Europa-Bold"
>
Save Changes
</Button>
Expand Down Expand Up @@ -602,6 +606,7 @@ const CardModal = ({
variant="Red"
size="lg"
onClick={onDeleteStandardOpen}
fontFamily="Europa-Bold"
>
Delete Standard
</Button>
Expand All @@ -614,6 +619,7 @@ const CardModal = ({
setSelectedImage(0);
openImagePreviewCallback();
}}
fontFamily="Europa-Bold"
>
View Notes
</Button>
Expand All @@ -622,6 +628,7 @@ const CardModal = ({
variant="Blue-rounded"
size="lg"
isDisabled={user?.isLoggedIn ? false : true}
fontFamily="Europa-Bold"
>
{!selected
? "Add to Report"
Expand Down
4 changes: 3 additions & 1 deletion src/components/Modals/CardModal/ConfirmActionModal.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ const ConfirmActionModal = ({
return (
<Modal isOpen={isOpen} onClose={onClose} isCentered={true}>
<ModalOverlay />
<ModalContent rounded={14}>
<ModalContent rounded={14} fontFamily="Europa-Regular">
<ModalHeader
pt={10}
display="flex"
Expand Down Expand Up @@ -81,6 +81,7 @@ const ConfirmActionModal = ({
fontSize="md"
width="auto"
onClick={onClose}
fontFamily="Europa-Bold"
>
{abandonActionText}
</Button>
Expand All @@ -91,6 +92,7 @@ const ConfirmActionModal = ({
fontSize="md"
width="auto"
onClick={handleAction}
fontFamily="Europa-Bold"
>
{confirmActionText}
</Button>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const ConfirmActionModal = ({
{...rest}
>
<ModalOverlay />
<ModalContent rounded={14} display="flex">
<ModalContent rounded={14} display="flex" fontFamily="Europa-Regular">
<ModalHeader
pt={10}
display="flex"
Expand Down Expand Up @@ -65,6 +65,8 @@ const ConfirmActionModal = ({
size="sm"
fontSize="md"
width="auto"
fontWeight="700"
fontFamily="Europa-Bold"
onClick={handleCancelAction ? handleCancelAction : onClose}
>
{cancelButtonText}
Expand All @@ -74,6 +76,8 @@ const ConfirmActionModal = ({
size="sm"
fontSize="md"
width="auto"
fontWeight="700"
fontFamily="Europa-Bold"
onClick={handleAction}
>
{confirmButtonText}
Expand Down
10 changes: 9 additions & 1 deletion src/components/NavBar/NavBar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,14 @@ const NavBar = () => {

const NavLinkAuth = (props) => {
if (!user?.isLoggedIn) {
return <NavLink name="Login" href={urls.pages.login} {...props} />;
return (
<NavLink
fontFamily="Europa-Regular"
name="Login"
href={urls.pages.login}
{...props}
/>
);
} else {
return (
<Flex align="center">
Expand Down Expand Up @@ -218,6 +225,7 @@ const NavBar = () => {
fontSize="lg"
onClick={onCartOpen}
style={shoppingCartButtonStyle}
fontFamily="Europa-Regular"
>
{<Icon as={FiChevronsUp} mr="1" fontSize="xl" />} Report Preview
</Button>
Expand Down
1 change: 1 addition & 0 deletions src/components/Notes/AddNewNote.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ const AddNewNote = ({ newNote, setNewNote, createNewNote }) => {
color="Grey"
value={newNote.body}
fontSize="sm"
fontFamily="Europa-Regular"
onChange={(val) => handleChange(val)}
submitOnBlur={false}
onSubmit={() => {
Expand Down
10 changes: 6 additions & 4 deletions src/components/Notes/ModalNotes.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import {
// Button,
Circle,
Flex,
Heading,
HStack,
Heading,
IconButton,
Text,
VStack,
Expand All @@ -16,9 +16,9 @@ import useSWR, { mutate } from "swr";
import { thumbsDown, thumbsUp, thumbsUpAndDown } from "../../actions/Card";
import useUser from "../../lib/hooks/useUser";
import AddNewNote from "./AddNewNote";
import InformationPreview from "./InformationPreview";
import Note from "./Note";
import SentimentButton from "./SentimentButton";
import InformationPreview from "./InformationPreview";

export default function ModalNotes({
selState,
Expand Down Expand Up @@ -102,7 +102,7 @@ export default function ModalNotes({
justifyContent="space-between"
>
<VStack alignItems="left" w="100%" maxH={{ xl: "86%", "2xl": "89%" }}>
<Heading size="lg" mt={3} mb={2}>
<Heading size="lg" mt={3} mb={2} fontFamily="Roboto Slab">
Notes
</Heading>

Expand Down Expand Up @@ -178,7 +178,9 @@ export default function ModalNotes({
<Flex alignItems="end">
<VStack alignItems="left" w="80%">
<HStack>
<Text fontSize="sm">Was this image helpful?</Text>
<Text fontSize="sm" fontFamily="Europa-Regular">
Was this image helpful?
</Text>
{user?.isAdmin ? (
<IconButton
bg="none"
Expand Down
2 changes: 1 addition & 1 deletion src/components/Notes/ReportNotes.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export default function ReportNotes({
return (
<VStack alignItems="left">
<VStack alignItems="left" w="100%">
<Heading textColor="#3F3F3F" size="md" mt={3} mb={-2}>
<Heading textColor="#515254" size="md" mt={3} mb={-2}>
Notes ({currentNotes.length})
</Heading>
{currentNotes.length === 0 ? (
Expand Down
4 changes: 3 additions & 1 deletion src/components/RecentStandardsView/RecentStandardsView.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ function RecentStandardsView({ maxCards }) {

return (
<Flex flexDirection="column" gap="16px">
<Heading fontSize="1.5em">Recent Standards</Heading>
<Heading fontSize="1.5em" fontFamily="'Roboto Slab', serif">
Recent Standards
</Heading>
<Link href="/library">
<Button width="max" variant="Grey-outlined">
<Text fontSize="xs">See All Standards</Text>
Expand Down
Loading

0 comments on commit 2a63e10

Please sign in to comment.