@imolko/create-ultra-reporter 2.1.33 → 2.1.34-beta
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/config/reader.js +7 -0
- package/bin/config/reader.js.map +1 -1
- package/bin/config/types.d.ts +2 -0
- package/bin/config/types.js.map +1 -1
- package/bin/pipeline/generate.d.ts +24 -0
- package/bin/pipeline/generate.js +82 -0
- package/bin/pipeline/generate.js.map +1 -1
- package/bin/reporters/data-transformation.d.ts +19 -1
- package/bin/reporters/data-transformation.js +79 -0
- package/bin/reporters/data-transformation.js.map +1 -1
- package/bin/reporters/readme-transform.d.ts +38 -0
- package/bin/reporters/readme-transform.js +110 -0
- package/bin/reporters/readme-transform.js.map +1 -0
- package/bin/reporters/types.d.ts +27 -0
- package/bin/scaffold/assembler.js +51 -29
- package/bin/scaffold/assembler.js.map +1 -1
- package/package.json +1 -1
- package/templates/documentation/src/components/HomepageFeatures/index.tsx +357 -28
- package/templates/documentation/src/components/HomepageFeatures/styles.module.css +4 -2
- package/templates/documentation/src/pages/index.module.css +10 -0
- package/templates/documentation/src/pages/index.tsx +40 -13
|
@@ -4,24 +4,37 @@ import useDocusaurusContext from '@docusaurus/useDocusaurusContext';
|
|
|
4
4
|
import Layout from '@theme/Layout';
|
|
5
5
|
import HomepageFeatures from '@site/src/components/HomepageFeatures';
|
|
6
6
|
import Heading from '@theme/Heading';
|
|
7
|
+
import { useEffect, useState } from 'react';
|
|
7
8
|
|
|
8
9
|
import styles from './index.module.css';
|
|
9
10
|
|
|
10
|
-
|
|
11
|
-
|
|
11
|
+
type DashboardSummary = {
|
|
12
|
+
readmeExcerptHtml?: string;
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
function HomepageHeader({ excerpt }: { excerpt?: string }) {
|
|
16
|
+
const { siteConfig } = useDocusaurusContext();
|
|
12
17
|
return (
|
|
13
18
|
<header className={clsx('hero hero--primary', styles.heroBanner)}>
|
|
14
19
|
<div className="container">
|
|
15
20
|
<Heading as="h1" className="hero__title">
|
|
16
21
|
{siteConfig.title}
|
|
17
22
|
</Heading>
|
|
18
|
-
|
|
23
|
+
{excerpt && (
|
|
24
|
+
<div
|
|
25
|
+
className={styles.heroExcerpt}
|
|
26
|
+
dangerouslySetInnerHTML={{ __html: excerpt }}
|
|
27
|
+
/>
|
|
28
|
+
)}
|
|
19
29
|
<div className={styles.buttons}>
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
30
|
+
{excerpt && (
|
|
31
|
+
<Link
|
|
32
|
+
className="button button--secondary button--lg"
|
|
33
|
+
to="/docs/overview"
|
|
34
|
+
>
|
|
35
|
+
Getting started
|
|
36
|
+
</Link>
|
|
37
|
+
)}
|
|
25
38
|
</div>
|
|
26
39
|
</div>
|
|
27
40
|
</header>
|
|
@@ -29,15 +42,29 @@ function HomepageHeader() {
|
|
|
29
42
|
}
|
|
30
43
|
|
|
31
44
|
export default function Home(): JSX.Element {
|
|
32
|
-
const {siteConfig} = useDocusaurusContext();
|
|
45
|
+
const { siteConfig } = useDocusaurusContext();
|
|
46
|
+
const [excerpt, setExcerpt] = useState<string | undefined>(undefined);
|
|
47
|
+
|
|
48
|
+
useEffect(() => {
|
|
49
|
+
fetch('/data/dashboard-summary.json')
|
|
50
|
+
.then((res) => (res.ok ? res.json() : null))
|
|
51
|
+
.then((data: DashboardSummary | null) => {
|
|
52
|
+
if (data?.readmeExcerptHtml) {
|
|
53
|
+
setExcerpt(data.readmeExcerptHtml);
|
|
54
|
+
}
|
|
55
|
+
})
|
|
56
|
+
.catch(() => {});
|
|
57
|
+
}, []);
|
|
58
|
+
|
|
33
59
|
return (
|
|
34
60
|
<Layout
|
|
35
61
|
title={`Hello from ${siteConfig.title}`}
|
|
36
|
-
description="Description will go into a meta tag in <head />"
|
|
37
|
-
|
|
38
|
-
{
|
|
62
|
+
description="Description will go into a meta tag in <head />"
|
|
63
|
+
>
|
|
64
|
+
<HomepageHeader excerpt={excerpt} />
|
|
65
|
+
<main>
|
|
39
66
|
<HomepageFeatures />
|
|
40
|
-
</main>
|
|
67
|
+
</main>
|
|
41
68
|
</Layout>
|
|
42
69
|
);
|
|
43
70
|
}
|