-
Notifications
You must be signed in to change notification settings - Fork 0
Added tailwind and started header and footer #8
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
Merged
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
7b038e5
Added tailwind and started header and footer
jenbreese 091eae4
fixup to add decanter and tailwind correctly
jenbreese 225cc8d
Adding styles to bar and pie charts
jenbreese fd1ac64
merge
jenbreese a06815c
fixup
jenbreese bd05fad
fixup
jenbreese d79d2b8
moved tables into tabbed functionality.
jenbreese 834424d
moving to apps
jenbreese 352b459
merge
jenbreese bf0ebc9
fixup! metadata title and description update
jbickar df123f7
Merge branch '2.x' into ACHOO-112
jbickar fdbb2b2
fixup! lowercase
jbickar a32aa1d
Add favicon and other metadata
jbickar 227d4b2
Hyperlink logo and site name
jbickar File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,22 +1,121 @@ | ||
| import './globals.css'; | ||
| import type { Metadata } from 'next'; | ||
| import { Inter } from 'next/font/google'; | ||
| import { Source_Sans_3, Source_Serif_4 } from 'next/font/google'; | ||
| import localFont from 'next/font/local'; | ||
| import { GlobalFooter } from '@/components/GlobalFooter/GlobalFooter'; | ||
| import { cnb } from 'cnbuilder'; | ||
|
|
||
| const inter = Inter({ subsets: ['latin'] }); | ||
| const source_sans = Source_Sans_3({ | ||
| subsets: ['latin'], | ||
| style: ['italic','normal'], | ||
| display: 'swap', | ||
| variable: '--font-source-sans', | ||
| }); | ||
|
|
||
| const source_serif = Source_Serif_4({ | ||
| subsets: ['latin'], | ||
| style: ['italic','normal'], | ||
| display: 'swap', | ||
| variable: '--font-source-serif', | ||
| }); | ||
|
|
||
| const stanford = localFont({ | ||
| src: '../public/fonts/stanford.woff2', | ||
| weight: '300', | ||
| variable: '--font-stanford', | ||
| }); | ||
|
|
||
| export const metadata: Metadata = { | ||
| title: 'Acquia API Dashboard', | ||
| description: 'Dashboard for visualizing Acquia API data', | ||
| title: 'CHURRO', | ||
| description: 'Dashboard for Acquia Views/Visits data', | ||
| applicationName: 'Stanford University', | ||
| icons: { | ||
| icon: [ | ||
| { url: '/favicon.ico', type: 'image/vnd.microsoft.icon' }, | ||
| { url: 'https://www-media.stanford.edu/assets/favicon/favicon-196x196.png', sizes: '196x196', type: 'image/png' }, | ||
| { url: 'https://www-media.stanford.edu/assets/favicon/favicon-192x192.png', sizes: '192x192', type: 'image/png' }, | ||
| { url: 'https://www-media.stanford.edu/assets/favicon/favicon-128.png', sizes: '128x128', type: 'image/png' }, | ||
| { url: 'https://www-media.stanford.edu/assets/favicon/favicon-96x96.png', sizes: '96x96', type: 'image/png' }, | ||
| { url: 'https://www-media.stanford.edu/assets/favicon/favicon-32x32.png', sizes: '32x32', type: 'image/png' }, | ||
| { url: 'https://www-media.stanford.edu/assets/favicon/favicon-16x16.png', sizes: '16x16', type: 'image/png' }, | ||
| ], | ||
| apple: [ | ||
| { url: 'https://www-media.stanford.edu/assets/favicon/apple-touch-icon-60x60.png', sizes: '60x60' }, | ||
| { url: 'https://www-media.stanford.edu/assets/favicon/apple-touch-icon-72x72.png', sizes: '72x72' }, | ||
| { url: 'https://www-media.stanford.edu/assets/favicon/apple-touch-icon-76x76.png', sizes: '76x76' }, | ||
| { url: 'https://www-media.stanford.edu/assets/favicon/apple-touch-icon-114x114.png', sizes: '114x114' }, | ||
| { url: 'https://www-media.stanford.edu/assets/favicon/apple-touch-icon-120x120.png', sizes: '120x120' }, | ||
| { url: 'https://www-media.stanford.edu/assets/favicon/apple-touch-icon-144x144.png', sizes: '144x144' }, | ||
| { url: 'https://www-media.stanford.edu/assets/favicon/apple-touch-icon-152x152.png', sizes: '152x152' }, | ||
| { url: 'https://www-media.stanford.edu/assets/favicon/apple-touch-icon-180x180.png', sizes: '180x180' }, | ||
| ], | ||
| other: [ | ||
| { rel: 'mask-icon', url: 'https://www-media.stanford.edu/assets/favicon/safari-pinned-tab.svg', color: '#ffffff' }, | ||
| ], | ||
| }, | ||
| other: { | ||
| 'msapplication-TileColor': '#FFFFFF', | ||
| 'msapplication-TileImage': 'https://www-media.stanford.edu/assets/favicon/mstile-144x144.png', | ||
| 'msapplication-square70x70logo': 'https://www-media.stanford.edu/assets/favicon/mstile-70x70.png', | ||
| 'msapplication-square150x150logo': 'https://www-media.stanford.edu/assets/favicon/mstile-150x150.png', | ||
| 'msapplication-square310x310logo': 'https://www-media.stanford.edu/assets/favicon/mstile-310x310.png', | ||
| }, | ||
| }; | ||
|
|
||
| function StanfordHeader() { | ||
| return ( | ||
| <header className="stanford-header"> | ||
| <div className="px-20 sm:px-30 md:px-50 lg:px-30 pt-5 pb-1 bg-cardinal-red"> | ||
| <a className="logo hocus:no-underline text-white hocus:text-white text-20 leading-none" href="https://www.stanford.edu">Stanford University</a> | ||
| </div> | ||
| <div className="flex flex-col md:flex-row items-center px-20 sm:px-30 md:px-50 lg:px-30 py-4"> | ||
| <div className="rs-p-0"> | ||
| <a | ||
| href="/" | ||
| className="logo text-cardinal-red type-3 no-underline hover:no-underline focus:no-underline active:no-underline" | ||
| aria-label="Go to CHURRO homepage" | ||
| > | ||
| <span className="block"> | ||
| Stanford <br/> University | ||
| </span> | ||
| </a> | ||
| </div> | ||
|
|
||
| <div className="ml-4"> | ||
| <a | ||
| href="/" | ||
| className="no-underline hover:no-underline focus:no-underline active:no-underline text-black hover:text-black focus:text-black active:text-black" | ||
| aria-label="Go to CHURRO homepage" | ||
| > | ||
| <h1 className="text-4xl rs-p-0 whitespace-nowrap">Cloud Hosting Usage Reporting with Recurring Output (CHURRO)</h1> | ||
| </a> | ||
| </div> | ||
| </div> | ||
| </header> | ||
| ); | ||
| } | ||
|
|
||
| export default function RootLayout({ | ||
| children, | ||
| }: { | ||
| children: React.ReactNode; | ||
| }) { | ||
| return ( | ||
| <html lang="en"> | ||
| <body className={inter.className}>{children}</body> | ||
| <html lang="en" | ||
| className={cnb( | ||
| source_sans.variable, | ||
| source_serif.variable, | ||
| stanford.variable, | ||
| )}> | ||
| <body className={cnb( | ||
| source_sans.variable, | ||
| source_serif.variable, | ||
| stanford.variable, | ||
| )}> | ||
| <StanfordHeader /> | ||
| <main>{children}</main> | ||
| <GlobalFooter /> | ||
| </body> | ||
| </html> | ||
| ); | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| export const widths = { | ||
| full: 'w-full', // width: 100%; default | ||
| site: 'cc', // Use Decanter custom screen margins and sets max content width of 1500px | ||
| wide: 'cc 3xl:px-100 4xl:px-[calc((100%-1800px)/2)]', | ||
| screen: 'w-screen', // width: 100vw | ||
| }; | ||
|
|
||
| export const bgColors = { | ||
| black: 'bg-gc-black text-white', | ||
| white: 'bg-white text-gc-black', | ||
| 'fog-light': 'bg-fog-light text-gc-black', | ||
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,61 @@ | ||
| import { HTMLAttributes } from 'react'; | ||
| import { cnb } from 'cnbuilder'; | ||
| import { | ||
| paddingTops, | ||
| paddingBottoms, | ||
| paddingVerticals, | ||
| marginTops, | ||
| marginBottoms, | ||
| marginVerticals, | ||
| type MarginType, | ||
| type PaddingType, | ||
| } from '@/utilities/datasource'; | ||
| import * as styles from './Container.styles'; | ||
| import * as types from './Container.types'; | ||
|
|
||
| export type ContainerProps = HTMLAttributes<HTMLElement> & { | ||
| as?: types.ContainerElementType; | ||
| width?: types.WidthType; | ||
| pt?: PaddingType; | ||
| pb?: PaddingType; | ||
| py?: PaddingType; | ||
| mt?: MarginType; | ||
| mb?: MarginType; | ||
| my?: MarginType; | ||
| bgColor?: types.BgColorType; | ||
| style?: React.CSSProperties; | ||
| }; | ||
|
|
||
| export const Container = ({ | ||
| as: AsComponent = 'div', | ||
| width = 'site', | ||
| py, | ||
| pt, | ||
| pb, | ||
| mt, | ||
| mb, | ||
| my, | ||
| bgColor, | ||
| style, | ||
| className, | ||
| children, | ||
| ...props | ||
| }: ContainerProps) => ( | ||
| <AsComponent | ||
| {...props} | ||
| style={style} | ||
| className={cnb( | ||
| bgColor ? styles.bgColors[bgColor] : '', | ||
| py ? paddingVerticals[py] : '', | ||
| pt ? paddingTops[pt] : '', | ||
| pb ? paddingBottoms[pb] : '', | ||
| my ? marginVerticals[my] : '', | ||
| mt ? marginTops[mt] : '', | ||
| mb ? marginBottoms[mb] : '', | ||
| width ? styles.widths[width] : '', | ||
| className, | ||
| )} | ||
| > | ||
| {children} | ||
| </AsComponent> | ||
| ); |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jbickar I think I would put your favions in a component and then link it here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Claude said:
TIL. See commit a32aa1d