Skip to content

Commit 9ebe944

Browse files
Merge branch 'main' into pagination
2 parents 4e7301f + 08b67cc commit 9ebe944

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+10772
-1593
lines changed

.github/workflows/preview-docs.yml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,23 @@ jobs:
1616
- name: Setup Node.js
1717
uses: actions/setup-node@v4
1818
with:
19-
node-version: "18"
19+
always-auth: true
20+
node-version: '18'
21+
registry-url: https://npm.pkg.github.com/
22+
env:
23+
NODE_AUTH_TOKEN: ${{secrets.AUTH_TOKEN}}
2024

2125
- name: Install Fern
2226
run: npm install -g fern-api
2327

28+
- name: Build Navigation
29+
run: |
30+
cd custom-implementation
31+
yarn
32+
yarn build
33+
cd ../
34+
35+
2436
- name: Generate Documentation Preview with Fern
2537
id: generate_docs
2638
env:

.github/workflows/publish-docs.yml

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,38 @@
11
name: ci
22

3-
on:
4-
push:
5-
branches:
6-
- main
3+
on:
4+
push:
5+
branches:
6+
- main
77

88
jobs:
99
publish-docs:
1010
runs-on: ubuntu-latest
11+
1112
steps:
1213
- name: Checkout repo
1314
uses: actions/checkout@v4
1415

15-
- name: Setup node
16-
uses: actions/setup-node@v3
16+
- name: Setup Node.js
17+
uses: actions/setup-node@v4
18+
with:
19+
always-auth: true
20+
node-version: '18'
21+
registry-url: https://npm.pkg.github.com/
22+
env:
23+
NODE_AUTH_TOKEN: ${{secrets.AUTH_TOKEN}}
1724

1825
- name: Download Fern
1926
run: npm install -g fern-api
2027

