diff --git a/cmd/web/routes.go b/cmd/web/routes.go index f7d6329..4628ebc 100644 --- a/cmd/web/routes.go +++ b/cmd/web/routes.go @@ -17,6 +17,12 @@ func routes(app *config.AppConfig) http.Handler { mux.Get("/", handlers.Repo.Home) mux.Get("/about", handlers.Repo.About) + mux.Get("/generals-quarters", handlers.Repo.Generals) + mux.Get("/majors-suite", handlers.Repo.Majors) + mux.Get("/search-availability", handlers.Repo.Availability) + mux.Get("/contact", handlers.Repo.Contact) + + mux.Get("/make-reservation", handlers.Repo.Reservation) fileServer := http.FileServer(http.Dir("./static/")) mux.Handle("/static/*", http.StripPrefix("/static", fileServer)) diff --git a/pkg/handlers/handlers.go b/pkg/handlers/handlers.go index f81f58f..961ddc3 100644 --- a/pkg/handlers/handlers.go +++ b/pkg/handlers/handlers.go @@ -49,3 +49,28 @@ func (m *Repository) About(w http.ResponseWriter, r *http.Request) { StringMap: stringMap, }) } + +// Reservation renders the make a reservation page and displays form +func (m *Repository) Reservation(w http.ResponseWriter, r *http.Request) { + render.RenderTemplate(w, "make-reservation.page.tmpl", &models.TemplateData{}) +} + +// Generals renders the room page +func (m *Repository) Generals(w http.ResponseWriter, r *http.Request) { + render.RenderTemplate(w, "generals.page.tmpl", &models.TemplateData{}) +} + +// Majors renders the room page +func (m *Repository) Majors(w http.ResponseWriter, r *http.Request) { + render.RenderTemplate(w, "majors.page.tmpl", &models.TemplateData{}) +} + +// Availability renders the search availability page +func (m *Repository) Availability(w http.ResponseWriter, r *http.Request) { + render.RenderTemplate(w, "search-availability.page.tmpl", &models.TemplateData{}) +} + +// Contact renders the contact page +func (m *Repository) Contact(w http.ResponseWriter, r *http.Request) { + render.RenderTemplate(w, "contact.page.tmpl", &models.TemplateData{}) +} diff --git a/static/css/styles.css b/static/css/styles.css new file mode 100644 index 0000000..7a7fdf6 --- /dev/null +++ b/static/css/styles.css @@ -0,0 +1,20 @@ +.my-footer { + height: 5em; + background-color: #163b65; + margin-top: 1.5em; + padding: 1em; + color: white; + font-size: 80%; +} + +.room-image { + max-width: 50%; +} + +.notie-container { + box-shadow: none; +} + +.datepicker { + z-index: 10000; +} \ No newline at end of file diff --git a/static/images/generals-quarters.png b/static/images/generals-quarters.png new file mode 100644 index 0000000..676bebc Binary files /dev/null and b/static/images/generals-quarters.png differ diff --git a/static/images/marjors-suite.png b/static/images/marjors-suite.png new file mode 100644 index 0000000..8d49755 Binary files /dev/null and b/static/images/marjors-suite.png differ diff --git a/templates/about.page.tmpl b/templates/about.page.tmpl index 9cc9513..c73ecfc 100644 --- a/templates/about.page.tmpl +++ b/templates/about.page.tmpl @@ -5,18 +5,7 @@

This is the about page

-

This is a paragraph of text

-

This is a paragraph of text

-

This came from the template: {{index .StringMap "test"}}

- -

- {{if ne (index .StringMap "remote_ip") ""}} - Your remote ip address is {{index .StringMap "remote_ip"}} - {{else}} - I don't know your ip address yet. Visit the home page so I can set it. - {{end}} -

diff --git a/templates/base.layout.tmpl b/templates/base.layout.tmpl index 5c73679..aa42e80 100644 --- a/templates/base.layout.tmpl +++ b/templates/base.layout.tmpl @@ -1,31 +1,263 @@ {{define "base"}} + - - - - Document + + + + + My Nice Page + + integrity="sha384-B0vP5xmATw1+K9KRQjQERJvTumQW0nPEzvF6L/Z6nronJ3oUOFUFpCjEUQouq2+l" crossorigin="anonymous"> + + + + + + - {{end}} + + + {{block "content" .}} {{end}} + + + + + + + + + {{block "js" .}} {{end}} + + + {{end}} \ No newline at end of file diff --git a/templates/contact.page.tmpl b/templates/contact.page.tmpl new file mode 100644 index 0000000..056a986 --- /dev/null +++ b/templates/contact.page.tmpl @@ -0,0 +1,12 @@ +{{template "base" .}} + +{{define "content"}} +
+
+
+

