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

Explore Metric2 #3529

Closed
wants to merge 2 commits into from
Closed
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
2 changes: 1 addition & 1 deletion aries-site/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
"main": "src/pages/index.js",
"private": true,
"dependencies": {
"aries-core": "*",
"@mdx-js/loader": "^2.3.0",
"@mdx-js/react": "^2.3.0",
"@next/mdx": "^13.4.4",
"aries-core": "*",
"next": "13.4.4",
"react-ga": "^2.7.0",
"react-syntax-highlighter": "^15.4.4",
Expand Down
Binary file not shown.
Binary file added aries-site/public/fonts/metric-2-black.woff2
Binary file not shown.
Binary file not shown.
Binary file added aries-site/public/fonts/metric-2-bold.woff2
Binary file not shown.
Binary file not shown.
Binary file added aries-site/public/fonts/metric-2-heavy.woff2
Binary file not shown.
Binary file added aries-site/public/fonts/metric-2-italic.woff2
Binary file not shown.
Binary file not shown.
Binary file added aries-site/public/fonts/metric-2-light.woff2
Binary file not shown.
Binary file not shown.
Binary file added aries-site/public/fonts/metric-2-medium.woff2
Binary file not shown.
Binary file added aries-site/public/fonts/metric-2-regular.woff2
Binary file not shown.
Binary file not shown.
Binary file added aries-site/public/fonts/metric-2-thin.woff2
Binary file not shown.
2 changes: 1 addition & 1 deletion aries-site/src/components/seo/Meta.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export const Meta = ({
// in dev mode, we allow unsafe-eval to work with react hot reloader
process.env.NODE_ENV !== 'production' ? "'unsafe-eval'" : ''
};
font-src *.hpe.com hpefonts.s3.amazonaws.com https://d3hq6blov2iije.cloudfront.net/fonts/;
font-src 'self' *.hpe.com hpefonts.s3.amazonaws.com https://d3hq6blov2iije.cloudfront.net/fonts/;
object-src 'none';`;

/*
Expand Down
50 changes: 38 additions & 12 deletions aries-site/src/pages/_app.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,33 @@
import { MDXProvider } from '@mdx-js/react';
import PropTypes from 'prop-types';
import React, { useEffect } from 'react';
import localFont from 'next/font/local';
import { Layout, ThemeMode } from '../layouts';
import { components } from '../components';

const metric = localFont({
src: [
{
path: '../../public/fonts/metric-2-regular.woff2',
weight: '400',
},
{
path: '../../public/fonts/metric-2-medium.woff2',
weight: '500',
},
{
path: '../../public/fonts/metric-2-light.woff2',
weight: '300',
},
{
path: '../../public/fonts/metric-2-bold.woff2',
weight: '700',
},
],
// src: '../../public/fonts/metric-2-regular.woff2',
variable: '--font-metric',
});

const slugToText = str => str.split('-').join(' ');

const backgroundImages = {
Expand Down Expand Up @@ -91,18 +115,20 @@ function App({ Component, pageProps, router }) {

return (
<ThemeMode>
<Layout
title={title || ''}
topic={topic}
// What's new page is MDX
isLanding={!topic && title !== 'whats new'}
// applies card images to the "hub" pages
backgroundImage={backgroundImages[title]}
>
<MDXProvider components={components}>
<Component {...pageProps} />
</MDXProvider>
</Layout>
<div className={metric.className}>
<Layout
title={title || ''}
topic={topic}
// What's new page is MDX
isLanding={!topic && title !== 'whats new'}
// applies card images to the "hub" pages
backgroundImage={backgroundImages[title]}
>
<MDXProvider components={components}>
<Component {...pageProps} />
</MDXProvider>
</Layout>
</div>
</ThemeMode>
);
}
Expand Down
Loading