Changed layout to have dynamic page title
This commit is contained in:
@@ -4,7 +4,7 @@ import "projectreshoot/view/layout"
|
||||
|
||||
// Returns the about page content
|
||||
templ About() {
|
||||
@layout.Global() {
|
||||
@layout.Global("About") {
|
||||
<div class="text-center max-w-150 m-auto">
|
||||
<div class="text-4xl mt-8">About</div>
|
||||
<div class="text-xl font-bold mt-4">What is Project Reshoot?</div>
|
||||
|
||||
@@ -4,7 +4,7 @@ import "projectreshoot/view/layout"
|
||||
import "projectreshoot/view/component/account"
|
||||
|
||||
templ Account(subpage string) {
|
||||
@layout.Global() {
|
||||
@layout.Global("Account - " + subpage) {
|
||||
@account.AccountContainer(subpage)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@ import "strconv"
|
||||
// a string, and err should be the corresponding response title.
|
||||
// Message is a custom error message displayed below the code and error.
|
||||
templ Error(code int, err string, message string) {
|
||||
@layout.Global() {
|
||||
@layout.Global(err) {
|
||||
<div
|
||||
class="grid mt-24 left-0 right-0 top-0 bottom-0
|
||||
place-content-center bg-base px-4"
|
||||
|
||||
@@ -4,7 +4,7 @@ import "projectreshoot/view/layout"
|
||||
|
||||
// Page content for the index page
|
||||
templ Index() {
|
||||
@layout.Global() {
|
||||
@layout.Global("Project Reshoot") {
|
||||
<div class="text-center mt-24">
|
||||
<div class="text-4xl lg:text-6xl">Project Reshoot</div>
|
||||
<div>A better way to discover and rate films</div>
|
||||
|
||||
@@ -5,7 +5,7 @@ import "projectreshoot/view/component/form"
|
||||
|
||||
// Returns the login page
|
||||
templ Login() {
|
||||
@layout.Global() {
|
||||
@layout.Global("Login") {
|
||||
<div class="max-w-100 mx-auto px-2">
|
||||
<div class="mt-7 bg-mantle border border-surface1 rounded-xl">
|
||||
<div class="p-4 sm:p-7">
|
||||
|
||||
@@ -4,7 +4,7 @@ import "projectreshoot/tmdb"
|
||||
import "projectreshoot/view/layout"
|
||||
|
||||
templ Movie(movie *tmdb.Movie, credits *tmdb.Credits, image *tmdb.Image) {
|
||||
@layout.Global() {
|
||||
@layout.Global(movie.Title) {
|
||||
<div class="md:bg-surface0 md:p-2 md:rounded-lg transition-all">
|
||||
<div
|
||||
id="billedcrew"
|
||||
|
||||
@@ -3,7 +3,7 @@ package page
|
||||
import "projectreshoot/view/layout"
|
||||
|
||||
templ Movies() {
|
||||
@layout.Global() {
|
||||
@layout.Global("Search movies") {
|
||||
<div class="max-w-4xl mx-auto md:mt-0 mt-2 px-2 md:px-0">
|
||||
<form hx-post="/search-movies" hx-target="#search-movies-results">
|
||||
<div
|
||||
|
||||
@@ -5,7 +5,7 @@ import "projectreshoot/contexts"
|
||||
|
||||
templ Profile() {
|
||||
{{ user := contexts.GetUser(ctx) }}
|
||||
@layout.Global() {
|
||||
@layout.Global("Profile - " + user.Username) {
|
||||
<div class="">
|
||||
Hello, { user.Username }
|
||||
</div>
|
||||
|
||||
@@ -5,7 +5,7 @@ import "projectreshoot/view/component/form"
|
||||
|
||||
// Returns the login page
|
||||
templ Register() {
|
||||
@layout.Global() {
|
||||
@layout.Global("Register") {
|
||||
<div class="max-w-100 mx-auto px-2">
|
||||
<div class="mt-7 bg-mantle border border-surface1 rounded-xl">
|
||||
<div class="p-4 sm:p-7">
|
||||
|
||||
Reference in New Issue
Block a user