File tree 3 files changed +74
-2
lines changed
Filter options
3 files changed +74
-2
lines changed
Original file line number Diff line number Diff line change
1
+ import { join } from 'path' ;
1
2
import svelte from 'rollup-plugin-svelte'
2
3
import commonjs from '@rollup/plugin-commonjs'
3
4
import resolve from '@rollup/plugin-node-resolve'
4
5
import livereload from 'rollup-plugin-livereload'
5
6
import { terser } from 'rollup-plugin-terser'
6
7
import css from 'rollup-plugin-css-only'
7
8
import { mdsvex } from 'mdsvex'
8
- import remarkEmoji from 'remark-emoji'
9
+ // import remarkEmoji from 'remark-emoji'
9
10
10
11
const production = ! process . env . ROLLUP_WATCH
11
12
@@ -52,7 +53,11 @@ export default {
52
53
} ,
53
54
remarkPlugins : [
54
55
// remarkEmoji
55
- ]
56
+ ] ,
57
+ layout : {
58
+ _ : join ( __dirname , './src/mdx-layouts/MainLayout.svelte' ) ,
59
+ menu : join ( __dirname , './src/mdx-layouts/MenuLayout.svelte' )
60
+ }
56
61
} ) ,
57
62
} ) ,
58
63
Original file line number Diff line number Diff line change
1
+ <script >
2
+ export let subtitle = ' '
3
+ </script >
4
+ <div class =" main-container" >
5
+ <div class =" header-container" >
6
+ <h1 >Counter</h1 >
7
+ <h2 >{subtitle }</h2 >
8
+ </div >
9
+ <div class =" content-container" >
10
+ <slot ></slot >
11
+ </div >
12
+ </div >
13
+
14
+ <style >
15
+ .main-container {
16
+ display : flex ;
17
+ flex-direction : column ;
18
+ }
19
+ .header-container {
20
+ display : flex ;
21
+ flex-direction : column ;
22
+ align-items : center ;
23
+ justify-content : center ;
24
+ height : 200px ;
25
+ width : 100% ;
26
+ background-color : yellowgreen ;
27
+ }
28
+ .content-container {
29
+ padding : 15px ;
30
+ }
31
+ </style >
Original file line number Diff line number Diff line change
1
+ <script >
2
+ export let items = []
3
+ </script >
4
+ <div class =" main-container" >
5
+ <div class =" header-container" >
6
+ {#each items as { title, link }}
7
+ <a target ="_blank" href ={link }>
8
+ {title }
9
+ </a >
10
+ {/each }
11
+ </div >
12
+ <div class =" content-container" >
13
+ <slot ></slot >
14
+ </div >
15
+ </div >
16
+
17
+ <style >
18
+ .main-container {
19
+ display : flex ;
20
+ flex-direction : column ;
21
+ }
22
+ .header-container {
23
+ display : flex ;
24
+ flex-direction : column ;
25
+ align-items : flex-start ;
26
+ justify-content : center ;
27
+ height : 200px ;
28
+ width : 100% ;
29
+ padding : 20px ;
30
+ box-sizing : border-box ;
31
+ background-color : yellowgreen ;
32
+ }
33
+ .content-container {
34
+ padding : 15px ;
35
+ }
36
+ </style >
You can’t perform that action at this time.
0 commit comments