Skip to content

Commit

Permalink
feat(): global hardcoded docs footer (#26)
Browse files Browse the repository at this point in the history
* define schema for footer content

* textual footer content

* parse footercontent and map to typescript function

* move Footer Schema and Content into index.tsx

* correct indentation

* remove redundant code

* use footerConfig within TSX function

* Delete src/custom/docs/components/footer/text.json

delete unneeded text.json

* delete redundent file

* remove {props.subtitle} and add Trademark Guidelines

* Add forward slash after second legal entry

* Add lint to ci.

* Fix type errors.

* Remove domain from intralinks.

* remove unneeded subtitle

* change title to name and specify column as property of FooterConfig

* Improve footer link wrapping.

* feat(): Feat/global footer

commit f982431
Merge: ed1e978 34f9064
Author: Irfan Khan <[email protected]>
Date:   Thu Oct 3 15:21:06 2024 +0100

    Merge branch 'feat/global_footer' of https://github.com/CQCL/quantinuum-ui into feat/global_footer

commit ed1e978
Author: Irfan Khan <[email protected]>
Date:   Thu Oct 3 15:19:44 2024 +0100

    change title to name and specify column as property of FooterConfig

commit d203c5e
Author: Irfan Khan <[email protected]>
Date:   Thu Oct 3 15:18:48 2024 +0100

    remove unneeded subtitle

commit 34f9064
Author: aidanCQ <[email protected]>
Date:   Thu Oct 3 15:17:58 2024 +0100

    Remove domain from intralinks.

commit 60c1a3a
Author: aidanCQ <[email protected]>
Date:   Thu Oct 3 15:17:00 2024 +0100

    Fix type errors.

commit c35745f
Author: aidanCQ <[email protected]>
Date:   Thu Oct 3 15:16:55 2024 +0100

    Add lint to ci.

commit 1204910
Author: Irfan Khan <[email protected]>
Date:   Thu Oct 3 15:06:02 2024 +0100

    Add forward slash after second legal entry

commit 1c7d0e1
Author: Irfan Khan <[email protected]>
Date:   Thu Oct 3 15:03:30 2024 +0100

    remove {props.subtitle} and add Trademark Guidelines

commit a38ca41
Author: Irfan Khan <[email protected]>
Date:   Thu Oct 3 15:02:55 2024 +0100

    delete redundent file

commit 4478a0e
Author: irfankhan10 <[email protected]>
Date:   Tue Oct 1 16:08:33 2024 +0100

    Delete src/custom/docs/components/footer/text.json

    delete unneeded text.json

commit 774acd5
Author: Irfan Khan <[email protected]>
Date:   Mon Sep 30 18:45:03 2024 +0200

    use footerConfig within TSX function

commit 8164624
Author: Irfan Khan <[email protected]>
Date:   Mon Sep 30 18:44:19 2024 +0200

    remove redundant code

commit 693031e
Author: Irfan Khan <[email protected]>
Date:   Mon Sep 30 18:41:41 2024 +0200

    correct indentation

commit 71b7c82
Author: Irfan Khan <[email protected]>
Date:   Mon Sep 30 18:41:12 2024 +0200

    move Footer Schema and Content into index.tsx

commit fa8a483
Author: Irfan Khan <[email protected]>
Date:   Mon Sep 30 18:21:39 2024 +0200

    parse footercontent and map to typescript function

commit f9de06c
Author: Irfan Khan <[email protected]>
Date:   Mon Sep 30 18:21:16 2024 +0200

    textual footer content

commit e32a714
Author: Irfan Khan <[email protected]>
Date:   Mon Sep 30 18:21:09 2024 +0200

    define schema for footer content

---------

Co-authored-by: aidanCQ <[email protected]>
  • Loading branch information
irfankhan10 and aidanCQ authored Oct 3, 2024
1 parent 6843454 commit 9b79b4e
Show file tree
Hide file tree
Showing 5 changed files with 73 additions and 77 deletions.
1 change: 1 addition & 0 deletions .github/workflows/pre-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ jobs:
node-version: 20
cache: 'npm'
- run: npm ci
- run: npm run lint
- run: npm run build
- run: npx semantic-release
env:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ jobs:
node-version: 20
cache: 'npm'
- run: npm ci
- run: npm run lint
- run: npm run build && npm run build-storybook

- name: Upload artifact.
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"scripts": {
"storybook": "storybook dev -p 6006",
"build-storybook": "storybook build",
"lint": "tsc",
"build": "rm -rf ./dist && rollup -c"
},
"release": {
Expand Down
83 changes: 69 additions & 14 deletions src/custom/docs/components/footer/index.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,55 @@
import { QuantinuumLogo } from "../../QuantinuumLogo";
import { Separator } from "src";
export const Footer = (props: { subtitle: string, columns: {
title: string;
items: {
name: string;
href: string;
}[];
}[] }) => {

const footerConfig = {
columns: [
{
name: "Products",
items: [
{
name: "H-Series",
href: "/h-series"
},
{
name: "Nexus",
href: "/nexus"
},
{
name: "InQuanto",
href: "/inquanto"
}
]
}, {
name: "Opensource",
items: [
{
name: "TKET",
href: "/tket"
},
{
name: "\u03BBambeq",
href: "/lambeq"
}
]
},{
name: "Quantinuum",
items: [
{
name: "About",
href: "https://www.quantinuum.com/about",
}, {
name: "Careers",
href: "https://www.quantinuum.com/publications",
},{
name: "Events",
href: "https://www.quantinuum.com/events"
}
]
}
],
}

export const Footer = () => {
return (
<div className="mb-24">

Expand All @@ -15,28 +58,40 @@ export const Footer = (props: { subtitle: string, columns: {
<div className="my-12"></div>

<footer className="text-muted-foreground flex w-full flex-col justify-between md:items-start lg:flex-row ">
<div className="mb-12 md:mb-0">
<div className="mb-12 lg:mb-0">
<div className="-mt-4">
<a href="https://www.quantinuum.com/" target='_blank' className='hover:opacity-75 transition'>
<QuantinuumLogo/>
</a>
</div>
<p className="max-w-[24rem] text-xs leading-5">
Copyright © {new Date().getFullYear()} Quantinuum Inc. All rights reserved.{' '}
<br /> {props.subtitle}
</p>
<div className='flex items-center gap-2 mt-2'>
<a href="https://www.quantinuum.com/terms-conditions" target="_blank" className='font-medium text-xs tracking-tight text-blue-600 dark:text-blue-300'>Terms and Conditions</a> <div>/</div> <a target="_blank" href="https://www.quantinuum.com/privacy-statement" className='font-medium text-xs tracking-tight text-blue-600 dark:text-blue-300'>Privacy Policy</a><div>/</div> <a target="_blank" href="https://www.quantinuum.com/cookie-notice" className='font-medium text-xs tracking-tight text-blue-600 dark:text-blue-300'>Cookie Notice</a>
<a href="https://www.quantinuum.com/terms-conditions" target="_blank" className='font-medium text-xs tracking-tight text-blue-600 dark:text-blue-300'>
Terms and Conditions
</a> <div>/</div>
<a target="_blank" href="https://www.quantinuum.com/privacy-statement" className='font-medium text-xs tracking-tight text-blue-600 dark:text-blue-300'>
Privacy Policy
</a><div>/</div>
</div>
<div className='flex items-center gap-2 mt-2'>
<a target="_blank" href="https://www.quantinuum.com/cookie-notice" className='font-medium text-xs tracking-tight text-blue-600 dark:text-blue-300'>
Cookie Notice
</a><div>/</div>
<a target="_blank" href="https://cdn.prod.website-files.com/669960f53cd73aedb80c8eea/66d87306d9caeeb12196f409_666c39372d2febd0b0bedf71_Quantinuum%20Trademark%20Guidelines%20v1.1%20June%202024.pdf" className='font-medium text-xs tracking-tight text-blue-600 dark:text-blue-300'>
Trademark Guidelines
</a>
</div>
</div>
<div className="grid grid-cols-1 gap-16 md:grid-cols-3 md:gap-24">
{props.columns.map((col) => {
{footerConfig.columns.map((col) => {
return (
<div key={col.title} className="flex flex-col md:items-end">
<div key={col.name} className="flex flex-col md:items-end">
<span className="text-foreground text-left text-[0.675rem] font-semibold uppercase tracking-wide md:text-right">
{col.title}
{col.name}
</span>
<ul className="mt-3 flex flex-col gap-2 md:text-right">
<ul className="mt-3 flex flex-col gap-2 lg:text-right">
{col.items.map((item) => {
return (
<li key={item.name}>
Expand Down
64 changes: 1 addition & 63 deletions stories/custom/docs-footer.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,71 +1,9 @@
import { Meta, StoryObj } from "@storybook/react";
import {DocsFooter } from "src";
import { QuantinuumLogo } from "src/custom/docs/QuantinuumLogo";

const footerConfig = {
logo: <QuantinuumLogo />,
columns: [
{
title: 'Solutions',
items: [
{
href: 'https://docs.quantinuum.com/nexus/index.html',
name: 'Quantinuum Nexus',
},
{
href: 'https://docs.quantinuum.com/inquanto/index.html',
name: 'Inquanto',
},
{
href: 'https://tket.quantinuum.com/',
name: 'TKET',
},
{
href: 'https://docs.quantinuum.com/lambeq',
name: 'Lambeq',
},
],
},
{
title: 'Hardware',
items: [
{
href: 'https://docs.quantinuum.com/h-series/index.html',
name: 'System Model H1',
},
{
href: 'https://docs.quantinuum.com/h-series/index.html',
name: 'System Model H2',
},
{
href: 'https://www.quantinuum.com/hardware#access',
name: 'Get Access',
},
],
},
{
title: 'What We Do?',
items: [
{
href: 'https://www.quantinuum.com/about',
name: 'About Quantinuum',
},
{
href: '"https://www.quantinuum.com/publications',
name: 'Research',
},
{
href: 'https://www.quantinuum.com/events',
name: 'Events',
},
],
},
],
subtitle: '',
}

export function DocsNavDemo() {
return <DocsFooter {...footerConfig} />;
return <DocsFooter />;
}

const meta: Meta<typeof DocsNavDemo> = {
Expand Down

0 comments on commit 9b79b4e

Please sign in to comment.