Skip to content

Commit fcd1087

Browse files
authored
fix: cover button style, fixed #670, fixed #665 (#675)
Please makes sure these boxes are checked before submitting your PR, thank you! * [x] Make sure you are merging your commits to `master` branch. * [x] Add some descriptions and refer relative issues for you PR. * [x] DO NOT include files inside `lib` directory. A temporary solution, I will refactor this part of the code in the next major version.
1 parent ab19b13 commit fcd1087

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

src/core/render/index.js

+11
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,17 @@ export function renderMixin(proto) {
198198
html = html.replace(m[0], '')
199199
}
200200

201+
// XXX: A Workaround
202+
html = html
203+
.split('\n')
204+
.map(part => {
205+
if (/^<a/.test(part)) {
206+
return part.replace('<a', '<a data-button')
207+
}
208+
return part
209+
})
210+
.join('\n')
211+
201212
this._renderTo('.cover-main', html)
202213
sticky()
203214
}

src/themes/basic/_coverpage.styl

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ section.cover
6161
max-width 500px
6262
padding 0
6363

64-
.cover-main > p:last-child a
64+
.cover-main > a[data-button]
6565
border-color var(--theme-color, $color-primary)
6666
border-radius 2rem
6767
border-style solid

0 commit comments

Comments
 (0)