Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[#3386] fix(web): fix font family of the gravitino title #3397

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions web/LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -215,3 +215,6 @@
./src/types/axios.d.ts
./src/lib/enums/httpEnum.ts
./src/lib/utils/index.js (parts of)

Third party SIL Open Font License v1.1 (OFL-1.1)
(SIL OPEN FONT LICENSE Version 1.1) The Alata font family (https://github.com/SorkinType/Alata)
11 changes: 9 additions & 2 deletions web/src/app/login/page.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,20 @@

import { useRouter } from 'next/navigation'
import Image from 'next/image'
import { Alata } from 'next/font/google'

import { Box, Card, Grid, Button, CardContent, Typography, TextField, FormControl, FormHelperText } from '@mui/material'

import clsx from 'clsx'
import * as yup from 'yup'
import { useForm, Controller } from 'react-hook-form'
import { yupResolver } from '@hookform/resolvers/yup'

import { useAppDispatch } from '@/lib/hooks/useStore'
import { loginAction } from '@/lib/store/auth'

const fonts = Alata({ subsets: ['latin'], weight: ['400'], display: 'swap' })

const defaultValues = {
grant_type: 'client_credentials',
client_id: '',
Expand Down Expand Up @@ -63,12 +67,15 @@ const LoginPage = () => {
<CardContent className={`twc-p-12`}>
<Box className={`twc-mb-8 twc-flex twc-items-center twc-justify-center`}>
<Image
src={`${process.env.NEXT_PUBLIC_BASE_PATH}/icons/gravitino.svg`}
src={`${process.env.NEXT_PUBLIC_BASE_PATH ?? ''}/icons/gravitino.svg`}
width={24}
height={24}
alt='logo'
/>
<Typography variant='h6' className={`twc-ml-2 twc-font-semibold twc-text-[1.5rem] logoText`}>
<Typography
variant='h6'
className={clsx('twc-ml-2 twc-font-semibold twc-text-[1.5rem]', fonts.className)}
>
Gravitino
</Typography>
</Box>
Expand Down
16 changes: 11 additions & 5 deletions web/src/app/rootLayout/AppBar.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@

import Link from 'next/link'
import Image from 'next/image'
import { Alata } from 'next/font/google'

import { useState, useEffect } from 'react'

import {
Box,
Expand All @@ -20,14 +23,16 @@ import {
MenuItem
} from '@mui/material'

import clsx from 'clsx'

import VersionView from './VersionView'
import LogoutButton from './Logout'
import { useSearchParams } from 'next/navigation'
import { useRouter } from 'next/navigation'
import { useAppSelector, useAppDispatch } from '@/lib/hooks/useStore'
import { fetchMetalakes } from '@/lib/store/metalakes'

import { useState, useEffect } from 'react'
const fonts = Alata({ subsets: ['latin'], weight: ['400'], display: 'swap' })

const AppBar = () => {
const searchParams = useSearchParams()
Expand Down Expand Up @@ -65,16 +70,17 @@ const AppBar = () => {
>
<Link href='/metalakes' className={'twc-flex twc-items-center twc-no-underline twc-mr-8'}>
<Image
src={process.env.NEXT_PUBLIC_BASE_PATH + '/icons/gravitino.svg'}
src={process.env.NEXT_PUBLIC_BASE_PATH ?? '' + '/icons/gravitino.svg'}
width={32}
height={32}
alt='logo'
/>
<Typography
variant='h5'
className={
'logoText twc-ml-2 twc-leading-none twc-font-bold twc-tracking-[-0.45px] twc-normal-case twc-text-[1.75rem]'
}
className={clsx(
'twc-ml-2 twc-leading-none twc-tracking-[-0.45px] twc-normal-case twc-text-[1.75rem]',
fonts.className
)}
>
Gravitino
</Typography>
Expand Down
6 changes: 0 additions & 6 deletions web/src/lib/styles/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
@tailwind components;
@tailwind utilities;

@import url('https://fonts.googleapis.com/css2?family=Alata&display=swap');

html,
body {
min-height: 100%;
Expand All @@ -17,7 +15,3 @@ body {
a {
-webkit-user-drag: none;
}

.logoText {
font-family: 'Alata' !important;
}
Loading