Add more helpful classes and ids
This commit is contained in:
parent
82ff2fb212
commit
d422b07394
4 changed files with 15 additions and 12 deletions
|
|
@ -87,7 +87,7 @@ when defined(js):
|
|||
text state.error.get().message
|
||||
|
||||
tdiv(class="edit-buttons"):
|
||||
tdiv(class="reply-button"):
|
||||
tdiv(class="cancel-button"):
|
||||
button(class="btn btn-link",
|
||||
onClick=(e: Event, n: VNode) => (state.onEditCancel())):
|
||||
text " Cancel"
|
||||
|
|
@ -95,4 +95,4 @@ when defined(js):
|
|||
button(class=class({"loading": state.loading}, "btn btn-primary"),
|
||||
onClick=(e: Event, n: VNode) => state.save()):
|
||||
italic(class="fas fa-check")
|
||||
text " Save"
|
||||
text " Save"
|
||||
|
|
|
|||
|
|
@ -149,4 +149,4 @@ proc render(): VNode =
|
|||
])
|
||||
|
||||
window.onPopState = onPopState
|
||||
setRenderer render
|
||||
setRenderer render
|
||||
|
|
|
|||
|
|
@ -78,10 +78,11 @@ when defined(js):
|
|||
"data-sitekey"=recaptchaSiteKey.get())
|
||||
script(src="https://www.google.com/recaptcha/api.js")
|
||||
tdiv(class="modal-footer"):
|
||||
button(class=class({"loading": state.loading}, "btn btn-primary"),
|
||||
onClick=(ev: Event, n: VNode) => onSignUpClick(ev, n, state)):
|
||||
button(class=class({"loading": state.loading},
|
||||
"btn btn-primary create-account-btn"),
|
||||
onClick=(ev: Event, n: VNode) => onSignUpClick(ev, n, state)):
|
||||
text "Create account"
|
||||
button(class="btn",
|
||||
button(class="btn login-btn",
|
||||
onClick=(ev: Event, n: VNode) =>
|
||||
(state.onLogIn(); state.shown = false)):
|
||||
text "Log in"
|
||||
|
|
@ -92,4 +93,4 @@ when defined(js):
|
|||
onClick=(ev: Event, n: VNode) =>
|
||||
(state.shown = false; anchorCB(ev, n))):
|
||||
text "content license"
|
||||
text "."
|
||||
text "."
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ when defined(js):
|
|||
|
||||
proc render*(state: UserMenu, user: User): VNode =
|
||||
result = buildHtml():
|
||||
tdiv():
|
||||
tdiv(id="profile-btn"):
|
||||
figure(class="avatar c-hand",
|
||||
onClick=(e: Event, n: VNode) => onClick(e, n, state)):
|
||||
img(src=user.avatarUrl, title=user.name)
|
||||
|
|
@ -52,13 +52,15 @@ when defined(js):
|
|||
tdiv(class="tile-icon"):
|
||||
img(class="avatar", src=user.avatarUrl,
|
||||
title=user.name)
|
||||
tdiv(class="tile-content"):
|
||||
tdiv(id="profile-name", class="tile-content"):
|
||||
text user.name
|
||||
li(class="divider")
|
||||
li(class="menu-item"):
|
||||
a(href=makeUri("/profile/" & user.name)):
|
||||
a(id="myprofile-btn",
|
||||
href=makeUri("/profile/" & user.name)):
|
||||
text "My profile"
|
||||
li(class="menu-item c-hand"):
|
||||
a(onClick = (e: Event, n: VNode) =>
|
||||
a(id="logout-btn",
|
||||
onClick = (e: Event, n: VNode) =>
|
||||
(state.shown=false; state.onLogout())):
|
||||
text "Logout"
|
||||
text "Logout"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue