Started working on pro features

This commit is contained in:
Eduard Urbach 2017-10-05 21:27:49 +02:00
parent ce9a2538d6
commit 03c79e2932
5 changed files with 18 additions and 8 deletions

View File

@ -1,5 +1,5 @@
component Postable(post arn.Postable, user *arn.User, highlightAuthorID string)
.post.mountable(id=strings.ToLower(post.Type()) + "-" + toString(post.ID()), data-highlight=post.Author().ID == highlightAuthorID, data-api="/api/" + strings.ToLower(post.Type()) + "/" + post.ID())
.post.mountable(id=strings.ToLower(post.Type()) + "-" + toString(post.ID()), data-highlight=post.Author().ID == highlightAuthorID, data-pro=post.Author().IsPro(), data-api="/api/" + strings.ToLower(post.Type()) + "/" + post.ID())
.post-author
Avatar(post.Author())

View File

@ -1,15 +1,15 @@
component WebDev
h1.page-title WebDev
AdminTabs
.light-button-group
a.light-button(href="https://developers.google.com/speed/pagespeed/insights/?url=https://notify.moe/&tab=desktop", target="_blank", rel="noopener")
h1.page-title WebDev
.buttons
a.button.mountable(href="https://developers.google.com/speed/pagespeed/insights/?url=https://notify.moe/&tab=desktop", target="_blank", rel="noopener")
Icon("external-link")
span Google PageSpeed
a.light-button(href="https://observatory.mozilla.org/analyze.html?host=notify.moe", target="_blank", rel="noopener")
a.button.mountable(href="https://observatory.mozilla.org/analyze.html?host=notify.moe", target="_blank", rel="noopener")
Icon("external-link")
span Mozilla Observatory
a.light-button(href="https://html5.validator.nu/?doc=https://notify.moe", target="_blank", rel="noopener")
a.button.mountable(href="https://html5.validator.nu/?doc=https://notify.moe", target="_blank", rel="noopener")
Icon("external-link")
span HTML5 Validator

View File

@ -17,6 +17,10 @@
[data-highlight="true"]
.post-content
border 2px solid post-highlight-color
[data-pro="true"]
.post-content
border 2px solid pro-color
> 600px
.post

View File

@ -461,6 +461,10 @@ export class AnimeNotifier {
let actionTrigger = element.dataset.trigger
let actionName = element.dataset.action
if(!actionTrigger || !actionName) {
continue
}
let oldAction = element["action assigned"]
if(oldAction) {
@ -473,6 +477,8 @@ export class AnimeNotifier {
if(!(actionName in actions)) {
this.statusMessage.showError(`Action '${actionName}' has not been defined`)
console.error(element)
continue
}
let actionHandler = e => {

View File

@ -4,8 +4,8 @@ main-color = rgb(248, 165, 130)
link-color = rgb(215, 38, 15)
link-hover-color = rgb(242, 60, 30)
link-active-color = link-hover-color
bg-color = rgb(246, 246, 246)
pro-color = hsla(0, 100%, 77%, 0.87)
// UI
ui-border-color = rgba(0, 0, 0, 0.1)