@brillout/docpress 0.1.20 → 0.2.1
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.js +1 -1
- package/{src/css/Inter-Var.ttf → dist/Inter-Var-IOAEQULN.ttf} +0 -0
- package/{src/components/Sponsors/companyLogos/ccoli.svg → dist/ccoli-CHW3TQKS.svg} +0 -0
- package/{src/icons/changelog.svg → dist/changelog-IPI5F42D.svg} +0 -0
- package/{src/navigation/navigation-fullscreen/chevron.svg → dist/chevron-K3WPYLOP.svg} +0 -0
- package/{src/components/features/chevron.svg → dist/chevron-R2IYJD62.svg} +0 -0
- package/dist/chunk-7HKDCMSZ.js +154 -0
- package/dist/chunk-7HKDCMSZ.js.map +1 -0
- package/dist/chunk-C3OIVLKV.js +75 -0
- package/dist/chunk-C3OIVLKV.js.map +1 -0
- package/dist/chunk-G2A5MZJA.js +48 -0
- package/dist/chunk-G2A5MZJA.js.map +1 -0
- package/dist/chunk-H5CO4N2X.js +174 -0
- package/dist/chunk-H5CO4N2X.js.map +1 -0
- package/dist/chunk-TTLAZ2T2.js +8 -0
- package/dist/chunk-TTLAZ2T2.js.map +1 -0
- package/dist/{chunk-ZYYJWJMY.js → chunk-XUTBTIEE.js} +15 -42
- package/dist/chunk-XUTBTIEE.js.map +1 -0
- package/dist/cli/index.d.ts +1 -0
- package/dist/cli/index.js +35 -0
- package/dist/cli/index.js.map +1 -0
- package/{src/navigation/navigation-fullscreen/close.svg → dist/close-IQXTDOHV.svg} +0 -0
- package/{src/utils/Emoji/compass.svg → dist/compass-2RWQU3E4.svg} +0 -0
- package/{src → dist}/components/features/FeatureList.css +2 -7
- package/dist/components/features/FeatureList.css.map +1 -0
- package/dist/components/features/FeatureList.d.ts +13 -0
- package/dist/components/features/FeatureList.js +8 -0
- package/dist/components/features/FeatureList.js.map +1 -0
- package/dist/components/features/initFeatureList.d.ts +3 -0
- package/dist/components/features/initFeatureList.js +60 -0
- package/dist/components/features/initFeatureList.js.map +1 -0
- package/{src/components/Sponsors/companyLogos/contra.svg → dist/contra-WLZBOPBV.svg} +0 -0
- package/dist/{devServer-J2XJQJGT.js → devServer-534L4U45.js} +5 -2
- package/dist/{devServer-J2XJQJGT.js.map → devServer-534L4U45.js.map} +1 -1
- package/{src/icons/discord.svg → dist/discord-JD33TUSF.svg} +0 -0
- package/{src/utils/Emoji/engine.png → dist/engine-6Q6VSCVA.png} +0 -0
- package/{src/icons/github.svg → dist/github-P5ZSKN2N.svg} +0 -0
- package/{src/icons/heart.svg → dist/heart-OINVKOXO.svg} +0 -0
- package/dist/index.css +121 -0
- package/dist/index.css.map +1 -0
- package/dist/index.d.ts +136 -0
- package/dist/index.js +459 -26
- package/dist/index.js.map +1 -1
- package/{src/components/Sponsors/label.svg → dist/label-MP75CTIA.svg} +0 -0
- package/{src/utils/Emoji/mechanical-arm.svg → dist/mechanical-arm-TR7IQQMG.svg} +0 -0
- package/{src/components/Sponsors/medalBronze.svg → dist/medalBronze-CO4CTUR4.svg} +0 -0
- package/{src/components/Sponsors/medalGold.svg → dist/medalGold-UP6A73FL.svg} +0 -0
- package/{src/components/Sponsors/medalSilver.svg → dist/medalSilver-FAPGGOBN.svg} +0 -0
- package/{src/components/Sponsors/companyLogos/mfqs.svg → dist/mfqs-2EAEE7N6.svg} +0 -0
- package/dist/renderer/_default.page.client.css +264 -0
- package/dist/renderer/_default.page.client.css.map +1 -0
- package/dist/renderer/_default.page.client.d.ts +1 -0
- package/dist/renderer/_default.page.client.js +180 -0
- package/dist/renderer/_default.page.client.js.map +1 -0
- package/dist/renderer/_default.page.server.css +312 -0
- package/dist/renderer/_default.page.server.css.map +1 -0
- package/dist/renderer/_default.page.server.d.ts +22 -0
- package/dist/renderer/_default.page.server.js +591 -0
- package/dist/renderer/_default.page.server.js.map +1 -0
- package/{src/utils/Emoji/road-fork.svg → dist/road-fork-3WZLW3HB.svg} +0 -0
- package/{src/utils/Emoji/shield.svg → dist/shield-CU45RG5C.svg} +0 -0
- package/{src/icons/twitter.svg → dist/twitter-I7DXDN3J.svg} +0 -0
- package/{src/utils/Emoji/typescript.svg → dist/typescript-ALIPKLRM.svg} +0 -0
- package/package.json +12 -9
- package/dist/chunk-ZYYJWJMY.js.map +0 -1
- package/src/MobileHeader.tsx +0 -68
- package/src/PageLayout.css +0 -41
- package/src/PageLayout.tsx +0 -37
- package/src/algolia/DocSearch.css +0 -29
- package/src/algolia/DocSearch.ts +0 -37
- package/src/autoScrollNav.ts +0 -22
- package/src/cli/devServer.ts +0 -31
- package/src/cli/index.ts +0 -29
- package/src/components/CodeBlock.tsx +0 -22
- package/src/components/DocLink.tsx +0 -108
- package/src/components/EditPageNote.tsx +0 -18
- package/src/components/HorizontalLine.tsx +0 -20
- package/src/components/ImportMeta.tsx +0 -11
- package/src/components/Info.tsx +0 -12
- package/src/components/Link.tsx +0 -18
- package/src/components/Note.tsx +0 -31
- package/src/components/P.css +0 -8
- package/src/components/P.tsx +0 -8
- package/src/components/ReadingRecommendation.tsx +0 -53
- package/src/components/RepoLink.tsx +0 -24
- package/src/components/Sponsors/companyLogos/ccoli-logo.svg +0 -1
- package/src/components/Sponsors/companyLogos/ccoli-text.svg +0 -1
- package/src/components/Sponsors/label.draft.svg +0 -108
- package/src/components/Sponsors.tsx +0 -242
- package/src/components/features/FeatureList.tsx +0 -114
- package/src/components/features/initFeatureList.ts +0 -66
- package/src/components/index.ts +0 -13
- package/src/config/Config.ts +0 -30
- package/src/config/getConfig.ts +0 -18
- package/src/config/resolveConfig/resolveHeading.ts +0 -0
- package/src/config/resolvePageContext.ts +0 -157
- package/src/css/button.css +0 -7
- package/src/css/code/block.css +0 -36
- package/src/css/code/inline.css +0 -27
- package/src/css/code.css +0 -20
- package/src/css/colorize-on-hover.css +0 -29
- package/src/css/font.css +0 -19
- package/src/css/heading.css +0 -25
- package/src/css/index.css +0 -11
- package/src/css/link.css +0 -17
- package/src/css/note.css +0 -26
- package/src/css/reset.css +0 -12
- package/src/css/table.css +0 -14
- package/src/css/tooltip.css +0 -11
- package/src/headings.ts +0 -200
- package/src/index.ts +0 -3
- package/src/installSectionUrlHashs.ts +0 -50
- package/src/markdownHeadingsVitePlugin.ts +0 -128
- package/src/navigation/Navigation-highlight.css +0 -41
- package/src/navigation/Navigation-items.css +0 -122
- package/src/navigation/Navigation-layout.css +0 -118
- package/src/navigation/Navigation.client.old.ts +0 -303
- package/src/navigation/Navigation.client.ts +0 -19
- package/src/navigation/Navigation.css +0 -12
- package/src/navigation/Navigation.tsx +0 -228
- package/src/navigation/NavigationHeader.tsx +0 -97
- package/src/navigation/navigation-fullscreen/NavigationFullscreenButton.css +0 -32
- package/src/navigation/navigation-fullscreen/NavigationFullscreenButton.tsx +0 -44
- package/src/navigation/navigation-fullscreen/initNavigationFullscreen.ts +0 -115
- package/src/parseEmojis.ts +0 -33
- package/src/renderer/_default.page.client.ts +0 -4
- package/src/renderer/_default.page.server.tsx +0 -69
- package/src/renderer/usePageContext.tsx +0 -25
- package/src/types.ts +0 -2
- package/src/utils/Emoji/Emoji.ts +0 -216
- package/src/utils/Emoji/assets.ts +0 -9
- package/src/utils/Emoji/index.ts +0 -1
- package/src/utils/Emoji/mountain.svg +0 -1
- package/src/utils/assert.ts +0 -39
- package/src/utils/client.ts +0 -2
- package/src/utils/crawlAllFiles.ts +0 -17
- package/src/utils/determineSectionUrlHash.ts +0 -35
- package/src/utils/filesystemPathHandling.ts +0 -42
- package/src/utils/filter.ts +0 -12
- package/src/utils/isBrowser.ts +0 -5
- package/src/utils/jsxToTextContent.ts +0 -11
- package/src/utils/objectAssign.ts +0 -9
- package/src/utils/server.ts +0 -8
- package/src/vite.config.ts +0 -44
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
import { RepoLink } from './RepoLink'
|
|
3
|
-
import { Emoji } from '../utils/server'
|
|
4
|
-
|
|
5
|
-
export { EditPageNote }
|
|
6
|
-
|
|
7
|
-
function EditPageNote({ pageContext }: { pageContext: { urlPathname: string } }) {
|
|
8
|
-
const text = (
|
|
9
|
-
<>
|
|
10
|
-
<Emoji name="writing-hang" /> Edit this page
|
|
11
|
-
</>
|
|
12
|
-
)
|
|
13
|
-
return (
|
|
14
|
-
<div style={{ marginTop: 50 }}>
|
|
15
|
-
<RepoLink path={'/docs/pages' + pageContext.urlPathname + '.page.server.mdx'} text={text} editMode={true} />
|
|
16
|
-
</div>
|
|
17
|
-
)
|
|
18
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
|
|
3
|
-
export { HorizontalLine }
|
|
4
|
-
|
|
5
|
-
function HorizontalLine({ primary }: { primary?: true }) {
|
|
6
|
-
return (
|
|
7
|
-
<div className={'header-separator-line ' + (primary ? 'primary' : '')} style={{ textAlign: 'center' }}>
|
|
8
|
-
<hr
|
|
9
|
-
style={{
|
|
10
|
-
display: 'inline-block',
|
|
11
|
-
margin: 0,
|
|
12
|
-
border: 0,
|
|
13
|
-
borderTop: '1px solid #eee',
|
|
14
|
-
maxWidth: 500,
|
|
15
|
-
width: '80%'
|
|
16
|
-
}}
|
|
17
|
-
/>
|
|
18
|
-
</div>
|
|
19
|
-
)
|
|
20
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
import { assert } from '../utils/server'
|
|
3
|
-
|
|
4
|
-
export { ImportMeta }
|
|
5
|
-
|
|
6
|
-
function ImportMeta({ prop }: { prop: string }) {
|
|
7
|
-
assert(!prop.startsWith('import'))
|
|
8
|
-
assert(!prop.startsWith('.'))
|
|
9
|
-
const text = 'imp' + 'ort.meta.' + prop
|
|
10
|
-
return <code>{text}</code>
|
|
11
|
-
}
|
package/src/components/Info.tsx
DELETED
package/src/components/Link.tsx
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
import { DocLink } from './DocLink'
|
|
3
|
-
import { isRepoLink, RepoLink } from './RepoLink'
|
|
4
|
-
|
|
5
|
-
export { Link }
|
|
6
|
-
|
|
7
|
-
function Link(props: {
|
|
8
|
-
href: string
|
|
9
|
-
text?: string | JSX.Element
|
|
10
|
-
noBreadcrumb?: true
|
|
11
|
-
doNotInferSectionTitle?: true
|
|
12
|
-
}) {
|
|
13
|
-
if (isRepoLink(props.href)) {
|
|
14
|
-
return <RepoLink path={props.href} text={props.text} />
|
|
15
|
-
} else {
|
|
16
|
-
return <DocLink {...props} />
|
|
17
|
-
}
|
|
18
|
-
}
|
package/src/components/Note.tsx
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
export { Note }
|
|
2
|
-
|
|
3
|
-
import React from 'react'
|
|
4
|
-
import { assert } from '../utils/server'
|
|
5
|
-
|
|
6
|
-
function Note({
|
|
7
|
-
type,
|
|
8
|
-
icon,
|
|
9
|
-
children
|
|
10
|
-
}: {
|
|
11
|
-
icon: JSX.Element | string
|
|
12
|
-
type?: 'error' | 'warning'
|
|
13
|
-
children: JSX.Element
|
|
14
|
-
}) {
|
|
15
|
-
assert(type === undefined || ['error', 'warning'].includes(type))
|
|
16
|
-
if (!icon) {
|
|
17
|
-
if (type === 'error') {
|
|
18
|
-
icon = ':no_entry:'
|
|
19
|
-
}
|
|
20
|
-
if (type === 'warning') {
|
|
21
|
-
icon = ':warning:'
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
return (
|
|
25
|
-
<blockquote className={type}>
|
|
26
|
-
<div style={{ marginBottom: 20 }} />
|
|
27
|
-
{icon} {children}
|
|
28
|
-
<div style={{ marginTop: 20 }} />
|
|
29
|
-
</blockquote>
|
|
30
|
-
)
|
|
31
|
-
}
|
package/src/components/P.css
DELETED
package/src/components/P.tsx
DELETED
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
import { Info } from './Info'
|
|
3
|
-
import { Link } from './Link'
|
|
4
|
-
|
|
5
|
-
export { ReadingRecommendation }
|
|
6
|
-
|
|
7
|
-
function ReadingRecommendation({ tour, links }: { tour?: true; links: string[] }) {
|
|
8
|
-
const multiple = links.length + (tour ? 1 : 0) > 1
|
|
9
|
-
return (
|
|
10
|
-
<Info>
|
|
11
|
-
{multiple ? ' ' : ''}
|
|
12
|
-
<b>Reading Recommendation{multiple ? '.' : ': '}</b>
|
|
13
|
-
{(() => {
|
|
14
|
-
if (!multiple) {
|
|
15
|
-
const link = tour ? <TourLink /> : <Link href={links[0]} />
|
|
16
|
-
return (
|
|
17
|
-
<>
|
|
18
|
-
{link}
|
|
19
|
-
{'.'}
|
|
20
|
-
</>
|
|
21
|
-
)
|
|
22
|
-
}
|
|
23
|
-
return (
|
|
24
|
-
<ul
|
|
25
|
-
style={{
|
|
26
|
-
marginLeft: 18,
|
|
27
|
-
marginTop: 11
|
|
28
|
-
}}
|
|
29
|
-
>
|
|
30
|
-
{tour && (
|
|
31
|
-
<li>
|
|
32
|
-
<TourLink />
|
|
33
|
-
</li>
|
|
34
|
-
)}
|
|
35
|
-
{links.map((link, i) => (
|
|
36
|
-
<li key={i}>
|
|
37
|
-
<Link href={link} />
|
|
38
|
-
</li>
|
|
39
|
-
))}
|
|
40
|
-
</ul>
|
|
41
|
-
)
|
|
42
|
-
})()}
|
|
43
|
-
</Info>
|
|
44
|
-
)
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
function TourLink() {
|
|
48
|
-
return (
|
|
49
|
-
<>
|
|
50
|
-
<Link href={'/react-tour'} noBreadcrumb={true} /> or <Link href={'/vue-tour'} noBreadcrumb={true} />
|
|
51
|
-
</>
|
|
52
|
-
)
|
|
53
|
-
}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
import { assert } from '../utils/server'
|
|
3
|
-
import { usePageContext } from '../renderer/usePageContext'
|
|
4
|
-
|
|
5
|
-
export { RepoLink }
|
|
6
|
-
export { isRepoLink }
|
|
7
|
-
|
|
8
|
-
function isRepoLink(href: string) {
|
|
9
|
-
return ['/examples/', '/docs/', '/boilerplates/', '.github/', '/test/'].some((start) => href.startsWith(start))
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
function RepoLink({ path, text, editMode }: { path: string; text?: string | JSX.Element; editMode?: true }) {
|
|
13
|
-
const pageContext = usePageContext()
|
|
14
|
-
assert(isRepoLink(path), { path })
|
|
15
|
-
text = text || path
|
|
16
|
-
if (!path.startsWith('/')) {
|
|
17
|
-
path = '/' + path
|
|
18
|
-
}
|
|
19
|
-
const viewMode = (editMode && 'edit') || (path.endsWith('/') && 'tree') || 'blob'
|
|
20
|
-
const { githubRepository } = pageContext.config.projectInfo
|
|
21
|
-
assert(githubRepository.startsWith('https://github.com/'))
|
|
22
|
-
const href = `${githubRepository}/${viewMode}/main${path}`
|
|
23
|
-
return <a href={href}>{text}</a>
|
|
24
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 156.62 156.96"><path d="M156.62 78.65c0-12.01-8.81-22.1-20.27-24.12 6.68-9.55 5.74-22.49-2.84-31.08-8.27-8.57-21.41-9.52-31.02-2.88C100.6 8.95 90.44-.01 78.32-.01S56.22 8.8 54.2 20.26c-9.55-6.68-22.49-5.74-31.08 2.84-8.71 8.71-9.56 22.19-2.31 31.33C9.08 56.24 0 66.45 0 78.65s8.83 21.91 20.32 24.05c-6.73 9.56-5.81 22.54 2.79 31.15 8.6 8.3 21.58 9.18 31.14 3.19 2.16 11.3 12.16 19.93 24.05 19.93s22.2-9.17 24.15-20.78c9.39 6.86 22.74 5.98 31.39-2.67 8.51-8.51 9.51-21.3 3.03-30.83 11.21-2.23 19.74-12.19 19.74-24.02Z" style="fill: rgb(117, 50, 168);"></path><path class="logo_svg__cls-1" fill="white" d="M61.33 72.59c.2-2.08 2.06-3.61 4.15-3.61h3.12c1.67 0 2.7-1.88 1.75-3.25-2.01-2.91-5.38-4.8-9.2-4.74-6.07.09-10.84 5.29-10.84 11.36v12.27c0 6.06 4.74 11.25 10.79 11.36s11.21-4.85 11.21-11v-3.96c0-2.23-1.81-4.04-4.04-4.04h-2.96c-2.34 0-4.21-2.01-3.98-4.39ZM95.33 72.59c.2-2.08 2.06-3.61 4.15-3.61h3.12c1.67 0 2.7-1.88 1.75-3.25-2.01-2.91-5.38-4.8-9.2-4.74-6.07.09-10.84 5.29-10.84 11.36v12.27c0 6.06 4.74 11.25 10.79 11.36s11.21-4.85 11.21-11v-3.96c0-2.23-1.81-4.04-4.04-4.04h-2.96c-2.34 0-4.21-2.01-3.98-4.39Z"></path></svg>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 366.81 127.09"><path fill="rgb(16, 24, 32)" d="M138 127.09a50.79 50.79 0 0 1-19.75-3.65 43 43 0 0 1-14.94-10.19 47 47 0 0 1-9.54-14.86 48.21 48.21 0 0 1 2.41-40.51 43.6 43.6 0 0 1 16.4-16.73q10.65-6.28 25.25-6.29t25.07 6.36a44.36 44.36 0 0 1 7 5.26 9 9 0 0 1-3.53 15.1l-3.51 1.07a10.47 10.47 0 0 1-10.37-2.41 19.48 19.48 0 0 0-4.23-3.13 21.52 21.52 0 0 0-10.64-2.67 22.56 22.56 0 0 0-11.94 3.29 22.79 22.79 0 0 0-8.5 9.27 29.85 29.85 0 0 0-3.09 13.9 28.79 28.79 0 0 0 3.17 13.73 24.89 24.89 0 0 0 8.5 9.43 21.35 21.35 0 0 0 11.86 3.46 22.14 22.14 0 0 0 7.81-1.38 22.61 22.61 0 0 0 6.61-3.78c.4-.32.77-.66 1.12-1a10.1 10.1 0 0 1 10-2.4l3.12 1a9.31 9.31 0 0 1 3.72 15.69l-.12.11a43.46 43.46 0 0 1-13.88 8.33 50.78 50.78 0 0 1-18 3ZM47.57 127.09a50.82 50.82 0 0 1-19.75-3.65 43 43 0 0 1-14.94-10.19 47.8 47.8 0 0 1-7.13-55.37 43.63 43.63 0 0 1 16.41-16.73q10.64-6.28 25.24-6.29t25.08 6.36a44.36 44.36 0 0 1 7 5.26A9 9 0 0 1 76 61.58l-3.5 1.07a10.49 10.49 0 0 1-10.4-2.41 19.42 19.42 0 0 0-4.22-3.13 21.59 21.59 0 0 0-10.65-2.67 22.59 22.59 0 0 0-11.94 3.29 22.86 22.86 0 0 0-8.5 9.27 29.85 29.85 0 0 0-3.09 13.9 28.8 28.8 0 0 0 3.18 13.73 24.89 24.89 0 0 0 8.5 9.43 21.34 21.34 0 0 0 11.85 3.46 22.19 22.19 0 0 0 7.82-1.38 22.61 22.61 0 0 0 6.61-3.78c.39-.32.76-.66 1.12-1a10.08 10.08 0 0 1 10-2.4l3.12 1a9.3 9.3 0 0 1 3.64 15.74l-.12.11a43.35 43.35 0 0 1-13.91 8.33 50.74 50.74 0 0 1-17.94 2.95ZM227.72 127.09a50.84 50.84 0 0 1-19.72-3.65 42.76 42.76 0 0 1-14.85-10.1 45.4 45.4 0 0 1-9.36-14.78 47.41 47.41 0 0 1-3.27-17.49 47.89 47.89 0 0 1 3.27-17.67 45.4 45.4 0 0 1 9.36-14.78A42.76 42.76 0 0 1 208 38.52a50.84 50.84 0 0 1 19.76-3.66 50.15 50.15 0 0 1 19.66 3.66A43.62 43.62 0 0 1 271.6 63.4a49.09 49.09 0 0 1 3.18 17.67 48.6 48.6 0 0 1-3.18 17.49 44.37 44.37 0 0 1-9.28 14.78 42.67 42.67 0 0 1-14.85 10.1 50.82 50.82 0 0 1-19.75 3.65Zm-23.53-46a29.53 29.53 0 0 0 3.09 13.74 23.7 23.7 0 0 0 8.41 9.35 22.08 22.08 0 0 0 12 3.37 21.34 21.34 0 0 0 11.85-3.46 25 25 0 0 0 8.5-9.43 28.8 28.8 0 0 0 3.18-13.73 28.93 28.93 0 0 0-3.18-13.65 24.18 24.18 0 0 0-8.5-9.43 22.55 22.55 0 0 0-23.88.08 24.27 24.27 0 0 0-8.41 9.43 29.51 29.51 0 0 0-3.06 13.7ZM294.62 0a18.06 18.06 0 0 1 18.06 18.06v78.77q0 6.21 2.06 8.36a7.48 7.48 0 0 0 5.67 2.15 24.64 24.64 0 0 0 5.67-.68h.06a5 5 0 0 1 6.1 4l1.39 7.87a5 5 0 0 1-3.3 5.56 49.5 49.5 0 0 1-6.83 1.8 59.09 59.09 0 0 1-11.16 1.2q-10.83 0-16.75-5.76t-5.92-16.45V5a5 5 0 0 1 4.95-5ZM343.79 11.42A11.42 11.42 0 0 1 355.21 0h.18a11.42 11.42 0 0 1 11.42 11.42 11.42 11.42 0 0 1-11.42 11.42h-.18a11.42 11.42 0 0 1-11.42-11.42Zm0 109V40.33a5 5 0 0 1 5-4.95 18.07 18.07 0 0 1 18.06 18.06v67a5 5 0 0 1-5 5h-13.1a5 5 0 0 1-4.96-5.02Z"></path></svg>
|
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
|
2
|
-
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
|
3
|
-
|
|
4
|
-
<svg
|
|
5
|
-
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
|
6
|
-
xmlns:cc="http://creativecommons.org/ns#"
|
|
7
|
-
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
|
8
|
-
xmlns:svg="http://www.w3.org/2000/svg"
|
|
9
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
10
|
-
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
|
11
|
-
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
|
12
|
-
width="210mm"
|
|
13
|
-
height="297mm"
|
|
14
|
-
viewBox="0 0 210 297"
|
|
15
|
-
version="1.1"
|
|
16
|
-
id="svg8"
|
|
17
|
-
inkscape:version="0.92.4 (5da689c313, 2019-01-14)"
|
|
18
|
-
sodipodi:docname="label.draft.svg">
|
|
19
|
-
<defs
|
|
20
|
-
id="defs2" />
|
|
21
|
-
<sodipodi:namedview
|
|
22
|
-
id="base"
|
|
23
|
-
pagecolor="#ffffff"
|
|
24
|
-
bordercolor="#666666"
|
|
25
|
-
borderopacity="1.0"
|
|
26
|
-
inkscape:pageopacity="0.0"
|
|
27
|
-
inkscape:pageshadow="2"
|
|
28
|
-
inkscape:zoom="0.9899495"
|
|
29
|
-
inkscape:cx="461.6406"
|
|
30
|
-
inkscape:cy="96.846632"
|
|
31
|
-
inkscape:document-units="mm"
|
|
32
|
-
inkscape:current-layer="layer1"
|
|
33
|
-
showgrid="false"
|
|
34
|
-
inkscape:window-width="1366"
|
|
35
|
-
inkscape:window-height="736"
|
|
36
|
-
inkscape:window-x="0"
|
|
37
|
-
inkscape:window-y="16"
|
|
38
|
-
inkscape:window-maximized="1" />
|
|
39
|
-
<metadata
|
|
40
|
-
id="metadata5">
|
|
41
|
-
<rdf:RDF>
|
|
42
|
-
<cc:Work
|
|
43
|
-
rdf:about="">
|
|
44
|
-
<dc:format>image/svg+xml</dc:format>
|
|
45
|
-
<dc:type
|
|
46
|
-
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
|
47
|
-
<dc:title></dc:title>
|
|
48
|
-
</cc:Work>
|
|
49
|
-
</rdf:RDF>
|
|
50
|
-
</metadata>
|
|
51
|
-
<g
|
|
52
|
-
inkscape:label="Layer 1"
|
|
53
|
-
inkscape:groupmode="layer"
|
|
54
|
-
id="layer1">
|
|
55
|
-
<path
|
|
56
|
-
style="fill:none;stroke:#000000;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
|
57
|
-
d="m 51.40476,117.83928 13.530744,-23.435929 0.01098,0.0063 v 0"
|
|
58
|
-
id="path815"
|
|
59
|
-
inkscape:connector-curvature="0" />
|
|
60
|
-
<path
|
|
61
|
-
style="fill:none;stroke:#000000;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
|
62
|
-
d="M 78.309972,119.26576 90.337099,96.280583 h 32.339611"
|
|
63
|
-
id="path817"
|
|
64
|
-
inkscape:connector-curvature="0"
|
|
65
|
-
sodipodi:nodetypes="ccc" />
|
|
66
|
-
<path
|
|
67
|
-
style="fill:none;stroke:#000000;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
|
68
|
-
d="M 71.815475,146.56548 H 85.96596 c 0.676332,-0.0209 3.30147,-0.005 3.934153,-0.83721 0.426501,-0.36462 1.272256,-1.92024 1.602106,-2.49156 l 4.177131,-7.23501 c 0,0 0.679705,-1.34341 1.817605,-2.11076 0.472523,-0.30451 3.063205,-0.4009 3.063205,-0.4009 h 13.21067"
|
|
69
|
-
id="path819"
|
|
70
|
-
inkscape:connector-curvature="0"
|
|
71
|
-
sodipodi:nodetypes="cccccccc" />
|
|
72
|
-
<path
|
|
73
|
-
sodipodi:nodetypes="cccccccc"
|
|
74
|
-
inkscape:connector-curvature="0"
|
|
75
|
-
id="path859"
|
|
76
|
-
d="m 145.52085,146.56548 h -14.15049 c -0.67633,-0.0209 -3.30147,-0.005 -3.93415,-0.83721 -0.4265,-0.36462 -1.27226,-1.92024 -1.60211,-2.49156 l -4.17713,-7.23501 c 0,0 -0.67971,-1.34341 -1.81761,-2.11076 -0.47252,-0.30451 -3.0632,-0.4009 -3.0632,-0.4009 h -13.21068"
|
|
77
|
-
style="fill:none;stroke:#000000;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
|
|
78
|
-
<path
|
|
79
|
-
sodipodi:nodetypes="ccccccccc"
|
|
80
|
-
inkscape:connector-curvature="0"
|
|
81
|
-
id="path967"
|
|
82
|
-
d="m 118.49554,172.57638 -47.05804,0 h 10.748698 c 0.676332,-0.0209 3.30147,-0.005 3.934153,-0.83721 0.426501,-0.36462 1.272256,-1.92024 1.602106,-2.49156 l 4.177131,-7.23501 c 0,0 0.679705,-1.34341 1.817605,-2.11076 0.472523,-0.30451 3.063205,-0.4009 3.063205,-0.4009 l 22.282102,0"
|
|
83
|
-
style="fill:none;stroke:#000000;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
|
|
84
|
-
<path
|
|
85
|
-
style="fill:#f0f0f0;stroke:none;stroke-width:0.99999994px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;fill-opacity:1"
|
|
86
|
-
d="M 365.78516 702.83789 C 365.78516 702.83789 355.99294 703.20261 354.20703 704.35352 C 349.90631 707.25374 347.33789 712.33203 347.33789 712.33203 L 331.54883 739.67578 C 330.30215 741.8351 327.10611 747.71566 325.49414 749.09375 C 323.1029 752.23911 313.18122 752.17882 310.625 752.25781 L 392.14258 752.25781 L 447.85742 752.25781 L 529.375 752.25781 C 526.81879 752.17882 516.89709 752.23911 514.50586 749.09375 C 512.89389 747.71566 509.69785 741.8351 508.45117 739.67578 L 492.66211 712.33203 C 492.66211 712.33203 490.09369 707.25374 485.79297 704.35352 C 484.00707 703.20261 474.2168 702.83789 474.2168 702.83789 L 450 702.83789 L 390 702.83789 L 365.78516 702.83789 z "
|
|
87
|
-
transform="scale(0.26458333)"
|
|
88
|
-
id="path977" />
|
|
89
|
-
<path
|
|
90
|
-
id="path982"
|
|
91
|
-
d="m 96.780656,212.41754 c 0,0 -2.590858,0.0965 -3.06338,0.40101 -1.137899,0.76735 -1.81746,2.11098 -1.81746,2.11098 l -4.177523,7.2347 c -0.32985,0.57132 -1.175469,2.12722 -1.60197,2.49184 -0.632682,0.83221 -3.257793,0.81625 -3.934126,0.83715 h 21.568193 30.61622 21.56819 c -0.67633,-0.0209 -3.30145,-0.005 -3.93413,-0.83715 -0.4265,-0.36462 -1.27212,-1.92052 -1.60197,-2.49184 l -4.17752,-7.2347 c 0,0 -0.67956,-1.34363 -1.81746,-2.11098 -0.47252,-0.30452 -3.06286,-0.40101 -3.06286,-0.40101 h -6.40736 -31.75 z"
|
|
92
|
-
style="fill:#f0f0f0;fill-opacity:1;stroke:none;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
|
93
|
-
inkscape:connector-curvature="0"
|
|
94
|
-
sodipodi:nodetypes="ccccccccccccccccc" />
|
|
95
|
-
<path
|
|
96
|
-
sodipodi:nodetypes="ccccccccccccccccc"
|
|
97
|
-
inkscape:connector-curvature="0"
|
|
98
|
-
style="fill:#f0f0f0;fill-opacity:1;stroke:none;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
|
99
|
-
d="m 96.780656,244.16756 c 0,0 -2.590858,0.0965 -3.06338,0.40101 -1.137899,0.76735 -1.81746,2.11098 -1.81746,2.11098 l -4.177523,7.2347 c -0.32985,0.57132 -1.175469,2.12722 -1.60197,2.49184 -0.632682,0.83221 -3.257793,0.81625 -3.934126,0.83715 h 21.568193 25.32455 21.56819 c -0.67633,-0.0209 -3.30145,-0.005 -3.93413,-0.83715 -0.4265,-0.36462 -1.27212,-1.92052 -1.60197,-2.49184 l -4.17752,-7.2347 c 0,0 -0.67956,-1.34363 -1.81746,-2.11098 -0.47252,-0.30452 -3.06286,-0.40101 -3.06286,-0.40101 h -6.40736 -26.45833 z"
|
|
100
|
-
id="path984" />
|
|
101
|
-
<path
|
|
102
|
-
id="path878"
|
|
103
|
-
d="m 103.72033,265.33423 c 0,0 -2.25707,0.0965 -2.66872,0.40101 -0.9913,0.76735 -1.583315,2.11098 -1.583315,2.11098 l -3.639329,7.2347 c -0.287355,0.57132 -1.024032,2.12722 -1.395586,2.49184 -0.551173,0.83221 -2.838088,0.81625 -3.427289,0.83715 h 18.789539 22.06196 18.78954 c -0.5892,-0.0209 -2.87612,-0.005 -3.42729,-0.83715 -0.37156,-0.36462 -1.10823,-1.92052 -1.39559,-2.49184 l -3.63932,-7.2347 c 0,0 -0.59202,-1.34363 -1.58332,-2.11098 -0.41164,-0.30452 -2.66827,-0.40101 -2.66827,-0.40101 h -5.58189 -23.04968 z"
|
|
104
|
-
style="fill:#f0f0f0;fill-opacity:1;stroke:none;stroke-width:0.24695262px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
|
105
|
-
inkscape:connector-curvature="0"
|
|
106
|
-
sodipodi:nodetypes="ccccccccccccccccc" />
|
|
107
|
-
</g>
|
|
108
|
-
</svg>
|
|
@@ -1,242 +0,0 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
import iconHeart from '../icons/heart.svg'
|
|
3
|
-
import { usePageContext } from '../renderer/usePageContext'
|
|
4
|
-
import { assert, Emoji } from '../utils/server'
|
|
5
|
-
import ccoliLogo from './Sponsors/companyLogos/ccoli.svg'
|
|
6
|
-
import contraLogo from './Sponsors/companyLogos/contra.svg'
|
|
7
|
-
import mfqsLogo from './Sponsors/companyLogos/mfqs.svg'
|
|
8
|
-
import medalGold from './Sponsors/medalGold.svg'
|
|
9
|
-
import medalSilver from './Sponsors/medalSilver.svg'
|
|
10
|
-
import medalBronze from './Sponsors/medalBronze.svg'
|
|
11
|
-
import labelBgImg from './Sponsors/label.svg'
|
|
12
|
-
|
|
13
|
-
export { Sponsors }
|
|
14
|
-
|
|
15
|
-
type Plan = 'FREE_SLOT' | 'bronze' | 'silver' | 'gold' | 'platinum'
|
|
16
|
-
|
|
17
|
-
type SponsorCompany = {
|
|
18
|
-
companyName: string
|
|
19
|
-
companyLogo: string
|
|
20
|
-
website: string
|
|
21
|
-
plan: Plan
|
|
22
|
-
}
|
|
23
|
-
type SponsorIndividual = {
|
|
24
|
-
username: string
|
|
25
|
-
}
|
|
26
|
-
type Sponsor = SponsorCompany | SponsorIndividual
|
|
27
|
-
|
|
28
|
-
const sponsors: Sponsor[] = [
|
|
29
|
-
{
|
|
30
|
-
companyName: 'Contra',
|
|
31
|
-
companyLogo: contraLogo,
|
|
32
|
-
plan: 'gold',
|
|
33
|
-
website: 'https://contra.com'
|
|
34
|
-
},
|
|
35
|
-
{
|
|
36
|
-
companyName: 'ccoli',
|
|
37
|
-
companyLogo: ccoliLogo,
|
|
38
|
-
plan: 'silver',
|
|
39
|
-
website: 'https://ccoli.co'
|
|
40
|
-
},
|
|
41
|
-
{
|
|
42
|
-
companyName: 'My Favorite Quilt Store',
|
|
43
|
-
companyLogo: mfqsLogo,
|
|
44
|
-
plan: 'bronze',
|
|
45
|
-
website: 'https://myfavoritequiltstore.com'
|
|
46
|
-
},
|
|
47
|
-
{
|
|
48
|
-
username: 'spacedawwwg'
|
|
49
|
-
},
|
|
50
|
-
{
|
|
51
|
-
username: 'codthing'
|
|
52
|
-
},
|
|
53
|
-
{
|
|
54
|
-
username: 'Junaidhkn'
|
|
55
|
-
},
|
|
56
|
-
{
|
|
57
|
-
username: 'zgfdev'
|
|
58
|
-
}
|
|
59
|
-
]
|
|
60
|
-
|
|
61
|
-
function Sponsors() {
|
|
62
|
-
const pageContext = usePageContext()
|
|
63
|
-
const { projectInfo } = pageContext.config
|
|
64
|
-
return (
|
|
65
|
-
<div style={{ textAlign: 'center', marginTop: 19 }}>
|
|
66
|
-
<a
|
|
67
|
-
className="button"
|
|
68
|
-
href="https://github.com/sponsors/brillout"
|
|
69
|
-
style={{
|
|
70
|
-
color: 'inherit',
|
|
71
|
-
display: 'inline-flex',
|
|
72
|
-
alignItems: 'center',
|
|
73
|
-
padding: '5px 10px',
|
|
74
|
-
marginBottom: 10
|
|
75
|
-
}}
|
|
76
|
-
>
|
|
77
|
-
<img src={iconHeart} height={22} /> <span style={{ marginLeft: 7, fontSize: '1.07em' }}>Sponsor</span>
|
|
78
|
-
</a>
|
|
79
|
-
<div></div>
|
|
80
|
-
<div style={{ maxWidth: 400, display: 'inline-block', marginTop: 12, marginBottom: 12 }}>
|
|
81
|
-
{projectInfo.projectNameJsx || projectInfo.projectName} is free and open source, made possible by wonderful
|
|
82
|
-
sponsors.
|
|
83
|
-
</div>
|
|
84
|
-
<div style={{ display: 'flex', flexWrap: 'wrap', justifyContent: 'center', alignItems: 'end' }}>
|
|
85
|
-
{sponsors.map((sponsor, i) => (
|
|
86
|
-
<SponsorDiv sponsor={sponsor} key={i} />
|
|
87
|
-
))}
|
|
88
|
-
</div>
|
|
89
|
-
</div>
|
|
90
|
-
)
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
function SponsorDiv({ sponsor }: { sponsor: Sponsor }) {
|
|
94
|
-
let imgSrc: string
|
|
95
|
-
let imgAlt: string | undefined
|
|
96
|
-
let width: number
|
|
97
|
-
let height: number
|
|
98
|
-
let website: string
|
|
99
|
-
let padding: number
|
|
100
|
-
let backgroundColor = '#f0f0f0'
|
|
101
|
-
let label: null | JSX.Element = null
|
|
102
|
-
if ('username' in sponsor) {
|
|
103
|
-
website = `https://github.com/${sponsor.username}`
|
|
104
|
-
imgSrc = `https://github.com/${sponsor.username}.png?size=30`
|
|
105
|
-
width = 30
|
|
106
|
-
height = 30
|
|
107
|
-
padding = 0
|
|
108
|
-
backgroundColor = 'none'
|
|
109
|
-
} else {
|
|
110
|
-
imgSrc = sponsor.companyLogo
|
|
111
|
-
website = sponsor.website
|
|
112
|
-
const size = getSize(sponsor.plan)
|
|
113
|
-
width = size.width
|
|
114
|
-
height = size.height
|
|
115
|
-
padding = size.padding
|
|
116
|
-
imgAlt = sponsor.companyName
|
|
117
|
-
label = <Label sponsor={sponsor} />
|
|
118
|
-
}
|
|
119
|
-
const marginWidth = 5
|
|
120
|
-
return (
|
|
121
|
-
<a
|
|
122
|
-
href={website}
|
|
123
|
-
style={{
|
|
124
|
-
margin: `10px ${marginWidth}px`
|
|
125
|
-
}}
|
|
126
|
-
>
|
|
127
|
-
{label}
|
|
128
|
-
<div
|
|
129
|
-
style={{
|
|
130
|
-
backgroundColor,
|
|
131
|
-
borderRadius: 7,
|
|
132
|
-
overflow: 'hidden',
|
|
133
|
-
width,
|
|
134
|
-
maxWidth: `calc(100vw - 2 * var(--main-view-padding) - 2 * ${marginWidth}px)`,
|
|
135
|
-
height,
|
|
136
|
-
display: 'flex',
|
|
137
|
-
alignItems: 'center',
|
|
138
|
-
flexDirection: 'column',
|
|
139
|
-
justifyContent: 'center'
|
|
140
|
-
}}
|
|
141
|
-
>
|
|
142
|
-
<img
|
|
143
|
-
style={{ width: `calc(100% - ${padding}px)`, height: height - padding, zIndex: 2 }}
|
|
144
|
-
src={imgSrc}
|
|
145
|
-
alt={imgAlt}
|
|
146
|
-
/>
|
|
147
|
-
</div>
|
|
148
|
-
</a>
|
|
149
|
-
)
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
function Label({ sponsor }: { sponsor: Sponsor }) {
|
|
153
|
-
assert(!('username' in sponsor))
|
|
154
|
-
const labelBg = getLabelBg(sponsor)
|
|
155
|
-
const labelIcon = getLabelIcon(sponsor)
|
|
156
|
-
const labelText = getLabelText(sponsor)
|
|
157
|
-
return (
|
|
158
|
-
<div
|
|
159
|
-
style={{
|
|
160
|
-
top: 0,
|
|
161
|
-
display: 'flex',
|
|
162
|
-
justifyContent: 'center',
|
|
163
|
-
alignItems: 'center',
|
|
164
|
-
position: 'relative',
|
|
165
|
-
paddingBottom: 1
|
|
166
|
-
}}
|
|
167
|
-
>
|
|
168
|
-
{labelBg}
|
|
169
|
-
{labelIcon}
|
|
170
|
-
{labelText}
|
|
171
|
-
</div>
|
|
172
|
-
)
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
function getLabelBg(sponsor: SponsorCompany) {
|
|
176
|
-
const height = sponsor.plan === 'platinum' ? 32 : 24
|
|
177
|
-
return <img src={labelBgImg} style={{ height, position: 'absolute', bottom: 0, zIndex: -1 }} />
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
function getLabelText(sponsor: SponsorCompany) {
|
|
181
|
-
if (sponsor.plan === 'platinum') {
|
|
182
|
-
return <></>
|
|
183
|
-
}
|
|
184
|
-
const letterSpacing = ['bronze', 'silver', 'gold'].includes(sponsor.plan) ? 1 : undefined
|
|
185
|
-
return (
|
|
186
|
-
<>
|
|
187
|
-
{' '}
|
|
188
|
-
<span
|
|
189
|
-
style={{
|
|
190
|
-
zIndex: 1,
|
|
191
|
-
fontSize: '0.82em',
|
|
192
|
-
position: 'relative',
|
|
193
|
-
top: 0,
|
|
194
|
-
fontWeight: 500,
|
|
195
|
-
color: '#666',
|
|
196
|
-
letterSpacing
|
|
197
|
-
}}
|
|
198
|
-
>
|
|
199
|
-
{capitalizeFirstLetter(sponsor.plan)}
|
|
200
|
-
</span>
|
|
201
|
-
</>
|
|
202
|
-
)
|
|
203
|
-
}
|
|
204
|
-
|
|
205
|
-
function getLabelIcon(sponsor: SponsorCompany) {
|
|
206
|
-
let medalSrc: string
|
|
207
|
-
if (sponsor.plan === 'platinum') {
|
|
208
|
-
return <Emoji name="trophy" style={{ fontSize: '1.3em' }} />
|
|
209
|
-
} else if (sponsor.plan === 'gold') {
|
|
210
|
-
medalSrc = medalGold
|
|
211
|
-
} else if (sponsor.plan === 'silver') {
|
|
212
|
-
medalSrc = medalSilver
|
|
213
|
-
} else if (sponsor.plan === 'bronze') {
|
|
214
|
-
medalSrc = medalBronze
|
|
215
|
-
} else {
|
|
216
|
-
assert(false)
|
|
217
|
-
}
|
|
218
|
-
return <img src={medalSrc} style={{ height: 15, zIndex: 1, marginRight: 5 }} />
|
|
219
|
-
}
|
|
220
|
-
|
|
221
|
-
function getSize(plan: Plan) {
|
|
222
|
-
if (plan === 'platinum') {
|
|
223
|
-
assert(false)
|
|
224
|
-
}
|
|
225
|
-
if (plan === 'gold') {
|
|
226
|
-
return { width: 400, height: 150, padding: 95 }
|
|
227
|
-
}
|
|
228
|
-
if (plan === 'silver') {
|
|
229
|
-
return { width: 300, height: 100, padding: 45 }
|
|
230
|
-
}
|
|
231
|
-
if (plan === 'bronze') {
|
|
232
|
-
return { width: 200, height: 70, padding: 30 }
|
|
233
|
-
}
|
|
234
|
-
if (plan === 'FREE_SLOT') {
|
|
235
|
-
return { width: 150, height: 40, padding: 15 }
|
|
236
|
-
}
|
|
237
|
-
assert(false)
|
|
238
|
-
}
|
|
239
|
-
|
|
240
|
-
function capitalizeFirstLetter(word: string): string {
|
|
241
|
-
return word[0].toUpperCase() + word.slice(1)
|
|
242
|
-
}
|