Skip to content

Commit

Permalink
fix: cover button style, fixed #670, fixed #665
Browse files Browse the repository at this point in the history
  • Loading branch information
QingWei-Li committed Nov 1, 2018
1 parent ab19b13 commit 91d5e18
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
11 changes: 11 additions & 0 deletions src/core/render/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,17 @@ export function renderMixin(proto) {
html = html.replace(m[0], '')
}

// XXX: A Workaround
html = html
.split('\n')
.map(part => {
if (/^<a/.test(part)) {
return part.replace('<a', '<a data-button')
}
return part
})
.join('\n')

this._renderTo('.cover-main', html)
sticky()
}
Expand Down
2 changes: 1 addition & 1 deletion src/themes/basic/_coverpage.styl
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ section.cover
max-width 500px
padding 0

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

0 comments on commit 91d5e18

Please sign in to comment.