Skip to content

Commit ce3ba29

Browse files
committed
chore: improve demo
1 parent cb95ece commit ce3ba29

File tree

4 files changed

+61
-15
lines changed

4 files changed

+61
-15
lines changed

src/demo/CodeGen.vue

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -324,10 +324,6 @@ input[type="number"] {
324324
overflow: hidden;
325325
background-color: #fff;
326326
box-shadow: 0 0 45px rgba(0, 0, 0, 0.2);
327-
328-
h2 {
329-
margin-top: 0;
330-
}
331327
}
332328
333329
.options {

src/demo/Demo.vue

Lines changed: 55 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,23 @@ watch(codeOpen, open => {
5656
<a href="https://github.com/ecomfe/vue-echarts">Vue-ECharts</a>
5757
</h1>
5858
<p class="desc">
59-
Vue.js component for Apache ECharts. (<a
59+
Vue.js component for Apache ECharts. (<a
6060
href="https://github.com/ecomfe/vue-echarts#readme"
6161
>docs</a
6262
>)
6363
</p>
6464

65+
<h2 class="sep">Examples</h2>
66+
<p>
67+
<small
68+
>See
69+
<a href="https://echarts.apache.org/examples/en/index.html"
70+
>echarts.apache.org/examples</a
71+
>
72+
for all examples.</small
73+
>
74+
</p>
75+
6576
<bar-chart />
6677
<pie-chart />
6778
<polar-chart />
@@ -132,20 +143,52 @@ body {
132143
a {
133144
color: inherit;
134145
text-decoration: none;
146+
box-shadow: 0 1px 0 0 #42b983;
147+
transition: box-shadow 0.2s;
148+
149+
&:hover {
150+
box-shadow: 0 2px 0 0 #42b983;
151+
}
152+
}
153+
154+
h1,
155+
h2,
156+
h3 {
157+
color: #2c3e50;
158+
font-weight: 400;
135159
}
136160
137161
h1 {
138162
margin-bottom: 1em;
139163
font-family: Inter, "Helvetica Neue", Arial, sans-serif;
140164
}
141165
142-
h1,
143166
h2 {
144-
color: #2c3e50;
145-
font-weight: 400;
167+
margin-top: 1em;
168+
margin-bottom: 1em;
146169
}
147170
148-
h2 {
171+
.sep {
172+
margin-top: 6em;
173+
margin-bottom: 1.8em;
174+
display: flex;
175+
justify-content: center;
176+
align-items: center;
177+
gap: 12px;
178+
font-size: 1.25em;
179+
color: #7f8c8d;
180+
opacity: 0.6;
181+
182+
&::before,
183+
&::after {
184+
content: "";
185+
display: block;
186+
width: 48px;
187+
border-bottom: 1px dotted currentColor;
188+
}
189+
}
190+
191+
h3 {
149192
margin-top: 2em;
150193
padding-top: 1em;
151194
font-size: 1.2em;
@@ -208,15 +251,18 @@ footer {
208251
a {
209252
display: inline-block;
210253
margin: 0 5px;
211-
padding: 3px 0 6px;
212254
color: #7f8c8d;
213255
font-size: 2em;
214-
text-decoration: none;
215256
}
257+
}
216258
259+
h1,
260+
h2,
261+
h3 {
262+
a,
217263
a:hover {
218-
padding-bottom: 3px;
219-
border-bottom: 3px solid #42b983;
264+
text-decoration: none;
265+
box-shadow: none;
220266
}
221267
}
222268

src/demo/data/logo.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@ export default {
2525
return "";
2626
}
2727
}
28+
},
29+
itemStyle: {
30+
shadowBlur: 12,
31+
shadowColor: "rgba(0, 0, 0, 0.25)"
2832
}
2933
}
3034
]

src/demo/examples/Example.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
<template>
2-
<h2 :id="id">
2+
<h3 :id="id">
33
<a :href="`#${id}`">
44
{{ title }}
55
<small v-if="desc">{{ desc }}</small>
66
</a>
7-
</h2>
7+
</h3>
88
<section>
99
<figure class="fig hero" v-if="!split">
1010
<slot />

0 commit comments

Comments
 (0)