-
-
Notifications
You must be signed in to change notification settings - Fork 133
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(plugin/page_vote): add page_vote
plugin
#983
base: master
Are you sure you want to change the base?
Conversation
adjust code structure disable `page vote` plugin by default
|
||
function initPageVoteWidget(ctx: ContextApi, options: PageVoteOptions) { | ||
const btnContainer = document.querySelector<HTMLElement>(options.btnEl) | ||
if (!btnContainer) return // throw Error(`page vote's config \`btnEl\` selector ${options.btnEl} not found`) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
to avoid test failed, it skips when enable page vote but there is no element to render, is this ok?
ui/artalk/src/style/_action-btn.scss
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
extract this style for reuse
I think it can be further optimized, all of div.atk-actions span.atk-common-action-btn
have duplicate style.
I believe the "vote up/down page" button should be appended to a specified element. Style and update vote count still have some problem, but it's a work in progress.
Feel free to discuss with me and share your thoughts.
close #944