Frontend now built with CSS. Improves about page.
This commit is contained in:
parent
bfa5bfe4d9
commit
4f2f95efb5
6 changed files with 27 additions and 8 deletions
|
|
@ -31,7 +31,8 @@ task backend, "Compiles and runs the forum backend":
|
||||||
task runbackend, "Runs the forum backend":
|
task runbackend, "Runs the forum backend":
|
||||||
exec "./src/forum"
|
exec "./src/forum"
|
||||||
|
|
||||||
task frontend, "Builds the necessary JS frontend":
|
task frontend, "Builds the necessary JS frontend (with CSS)":
|
||||||
|
exec "nimble c -r src/frontend/buildcss"
|
||||||
exec "nimble js src/frontend/forum.nim"
|
exec "nimble js src/frontend/forum.nim"
|
||||||
mkDir "public/js"
|
mkDir "public/js"
|
||||||
cpFile "src/frontend/nimcache/forum.js", "public/js/forum.js"
|
cpFile "src/frontend/nimcache/forum.js", "public/js/forum.js"
|
||||||
|
|
|
||||||
|
|
@ -243,7 +243,7 @@ $views-color: #545d70;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.posts {
|
.posts, .about {
|
||||||
@extend .grid-md;
|
@extend .grid-md;
|
||||||
@extend .container;
|
@extend .container;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
|
|
@ -634,4 +634,9 @@ hr {
|
||||||
.modal-container .modal-body {
|
.modal-container .modal-body {
|
||||||
max-height: 60vh;
|
max-height: 60vh;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.license-text {
|
||||||
|
text-align: left;
|
||||||
|
font-size: 80%;
|
||||||
}
|
}
|
||||||
|
|
@ -40,5 +40,5 @@ when defined(js):
|
||||||
|
|
||||||
result = buildHtml():
|
result = buildHtml():
|
||||||
section(class="container grid-xl"):
|
section(class="container grid-xl"):
|
||||||
tdiv(id="about"):
|
tdiv(class="about"):
|
||||||
verbatim(state.content)
|
verbatim(state.content)
|
||||||
9
src/frontend/buildcss.nim
Normal file
9
src/frontend/buildcss.nim
Normal file
|
|
@ -0,0 +1,9 @@
|
||||||
|
import sass, os
|
||||||
|
|
||||||
|
when isMainModule:
|
||||||
|
compileFile(
|
||||||
|
getCurrentDir() / "public" / "css" / "nimforum.scss",
|
||||||
|
getCurrentDir() / "public" / "css" / "nimforum.css"
|
||||||
|
)
|
||||||
|
|
||||||
|
echo("Compiled CSS")
|
||||||
|
|
@ -1,4 +0,0 @@
|
||||||
import sass
|
|
||||||
|
|
||||||
when isMainModule:
|
|
||||||
compileFile("nimforum.scss", "nimforum.css")
|
|
||||||
|
|
@ -84,4 +84,12 @@ when defined(js):
|
||||||
button(class="btn",
|
button(class="btn",
|
||||||
onClick=(ev: Event, n: VNode) =>
|
onClick=(ev: Event, n: VNode) =>
|
||||||
(state.onLogIn(); state.shown = false)):
|
(state.onLogIn(); state.shown = false)):
|
||||||
text "Log in"
|
text "Log in"
|
||||||
|
|
||||||
|
p(class="license-text text-gray"):
|
||||||
|
text "By registering, you agree to the "
|
||||||
|
a(href=makeUri("/about/license"),
|
||||||
|
onClick=(ev: Event, n: VNode) =>
|
||||||
|
(state.shown = false; anchorCB(ev, n))):
|
||||||
|
text "content license"
|
||||||
|
text "."
|
||||||
Loading…
Add table
Add a link
Reference in a new issue