no message
Former-commit-id: 0a96bb54e9270e451e59b72e00e35053a7c0e152 Former-commit-id: c250ba90da6546626b9831847630aae786c88344 Former-commit-id: c1182b1bdc6ea9b3934275286a93e2760a643bfe
This commit is contained in:
8
src/pages/demo/plugins/highlight/code/css.js
Normal file
8
src/pages/demo/plugins/highlight/code/css.js
Normal file
@@ -0,0 +1,8 @@
|
||||
export default `body {
|
||||
background-color: aliceblue;
|
||||
height: 100%;
|
||||
}
|
||||
.my-card {
|
||||
height: 300px;
|
||||
width: 300px;
|
||||
}`
|
||||
8
src/pages/demo/plugins/highlight/code/html.js
Normal file
8
src/pages/demo/plugins/highlight/code/html.js
Normal file
@@ -0,0 +1,8 @@
|
||||
export default `<ul>
|
||||
<li class="li-1"><p>Hello</p></li>
|
||||
<li>
|
||||
<span style="color: red;">
|
||||
Hello
|
||||
</span>
|
||||
</li>
|
||||
</ul>`
|
||||
3
src/pages/demo/plugins/highlight/code/javascript.js
Normal file
3
src/pages/demo/plugins/highlight/code/javascript.js
Normal file
@@ -0,0 +1,3 @@
|
||||
export default `[].forEach.call($$("*"), a => {
|
||||
a.style.outline="1px solid #"+(~~(Math.random()*(1<<24))).toString(16)
|
||||
})`
|
||||
8
src/pages/demo/plugins/highlight/code/scss.js
Normal file
8
src/pages/demo/plugins/highlight/code/scss.js
Normal file
@@ -0,0 +1,8 @@
|
||||
export default `body {
|
||||
background-color: aliceblue;
|
||||
height: 100%;
|
||||
.my-card {
|
||||
height: 300px;
|
||||
width: 300px;
|
||||
}
|
||||
}`
|
||||
45
src/pages/demo/plugins/highlight/demo.vue
Normal file
45
src/pages/demo/plugins/highlight/demo.vue
Normal file
@@ -0,0 +1,45 @@
|
||||
<template>
|
||||
<Container type="ghost">
|
||||
<el-card class="mb">
|
||||
<p slot="title">javascript</p>
|
||||
<Highlight :code="codeJavascript"></Highlight>
|
||||
</el-card>
|
||||
<el-row :gutter="10">
|
||||
<el-col :span="8">
|
||||
<el-card class="mb">
|
||||
<p slot="title">css</p>
|
||||
<Highlight :code="codeCSS"></Highlight>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-card class="mb">
|
||||
<p slot="title">scss</p>
|
||||
<Highlight :code="codeSCSS"></Highlight>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-card class="mb">
|
||||
<p slot="title">html</p>
|
||||
<Highlight :code="codeHTML"></Highlight>
|
||||
</el-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</Container>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import codeJavascript from './code/javascript'
|
||||
import codeCSS from './code/css'
|
||||
import codeSCSS from './code/scss'
|
||||
import codeHTML from './code/html'
|
||||
export default {
|
||||
data () {
|
||||
return {
|
||||
codeJavascript,
|
||||
codeCSS,
|
||||
codeSCSS,
|
||||
codeHTML
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
9
src/pages/demo/plugins/highlight/readme.vue
Normal file
9
src/pages/demo/plugins/highlight/readme.vue
Normal file
@@ -0,0 +1,9 @@
|
||||
<template>
|
||||
<Container>
|
||||
<p slot="title">README.md</p>
|
||||
<p slot="more"><GithubLink url="https://github.com/isagalaev/highlight.js"></GithubLink></p>
|
||||
<div>
|
||||
<Markdown url="https://raw.githubusercontent.com/isagalaev/highlight.js/master/README.md"></Markdown>
|
||||
</div>
|
||||
</Container>
|
||||
</template>
|
||||
Reference in New Issue
Block a user