Skip to content
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions data/events/2024/denver/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ ga_tracking_id: "G-9SR9GD94E0" # If you have your own Google Analytics tracking
startdate: 2024-09-16 # The start date of your event. Leave blank if you don't have a venue reserved yet.
enddate: 2024-09-17 # The end date of your event. Leave blank if you don't have a venue reserved yet.

timeoffset: "-0600"

# Leave CFP dates blank if you don't know yet, or set all three at once.
cfp_date_start: 2023-10-31T23:59:59-06:00 # start accepting talk proposals.
cfp_date_end: 2024-05-04T23:59:59-06:00 # close your call for proposals.
Expand Down
2 changes: 2 additions & 0 deletions data/events/2024/london/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ masthead_background: "background.png"
startdate: 2024-09-26T00:00:00+01:00 # The start date of your event. Leave blank if you don't have a venue reserved yet.
enddate: 2024-09-27T00:00:00+01:00 # The end date of your event. Leave blank if you don't have a venue reserved yet.

timezone: "Europe/London"

# Leave CFP dates blank if you don't know yet, or set all three at once.
cfp_date_start: 2023-09-22T00:00:00+01:00 # start accepting talk proposals.
cfp_date_end: 2024-05-24T23:59:59+01:00 # close your call for proposals.
Expand Down
5 changes: 4 additions & 1 deletion data/events/2024/rio-de-janeiro/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ ga_tracking_id: "" # If you have your own Google Analytics tracking ID, enter it
startdate: 2024-08-24T09:00:00-03:00 # The start date of your event. Leave blank if you don't have a venue reserved yet.
enddate: 2024-08-24T18:00:00-03:00 # The end date of your event. Leave blank if you don't have a venue reserved yet.

timezone: "America/Sao_Paulo"
timeoffset: "-0300"

# Leave CFP dates blank if you don't know yet, or set all three at once.
cfp_date_start: 2024-04-22T00:00:00-03:00 # start accepting talk proposals.
cfp_date_end: 2024-05-26T00:00:00-03:00 # close your call for proposals.
Expand Down Expand Up @@ -326,4 +329,4 @@ program:
type: custom
date: 2024-08-24
start_time: "19:00"
end_time: "20:00"
end_time: "20:00"
43 changes: 43 additions & 0 deletions themes/devopsdays-theme/layouts/program/single.html
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,22 @@ <h2>Program</h2>
{{- end -}}
{{- end -}}
<!-- new experimental program end -->

{{- if or $e.timeoffset $e.timezone -}}
<script>
var userLang = navigator.language || navigator.userLanguage;
var date = new Date();
var userTimeZone = Intl.DateTimeFormat().resolvedOptions().timeZone;
var userTimeAbbreviation = Intl.DateTimeFormat(userLang,{ timeZone: userTimeZone, timeZoneName: 'short' }).formatToParts().find(part => part.type==='timeZoneName').value;
</script>
{{- end -}}
{{- if $e.timezone -}}
<script>
var eventTimeOffset = (Intl.DateTimeFormat(userLang,{ timeZone: "{{ $e.timezone }}", timeZoneName: 'longOffset' }).formatToParts().find(part => part.type==='timeZoneName').value).slice(3,99);
var eventTimeAbbreviation = Intl.DateTimeFormat(userLang,{ timeZone: "{{ $e.timezone }}", timeZoneName: 'short' }).formatToParts().find(part => part.type==='timeZoneName').value;
</script>
{{- end -}}

<div class="row">
<div class="col">
<div id="accordion" role="tablist" aria-multiselectable="true">
Expand Down Expand Up @@ -125,6 +141,33 @@ <h5 class="mb-0">
{{ .start_time }}
-
{{ .end_time }}
{{- if $e.timezone -}}
&nbsp;<script>document.write(eventTimeAbbreviation)</script>
{{- end -}}
{{- if or $e.timeoffset $e.timezone -}}
<br>
{{- if $e.timeoffset -}}
<script>
var localstarttime = new Date("{{- dateFormat "2006-01-02" ($.Scratch.Get "date") -}}T"+{{- .start_time -}}+":00"+{{- $e.timeoffset -}});
var localendtime = new Date("{{- dateFormat "2006-01-02" ($.Scratch.Get "date") -}}T"+{{- .end_time -}}+":00"+{{- $e.timeoffset -}});
</script>
{{- end -}}
{{- if not $e.timeoffset -}}
<script>
var localstarttime = new Date("{{- dateFormat "2006-01-02" ($.Scratch.Get "date") -}}T"+{{ .start_time }}+":00"+eventTimeOffset);
var localendtime = new Date("{{- dateFormat "2006-01-02" ($.Scratch.Get "date") -}}T"+{{ .end_time }}+":00"+eventTimeOffset);
</script>
{{- end -}}
<script>
document.write("<strong>");
document.write(String(localstarttime.getHours()).padStart(2,"0")+":"+String(localstarttime.getMinutes()).padStart(2,"0"));
document.write("&nbsp;-&nbsp;");
document.write(String(localendtime.getHours()).padStart(2,"0")+":"+String(localendtime.getMinutes()).padStart(2,"0"));
document.write("&nbsp;");
document.write(userTimeAbbreviation);
document.write("</strong>");
</script>
{{- end -}}
</div>
<div class="col-lg-8 col-md-6 program-element {{ printf "program-%s" .type }}" {{ if .background_color }}style="background-color: {{ .background_color }}"{{end}}>
{{- if eq .type "custom" -}}
Expand Down
2 changes: 2 additions & 0 deletions themes/devopsdays-theme/reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ All dates are in unquoted YYYY-MM-DD, like this: `variable: 2016-01-05`, or like
|-------------------------|------------|----------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------|
| `startdate` | YYYY-MM-DD | No | The start date of your event. Leave blank if you don't have a venue reserved yet. | 2016-01-05 |
| `enddate` | YYYY-MM-DD | No | The end date of your event. Leave blank if you don't have a venue reserved yet. | 2016-01-05 |
| `timeoffset` | YYYY-MM-DD | No | The offset of the timezone of your event from UTC | "-0600" |
| `timezone` | YYYY-MM-DD | No | The timezone of the event | "Europe/London" |
| `cfp_date_start` | YYYY-MM-DD | No | The date you will start accepting talk proposals. Can be a blank value. | 2016-01-05 |
| `cfp_date_end` | YYYY-MM-DD | No | The date you will close your call for proposals. Can be a blank value. If you set the full datetime string with correct TZ, CFP will display as open until local close time. | 2016-01-05T23:59:00-06:00 |
| `cfp_date_announce` | YYYY-MM-DD | No | The date you will inform proposers of status. Can be a blank value. | 2016-01-05 |
Expand Down
Loading