From 2285c79f2f7995377e3d3c9286cb653c4b8beff5 Mon Sep 17 00:00:00 2001 From: luigi-borriello00 Date: Thu, 12 Oct 2023 19:14:28 +0200 Subject: [PATCH 1/2] feat(application): implement and decored about view --- .../scala/scatan/views/home/AboutView.scala | 22 ++++++++++++++++++- style.css | 8 +++++++ 2 files changed, 29 insertions(+), 1 deletion(-) diff --git a/src/main/scala/scatan/views/home/AboutView.scala b/src/main/scala/scatan/views/home/AboutView.scala index 8622bf48..46bd2f4d 100644 --- a/src/main/scala/scatan/views/home/AboutView.scala +++ b/src/main/scala/scatan/views/home/AboutView.scala @@ -17,9 +17,29 @@ private class ScalaJSAboutView(container: String, requirements: View.Requirement with AboutView: override def element: Element = div( + cls := "about-view-container", h1("About"), - p("This is a ScalaJS view"), + p( + "The goal of the project is to create a clone of the board game 'Settlers of Catan', a game for 3 or 4 players. " + ), + p( + "In the game, each participant takes on the role of a settler trying to establish themselves on the island of Catan. " + ), + p( + "The game is played on a board consisting of hexagonal tiles, which are arranged randomly at the beginning of the game. " + ), + p( + "The primary objective is to accumulate essential resources, including wood, clay, wheat, wool, and ore, through the construction of strategically placed settlements, cities, and roads on the island. These resources are obtained based on the results of dice rolls and the location of the structures built." + ), + h2("Built with"), + ul( + li("Scala 3"), + li("Scala.js"), + li("Laminar"), + li("ScalaTest") + ), button( + cls := "home-menu-button", "Back", onClick --> (_ => this.navigateBack()) ) diff --git a/style.css b/style.css index 838fed79..9822bc18 100644 --- a/style.css +++ b/style.css @@ -336,3 +336,11 @@ body { border-radius: 5px; z-index: 1000; } + +.about-view-container{ + color: white; + font-size: x-large; + background-color: rgba(0, 0, 0, 0.5); + border-radius: 1em; + padding: 1em; +} \ No newline at end of file From 986b33b54c4d5b6b0491d91c721589a60387ca9e Mon Sep 17 00:00:00 2001 From: luigi-borriello00 Date: Thu, 12 Oct 2023 19:21:24 +0200 Subject: [PATCH 2/2] feat(about-view): add credits --- .../scala/scatan/views/home/AboutView.scala | 21 +++++++++++++++++++ style.css | 5 +++++ 2 files changed, 26 insertions(+) diff --git a/src/main/scala/scatan/views/home/AboutView.scala b/src/main/scala/scatan/views/home/AboutView.scala index 46bd2f4d..bb26c89b 100644 --- a/src/main/scala/scatan/views/home/AboutView.scala +++ b/src/main/scala/scatan/views/home/AboutView.scala @@ -38,6 +38,27 @@ private class ScalaJSAboutView(container: String, requirements: View.Requirement li("Laminar"), li("ScalaTest") ), + h2("Authors"), + ul( + // add links to github profiles + li( + a( + cls := "about-link", + "Luigi Borriello", + href := "https://github.com/luigi-borriello00" + ) + ), + li( + a( + cls := "about-link", + "Manuel Andruccioli", + href := "https://github.com/manuandru" + ) + ), + li( + a(cls := "about-link", "Alessandro Mazzoli", href := "https://github.com/alemazzo") + ) + ), button( cls := "home-menu-button", "Back", diff --git a/style.css b/style.css index 9822bc18..22bfb2fc 100644 --- a/style.css +++ b/style.css @@ -343,4 +343,9 @@ body { background-color: rgba(0, 0, 0, 0.5); border-radius: 1em; padding: 1em; +} + +.about-link{ + color: white; + text-decoration: none; } \ No newline at end of file