Handmade Cities banner

This commit is contained in:
Asaf Gartner 2024-05-01 07:15:28 +03:00
parent 71d236f1c2
commit 7fd57f692b
3 changed files with 124 additions and 116 deletions

View File

@ -88,6 +88,16 @@ var HMBoston2023 = Event{
EndTime: time.Date(2023, 8, 4, 0, 0, 0, 0, utils.Must1(time.LoadLocation("America/Los_Angeles"))),
}
var HMS2024 = Event{
StartTime: time.Date(2024, 11, 20, 0, 0, 0, 0, utils.Must1(time.LoadLocation("America/Los_Angeles"))),
EndTime: time.Date(2024, 11, 22, 0, 0, 0, 0, utils.Must1(time.LoadLocation("America/Los_Angeles"))),
}
var HMBoston2024 = Event{
StartTime: time.Date(2024, 8, 9, 0, 0, 0, 0, utils.Must1(time.LoadLocation("America/Los_Angeles"))),
EndTime: time.Date(2024, 8, 10, 0, 0, 0, 0, utils.Must1(time.LoadLocation("America/Los_Angeles"))),
}
var AllJams = []Jam{WRJ2021, WRJ2022, VJ2023, WRJ2023, LJ2024}
func CurrentJam() *Jam {

View File

@ -112,6 +112,116 @@
</div>
*/}}
<div class="mb3 ph3 ph0-ns">
<style>
#cities-banner {
background: url("{{ static "cities/banner.png" }}");
background-repeat: no-repeat;
color: white !important;
text-align: center;
background-size: contain;
background-position: bottom;
background-color: black;
}
#cities-banner h3 {
font-family: 'MohaveHMN', sans-serif;
font-weight: normal;
font-size: 2.2rem;
line-height: 0.8;
margin: 0;
text-transform: uppercase;
}
.cities-details {
font-family: 'MohaveHMN', sans-serif;
font-variant: small-caps;
font-size: 1.2rem;
line-height: 0.8;
margin-top: 0.6rem;
letter-spacing: 0.02rem;
}
#cities-learn-more {
font-size: 1rem;
}
#cities-title-container{
padding-left: 8.5rem;
}
@media screen and (min-width: 30rem) {
#cities-banner {
text-align: left;
}
#cities-title-container {
padding-top: 0.2rem;
}
}
@media screen and (max-width: 960px) {
#cities-title-container {
padding-left: 7.5rem;
}
#cities-banner{
background-size: 200%;
background-position: 0 100%;
}
}
@media screen and (max-width: 560px) {
#cities-banner {
text-align: left;
}
#cities-title-container {
padding-top: 0.2rem;
padding-left: 0;
text-align: center;
}
}
</style>
<a id="cities-banner" class="pv3 ph3 ph4-l br3 flex flex-column flex-row-ns items-center" href="https://handmadecities.com/tickets">
<div id="cities-title-container" class="flex flex-column pl3-m pl4-l pv3 pv0-ns">
<h3 id="cities-title">Handmade cities</h3>
<div class="cities-details">
Boston - Aug 9-10 2024.
{{ if gt .HMBostonDaysUntilEnd 0 }}
{{ if eq .HMBostonDaysUntilStart 0 }}
<b>Happening now.</b>
{{ else if eq .HMBostonDaysUntilStart 1 }}
<b>Starting tomorrow.</b>
{{ else if lt .HMBostonDaysUntilStart 31 }}
<b>In {{ .HMBostonDaysUntilStart }} days.</b>
{{ end }}
{{ end }}
</div>
<div class="cities-details">
Seattle - Nov 20-22 2024.
{{ if gt .HMSDaysUntilEnd 0 }}
{{ if eq .HMSDaysUntilStart 0 }}
<b>Happening now.</b>
{{ else if eq .HMSDaysUntilStart 1 }}
<b>Starting tomorrow.</b>
{{ else if lt .HMSDaysUntilStart 31 }}
<b>In {{ .HMSDaysUntilStart }} days.</b>
{{ end }}
{{ end }}
</div>
</div>
<div class="flex-grow-1"></div>
<div id="cities-learn-more">
Tickets available now
<div class="dib svgicon">{{ svg "chevron-right" }}</div>
</div>
</a>
</div>
<div class="mb3 ph3 ph0-ns">
<style>
#jam-banner {
@ -282,118 +392,6 @@
</div>
*/}}
{{/*
<div class="mb3 ph3 ph0-ns">
<style>
#cities-banner {
background: url("{{ static "cities/banner.png" }}");
background-repeat: no-repeat;
color: white !important;
text-align: center;
background-size: contain;
background-position: bottom;
background-color: black;
}
#cities-banner h3 {
font-family: 'MohaveHMN', sans-serif;
font-weight: normal;
font-size: 2.2rem;
line-height: 0.8;
margin: 0;
text-transform: uppercase;
}
.cities-details {
font-family: 'MohaveHMN', sans-serif;
font-variant: small-caps;
font-size: 1.2rem;
line-height: 0.8;
margin-top: 0.6rem;
letter-spacing: 0.02rem;
}
#cities-learn-more {
font-size: 1rem;
}
#cities-title-container{
padding-left: 8.5rem;
}
@media screen and (min-width: 30rem) {
#cities-banner {
text-align: left;
}
#cities-title-container {
padding-top: 0.2rem;
}
}
@media screen and (max-width: 960px) {
#cities-title-container {
padding-left: 7.5rem;
}
#cities-banner{
background-size: 200%;
background-position: 0 100%;
}
}
@media screen and (max-width: 560px) {
#cities-banner {
text-align: left;
}
#cities-title-container {
padding-top: 0.2rem;
padding-left: 0;
text-align: center;
}
}
</style>
<a id="cities-banner" class="pv3 ph3 ph4-l br3 flex flex-column flex-row-ns items-center" href="https://handmadecities.com/tickets">
<div id="cities-title-container" class="flex flex-column pl3-m pl4-l pv3 pv0-ns">
<h3 id="cities-title">Handmade cities</h3>
<div class="cities-details">
Boston - Aug 3-4 2023.
{{ if gt .HMBostonDaysUntilEnd 0 }}
{{ if eq .HMBostonDaysUntilStart 0 }}
<b>Happening now.</b>
{{ else if eq .HMBostonDaysUntilStart 1 }}
<b>Starting tomorrow.</b>
{{ else if lt .HMBostonDaysUntilStart 31 }}
<b>In {{ .HMBostonDaysUntilStart }} days.</b>
{{ end }}
{{ end }}
</div>
<div class="cities-details">
Seattle - Nov 15-17 2023.
{{ if gt .HMSDaysUntilEnd 0 }}
{{ if eq .HMSDaysUntilStart 0 }}
<b>Happening now.</b>
{{ else if eq .HMSDaysUntilStart 1 }}
<b>Starting tomorrow.</b>
{{ else if lt .HMSDaysUntilStart 31 }}
<b>In {{ .HMSDaysUntilStart }} days.</b>
{{ end }}
{{ end }}
</div>
</div>
<div class="flex-grow-1"></div>
<div id="cities-learn-more">
Tickets available now
<div class="dib svgicon">{{ svg "chevron-right" }}</div>
</div>
</a>
</div>
*/}}
{{ if not .User }}
<div class="mb3 ph3 ph0-ns">
<style>

View File

@ -160,11 +160,11 @@ func Index(c *RequestContext) ResponseData {
JamDaysUntilStart: daysUntil(hmndata.LJ2024.StartTime),
JamDaysUntilEnd: daysUntil(hmndata.LJ2024.EndTime),
HMSDaysUntilStart: daysUntil(hmndata.HMS2023.StartTime),
HMSDaysUntilEnd: daysUntil(hmndata.HMS2023.EndTime),
HMSDaysUntilStart: daysUntil(hmndata.HMS2024.StartTime),
HMSDaysUntilEnd: daysUntil(hmndata.HMS2024.EndTime),
HMBostonDaysUntilStart: daysUntil(hmndata.HMBoston2023.StartTime),
HMBostonDaysUntilEnd: daysUntil(hmndata.HMBoston2023.EndTime),
HMBostonDaysUntilStart: daysUntil(hmndata.HMBoston2024.StartTime),
HMBostonDaysUntilEnd: daysUntil(hmndata.HMBoston2024.EndTime),
}, c.Perf)
if err != nil {
return c.ErrorResponse(http.StatusInternalServerError, oops.New(err, "failed to render landing page template"))