File tree Expand file tree Collapse file tree 3 files changed +20
-180
lines changed
lib/nodejs/markdown-it-table-wrapper Expand file tree Collapse file tree 3 files changed +20
-180
lines changed Original file line number Diff line number Diff line change @@ -105,3 +105,9 @@ neat_js:
105105node_sass :
106106 includePaths :
107107 - node_modules
108+
109+ markdown_it_plus :
110+ plugins :
111+ - plugin :
112+ name : ../../../themes/doc/lib/nodejs/markdown-it-table-wrapper
113+ enable : true
Original file line number Diff line number Diff line change 1+ module . exports = function ( md ) {
2+ md . renderer . rules . table_open = function ( ) {
3+ return '<figure class="table-wrapper"><table>'
4+ }
5+
6+ md . renderer . rules . table_close = function ( ) {
7+ return '</table></figure>'
8+ }
9+ } ;
Original file line number Diff line number Diff line change 11.doc-formatting {
2-
32 h1 :first-of-type {
43 margin-top : 0 ;
54 line-height : 3.4rem ;
122121 p code {
123122 @include doc-inline-code ;
124123 }
125- // just table direct children to don't collide
126- // with code highlight markup
127- > table {
124+
125+ .table-wrapper {
128126 margin : 10px 0 ;
129127 background-color : white ;
130-
128+ }
129+
130+ .table-wrapper table {
131131 thead {
132132 color : #000 ;
133133 text-align : left ;
167167 }
168168 }
169169}
170-
171- //
172- // "highlight.js" (built-in hexo code highlight plugin)
173- // ---------------------------------------------------
174-
175- /* .doc-formatting {
176- figure {
177- clear: both;
178- margin: 1.5em 0;
179- }
180-
181- figure figcaption {
182- font-size: 12px;
183- line-height: 16px;
184- color: $doc-color-mediumdark;
185- }
186-
187- pre {
188- padding: 1em 1.25em;
189- white-space: pre-wrap;
190- color: $doc-color-darkest;
191- background: $doc-color-lighter;
192- }
193-
194- *:not(figure.highlight) pre {
195- margin-top: 0.75em;
196- margin-bottom: 0.75em;
197- }
198-
199- *:not(figure.highlight) pre code {
200- border: none;
201- box-shadow: none;
202- color: $doc-color-darkest;
203- margin: 0;
204- max-width: 100%;
205- padding: 0;
206- }
207-
208- .highlight {
209- clear: both;
210- margin: 1.5em 0;
211- font-size: 14px;
212- line-height: 20px;
213- overflow-x: auto;
214-
215- table {
216- width: 100%;
217- }
218-
219- figcaption {
220- font-size: 12px;
221- line-height: 16px;
222- color: $doc-color-mediumdark;
223- }
224-
225- .gutter {
226- width: 40px;
227- }
228-
229- .gutter pre {
230- margin: 0;
231- padding: 1.5em 10px;
232- text-align: right;
233- }
234-
235- .code pre {
236- overflow-y: auto;
237- overflow-x: auto;
238- padding: 1.5em 15px 1.5em 20px;
239- margin: 0;
240- white-space: pre;
241- }
242-
243- .code pre .line:empty::after {
244- content: '\200b';
245- }
246- // syntax
247- // Grabbed from legacy docs theme
248- .gutter pre {
249- color: $dc-gray60;
250- }
251-
252- pre {
253- color: $dc-gray10;
254-
255- .constant,
256- .function .keyword {
257- color: $dc-blue30;
258- }
259-
260- .attribute,
261- .built_in,
262- .keyword {
263- color: $dc-blue30;
264- }
265-
266- .title {
267- color: $dc-green20;
268- }
269-
270- .change,
271- .clojure .built_in,
272- .flow,
273- .lisp .title,
274- .nginx .title,
275- .tag,
276- .tag .title,
277- .tex .special,
278- .winutils {
279- color: $dc-blue30;
280- }
281-
282- .regexp,
283- .symbol,
284- .symbol .string,
285- .value {
286- color: $dc-orange40;
287- }
288-
289- .literal,
290- .number {
291- color: $dc-orange40;
292- }
293-
294- .addition,
295- .apache .cbracket,
296- .apache .tag,
297- .attr_selector,
298- .django .filter .argument,
299- .django .template_tag,
300- .django .variable,
301- .envvar,
302- .haskell .type,
303- .javadoc,
304- .preprocessor,
305- .prompt,
306- .pseudo,
307- .ruby .class .parent,
308- .smalltalk .array,
309- .smalltalk .class,
310- .smalltalk .localvars,
311- .sql .aggregate,
312- .stream,
313- .string,
314- .subst,
315- .tag .value,
316- .tex .command {
317- color: $dc-orange40;
318- }
319-
320- .apache .sqbracket,
321- .comment,
322- .deletion,
323- .doctype,
324- .java .annotation,
325- .pi,
326- .python .decorator,
327- .shebang,
328- .template_comment,
329- .tex .formula {
330- color: $dc-gray40;
331- }
332-
333- .coffeescript .javascript,
334- .javascript .xml,
335- .tex .formula,
336- .xml .cdata,
337- .xml .css,
338- .xml .javascript,
339- .xml .vbscript {
340- opacity: 0.5;
341- }
342- }
343- }
344- }*/
You can’t perform that action at this time.
0 commit comments