Skip to content
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
20 changes: 20 additions & 0 deletions components/DefaultPage/index.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
import React from 'react';
import getConfig from 'next/config';
import Head from 'next/head';
import Image from 'next/image';
import Link from 'next/link';
import { MDXRemote, MDXRemoteSerializeResult } from 'next-mdx-remote';

import githubIcon from '../../node_modules/@tabler/icons/icons/brand-github.svg';
import pullRequestIcon from '../../node_modules/@tabler/icons/icons/git-pull-request.svg';

import { Footer } from '../Footer';
import { Header } from '../Header';
import { Heading, TableOfContents } from '../../lib/content';
Expand All @@ -17,6 +22,7 @@ const scope = {

export interface Props {
path: string;
filePath: string;
source: MDXRemoteSerializeResult;
tableOfContents: TableOfContents;
headings: Heading[];
Expand All @@ -36,6 +42,20 @@ export const DefaultPage = (props: Props) => {
<NavBar toc={toc} path={props.path} />
<div className={styles['generated-content']}>
<MDXRemote {...props.source} scope={scope} />
<hr className={styles['bottom-divider']} />
<div className={styles['open-source-cta']}>
<h6>
<Image src={githubIcon.src} width={24} height={24} alt={'GitHub'} />
<span>This site is open source!</span>
</h6>
<div className={styles['open-source-cta__content']}>
<p>See something that could be improved? Open a pull request on GitHub.</p>
<Link className={styles['open-source-cta__button']} href={`https://github.com/tempus-ex/docs/blob/main/${props.filePath}`} target="_blank">
<Image src={pullRequestIcon.src} width={16} height={16} alt={'Pull Request'} />
Contribute to This Page
</Link>
</div>
</div>
</div>
<PageNavBar headings={props.headings} />
</main>
Expand Down
53 changes: 53 additions & 0 deletions components/DefaultPage/styles.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -201,3 +201,56 @@
}
}
}

.bottom-divider {
border: 0;
border-top: 1px solid var(--border-color);
margin-top: spacing("xl");
margin-bottom: spacing("xl");
}

.open-source-cta {
h6 {
text-transform: none;

img {
margin-right: spacing("xs");
vertical-align: middle;
}

span {
vertical-align: middle;
}
}

// This button is designed to match GitHub's look and feel for buttons.
&__button {
font-size: 1.5rem;

background-color: rgb(246, 248, 250);
border: 1px solid rgb(9, 105, 218);
border-radius: 6px;
color: rgb(36, 41, 47) !important;
padding: 8px 18px;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji" !important;
box-shadow: rgba(31, 35, 40, 0.04) 0px 1px 0px 0px, rgba(255, 255, 255, 0.25) 0px 1px 0px 0px inset;
font-size: 14px !important;
font-weight: 500 !important;
line-height: 20px;
vertical-align: middle;

img {
margin-right: 4px;
vertical-align: text-bottom;
}
}

&__content {
margin-left: calc(24px + spacing("xs"));

p {
color: rgb(101, 109, 118);
margin-bottom: spacing("lg");
}
}
}
4 changes: 4 additions & 0 deletions content/fusionfeed/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,7 @@ It can provide many types of data, including the following:
All API endpoints are prefixed with a major version number. The current major API version is V2. All of the current API endpoint URLs begin with <code>{config.fusionFeedUrl}/v2/</code>.

Tempus Ex is committed to never making breaking changes for any given major version number. However, Tempus Ex will from time to time deprecate APIs. When this happens, those deprecated APIs will continue to work, but it is highly recommended that you upgrade to the suggested alternatives as soon as possible.

## Status

To subscribe to status updates for FusionFeed, please visit [status.tempus-ex.com](https://status.tempus-ex.com).
1 change: 1 addition & 0 deletions lib/content-loading.ts
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,7 @@ export async function getAllContent(): Promise<Map<string, Content>> {
links,
source,
path: contentPath,
filePath: p,
});
}

Expand Down
1 change: 1 addition & 0 deletions lib/content.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ export interface Content {
frontmatter: Frontmatter;
source: MDXRemoteSerializeResult;
path: string;
filePath: string;
graphql: GraphQL[];
rest: REST[];
headings: Heading[];
Expand Down
1 change: 1 addition & 0 deletions pages/[...path].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ export const getStaticProps = async function ({ params }: { params: Params }) {
return {
props: {
path,
filePath: content.filePath,
source: content.source,
tableOfContents,
headings: content.headings,
Expand Down