28+
- name: Build Navigation
29+
run: |
30+
cd custom-implementation
31+
yarn
32+
yarn build
33+
cd ../
34+
2135
- name: Generate and Publish Docs
2236
env:
2337
FERN_TOKEN: ${{ secrets.FERN_TOKEN }}
24-
run: fern generate --docs
38+
run: fern generate --docs

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
node_modules
12
fern/*/definition/
23
.DS_Store
34
.idea

custom-implementation/.eslintignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
node_modules
2+
.DS_Store
3+
dist
4+
dist-ssr
5+
*.local
6+
node_modules/*
7+
yarn.lock
8+
tailwind.config.js

custom-implementation/.eslintrc.cjs

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
module.exports = {
2+
root: true,
3+
env: { browser: true, es2020: true },
4+
extends: [
5+
'eslint:recommended',
6+
'plugin:@typescript-eslint/recommended',
7+
'plugin:react-hooks/recommended',
8+
],
9+
ignorePatterns: ['dist', '.eslintrc.cjs'],
10+
parser: '@typescript-eslint/parser',
11+
plugins: ['react-refresh'],
12+
rules: {
13+
'react-refresh/only-export-components': [
14+
'warn',
15+
{ allowConstantExport: true },
16+
],
17+
},
18+
}

custom-implementation/.prettierignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
node_modules
2+
.DS_Store
3+
dist
4+
dist-ssr
5+
*.local
6+
node_modules/*
7+
yarn.lock

custom-implementation/.prettierrc.cjs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
module.exports = {
2+
semi: false,
3+
trailingComma: 'all',
4+
singleQuote: true,
5+
printWidth: 80,
6+
tabWidth: 2,
7+
jsxBracketSameLine: true,
8+
endOfLine: 'auto',
9+
}

custom-implementation/index.html

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<!doctype html>
2+
<html lang="en">
3+
<head>
4+
</head>
5+
<body>
6+
<header id="fern-header"></header>
7+
<footer id="fern-footer" style="margin-top:100px"></footer>
8+
<script type="module" src="/src/main.tsx"></script>
9+
</body>
10+
</html>

custom-implementation/package.json

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
{
2+
"name": "custom-app",
3+
"private": true,
4+
"version": "0.0.0",
5+
"type": "module",
6+
"scripts": {
7+
"dev": "vite",
8+
"build": "tsc && vite build",
9+
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
10+
"preview": "vite preview"
11+
},
12+
"dependencies": {
13+
"@devrev/marketing-shared-components": "^0.3.16",
14+
"@radix-ui/react-dropdown-menu": "^2.0.6",
15+
"@sanity/client": "^6.15.3",
16+
"react": "^18.2.0",
17+
"react-dom": "^18.2.0"
18+
},
19+
"devDependencies": {
20+
"@types/react": "^18.2.55",
21+
"@types/react-dom": "^18.2.19",
22+
"@typescript-eslint/eslint-plugin": "^6.21.0",
23+
"@typescript-eslint/parser": "^6.21.0",
24+
"@vitejs/plugin-react": "^4.2.1",
25+
"eslint": "^8.56.0",
26+
"eslint-plugin-react-hooks": "^4.6.0",
27+
"eslint-plugin-react-refresh": "^0.4.5",
28+
"typescript": "^5.2.2",
29+
"vite": "^5.1.0"
30+
}
31+
}
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
.custom-footer a {
2+
text-decoration: none;
3+
color: black;
4+
cursor: pointer;
5+
}
6+
7+
.custom-footer html, body, div, applet, object, iframe,
8+
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
9+
a, abbr, acronym, address, big, cite, code,
10+
del, dfn, em, img, ins, kbd, q, s, samp,
11+
small, strike, strong, sub, sup, tt, var,
12+
b, u, i, center,
13+
dl, dt, dd, ol, ul, li,
14+
fieldset, form, label, legend,
15+
table, caption, tbody, tfoot, thead, tr, th, td,
16+
article, aside, canvas, details, embed,
17+
figure, figcaption, footer, header, hgroup,
18+
menu, nav, output, ruby, section, summary,
19+
time, mark, audio, video, button {
20+
margin: 0;
21+
padding: 0;
22+
border: 0;
23+
vertical-align: baseline;
24+
}
25+
26+
27+
/* HTML5 display-role reset for older browsers */
28+
.custom-footer article, aside, details, figcaption, figure,
29+
footer, header, hgroup, menu, nav, section {
30+
display: block;
31+
}
32+
33+
.custom-footer ol, ul {
34+
list-style: none;
35+
}
36+
37+
.custom-footer blockquote, q {
38+
quotes: none;
39+
}
40+
41+
.custom-footer blockquote:before, blockquote:after, q:before, q:after {
42+
content: '';
43+
content: none;
44+
}
45+
46+
.custom-footer table {
47+
border-collapse: collapse;
48+
border-spacing: 0;
49+
}
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
'use client'
2+
3+
import {
4+
ComponentConfigContext,
5+
FooterV30 as SharedFooter,
6+
} from '@devrev/marketing-shared-components/dist/cjs'
7+
8+
import './footer.css'
9+
10+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
11+
const Footer = ({ list = [], logo, status, compliance, ...rest }: any) => {
12+
// Footer
13+
return (
14+
<ComponentConfigContext.Provider
15+
value={{
16+
origin: 'https://developer.devrev.ai',
17+
}}>
18+
<SharedFooter
19+
className="custom-footer"
20+
list={list}
21+
logo={logo}
22+
status={status}
23+
compliance={compliance}
24+
{...rest}
25+
/>
26+
</ComponentConfigContext.Provider>
27+
)
28+
}
29+
30+
export default Footer
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
.custom-header {
2+
z-index: 60;
3+
}
4+
5+
.custom-header nav a {
6+
text-decoration: none;
7+
color: black;
8+
cursor: pointer;
9+
}
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
'use client'
2+
3+
import { useEffect, useState } from 'react'
4+
import {
5+
ComponentConfigContext,
6+
HeaderV30 as SharedHeader,
7+
} from '@devrev/marketing-shared-components/dist/cjs'
8+
9+
import './header.css'
10+
11+
const Header = ({
12+
logo,
13+
links,
14+
actions,
15+
collapseOnScroll = true,
16+
}: // eslint-disable-next-line @typescript-eslint/no-explicit-any
17+
any) => {
18+
const html = document.getElementsByTagName('html')[0]
19+
const [theme, setTheme] = useState(html.getAttribute('class'))
20+
useEffect(() => {
21+
const observer = new MutationObserver(() => {
22+
setTheme(html.getAttribute('class'))
23+
})
24+
25+
const config = { attributes: true, attributeFilter: ['class'] }
26+
observer.observe(html, config)
27+
return () => {
28+
observer.disconnect()
29+
}
30+
}, [html])
31+
32+
return (
33+
<div>
34+
<ComponentConfigContext.Provider
35+
value={{
36+
origin: 'https://developer.devrev.ai',
37+
}}>
38+
<SharedHeader
39+
logo={logo}
40+
items={links}
41+
actions={actions}
42+
version={theme === 'dark' ? 'light' : 'dark'}
43+
collapseOnScroll={collapseOnScroll}
44+
wrapperClassName="custom-header"
45+
/>
46+
</ComponentConfigContext.Provider>
47+
</div>
48+
)
49+
}
50+
51+
export default Header

0 commit comments

Comments
 (0)