File tree 2 files changed +34
-11
lines changed
2 files changed +34
-11
lines changed Original file line number Diff line number Diff line change 1
1
<template >
2
- <div v-html =" markdown" class =" prose max-w-none dark:text-white" ></div >
2
+ <div v-html =" markdown" class =" prose dark:prose-dark max-w-none dark:text-white" ></div >
3
3
</template >
4
4
5
5
<script >
@@ -31,8 +31,11 @@ export default {
31
31
mode = this .detectMode (this .step .title )
32
32
33
33
}
34
- if (mode) {
35
34
35
+ if (mode === ' markdown' ) {
36
+ return markdownIt .render (wrapBody);
37
+ }
38
+ if (mode) {
36
39
wrapBody = " ```" + mode + " \n "
37
40
+ this .step .body + " \n "
38
41
+ " ```"
Original file line number Diff line number Diff line change 1
1
const colors = require ( 'tailwindcss/colors' )
2
-
2
+ const round = ( num ) =>
3
+ num
4
+ . toFixed ( 7 )
5
+ . replace ( / ( \. [ 0 - 9 ] + ?) 0 + $ / , '$1' )
6
+ . replace ( / \. 0 $ / , '' )
7
+ const em = ( px , base ) => `${ round ( px / base ) } em`
3
8
module . exports = {
4
9
purge : [
5
10
"./components/**/*.{vue,js}" ,
@@ -12,13 +17,26 @@ module.exports = {
12
17
theme : {
13
18
14
19
extend : {
15
- // typography: (theme) => ({
16
- // dark: {
17
- // css: {
18
- // color: '#fff'
19
- // }
20
- // }
21
- // }),
20
+ typography : ( theme ) => ( {
21
+ dark : {
22
+ css : {
23
+ color : '#fff' ,
24
+ h1 : {
25
+ color : theme ( 'colors.gray.200' ) ,
26
+ fontSize : em ( 30 , 14 ) ,
27
+ } , h2 : {
28
+ color : theme ( 'colors.gray.200' ) ,
29
+ fontSize : em ( 20 , 14 ) ,
30
+ } , h3 : {
31
+ color : theme ( 'colors.gray.200' ) ,
32
+ fontSize : em ( 18 , 14 ) ,
33
+ } , h4 : {
34
+ color : theme ( 'colors.gray.200' ) ,
35
+ fontSize : em ( 20 , 14 ) ,
36
+ } ,
37
+ }
38
+ }
39
+ } ) ,
22
40
opacity : [ 'disabled' ] ,
23
41
fontFamily : {
24
42
header : [ "Rubik" , "sans-serif" ] ,
@@ -37,7 +55,9 @@ module.exports = {
37
55
}
38
56
} ,
39
57
variants : {
40
- typography : [ 'dark' ]
58
+ extend : {
59
+ typography : [ 'dark' ]
60
+ }
41
61
} ,
42
62
plugins : [
43
63
require ( '@tailwindcss/typography' ) ,
You can’t perform that action at this time.
0 commit comments