Merge pull request '2021' (#4) from 2021 into master

Reviewed-on: #4
master
Özcan Oğuz 4 years ago
commit 292a5aef77
  1. 2
      i18n/en.toml
  2. 2
      i18n/tr.toml
  3. 88
      layouts/live/list.html
  4. 24
      layouts/partials/head.html

@ -32,7 +32,7 @@ other = "Share"
other = "Share on Facebook"
[twitter_share_text]
other = "#ÖzgürKon2020 will be held on May 16-17 online with @oydorgtr! Follow on @OzgurKonorg, for details: ozgurkon.org"
other = "#ÖzgürKon2021 will be held on May 15-16 online with @oydorgtr! Follow on @OzgurKonorg, for details: ozgurkon.org/2021"
[twitter_share_label]
other = "Share on Twitter"

@ -32,7 +32,7 @@ other = "Paylaş"
other = "Facebook'ta paylaş"
[twitter_share_text]
other = "#ÖzgürKon2020 16-17 Mayıs 2020'de @oydorgtr tarafından çevrimiçi olarak düzenleniyor! Duyurular için: @OzgurKonorg detaylar için: ozgurkon.org"
other = "#ÖzgürKon2021 15-16 Mayıs 2021'de @oydorgtr tarafından çevrimiçi olarak düzenleniyor! Duyurular için: @OzgurKonorg detaylar için: ozgurkon.org/2021"
[twitter_share_label]
other = "Twitter'da paylaş"

@ -1,88 +0,0 @@
{{ define "main" }}
{{ .Content }}
<nav class="live-tab-switcher">
{{ range $index, $room := $.Site.Data.live }}
<a class="live-tab-link{{ if ($index) eq 0 }} active {{end}}" id="button-{{$room.navId}}" onClick="switchTabs(event, '{{$room.navId}}')" href="#room-{{$room.navId}}">{{$room.name}}</a>
{{end}}
</nav>
<section class="live-section">
{{ range $index, $room := $.Site.Data.live }}
<div id="room-{{$room.navId}}" class="live-player-wrapper {{ if ($index) eq 1 }} live-tab-d-none {{end}}">
<video-js
id="player-{{$room.navId}}"
data-setup="{}"
>
<source src="{{ $room.url }}">
</video-js>
</div>
{{ end }}
<iframe src="https://kiwiirc.com/client/chat.freenode.net/?&theme=cli#ozgurkon" class="live-chat"></iframe>
</section>
{{end}}
{{ define "scripts"}}
<script type="text/javascript" src="https://vjs.zencdn.net/7.8.1/video.js"></script>
<script type="text/javascript" src="https://unpkg.com/@videojs/http-streaming@1.13.3/dist/videojs-http-streaming.min.js"></script>
<script type="text/javascript">
const players = {
{{ range $room := $.Site.Data.live }}
{{ $room.navId}}: videojs('player-{{$room.navId}}', {
controls: true,
aspectRatio: '16:9'
}),
{{end}}
}
const roomAkgul = document.getElementById('room-akgul');
const roomUckan = document.getElementById('room-uckan');
const buttonAkgul = document.getElementById('button-akgul');
const buttonUckan = document.getElementById('button-uckan');
function switchTabs(event, id) {
event.preventDefault();
pausePlayer(id);
if(id === "akgul") {
setActive(buttonAkgul);
notActive(buttonUckan);
show(roomAkgul);
hide(roomUckan);
}
if(id === "uckan") {
setActive(buttonUckan);
notActive(buttonAkgul);
hide(roomAkgul);
show(roomUckan);
}
}
function pausePlayer(id) {
const playerToPause = (id === "akgul") ? "uckan" : "akgul";
players[id].play();
players[playerToPause].pause();
}
function show(el) {
if(el.classList.contains('live-tab-d-none')) return el.classList.remove('live-tab-d-none');
}
function hide(el) {
if(!el.classList.contains('live-tab-d-none')) return el.classList.add('live-tab-d-none');
}
function setActive(el) {
if(!el.classList.contains('active')) return el.classList.add('active');
}
function notActive(el) {
if(el.classList.contains('active')) return el.classList.remove('active');
}
setTimeout(() => {
document.getElementById("button-akgul").click();
},3000);
</script>
{{ end }}

@ -43,33 +43,29 @@
{{ if .IsHome }}
<meta property="og:title" content="{{ .Site.Title }}" />
<meta property="og:type" content="website" />
<meta property="og:url" content="https://ozgurkon.org" />
<meta property="og:url" content="https://ozgurkon.org/2021" />
<meta property="og:description" content="{{ $.Site.Params.description }}" />
<meta property="og:image" content="/tn.png" />
<meta property="og:site_name" content="ÖzgürKon 2020" />
<meta property="og:image" content="/images/logos/ozgurkon_only_logo.svg" />
<meta property="og:site_name" content="ÖzgürKon 2021" />
<meta name="twitter:card" content="summary" />
<meta name="twitter:site" content="@OzgurKonorg" />
<meta name="twitter:title" content="ÖzgürKon 2020">
<meta name="twitter:title" content="ÖzgürKon 2021">
<meta name="twitter:description" content="{{ $.Site.Params.description }}">
<meta name="twitter:creator" content="@OzgurKonorg" />
<meta name="twitter:image" content="https://ozgurkon.org/tn.png?1234">
<meta name="twitter:image" content="https://ozgurkon.org/tn.png">
{{ else }}
<meta property="og:title" content="{{ .Page.Title }} - {{ .Site.Title }}" />
<meta property="og:type" content="article" />
<meta property="og:url" content="https://ozgurkon.org" />
<meta property="og:url" content="https://ozgurkon.org/2021" />
<meta property="og:description" content="{{ .Page.Summary }}" />
<meta property="og:image" content="/tn.png" />
<meta property="og:site_name" content="ÖzgürKon 2020" />
<meta property="og:image" content="/images/logos/ozgurkon_only_logo.svg" />
<meta property="og:site_name" content="ÖzgürKon 2021" />
<meta name="twitter:card" content="summary" />
<meta name="twitter:site" content="@OzgurKonorg" />
<meta name="twitter:title" content="{{ .Page.Title }} - ÖzgürKon 2020">
<meta name="twitter:title" content="{{ .Page.Title }} - ÖzgürKon 2021">
<meta name="twitter:description" content="{{ .Page.Summary }}">
<meta name="twitter:creator" content="@OzgurKonorg" />
<meta name="twitter:image" content="https://ozgurkon.org/tn.png?1234">
{{ if (.Type) eq "live" }}
<link href="https://vjs.zencdn.net/7.8.1/video-js.css" rel="stylesheet">
{{ end }}
<meta name="twitter:image" content="https://ozgurkon.org/images/logos/ozgurkon_only_logo.svg">
{{ end }}
<link href="{{ with .OutputFormats.Get "RSS" }}{{ .RelPermalink }}{{ end }}" rel="alternate" type="application/rss+xml" title="{{ .Site.Title }}"/>

Loading…
Cancel
Save