update
This commit is contained in:
parent
4859136764
commit
19e8a238ac
19 changed files with 6529 additions and 17 deletions
2
index.ts
2
index.ts
|
@ -0,0 +1,2 @@
|
|||
export { default as Splash } from './src/layouts/Splash.astro'
|
||||
export { default as Document } from './src/layouts/Document.astro'
|
10
src/components/Sidebar.astro
Executable file
10
src/components/Sidebar.astro
Executable file
|
@ -0,0 +1,10 @@
|
|||
---
|
||||
import { SidebarItems } from '../../config.json'
|
||||
import { SITE_BASE, SITE_PROTOCOL, SITE_DOMAIN } from '@utils/GetConfig'
|
||||
---
|
||||
|
||||
<div class="sidebar">
|
||||
{SidebarItems.map((item) => (
|
||||
item.heading ? <h2>{item.heading}</h2> : <a href={SITE_PROTOCOL + '://' + SITE_DOMAIN + SITE_BASE + item.link}>{item.text}</a>
|
||||
))}
|
||||
</div>
|
21
src/components/global/Head.astro
Executable file
21
src/components/global/Head.astro
Executable file
|
@ -0,0 +1,21 @@
|
|||
---
|
||||
// Properties
|
||||
const { Title } = Astro.props;
|
||||
---
|
||||
|
||||
<head>
|
||||
<!-- Metadata -->
|
||||
<title>{Title}</title>
|
||||
|
||||
<!-- tells dark reader that the site has a dark theme and to turn itself off -->
|
||||
<meta name="darkreader-lock" />
|
||||
|
||||
<!-- Options -->
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="theme-color" content="#000000" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, shrink-to-fit=no, viewport-fit=cover" />
|
||||
|
||||
<!-- Favicon -->
|
||||
<link rel="apple-touch-icon" href="favicon.svg" />
|
||||
<link rel="icon" href="favicon.svg" />
|
||||
</head>
|
22
src/components/global/Header.astro
Executable file
22
src/components/global/Header.astro
Executable file
|
@ -0,0 +1,22 @@
|
|||
---
|
||||
// Environment Variables
|
||||
import {
|
||||
SITE_NAME
|
||||
} from '@utils/GetConfig'
|
||||
|
||||
// Configuration
|
||||
import { HeaderItems } from '../../../config.json'
|
||||
---
|
||||
|
||||
<header>
|
||||
<div class="header-content">
|
||||
<div class="start">
|
||||
<h2><a style="text-decoration: none;" href="/">{SITE_NAME}</a></h2>
|
||||
</div>
|
||||
<div class="end">
|
||||
{HeaderItems.map((item) => (
|
||||
<a href={item.link}>{item.text}</a>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
68
src/layouts/Document.astro
Executable file
68
src/layouts/Document.astro
Executable file
|
@ -0,0 +1,68 @@
|
|||
---
|
||||
// Environment Variables
|
||||
// import {
|
||||
// ORG_NAME,
|
||||
// FEEDBACK_ENABLED,
|
||||
// FEELBACK_ENABLED,
|
||||
// REVERT_LAYOUT,
|
||||
// WHITELABEL
|
||||
// } from '@utils/GetConfig'
|
||||
|
||||
// Properties
|
||||
const { frontmatter, Title, Feedback, Feelback } = Astro.props
|
||||
|
||||
// Components
|
||||
|
||||
// Styles
|
||||
import "../styles/index.scss";
|
||||
import "../styles/feelback.css";
|
||||
import "../styles/prism.css"
|
||||
---
|
||||
|
||||
<div class="page">
|
||||
<div class="content">
|
||||
<div class="document">
|
||||
<!-- <h1>{frontmatter.Title}</h1> -->
|
||||
<slot/>
|
||||
<!-- <hr/>
|
||||
<p>Last Updated: null</p> -->
|
||||
<!-- {
|
||||
FEEDBACK_ENABLED ?
|
||||
// Feelback
|
||||
FEELBACK_ENABLED ?
|
||||
<FeelbackYesNo
|
||||
contentSetId="2308b02b-8f9f-437e-9780-5ad4c0db016e"
|
||||
preset="like-dislike"
|
||||
textQuestion="Did this article help?"
|
||||
textAnswer="Thank you for your feedback."
|
||||
/>
|
||||
:
|
||||
null
|
||||
:
|
||||
null
|
||||
} -->
|
||||
</div>
|
||||
</div>
|
||||
<div class="footer">
|
||||
<div class="footer-start">
|
||||
<!-- <p>© {ORG_NAME}. All right reserved.</p> -->
|
||||
</div>
|
||||
<div class="footer-end">
|
||||
<!-- {WHITELABEL ?
|
||||
<p>Built with <a href="#">ButterflyVu</a></p>
|
||||
:
|
||||
null
|
||||
} -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- {REVERT_LAYOUT ?
|
||||
<style>
|
||||
.content {
|
||||
flex-direction: row-reverse;
|
||||
}
|
||||
</style>
|
||||
:
|
||||
null
|
||||
} -->
|
0
src/layouts/Splash.astro
Executable file
0
src/layouts/Splash.astro
Executable file
264
src/styles/feelback.css
Executable file
264
src/styles/feelback.css
Executable file
|
@ -0,0 +1,264 @@
|
|||
.feelback-container,
|
||||
.feelback-style {
|
||||
--highlight:
|
||||
0,
|
||||
0,
|
||||
0;
|
||||
--highlight-opacity: 0.08;
|
||||
--border-color: rgba(128, 128, 128, .5);
|
||||
--max-width: unset;
|
||||
--bg: #fff;
|
||||
position: relative;
|
||||
max-width: var(--max-width);
|
||||
}
|
||||
.feelback-container.feelback-pulse,
|
||||
.feelback-style.feelback-pulse {
|
||||
display: inline-block;
|
||||
}
|
||||
.feelback-container.feelback-reaction,
|
||||
.feelback-style.feelback-reaction {
|
||||
display: inline-block;
|
||||
}
|
||||
.feelback-container.feelback-message.layout-button-dialogue,
|
||||
.feelback-container.feelback-tagged-message.layout-button-dialog,
|
||||
.feelback-style.feelback-message.layout-button-dialogue,
|
||||
.feelback-style.feelback-tagged-message.layout-button-dialog {
|
||||
display: inline-block;
|
||||
}
|
||||
.feelback-container textarea,
|
||||
.feelback-style textarea {
|
||||
height: 120px;
|
||||
width: 100%;
|
||||
padding: 0.5rem;
|
||||
}
|
||||
.feelback-container input,
|
||||
.feelback-style input {
|
||||
width: 100%;
|
||||
}
|
||||
.feelback-container input[type=text],
|
||||
.feelback-container input[type=email],
|
||||
.feelback-style input[type=text],
|
||||
.feelback-style input[type=email] {
|
||||
padding: 0.5rem;
|
||||
}
|
||||
.feelback-container .popup,
|
||||
.feelback-style .popup {
|
||||
display: none;
|
||||
position: absolute;
|
||||
background-color: var(--theme-bg, var(--bg));
|
||||
border: 1px solid var(--border-color);
|
||||
border-radius: 4px;
|
||||
z-index: 2;
|
||||
}
|
||||
.feelback-container .dialog,
|
||||
.feelback-style .dialog {
|
||||
position: fixed;
|
||||
left: 0;
|
||||
top: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
z-index: 99999;
|
||||
background-color: rgba(0, 0, 66, 0.15);
|
||||
}
|
||||
.feelback-container .dialog > :first-child,
|
||||
.feelback-style .dialog > :first-child {
|
||||
margin: 10% auto;
|
||||
max-width: 480px;
|
||||
}
|
||||
.feelback-container .dialog .content,
|
||||
.feelback-style .dialog .content {
|
||||
padding: 1.5rem;
|
||||
border-radius: 6px;
|
||||
border: 1px solid #7d8792;
|
||||
background-color: #f3f9ff;
|
||||
}
|
||||
.feelback-container .hidden,
|
||||
.feelback-style .hidden {
|
||||
display: none;
|
||||
}
|
||||
.feelback-container.bordered .content,
|
||||
.feelback-style.bordered .content {
|
||||
border-radius: 1rem;
|
||||
border: 1px solid var(--border-color);
|
||||
padding: 0.5rem 0.75rem;
|
||||
}
|
||||
.feelback-container.width-md,
|
||||
.feelback-style.width-md {
|
||||
--max-width: 440px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
.feelback-container.width-sm,
|
||||
.feelback-style.width-sm {
|
||||
--max-width: 320px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
.feelback-container.align-center .feelback-q,
|
||||
.feelback-style.align-center .feelback-q {
|
||||
justify-content: center;
|
||||
}
|
||||
.feelback-q {
|
||||
display: flex;
|
||||
padding-inline: 0.4em;
|
||||
gap: 1.2em;
|
||||
align-items: center;
|
||||
}
|
||||
@media (max-width: 768px) {
|
||||
.feelback-q {
|
||||
justify-content: space-between;
|
||||
}
|
||||
}
|
||||
.feelback-a {
|
||||
padding-inline: 0.4em;
|
||||
line-height: 32px;
|
||||
}
|
||||
.feelback-form > .content {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 0.3rem;
|
||||
}
|
||||
.feelback-form .form-title {
|
||||
font-size: 1.1em;
|
||||
font-weight: bold;
|
||||
}
|
||||
.feelback-buttons {
|
||||
gap: 2px;
|
||||
display: flex;
|
||||
align-items: baseline;
|
||||
}
|
||||
.feelback-buttons.with-count {
|
||||
gap: 6px;
|
||||
}
|
||||
.feelback-buttons.hide-zero .feelback-btn:has(.feelback-count:not([data-feelback-count-value]), .feelback-count[data-feelback-count-value="0"]),
|
||||
.feelback-buttons.hide-zero .feelback-btn:not(:has(.feelback-count)) {
|
||||
display: none;
|
||||
}
|
||||
.feelback-buttons.attached {
|
||||
gap: 0;
|
||||
}
|
||||
.feelback-buttons.align-end {
|
||||
flex-direction: row-reverse;
|
||||
}
|
||||
.feelback-buttons.large > .feelback-btn {
|
||||
font-size: 1.25em;
|
||||
}
|
||||
.feelback-buttons .label {
|
||||
font-size: 0.9em;
|
||||
padding-inline: 0.25em;
|
||||
}
|
||||
.feelback-radio-group {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
border: none;
|
||||
}
|
||||
.feelback-radio-item {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
padding-top: 0.25rem;
|
||||
padding-bottom: 0.25rem;
|
||||
align-items: flex-start;
|
||||
}
|
||||
.feelback-radio-item input[type=radio] {
|
||||
flex-shrink: 0;
|
||||
width: unset;
|
||||
display: inline-block;
|
||||
margin: 0.5rem;
|
||||
}
|
||||
.feelback-radio-item label {
|
||||
cursor: pointer;
|
||||
display: block;
|
||||
}
|
||||
.feelback-radio-item .feelback-text {
|
||||
font-size: 0.9em;
|
||||
}
|
||||
.feelback-icon {
|
||||
display: flex;
|
||||
line-height: 1em;
|
||||
}
|
||||
.feelback-count {
|
||||
font-weight: bold;
|
||||
padding-inline-start: 0.25em;
|
||||
}
|
||||
.feelback-count.hide-zero[data-feelback-count-value="0"],
|
||||
.feelback-count.hide-zero:not([data-feelback-count-value]) {
|
||||
display: none;
|
||||
}
|
||||
.feelback-btn {
|
||||
min-width: 32px;
|
||||
height: 32px;
|
||||
padding: 0 0.4em;
|
||||
display: flex;
|
||||
cursor: pointer;
|
||||
background-color: transparent;
|
||||
border: 0;
|
||||
font-size: 1em;
|
||||
border-radius: 0.15em;
|
||||
text-align: center;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
.feelback-btn.disabled {
|
||||
cursor: default;
|
||||
}
|
||||
.feelback-btn.disabled > .feelback-icon {
|
||||
opacity: 0.7;
|
||||
}
|
||||
.feelback-btn > .active {
|
||||
display: none;
|
||||
}
|
||||
.feelback-btn.active {
|
||||
background-color: rgba(var(--highlight), var(--highlight-opacity));
|
||||
}
|
||||
.feelback-btn.active > .feelback-icon {
|
||||
transform: scale(1.3);
|
||||
opacity: 1;
|
||||
}
|
||||
.feelback-btn.active > .feelback-icon.inactive {
|
||||
display: none;
|
||||
}
|
||||
.feelback-btn.active > .feelback-icon.active {
|
||||
display: flex;
|
||||
}
|
||||
.feelback-btn:hover:not(.disabled) {
|
||||
background-color: rgba(var(--highlight), calc(var(--highlight-opacity) * 2));
|
||||
}
|
||||
.feelback-btn:hover:not(.disabled) > .feelback-icon {
|
||||
transform: scale(1.3);
|
||||
transition: all 350ms cubic-bezier(0.35, 1.23, 0.5, 1.37);
|
||||
}
|
||||
.feelback-btn.btn-reaction-picker {
|
||||
border-radius: 100%;
|
||||
background-color: rgba(var(--highlight), var(--highlight-opacity));
|
||||
border: 1px solid rgba(128, 128, 128, 0.5);
|
||||
}
|
||||
.feelback-btn.btn-reaction-picker .feelback-icon {
|
||||
transform: scale(1.15);
|
||||
}
|
||||
.feelback-btn.btn-action {
|
||||
min-width: 80px;
|
||||
padding-inline: 0.5rem;
|
||||
text-transform: uppercase;
|
||||
font-size: 0.9em;
|
||||
border: 1px solid currentColor;
|
||||
}
|
||||
.theme-dark .feelback-container,
|
||||
.theme-dark .feelback-style,
|
||||
html[data-theme=dark] .feelback-container,
|
||||
html[data-theme=dark] .feelback-style,
|
||||
html.dark .feelback-container,
|
||||
html.dark .feelback-style {
|
||||
--highlight:
|
||||
255,
|
||||
255,
|
||||
255;
|
||||
--highlight-opacity: 0.15;
|
||||
--bg: transparent;
|
||||
--border-color: rgba(255, 255, 255, .4);
|
||||
}
|
||||
.theme-dark .feelback-container .dialog .content,
|
||||
.theme-dark .feelback-style .dialog .content,
|
||||
html[data-theme=dark] .feelback-container .dialog .content,
|
||||
html[data-theme=dark] .feelback-style .dialog .content,
|
||||
html.dark .feelback-container .dialog .content,
|
||||
html.dark .feelback-style .dialog .content {
|
||||
background: #111c29;
|
||||
}
|
122
src/styles/index.scss
Executable file
122
src/styles/index.scss
Executable file
|
@ -0,0 +1,122 @@
|
|||
body {
|
||||
max-width: 1200px;
|
||||
margin: auto;
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
background: #0a0a0a;
|
||||
color: white;
|
||||
}
|
||||
|
||||
a {
|
||||
color: white;
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
table {
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
border-collapse: collapse;
|
||||
width: 100%;
|
||||
td, th {
|
||||
border: 1px solid #111111;
|
||||
padding: 8px;
|
||||
}
|
||||
tr:nth-child(odd){background-color: #333333;}
|
||||
tr:nth-child(even){background-color: #141414;}
|
||||
tr:hover {background-color: #454545;}
|
||||
th {
|
||||
padding-top: 12px;
|
||||
padding-bottom: 12pqx;
|
||||
text-align: left;
|
||||
background-color: #070707;
|
||||
color: white;
|
||||
}
|
||||
}
|
||||
|
||||
blockquote {
|
||||
margin: 0px;
|
||||
background: #323232;
|
||||
border-radius: 4px;
|
||||
padding: 12px 24px;
|
||||
border-left: 4px white solid;
|
||||
p {
|
||||
margin: 0px;
|
||||
}
|
||||
}
|
||||
|
||||
header {
|
||||
background: #161616;
|
||||
width: 100%;
|
||||
position: absolute;
|
||||
top: 0px;
|
||||
left: 0px;
|
||||
z-index: 1;
|
||||
.header-content {
|
||||
max-width: 1200px;
|
||||
margin: auto;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
.end {
|
||||
display: flex;
|
||||
gap: 12px;
|
||||
a {
|
||||
text-decoration: none;
|
||||
&:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.page {
|
||||
position: relative;
|
||||
min-height: 100vh;
|
||||
.content {
|
||||
padding-top: 90px;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
gap: 24px;
|
||||
padding-bottom: 80px;
|
||||
.sidebar {
|
||||
min-width: 250px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 12px;
|
||||
a {
|
||||
text-decoration: none;
|
||||
font-size: 14px;
|
||||
color: #898989;
|
||||
}
|
||||
}
|
||||
.document {
|
||||
height: max-content;
|
||||
img, video {
|
||||
width: 100%;
|
||||
border-radius: 6px;
|
||||
}
|
||||
.feelback-q {
|
||||
justify-content: center;
|
||||
padding: 24px 0px;
|
||||
svg {
|
||||
color: white;
|
||||
}
|
||||
.feelback-btn.active {
|
||||
background: white;
|
||||
border-radius: 3rem;
|
||||
svg {
|
||||
color: black;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.footer {
|
||||
position: absolute;
|
||||
padding-bottom: 24px;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
height: 2.5rem;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
}
|
275
src/styles/prism.css
Normal file
275
src/styles/prism.css
Normal file
|
@ -0,0 +1,275 @@
|
|||
pre[class*="language-"],
|
||||
code[class*="language-"] {
|
||||
color: #d4d4d4;
|
||||
font-size: 12px;
|
||||
text-shadow: none;
|
||||
font-family: Menlo, Monaco, Consolas, "Andale Mono", "Ubuntu Mono", "Courier New", monospace;
|
||||
direction: ltr;
|
||||
text-align: left;
|
||||
white-space: pre;
|
||||
word-spacing: normal;
|
||||
word-break: normal;
|
||||
line-height: 1.5;
|
||||
-moz-tab-size: 4;
|
||||
-o-tab-size: 4;
|
||||
tab-size: 4;
|
||||
-webkit-hyphens: none;
|
||||
-moz-hyphens: none;
|
||||
-ms-hyphens: none;
|
||||
hyphens: none;
|
||||
}
|
||||
|
||||
pre[class*="language-"]::selection,
|
||||
code[class*="language-"]::selection,
|
||||
pre[class*="language-"] *::selection,
|
||||
code[class*="language-"] *::selection {
|
||||
text-shadow: none;
|
||||
background: #264F78;
|
||||
}
|
||||
|
||||
@media print {
|
||||
pre[class*="language-"],
|
||||
code[class*="language-"] {
|
||||
text-shadow: none;
|
||||
}
|
||||
}
|
||||
|
||||
pre[class*="language-"] {
|
||||
padding: 0px 12px;
|
||||
margin: .5em 0;
|
||||
overflow: auto;
|
||||
background: #1e1e1e;
|
||||
}
|
||||
|
||||
:not(pre) > code[class*="language-"] {
|
||||
padding: .1em .3em;
|
||||
border-radius: .3em;
|
||||
color: #db4c69;
|
||||
background: #1e1e1e;
|
||||
}
|
||||
/*********************************************************
|
||||
* Tokens
|
||||
*/
|
||||
.namespace {
|
||||
opacity: .7;
|
||||
}
|
||||
|
||||
.token.doctype .token.doctype-tag {
|
||||
color: #569CD6;
|
||||
}
|
||||
|
||||
.token.doctype .token.name {
|
||||
color: #9cdcfe;
|
||||
}
|
||||
|
||||
.token.comment,
|
||||
.token.prolog {
|
||||
color: #6a9955;
|
||||
}
|
||||
|
||||
.token.punctuation,
|
||||
.language-html .language-css .token.punctuation,
|
||||
.language-html .language-javascript .token.punctuation {
|
||||
color: #d4d4d4;
|
||||
}
|
||||
|
||||
.token.property,
|
||||
.token.tag,
|
||||
.token.boolean,
|
||||
.token.number,
|
||||
.token.constant,
|
||||
.token.symbol,
|
||||
.token.inserted,
|
||||
.token.unit {
|
||||
color: #b5cea8;
|
||||
}
|
||||
|
||||
.token.selector,
|
||||
.token.attr-name,
|
||||
.token.string,
|
||||
.token.char,
|
||||
.token.builtin,
|
||||
.token.deleted {
|
||||
color: #ce9178;
|
||||
}
|
||||
|
||||
.language-css .token.string.url {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.token.operator,
|
||||
.token.entity {
|
||||
color: #d4d4d4;
|
||||
}
|
||||
|
||||
.token.operator.arrow {
|
||||
color: #569CD6;
|
||||
}
|
||||
|
||||
.token.atrule {
|
||||
color: #ce9178;
|
||||
}
|
||||
|
||||
.token.atrule .token.rule {
|
||||
color: #c586c0;
|
||||
}
|
||||
|
||||
.token.atrule .token.url {
|
||||
color: #9cdcfe;
|
||||
}
|
||||
|
||||
.token.atrule .token.url .token.function {
|
||||
color: #dcdcaa;
|
||||
}
|
||||
|
||||
.token.atrule .token.url .token.punctuation {
|
||||
color: #d4d4d4;
|
||||
}
|
||||
|
||||
.token.keyword {
|
||||
color: #569CD6;
|
||||
}
|
||||
|
||||
.token.keyword.module,
|
||||
.token.keyword.control-flow {
|
||||
color: #c586c0;
|
||||
}
|
||||
|
||||
.token.function,
|
||||
.token.function .token.maybe-class-name {
|
||||
color: #dcdcaa;
|
||||
}
|
||||
|
||||
.token.regex {
|
||||
color: #d16969;
|
||||
}
|
||||
|
||||
.token.important {
|
||||
color: #569cd6;
|
||||
}
|
||||
|
||||
.token.italic {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.token.constant {
|
||||
color: #9cdcfe;
|
||||
}
|
||||
|
||||
.token.class-name,
|
||||
.token.maybe-class-name {
|
||||
color: #4ec9b0;
|
||||
}
|
||||
|
||||
.token.console {
|
||||
color: #9cdcfe;
|
||||
}
|
||||
|
||||
.token.parameter {
|
||||
color: #9cdcfe;
|
||||
}
|
||||
|
||||
.token.interpolation {
|
||||
color: #9cdcfe;
|
||||
}
|
||||
|
||||
.token.punctuation.interpolation-punctuation {
|
||||
color: #569cd6;
|
||||
}
|
||||
|
||||
.token.boolean {
|
||||
color: #569cd6;
|
||||
}
|
||||
|
||||
.token.property,
|
||||
.token.variable,
|
||||
.token.imports .token.maybe-class-name,
|
||||
.token.exports .token.maybe-class-name {
|
||||
color: #9cdcfe;
|
||||
}
|
||||
|
||||
.token.selector {
|
||||
color: #d7ba7d;
|
||||
}
|
||||
|
||||
.token.escape {
|
||||
color: #d7ba7d;
|
||||
}
|
||||
|
||||
.token.tag {
|
||||
color: #569cd6;
|
||||
}
|
||||
|
||||
.token.tag .token.punctuation {
|
||||
color: #808080;
|
||||
}
|
||||
|
||||
.token.cdata {
|
||||
color: #808080;
|
||||
}
|
||||
|
||||
.token.attr-name {
|
||||
color: #9cdcfe;
|
||||
}
|
||||
|
||||
.token.attr-value,
|
||||
.token.attr-value .token.punctuation {
|
||||
color: #ce9178;
|
||||
}
|
||||
|
||||
.token.attr-value .token.punctuation.attr-equals {
|
||||
color: #d4d4d4;
|
||||
}
|
||||
|
||||
.token.entity {
|
||||
color: #569cd6;
|
||||
}
|
||||
|
||||
.token.namespace {
|
||||
color: #4ec9b0;
|
||||
}
|
||||
/*********************************************************
|
||||
* Language Specific
|
||||
*/
|
||||
|
||||
pre[class*="language-javascript"],
|
||||
code[class*="language-javascript"],
|
||||
pre[class*="language-jsx"],
|
||||
code[class*="language-jsx"],
|
||||
pre[class*="language-typescript"],
|
||||
code[class*="language-typescript"],
|
||||
pre[class*="language-tsx"],
|
||||
code[class*="language-tsx"] {
|
||||
color: #9cdcfe;
|
||||
}
|
||||
|
||||
pre[class*="language-css"],
|
||||
code[class*="language-css"] {
|
||||
color: #ce9178;
|
||||
}
|
||||
|
||||
pre[class*="language-html"],
|
||||
code[class*="language-html"] {
|
||||
color: #d4d4d4;
|
||||
}
|
||||
|
||||
.language-regex .token.anchor {
|
||||
color: #dcdcaa;
|
||||
}
|
||||
|
||||
.language-html .token.punctuation {
|
||||
color: #808080;
|
||||
}
|
||||
/*********************************************************
|
||||
* Line highlighting
|
||||
*/
|
||||
pre[class*="language-"] > code[class*="language-"] {
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.line-highlight.line-highlight {
|
||||
background: #f7ebc6;
|
||||
box-shadow: inset 5px 0 0 #f7d87c;
|
||||
z-index: 0;
|
||||
}
|
24
src/styles/splash.scss
Executable file
24
src/styles/splash.scss
Executable file
|
@ -0,0 +1,24 @@
|
|||
.splash {
|
||||
position: relative;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
.splash-action {
|
||||
display: flex;
|
||||
gap: 6px;
|
||||
a {
|
||||
text-decoration: none;
|
||||
padding: 12px 26px;
|
||||
background: white;
|
||||
color: black;
|
||||
border-radius: 3rem;
|
||||
border: 1px white solid;
|
||||
&.button-secondary {
|
||||
background: transparent;
|
||||
color: white;
|
||||
border: 2px white solid;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
4
test/.vscode/extensions.json
vendored
4
test/.vscode/extensions.json
vendored
|
@ -1,4 +0,0 @@
|
|||
{
|
||||
"recommendations": ["astro-build.astro-vscode", "unifiedjs.vscode-mdx"],
|
||||
"unwantedRecommendations": []
|
||||
}
|
11
test/.vscode/launch.json
vendored
11
test/.vscode/launch.json
vendored
|
@ -1,11 +0,0 @@
|
|||
{
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
"command": "./node_modules/.bin/astro dev",
|
||||
"name": "Development server",
|
||||
"request": "launch",
|
||||
"type": "node-terminal"
|
||||
}
|
||||
]
|
||||
}
|
BIN
test/bun.lockb
BIN
test/bun.lockb
Binary file not shown.
5463
test/package-lock.json
generated
Normal file
5463
test/package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load diff
|
@ -13,6 +13,8 @@
|
|||
"@astrojs/mdx": "^3.1.8",
|
||||
"@astrojs/rss": "^4.0.9",
|
||||
"@astrojs/sitemap": "^3.2.1",
|
||||
"astro": "^4.16.7"
|
||||
"@sudovanilla/butterflyvu": "../",
|
||||
"astro": "^4.16.7",
|
||||
"sass": "^1.80.4"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -14,3 +14,10 @@ const blog = defineCollection({
|
|||
});
|
||||
|
||||
export const collections = { blog };
|
||||
|
||||
const docs = defineCollection({
|
||||
type: 'content',
|
||||
schema: z.object({title: z.string()}),
|
||||
});
|
||||
|
||||
export const Documents = { docs }
|
211
test/src/content/docs/demo.md
Normal file
211
test/src/content/docs/demo.md
Normal file
|
@ -0,0 +1,211 @@
|
|||
---
|
||||
Title: 'Markdown Style Guide'
|
||||
---
|
||||
|
||||
Here is a sample of some basic Markdown syntax that can be used when writing Markdown content in Astro.
|
||||
|
||||
## Headings
|
||||
|
||||
The following HTML `<h1>`—`<h6>` elements represent six levels of section headings. `<h1>` is the highest section level while `<h6>` is the lowest.
|
||||
|
||||
# H1
|
||||
|
||||
## H2
|
||||
|
||||
### H3
|
||||
|
||||
#### H4
|
||||
|
||||
##### H5
|
||||
|
||||
###### H6
|
||||
|
||||
## Paragraph
|
||||
|
||||
Xerum, quo qui aut unt expliquam qui dolut labo. Aque venitatiusda cum, voluptionse latur sitiae dolessi aut parist aut dollo enim qui voluptate ma dolestendit peritin re plis aut quas inctum laceat est volestemque commosa as cus endigna tectur, offic to cor sequas etum rerum idem sintibus eiur? Quianimin porecus evelectur, cum que nis nust voloribus ratem aut omnimi, sitatur? Quiatem. Nam, omnis sum am facea corem alique molestrunt et eos evelece arcillit ut aut eos eos nus, sin conecerem erum fuga. Ri oditatquam, ad quibus unda veliamenimin cusam et facea ipsamus es exerum sitate dolores editium rerore eost, temped molorro ratiae volorro te reribus dolorer sperchicium faceata tiustia prat.
|
||||
|
||||
Itatur? Quiatae cullecum rem ent aut odis in re eossequodi nonsequ idebis ne sapicia is sinveli squiatum, core et que aut hariosam ex eat.
|
||||
|
||||
## Images
|
||||
|
||||
### Syntax
|
||||
|
||||
```markdown
|
||||
![Alt text](./full/or/relative/path/of/image)
|
||||
```
|
||||
|
||||
### Output
|
||||
|
||||
![blog placeholder](/blog-placeholder-about.jpg)
|
||||
|
||||
## Blockquotes
|
||||
|
||||
The blockquote element represents content that is quoted from another source, optionally with a citation which must be within a `footer` or `cite` element, and optionally with in-line changes such as annotations and abbreviations.
|
||||
|
||||
### Blockquote without attribution
|
||||
|
||||
#### Syntax
|
||||
|
||||
```markdown
|
||||
> Tiam, ad mint andaepu dandae nostion secatur sequo quae.
|
||||
> **Note** that you can use _Markdown syntax_ within a blockquote.
|
||||
```
|
||||
|
||||
#### Output
|
||||
|
||||
> Tiam, ad mint andaepu dandae nostion secatur sequo quae.
|
||||
> **Note** that you can use _Markdown syntax_ within a blockquote.
|
||||
|
||||
### Blockquote with attribution
|
||||
|
||||
#### Syntax
|
||||
|
||||
```markdown
|
||||
> Don't communicate by sharing memory, share memory by communicating.<br>
|
||||
> — <cite>Rob Pike[^1]</cite>
|
||||
```
|
||||
|
||||
#### Output
|
||||
|
||||
> Don't communicate by sharing memory, share memory by communicating.<br>
|
||||
> — <cite>Rob Pike[^1]</cite>
|
||||
|
||||
[^1]: The above quote is excerpted from Rob Pike's [talk](https://www.youtube.com/watch?v=PAAkCSZUG1c) during Gopherfest, November 18, 2015.
|
||||
|
||||
## Tables
|
||||
|
||||
### Syntax
|
||||
|
||||
```markdown
|
||||
| Italics | Bold | Code |
|
||||
| --------- | -------- | ------ |
|
||||
| _italics_ | **bold** | `code` |
|
||||
```
|
||||
|
||||
### Output
|
||||
|
||||
| Italics | Bold | Code |
|
||||
| --------- | -------- | ------ |
|
||||
| _italics_ | **bold** | `code` |
|
||||
|
||||
## Code Blocks
|
||||
|
||||
### Syntax
|
||||
|
||||
we can use 3 backticks ``` in new line and write snippet and close with 3 backticks on new line and to highlight language specific syntax, write one word of language name after first 3 backticks, for eg. html, javascript, css, markdown, typescript, txt, bash
|
||||
|
||||
````markdown
|
||||
```html
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title>Example HTML5 Document</title>
|
||||
</head>
|
||||
<body>
|
||||
<p>Test</p>
|
||||
</body>
|
||||
</html>
|
||||
```
|
||||
````
|
||||
|
||||
### Output
|
||||
|
||||
```html
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title>Example HTML5 Document</title>
|
||||
</head>
|
||||
<body>
|
||||
<p>Test</p>
|
||||
</body>
|
||||
</html>
|
||||
```
|
||||
|
||||
## List Types
|
||||
|
||||
### Ordered List
|
||||
|
||||
#### Syntax
|
||||
|
||||
```markdown
|
||||
1. First item
|
||||
2. Second item
|
||||
3. Third item
|
||||
```
|
||||
|
||||
#### Output
|
||||
|
||||
1. First item
|
||||
2. Second item
|
||||
3. Third item
|
||||
|
||||
### Unordered List
|
||||
|
||||
#### Syntax
|
||||
|
||||
```markdown
|
||||
- List item
|
||||
- Another item
|
||||
- And another item
|
||||
```
|
||||
|
||||
#### Output
|
||||
|
||||
- List item
|
||||
- Another item
|
||||
- And another item
|
||||
|
||||
### Nested list
|
||||
|
||||
#### Syntax
|
||||
|
||||
```markdown
|
||||
- Fruit
|
||||
- Apple
|
||||
- Orange
|
||||
- Banana
|
||||
- Dairy
|
||||
- Milk
|
||||
- Cheese
|
||||
```
|
||||
|
||||
#### Output
|
||||
|
||||
- Fruit
|
||||
- Apple
|
||||
- Orange
|
||||
- Banana
|
||||
- Dairy
|
||||
- Milk
|
||||
- Cheese
|
||||
|
||||
## Other Elements — abbr, sub, sup, kbd, mark
|
||||
|
||||
### Syntax
|
||||
|
||||
```markdown
|
||||
<abbr title="Graphics Interchange Format">GIF</abbr> is a bitmap image format.
|
||||
|
||||
H<sub>2</sub>O
|
||||
|
||||
X<sup>n</sup> + Y<sup>n</sup> = Z<sup>n</sup>
|
||||
|
||||
Press <kbd>CTRL</kbd> + <kbd>ALT</kbd> + <kbd>Delete</kbd> to end the session.
|
||||
|
||||
Most <mark>salamanders</mark> are nocturnal, and hunt for insects, worms, and other small creatures.
|
||||
```
|
||||
|
||||
### Output
|
||||
|
||||
<abbr title="Graphics Interchange Format">GIF</abbr> is a bitmap image format.
|
||||
|
||||
H<sub>2</sub>O
|
||||
|
||||
X<sup>n</sup> + Y<sup>n</sup> = Z<sup>n</sup>
|
||||
|
||||
Press <kbd>CTRL</kbd> + <kbd>ALT</kbd> + <kbd>Delete</kbd> to end the session.
|
||||
|
||||
Most <mark>salamanders</mark> are nocturnal, and hunt for insects, worms, and other small creatures.
|
12
test/src/layouts/Document.astro
Normal file
12
test/src/layouts/Document.astro
Normal file
|
@ -0,0 +1,12 @@
|
|||
---
|
||||
import {
|
||||
Document
|
||||
} from '../../../'
|
||||
|
||||
---
|
||||
|
||||
<Document
|
||||
SiteName="Hello"
|
||||
>
|
||||
<slot/>
|
||||
</Document>
|
24
test/src/pages/docs/[...slug].astro
Normal file
24
test/src/pages/docs/[...slug].astro
Normal file
|
@ -0,0 +1,24 @@
|
|||
---
|
||||
import { type CollectionEntry, getCollection } from 'astro:content';
|
||||
|
||||
export async function getStaticPaths() {
|
||||
const documents = await getCollection('docs');
|
||||
return documents.map((document) => ({
|
||||
params: { slug: document.slug },
|
||||
props: document,
|
||||
}));
|
||||
}
|
||||
type Props = CollectionEntry<'docs'>;
|
||||
|
||||
const document = Astro.props;
|
||||
const { Content } = await document.render();
|
||||
|
||||
|
||||
|
||||
|
||||
import Document from "../../layouts/Document.astro"
|
||||
---
|
||||
|
||||
<Document>
|
||||
<Content />
|
||||
</Document>
|
Loading…
Reference in a new issue