Fix some css
This commit is contained in:
parent
4a7dcec363
commit
ead1932d48
@ -13,7 +13,7 @@ class BaseView(staticFileResolver: StaticFileResolver) : View(staticFileResolver
|
|||||||
) {
|
) {
|
||||||
section("text-center my-2 p-2") {
|
section("text-center my-2 p-2") {
|
||||||
h1("text-5xl casual") {
|
h1("text-5xl casual") {
|
||||||
span("text-teal-300") { +"Simplenotes " }
|
span("text-teal-300") { +"SimpleNotes " }
|
||||||
+"- access your notes anywhere"
|
+"- access your notes anywhere"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -143,7 +143,6 @@ class NoteView(staticFileResolver: StaticFileResolver) : View(staticFileResolver
|
|||||||
}
|
}
|
||||||
if (!shared) {
|
if (!shared) {
|
||||||
noteActionForm(note)
|
noteActionForm(note)
|
||||||
publicPrivateForm(note)
|
|
||||||
|
|
||||||
if (note.public) {
|
if (note.public) {
|
||||||
p("my-4") {
|
p("my-4") {
|
||||||
@ -169,8 +168,20 @@ class NoteView(staticFileResolver: StaticFileResolver) : View(staticFileResolver
|
|||||||
span("flex space-x-2 justify-end mb-4") {
|
span("flex space-x-2 justify-end mb-4") {
|
||||||
a(
|
a(
|
||||||
href = "/notes/${note.uuid}/edit",
|
href = "/notes/${note.uuid}/edit",
|
||||||
classes = "btn btn-teal"
|
classes = "btn btn-green"
|
||||||
) { +"Edit" }
|
) { +"Edit" }
|
||||||
|
form(method = FormMethod.post, classes = "inline") {
|
||||||
|
button(
|
||||||
|
type = ButtonType.submit,
|
||||||
|
name = if (note.public) "private" else "public",
|
||||||
|
classes = "btn btn-teal"
|
||||||
|
) {
|
||||||
|
if (note.public)
|
||||||
|
+"Private ?"
|
||||||
|
else
|
||||||
|
+"Public ?"
|
||||||
|
}
|
||||||
|
}
|
||||||
form(method = FormMethod.post, classes = "inline") {
|
form(method = FormMethod.post, classes = "inline") {
|
||||||
button(
|
button(
|
||||||
type = ButtonType.submit,
|
type = ButtonType.submit,
|
||||||
@ -180,22 +191,4 @@ class NoteView(staticFileResolver: StaticFileResolver) : View(staticFileResolver
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun DIV.publicPrivateForm(note: PersistedNote) {
|
|
||||||
span("flex space-x-2 justify-end mb-4") {
|
|
||||||
|
|
||||||
form(method = FormMethod.post, classes = "ml-auto ") {
|
|
||||||
button(
|
|
||||||
type = ButtonType.submit,
|
|
||||||
name = if (note.public) "private" else "public",
|
|
||||||
classes = "btn btn-teal"
|
|
||||||
) {
|
|
||||||
if (note.public)
|
|
||||||
+"This note is public, do you want to make it private ?"
|
|
||||||
else
|
|
||||||
+"This note is private, do you want to make it public ?"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -26,22 +26,23 @@ class SettingView(staticFileResolver: StaticFileResolver) : View(staticFileResol
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
section("m-4 p-4 bg-gray-800 rounded flex justify-around") {
|
section("m-4 p-2 bg-gray-800 rounded flex flex-wrap justify-around items-end") {
|
||||||
|
|
||||||
form(method = FormMethod.post, action = "/export") {
|
form(classes = "m-2", method = FormMethod.post, action = "/export") {
|
||||||
button(name = "display",
|
button(name = "display",
|
||||||
classes = "inline btn btn-teal block",
|
classes = "inline btn btn-teal block",
|
||||||
type = submit) { +"Display my data" }
|
type = submit) { +"Display my data" }
|
||||||
}
|
}
|
||||||
|
|
||||||
form(method = FormMethod.post, action = "/export") {
|
form(classes = "m-2", method = FormMethod.post, action = "/export") {
|
||||||
|
|
||||||
listOf("json", "zip").forEach { format ->
|
|
||||||
div {
|
div {
|
||||||
|
listOf("json", "zip").forEach { format ->
|
||||||
radioInput(name = "format") {
|
radioInput(name = "format") {
|
||||||
id = format
|
id = format
|
||||||
attributes["value"] = format
|
attributes["value"] = format
|
||||||
if(format == "json") attributes["checked"] = ""
|
if (format == "json") attributes["checked"] = ""
|
||||||
|
else attributes["class"] = "ml-4"
|
||||||
}
|
}
|
||||||
label(classes = "ml-2") {
|
label(classes = "ml-2") {
|
||||||
attributes["for"] = format
|
attributes["for"] = format
|
||||||
|
|||||||
@ -25,8 +25,8 @@ fun FlowContent.deletedNoteTable(notes: List<PersistedNoteMetadata>) = div("over
|
|||||||
td("text-center") { +updatedAt.toTimeAgo() }
|
td("text-center") { +updatedAt.toTimeAgo() }
|
||||||
td { tags(tags) }
|
td { tags(tags) }
|
||||||
td("text-center") {
|
td("text-center") {
|
||||||
form(classes = "inline", method = post, action = "/notes/deleted/$uuid") {
|
form(method = post, action = "/notes/deleted/$uuid") {
|
||||||
button(classes = "btn btn-red", type = submit, name = "delete") {
|
button(classes = "btn btn-red mb-2", type = submit, name = "delete") {
|
||||||
+"Delete permanently"
|
+"Delete permanently"
|
||||||
}
|
}
|
||||||
button(classes = "ml-2 btn btn-green", type = submit, name = "restore") {
|
button(classes = "ml-2 btn btn-green", type = submit, name = "restore") {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user