Add back button on paste page
This commit is contained in:
parent
4919958d8f
commit
96c335c41a
@ -36,6 +36,9 @@ object Routes {
|
|||||||
post("/") {
|
post("/") {
|
||||||
call.handlePost()
|
call.handlePost()
|
||||||
}
|
}
|
||||||
|
get("/favicon.ico") {
|
||||||
|
call.respond(HttpStatusCode.NotFound)
|
||||||
|
}
|
||||||
get<PasteRequest> { req ->
|
get<PasteRequest> { req ->
|
||||||
call.handleGet(req)
|
call.handleGet(req)
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
package moe.kageru.kodeshare.pages
|
package moe.kageru.kodeshare.pages
|
||||||
|
|
||||||
import kotlinx.css.*
|
import kotlinx.css.*
|
||||||
|
import kotlinx.css.properties.TextDecoration
|
||||||
|
import kotlinx.css.properties.border
|
||||||
import kotlinx.css.properties.ms
|
import kotlinx.css.properties.ms
|
||||||
import kotlinx.css.properties.transition
|
import kotlinx.css.properties.transition
|
||||||
|
|
||||||
@ -33,11 +35,13 @@ object Css {
|
|||||||
}
|
}
|
||||||
// this doesn’t inherit the style from anything else for some reason
|
// this doesn’t inherit the style from anything else for some reason
|
||||||
rule(".hljs, pre, code") {
|
rule(".hljs, pre, code") {
|
||||||
width = 100.pct
|
width = 95.pct
|
||||||
height = 100.pct
|
height = 100.pct
|
||||||
textAlign = TextAlign.left
|
textAlign = TextAlign.left
|
||||||
fontFamily = "Hack, Fira Code, Noto Mono, monospace"
|
fontFamily = "Hack, Fira Code, Noto Mono, monospace"
|
||||||
fontSize = 13.pt
|
fontSize = 13.pt
|
||||||
|
display = Display.inline
|
||||||
|
position = Position.relative
|
||||||
}
|
}
|
||||||
rule("input[type=\"submit\"]") {
|
rule("input[type=\"submit\"]") {
|
||||||
backgroundColor = accent1
|
backgroundColor = accent1
|
||||||
@ -51,6 +55,16 @@ object Css {
|
|||||||
cursor = Cursor.pointer
|
cursor = Cursor.pointer
|
||||||
transition(duration = 500.ms)
|
transition(duration = 500.ms)
|
||||||
}
|
}
|
||||||
|
rule("div.back") {
|
||||||
|
position = Position.absolute
|
||||||
|
padding = "5px"
|
||||||
|
border(2.px, BorderStyle.solid, accent1)
|
||||||
|
borderRadius = 3.px
|
||||||
|
color = accent1
|
||||||
|
top = 1.em
|
||||||
|
right = 1.em
|
||||||
|
zIndex = 1
|
||||||
|
}
|
||||||
rule("input[type=\"submit\"]:hover") {
|
rule("input[type=\"submit\"]:hover") {
|
||||||
backgroundColor = Color.transparent
|
backgroundColor = Color.transparent
|
||||||
borderColor = accent2
|
borderColor = accent2
|
||||||
@ -62,5 +76,15 @@ object Css {
|
|||||||
rule("::selection") {
|
rule("::selection") {
|
||||||
color = accent1
|
color = accent1
|
||||||
}
|
}
|
||||||
|
a {
|
||||||
|
color = accent1
|
||||||
|
textDecoration = TextDecoration.none
|
||||||
|
}
|
||||||
|
rule("a:visited") {
|
||||||
|
color = accent1
|
||||||
|
}
|
||||||
|
rule("a:focus") {
|
||||||
|
color = accent2
|
||||||
|
}
|
||||||
}.toString()
|
}.toString()
|
||||||
}
|
}
|
@ -22,6 +22,11 @@ object PastePage {
|
|||||||
+content
|
+content
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
div("back") {
|
||||||
|
a("/") {
|
||||||
|
+"New paste"
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user