feat(11): adding static files and task style guide

This commit is contained in:
efim
2023-06-26 08:02:26 +00:00
parent 6fec3d54ee
commit 05cdea56de
10 changed files with 313 additions and 13 deletions

View File

@@ -8,21 +8,13 @@ import scalatags.Text.tags2
object App extends cask.MainRoutes {
@cask.get("/")
def index() = doctype("html")(
html(
head(
tags2.title("Exercise 11"),
link(rel := "stylesheet", href := "/dist/output.css")
),
body(
cls := "bg-blue-100",
h1("Welcome to the future")
)
)
)
def index() = Page.markdown
@cask.staticFiles("/dist") // this is what path gets matched
def distFiles() = "dist" // this is os path where files are looked up
def distFiles() = "dist" // this is os path where files are looked up, for the generated files
@cask.staticFiles("/public") // this is what path gets matched
def publicFiles() = "public" // this is os path where files are looked up, for the committed files
initialize()
}

View File

@@ -0,0 +1,28 @@
package pricegrid
import scalatags.Text.all._
import scalatags.Text.tags2
object Page {
val markdown = doctype("html")(
html(
lang := "en",
head(
meta(charset := "UTF-8"),
meta(
name := "viewport",
content := "width=device-width, initial-scale=1.0",
),
tags2.title("Frontend Mentor | Single Price Grid Component"),
link(rel := "icon", `type` := "image/png", href := "/public/images/favicon-32x32.png" ),
link(rel := "stylesheet", href := "/dist/output.css")
),
body(
cls := "bg-blue-100",
h1(
cls := "text-3xl",
"Welcome to the future")
)
)
)
}