Skip to content

Commit d2511ee

Browse files
committed
feat(site): support custom markdown route
1 parent 144776b commit d2511ee

44 files changed

Lines changed: 938 additions & 698 deletions

Some content is hidden

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

packages/site/.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@ src/app/configs/*
33

44
src/app/i18n/resources.json
55

6-
src/app/routes/components/
6+
src/app/routes/components/*
7+
!src/app/routes/components/*.md

packages/site/src/app/components/route/DemoBox.scss

Lines changed: 0 additions & 84 deletions
This file was deleted.
Lines changed: 3 additions & 169 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
@import '~rfs/scss';
22

3-
.app-route__anchor {
3+
.app-route-article__anchor {
44
position: fixed;
55
top: 120px;
66
right: 20px;
@@ -13,7 +13,7 @@
1313
}
1414
}
1515

16-
.app-route__anchor-conatiner {
16+
.app-route-article__anchor-conatiner {
1717
position: fixed;
1818
right: 0;
1919
bottom: 0;
@@ -27,7 +27,7 @@
2727
background-color: var(--d-background-color);
2828
}
2929

30-
.app-route__anchor-button {
30+
.app-route-article__anchor-button {
3131
position: fixed;
3232
right: 20px;
3333
bottom: 44px;
@@ -49,169 +49,3 @@
4949

5050
appearance: none;
5151
}
52-
53-
.app-route-article {
54-
code {
55-
word-break: break-all;
56-
}
57-
58-
pre > code {
59-
font-family: Consolas, Menlo, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
60-
}
61-
62-
pre code.hljs {
63-
background-color: var(--app-code-background-color);
64-
}
65-
66-
code:not(pre > code) {
67-
margin: 0 1px;
68-
padding: 4px 6px;
69-
border-radius: 3px;
70-
71-
font-family: Consolas, Menlo, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
72-
73-
background-color: var(--app-code-background-color);
74-
}
75-
76-
a:not(.app-demo-box__renderer a) {
77-
color: var(--d-color-primary);
78-
text-decoration: none;
79-
80-
&:hover {
81-
color: var(--d-color-primary-lighter);
82-
}
83-
}
84-
85-
h1 {
86-
margin: 8px 0 20px;
87-
88-
font-weight: 500;
89-
@include font-size(2rem);
90-
}
91-
92-
h2 {
93-
margin: 38px 0 20px;
94-
95-
font-weight: 500;
96-
@include font-size(1.5rem);
97-
}
98-
99-
h3 {
100-
margin: 28px 0 12px;
101-
102-
font-weight: 500;
103-
@include font-size(1.25rem);
104-
}
105-
106-
table {
107-
width: 100%;
108-
margin: 8px 0 16px;
109-
border: 1px solid var(--d-border-color);
110-
border-collapse: collapse;
111-
border-spacing: 0;
112-
113-
empty-cells: show;
114-
115-
th {
116-
font-weight: 500;
117-
white-space: nowrap;
118-
119-
background: var(--app-th-background-color);
120-
}
121-
122-
th,
123-
td {
124-
padding: 16px 24px;
125-
border: 1px solid var(--d-divider-color);
126-
127-
text-align: left;
128-
}
129-
}
130-
131-
.anchor {
132-
display: inline-block;
133-
margin-left: 8px;
134-
135-
color: var(--d-color-primary);
136-
text-decoration: none;
137-
138-
opacity: 0;
139-
140-
transition: opacity 0.2s linear;
141-
142-
&:focus-visible {
143-
outline: none;
144-
opacity: 1;
145-
}
146-
}
147-
148-
h1,
149-
h2,
150-
h3,
151-
h4,
152-
h5,
153-
h6 {
154-
&:hover .anchor {
155-
opacity: 1;
156-
}
157-
}
158-
159-
.icon-button {
160-
color: var(--d-color-step-400);
161-
162-
cursor: pointer;
163-
164-
transition: color 0.1s linear;
165-
166-
&:hover {
167-
color: var(--d-color-primary);
168-
}
169-
}
170-
171-
.app-route-article__subtitle {
172-
margin-left: 12px;
173-
}
174-
175-
.app-route-article__demos {
176-
pre code.hljs {
177-
background-color: transparent;
178-
}
179-
}
180-
181-
.app-route-article__api {
182-
.app-table-container {
183-
width: 100%;
184-
overflow-x: auto;
185-
}
186-
187-
table {
188-
min-width: 1200px;
189-
190-
table-layout: fixed;
191-
192-
th:nth-of-type(1) {
193-
width: 260px;
194-
195-
white-space: nowrap;
196-
}
197-
198-
th:nth-of-type(2) {
199-
width: calc(100% - 720px);
200-
}
201-
202-
th:nth-of-type(3) {
203-
width: 300px;
204-
}
205-
206-
th:nth-of-type(4) {
207-
width: 160px;
208-
}
209-
210-
td:nth-of-type(1),
211-
td:nth-of-type(3),
212-
td:nth-of-type(4) {
213-
font-family: Consolas, Menlo, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
214-
}
215-
}
216-
}
217-
}

0 commit comments

Comments
 (0)