Skip to content

Commit

Permalink
chore: add examples.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaywcjlove committed Oct 22, 2024
1 parent d9fdc86 commit b54e525
Show file tree
Hide file tree
Showing 28 changed files with 2,391 additions and 0 deletions.
8 changes: 8 additions & 0 deletions examples/default/docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Get Started

Create a [idoc](https://github.com/jaywcjlove/idoc) site using the beautiful theme.

```bash
npx idoc init my-app
npx idoc
```
14 changes: 14 additions & 0 deletions examples/default/docs/about.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# About

```
,, ,,
db `7MM
MM
`7MM ,M""bMM ,pW"Wq. ,p6"bo
MM ,AP MM 6W' `Wb 6M' OO
MM 8MI MM 8M M8 8M
MM `Mb MM YA. ,A9 YM. ,
.JMML.`Wbmd"MML.`Ybmd9' YMbmd'
```

[![](https://img.shields.io/github/forks/jaywcjlove/idoc.svg?style=social)](https://github.com/jaywcjlove/followers) [![](https://img.shields.io/github/stars/jaywcjlove/idoc.svg?style=social)](https://github.com/jaywcjlove/idoc/stargazers) [![](https://img.shields.io/github/followers/jaywcjlove.svg?style=social)](https://github.com/jaywcjlove/followers)
39 changes: 39 additions & 0 deletions examples/default/idoc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# yaml-language-server: $schema=https://jaywcjlove.github.io/idoc/schema
# yaml-language-server: $schema=https://jaywcjlove.gitee.io/idoc/schema

## directory of document source files
## defalut: `docs`
# -----------------------
dir: docs


## output directory of generated documents
## defalut: `dist`
# -----------------------
output: dist


## site name
# -----------------------
site: dev


## Customize theme settings.
## defalut: `default`
# -----------------------
theme: default

# Show open source button
openSource: https://github.com/jaywcjlove/idoc
# Display the edit button, need to configure `openSource`.
editButton:
label: Edit this page on GitHub
url: https://github.com/jaywcjlove/idoc/blob/master/
# Navigation Menu.
menus:
Home: index.html
About: about.html

footer: |
Released under the MIT License. Copyright © 2022 Kenny Wong<br />
Generated by <a href="https://github.com/jaywcjlove/idoc" target="_blank">idoc</a>
13 changes: 13 additions & 0 deletions examples/default/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"name": "dev",
"version": "0.0.1",
"description": "dev document.",
"license": "MIT",
"scripts": {
"start": "idoc -w",
"build": "idoc"
},
"devDependencies": {
"idoc": "^1.33.2"
}
}
8 changes: 8 additions & 0 deletions examples/template/docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Get Started

Create a [idoc](https://github.com/jaywcjlove/idoc) site using the beautiful theme.

```bash
npx idoc init my-app
npx idoc
```
14 changes: 14 additions & 0 deletions examples/template/docs/about.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# About

```
,, ,,
db `7MM
MM
`7MM ,M""bMM ,pW"Wq. ,p6"bo
MM ,AP MM 6W' `Wb 6M' OO
MM 8MI MM 8M M8 8M
MM `Mb MM YA. ,A9 YM. ,
.JMML.`Wbmd"MML.`Ybmd9' YMbmd'
```

[![](https://img.shields.io/github/forks/jaywcjlove/idoc.svg?style=social)](https://github.com/jaywcjlove/followers) [![](https://img.shields.io/github/stars/jaywcjlove/idoc.svg?style=social)](https://github.com/jaywcjlove/idoc/stargazers) [![](https://img.shields.io/github/followers/jaywcjlove.svg?style=social)](https://github.com/jaywcjlove/followers)
39 changes: 39 additions & 0 deletions examples/template/idoc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# yaml-language-server: $schema=https://jaywcjlove.github.io/idoc/schema
# yaml-language-server: $schema=https://jaywcjlove.gitee.io/idoc/schema

## directory of document source files
## defalut: `docs`
# -----------------------
dir: docs


## output directory of generated documents
## defalut: `dist`
# -----------------------
output: dist


## site name
# -----------------------
site: template


## Customize theme settings.
## defalut: `default`
# -----------------------
theme: theme/default

# Show open source button
openSource: https://github.com/jaywcjlove/idoc
# Display the edit button, need to configure `openSource`.
editButton:
label: Edit this page on GitHub
url: https://github.com/jaywcjlove/idoc/blob/master/
# Navigation Menu.
menus:
Home: index.html
About: about.html

footer: |
Released under the MIT License. Copyright © 2022 Kenny Wong<br />
Generated by <a href="https://github.com/jaywcjlove/idoc" target="_blank">idoc</a>
13 changes: 13 additions & 0 deletions examples/template/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"name": "template",
"version": "0.0.1",
"description": "template document.",
"license": "MIT",
"scripts": {
"start": "idoc -w",
"build": "idoc"
},
"devDependencies": {
"idoc": "^1.33.2"
}
}
49 changes: 49 additions & 0 deletions examples/template/theme/default/css/copy.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
markdown-style pre > .copied,
markdown-style [class*='language-'] .copied {
display: flex;
position: absolute;
cursor: pointer;
color: #a5afbb;
top: 6px;
right: 6px;
border-radius: 5px;
background: #82828226;
padding: 6px;
font-size: 12px;
transition: all 0.3s;
z-index: 10;
}
markdown-style pre > .copied:not(.active),
markdown-style [class*='language-'] .copied:not(.active) {
visibility: hidden;
}
markdown-style pre:hover > .copied,
markdown-style [class*='language-']:hover .copied {
visibility: visible;
}
markdown-style pre:hover > .copied:hover,
markdown-style [class*='language-']:hover .copied:hover {
background: #4caf50;
color: #fff;
}
markdown-style [class*='language-']:hover .copied:active,
markdown-style pre > .copied.active {
background: #2e9b33;
color: #fff;
}
markdown-style pre > .copied .octicon-copy,
markdown-style [class*='language-'] .copied .octicon-copy {
display: block;
}
markdown-style pre > .copied .octicon-check,
markdown-style [class*='language-'] .copied .octicon-check {
display: none;
}
markdown-style pre > .active .octicon-copy,
markdown-style [class*='language-'] .active .octicon-copy {
display: none;
}
markdown-style pre > .active .octicon-check,
markdown-style [class*='language-'] .active .octicon-check {
display: block;
}
62 changes: 62 additions & 0 deletions examples/template/theme/default/css/demo-preview.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
.idoc-demo-warpper {
overflow: hidden;
min-height: 60px;
margin-bottom: 16px;
}

div.idoc-demo-warpper {
position: relative;
background-color: var(--color-canvas-subtle);
border-radius: 6px;
}

div.idoc-demo-warpper > pre {
padding: 16px;
overflow: auto;
display: block;
margin-bottom: 0 !important;
height: 100%;
}

div.idoc-demo-previw {
padding: 10px;
font-size: initial;
line-height: initial;
line-height: initial;
font-family: initial;
overflow: auto;
}
.idoc-demo-previw {
border: 0;
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
width: 100%;
background-color: var(--color-canvas-subtle);
border: 1px solid var(--color-border-default);
border-radius: 6px;
z-index: 9;
transition: left 0.3s cubic-bezier(1, 0, 1, 0);
}

.idoc-demo-previw.ishiden {
left: -100%;
}
button.idoc-toggle-previw {
user-select: none;
position: absolute;
z-index: 10;
border: transparent;
background-color: var(--color-border-default);
cursor: pointer;
font-size: 12px;
padding: 2px 5px;
border-radius: 3px;
bottom: 5px;
right: 5px;
}
button.idoc-toggle-previw:hover {
color: var(--color-theme-text);
}
Loading

0 comments on commit b54e525

Please sign in to comment.