diff --git a/src/templates/img/timemachine/win95-border-btn-pressed.gif b/src/templates/img/timemachine/win95-border-btn-pressed.gif new file mode 100644 index 0000000..b343fed Binary files /dev/null and b/src/templates/img/timemachine/win95-border-btn-pressed.gif differ diff --git a/src/templates/img/timemachine/win95-border-btn.gif b/src/templates/img/timemachine/win95-border-btn.gif index b774fae..56dabe7 100644 Binary files a/src/templates/img/timemachine/win95-border-btn.gif and b/src/templates/img/timemachine/win95-border-btn.gif differ diff --git a/src/templates/img/timemachine/win95-border-input.gif b/src/templates/img/timemachine/win95-border-input.gif new file mode 100644 index 0000000..9a7500a Binary files /dev/null and b/src/templates/img/timemachine/win95-border-input.gif differ diff --git a/src/templates/img/timemachine/win95-check.png b/src/templates/img/timemachine/win95-check.png new file mode 100644 index 0000000..b184ecc Binary files /dev/null and b/src/templates/img/timemachine/win95-check.png differ diff --git a/src/templates/img/timemachine/win95-checklist.png b/src/templates/img/timemachine/win95-checklist.png new file mode 100644 index 0000000..a973d80 Binary files /dev/null and b/src/templates/img/timemachine/win95-checklist.png differ diff --git a/src/templates/img/timemachine/win95-media.png b/src/templates/img/timemachine/win95-media.png new file mode 100644 index 0000000..610361c Binary files /dev/null and b/src/templates/img/timemachine/win95-media.png differ diff --git a/src/templates/img/timemachine/win95-scroll.png b/src/templates/img/timemachine/win95-scroll.png new file mode 100644 index 0000000..0fb0bd5 Binary files /dev/null and b/src/templates/img/timemachine/win95-scroll.png differ diff --git a/src/templates/src/layouts/timemachine_base.html b/src/templates/src/layouts/timemachine_base.html index 3350969..54daaf6 100644 --- a/src/templates/src/layouts/timemachine_base.html +++ b/src/templates/src/layouts/timemachine_base.html @@ -144,13 +144,37 @@ } .win95-btn { - width: 5.6rem; + min-width: 5.6rem; + height: 1.4375rem; /* 23px */ border-width: 2px; border-style: solid; border-color: #fff #333 #333 #fff; border-image: url('{{ dataimg "timemachine/win95-border-btn.gif" }}') 4; text-align: center; cursor: pointer; + display: flex; + justify-content: center; + align-items: center; + font-weight: normal; + padding: 0 1rem !important; + } + + .win95-btn:active { + border-image: url('{{ dataimg "timemachine/win95-border-btn-pressed.gif" }}') 4; + padding-top: 2px !important; + } + + .win95-input { + border-width: 2px; + border-style: solid; + border-image: url('{{ dataimg "timemachine/win95-border-input.gif" }}') 4; + outline: none; + background-color: white !important; + resize: vertical; /* only applies to textareas so whatever */ + } + + .less-spacing p { + margin: 0.2rem 0; } diff --git a/src/templates/src/time_machine_form.html b/src/templates/src/time_machine_form.html deleted file mode 100644 index 76ccbeb..0000000 --- a/src/templates/src/time_machine_form.html +++ /dev/null @@ -1,48 +0,0 @@ -{{ template "timemachine_base.html" . }} - -{{ define "frame title" }} -
- {{ . }} - -
-{{ end }} - -{{ define "content" }} -
-
- {{ template "frame title" "Hello" }} -
- {{ csrftoken .Session }} - - - - -
-
-
- -{{ end }} diff --git a/src/templates/src/time_machine_form_done.html b/src/templates/src/time_machine_form_done.html deleted file mode 100644 index e0144c3..0000000 --- a/src/templates/src/time_machine_form_done.html +++ /dev/null @@ -1,21 +0,0 @@ -{{ template "timemachine_base.html" . }} - -{{ define "frame title" }} -
- {{ . }} - -
-{{ end }} - -{{ define "content" }} -
-
- Thank you for your submission -
-
- -{{ end }} diff --git a/src/templates/src/time-machine.html b/src/templates/src/timemachine.html similarity index 97% rename from src/templates/src/time-machine.html rename to src/templates/src/timemachine.html index 635fbea..34b8962 100644 --- a/src/templates/src/time-machine.html +++ b/src/templates/src/timemachine.html @@ -76,6 +76,9 @@

+
+ Submit your own +
@@ -93,7 +96,6 @@
Yes
-
Absolutely
diff --git a/src/templates/src/timemachine_submit.html b/src/templates/src/timemachine_submit.html new file mode 100644 index 0000000..ddd475e --- /dev/null +++ b/src/templates/src/timemachine_submit.html @@ -0,0 +1,106 @@ +{{ template "timemachine_base.html" . }} + +{{ define "frame title" }} +
+ {{ . }} + +
+{{ end }} + +{{ define "content" }} +
+
+ {{ template "frame title" "Submit A Video" }} +
+ {{ csrftoken .Session }} +
+
+
+
+ +
+
+ Video URL + +
+

+ Take video of yourself using an old device. The video should: +

+
    +
  • Show the entire device so viewers have necessary context
  • +
  • Clearly show the contents of the device's screen
  • +
  • Have minimal editing, no commentary, and clear sound
  • +
+

+ Upload the video somewhere publicly accessible, then share the link here. We can download videos from file-sharing services or any video service supported by youtube-dl. +

+
+
+
+
+
+ +
+
+ Device Info + +
+

+ Include specific info about the device such as its model number, release year, CPU speed, amount of memory, etc. +

+
+
+
+
+
+ +
+
+ Description + +
+

+ What's the story behind this device? When did you get it? What did you use it for? Is it in good shape? Is there anything interesting or notable about it? +

+
+
+
+
+
+ +
+
+
+
+
+ +{{ end }} diff --git a/src/templates/src/timemachine_thanks.html b/src/templates/src/timemachine_thanks.html new file mode 100644 index 0000000..9dee23c --- /dev/null +++ b/src/templates/src/timemachine_thanks.html @@ -0,0 +1,36 @@ +{{ template "timemachine_base.html" . }} + +{{ define "frame title" }} +
+ {{ . }} + +
+{{ end }} + +{{ define "content" }} +
+
+
+ {{ template "frame title" "Submission Complete" }} +
+
+ +
+
+
+ Thank you for your submission! We will review it and get it published on the site soon. +
+
+ OK +
+
+
+
+
+
+ +{{ end }} diff --git a/src/website/staticpages.go b/src/website/staticpages.go index e91cc73..8262547 100644 --- a/src/website/staticpages.go +++ b/src/website/staticpages.go @@ -87,21 +87,3 @@ func Conferences(c *RequestContext) ResponseData { res.MustWriteTemplate("conferences.html", getBaseDataAutocrumb(c, "Conferences"), c.Perf) return res } - -func TimeMachine(c *RequestContext) ResponseData { - baseData := getBaseDataAutocrumb(c, "Time Machine") - baseData.OpenGraphItems = []templates.OpenGraphItem{ - {Property: "og:title", Value: "Time Machine"}, - {Property: "og:site_name", Value: "Handmade Network"}, - {Property: "og:type", Value: "website"}, - {Property: "og:image", Value: hmnurl.BuildPublic("timemachine/opengraph.png", true)}, - {Property: "og:description", Value: "This summer, dig out your old devices and see what they were actually like to use."}, - {Property: "og:url", Value: hmnurl.BuildTimeMachine()}, - {Name: "twitter:card", Value: "summary_large_image"}, - {Name: "twitter:image", Value: hmnurl.BuildPublic("timemachine/twittercard.png", true)}, - } - - var res ResponseData - res.MustWriteTemplate("time-machine.html", baseData, c.Perf) - return res -} diff --git a/src/website/time_machine.go b/src/website/time_machine.go index 7bd55fd..f8031f0 100644 --- a/src/website/time_machine.go +++ b/src/website/time_machine.go @@ -7,12 +7,40 @@ import ( "git.handmade.network/hmn/hmn/src/email" "git.handmade.network/hmn/hmn/src/hmnurl" "git.handmade.network/hmn/hmn/src/oops" + "git.handmade.network/hmn/hmn/src/templates" ) +func TimeMachine(c *RequestContext) ResponseData { + baseData := getBaseDataAutocrumb(c, "Time Machine") + baseData.OpenGraphItems = []templates.OpenGraphItem{ + {Property: "og:title", Value: "Time Machine"}, + {Property: "og:site_name", Value: "Handmade Network"}, + {Property: "og:type", Value: "website"}, + {Property: "og:image", Value: hmnurl.BuildPublic("timemachine/opengraph.png", true)}, + {Property: "og:description", Value: "This summer, dig out your old devices and see what they were actually like to use."}, + {Property: "og:url", Value: hmnurl.BuildTimeMachine()}, + {Name: "twitter:card", Value: "summary_large_image"}, + {Name: "twitter:image", Value: hmnurl.BuildPublic("timemachine/twittercard.png", true)}, + } + + type TemplateData struct { + templates.BaseData + SubmitUrl string + } + tmpl := TemplateData{ + BaseData: baseData, + SubmitUrl: hmnurl.BuildTimeMachineForm(), + } + + var res ResponseData + res.MustWriteTemplate("timemachine.html", tmpl, c.Perf) + return res +} + func TimeMachineForm(c *RequestContext) ResponseData { var res ResponseData res.MustWriteTemplate( - "time_machine_form.html", + "timemachine_submit.html", getBaseDataAutocrumb(c, "Time Machine"), c.Perf, ) @@ -49,10 +77,19 @@ func TimeMachineFormSubmit(c *RequestContext) ResponseData { } func TimeMachineFormDone(c *RequestContext) ResponseData { + type TemplateData struct { + templates.BaseData + TimeMachineUrl string + } + tmpl := TemplateData{ + BaseData: getBaseDataAutocrumb(c, "Time Machine"), + TimeMachineUrl: hmnurl.BuildTimeMachine(), + } + var res ResponseData res.MustWriteTemplate( - "time_machine_form_done.html", - getBaseDataAutocrumb(c, "Time Machine"), + "timemachine_thanks.html", + tmpl, c.Perf, ) return res