From d5fcb40cda832067a0f2d1651671c335262207ec Mon Sep 17 00:00:00 2001 From: Araozu Date: Sat, 23 Mar 2024 18:32:27 -0500 Subject: [PATCH] Change landing page design. Use Inter as display font --- static/index.html | 84 ++++++++++++++++++++++++-------------------- static/template.html | 5 +-- tailwind.config.js | 2 +- tailwind.css | 4 +-- 4 files changed, 49 insertions(+), 46 deletions(-) diff --git a/static/index.html b/static/index.html index d3f14fa..10399cf 100644 --- a/static/index.html +++ b/static/index.html @@ -13,10 +13,7 @@ - @@ -29,20 +26,40 @@ -
-
-

- Typed +
+
+
+

+ A modern, type safe, +
+ secure language +
+ compiled to PHP +

+

+ Inspired by Rust, Zig and Swift, THP has a modern syntax, semantics, + type system and stdlib. +


- Hypertext
- Processor -

-

- Syntax, stdlib and types for PHP -
- Written in Rust -

+ +
@@ -61,42 +78,31 @@
                 
-                    fun find_person(Str person_id) -> Result[Str] {
-                        val person_id = try person_id.parse[Int]()
+                    // Actual generics & sum types
+                    fun find_person(Int person_id) -> Result[String, String] {
+                        // Easy, explicit error bubbling
                         try Person::find_by_id(person_id)
                     }
 
-                    val id = POST::get("person_id") ?: die
-                    val person = find_person(person_id: id) ?: die
+                    val id = POST::get("person_id") ?? exit("Null person_id")
+                    // Errors as values
+                    val person = try find_person(person_id: id) with error {
+                        eprint("Error: {error}")
+                        exit("Person not found")
+                    }
 
+                    // First class HTML-like templates & components
                     print(
                         <a href="/person/reports/{person.id}">
-                            Hello {person.name}
+                            welcome, {person.name}
                         </a>
                     )
+                    // And more!
                 
             
-
- - Learn - - - - Install - -
- diff --git a/static/template.html b/static/template.html index 9531ac3..89714de 100644 --- a/static/template.html +++ b/static/template.html @@ -14,10 +14,7 @@ - diff --git a/tailwind.config.js b/tailwind.config.js index 8f05f33..1cca3ea 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -18,7 +18,7 @@ module.exports = { }, fontFamily: { "mono": ["'Fira Code'", "Inconsolata", "Iosevka", "monospace"], - "display": ["'Josefin Sans'", "'Fugaz One'", "sans-serif"], + "display": ["Inter", "'Josefin Sans'", "'Fugaz One'", "sans-serif"], "body": ["'Fira Sans'", "Inter", "sans-serif"], }, }, diff --git a/tailwind.css b/tailwind.css index 3487f37..4207a92 100644 --- a/tailwind.css +++ b/tailwind.css @@ -31,7 +31,7 @@ } html { - font-size: 18px; + font-size: 17px; } body { @@ -39,7 +39,7 @@ body { } pre, code { - font-family: 'Fira Code', Inconsolata, monospace; + font-family: Iosevka, 'Fira Code', monospace; } .button-effect-receiver {