This is the contact page

+ +
+
+
+{{end}} diff --git a/templates/generals.page.tmpl b/templates/generals.page.tmpl new file mode 100644 index 0000000..a2bd7a0 --- /dev/null +++ b/templates/generals.page.tmpl @@ -0,0 +1,80 @@ +{{template "base" .}} + +{{define "content"}} + +
+ + +
+
+ room image +
+
+ + +
+
+

General's Quarters

+

+ Your home away form home, set on the majestic waters of the Atlantic Ocean, this will be a vacation + to remember. + Your home away form home, set on the majestic waters of the Atlantic Ocean, this will be a vacation + to remember. + Your home away form home, set on the majestic waters of the Atlantic Ocean, this will be a vacation + to remember. + Your home away form home, set on the majestic waters of the Atlantic Ocean, this will be a vacation + to remember. + Your home away form home, set on the majestic waters of the Atlantic Ocean, this will be a vacation + to remember. + Your home away form home, set on the majestic waters of the Atlantic Ocean, this will be a vacation + to remember. +

+
+
+ + +
+ + +
+ + + + +
+ +{{end}} + + +{{define "js"}} + +{{end}} \ No newline at end of file diff --git a/templates/home.page.tmpl b/templates/home.page.tmpl index 61c910e..a1e34a7 100644 --- a/templates/home.page.tmpl +++ b/templates/home.page.tmpl @@ -1,12 +1,63 @@ {{template "base" .}} {{define "content"}} + +
-

This is the home page

-

This is some text

+

Welcome to Fort Smythe Bed and Breakfast

+

+ Your home away form home, set on the majestic waters of the Atlantic Ocean, this will be a vacation to remember. + Your home away form home, set on the majestic waters of the Atlantic Ocean, this will be a vacation to remember. + Your home away form home, set on the majestic waters of the Atlantic Ocean, this will be a vacation to remember. + Your home away form home, set on the majestic waters of the Atlantic Ocean, this will be a vacation to remember. + Your home away form home, set on the majestic waters of the Atlantic Ocean, this will be a vacation to remember. + Your home away form home, set on the majestic waters of the Atlantic Ocean, this will be a vacation to remember. +

+ + +
+ + +
+
{{end}} diff --git a/templates/majors.page.tmpl b/templates/majors.page.tmpl new file mode 100644 index 0000000..2f83e8e --- /dev/null +++ b/templates/majors.page.tmpl @@ -0,0 +1,77 @@ +{{template "base" .}} + +{{define "content"}} +
+ + +
+
+ room image +
+
+ + +
+
+

Major's Suite

+

+ Your home away form home, set on the majestic waters of the Atlantic Ocean, this will be a vacation + to remember. + Your home away form home, set on the majestic waters of the Atlantic Ocean, this will be a vacation + to remember. + Your home away form home, set on the majestic waters of the Atlantic Ocean, this will be a vacation + to remember. + Your home away form home, set on the majestic waters of the Atlantic Ocean, this will be a vacation + to remember. + Your home away form home, set on the majestic waters of the Atlantic Ocean, this will be a vacation + to remember. + Your home away form home, set on the majestic waters of the Atlantic Ocean, this will be a vacation + to remember. +

+
+
+ + +
+ + +
+ + + + +
+{{end}} + +{{define "js"}} + +{{end}} \ No newline at end of file diff --git a/templates/make-reservation.page.tmpl b/templates/make-reservation.page.tmpl new file mode 100644 index 0000000..5922daa --- /dev/null +++ b/templates/make-reservation.page.tmpl @@ -0,0 +1,48 @@ +{{template "base" .}} + +{{define "content"}} +
+
+
+

Make Reservation

+ +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ +
+ + +
+
+ +
+{{end}} \ No newline at end of file diff --git a/templates/search-availability.page.tmpl b/templates/search-availability.page.tmpl new file mode 100644 index 0000000..ed42c4c --- /dev/null +++ b/templates/search-availability.page.tmpl @@ -0,0 +1,46 @@ +{{template "base" .}} + +{{define "content"}} +
+
+
+
+

Search for Availability

+ +
+ +
+
+
+
+ +
+
+ +
+
+
+
+ +
+ + + +
+
+
+
+ +
+{{end}} + + +{{define "js"}} + +{{end}} + diff --git a/working-html/reservation.html b/working-html/reservation.html index 6602136..b2e0bef 100644 --- a/working-html/reservation.html +++ b/working-html/reservation.html @@ -109,18 +109,6 @@

Search for Availability

-
-
-

This is some text.

-

This is some text.

-

This is some text.

-

This is some text.

-

- -

-
-
-