Adding way to see all LPs, LTs and EPs from an author

Also smaller changes to the URL schemes, and a small change in the footer
This commit is contained in:
Andreas Mieke 2016-02-05 23:51:45 +01:00
parent 981645e6f6
commit 8db3624694
12 changed files with 216 additions and 26 deletions

View file

@ -29,11 +29,16 @@ func initRouter() *gin.Engine {
// Web UI // Web UI
router.GET("/", GetIndex) router.GET("/", GetIndex)
router.GET("/lets-play/:lslug/*eslug", GetLEpisode) router.GET("/lets-play/:lslug/:eslug", GetLEpisode)
router.GET("/lets-play/:lslug", GetLEpisode) router.GET("/lets-play/:lslug", GetLEpisode)
router.GET("/lets-play/", GetLps) router.GET("/lets-play", GetLps)
router.GET("/testet/*tslug", GetLt) router.GET("/testet", GetLt)
router.GET("/zeige/*aslug", GetAt) router.GET("/testet/:tslug", GetLt)
router.GET("/zeige", GetAt)
router.GET("/zeige/:aslug", GetAt)
router.GET("/zeige/:aslug/lets-play", GetAtLps)
router.GET("/zeige/:aslug/testet", GetAtLts)
router.GET("/zeige/:aslug/episoden", GetAtEps)
// API // API

View file

@ -0,0 +1,43 @@
{{ template "header.html" . }}
<div class="row">
<div class="large-12 columns">
<h1>{{ .title }}</h1>
<ul class="breadcrumbs" itemscope itemtype="http://schema.org/BreadcrumbList">
<li itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem">
<a itemprop="item" href="/"><span itemprop="name">Home</span></a>
<meta itemprop="position" content="1" />
</li>
<li itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem">
<a itemprop="item" href="/zeige"><span itemprop="name">Sprecher</span></a>
<meta itemprop="position" content="2" />
</li>
<li itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem">
<a itemprop="item" href="/zeige/{{ .AT.Slug.String }}"><span itemprop="name">{{ .AT.Name.String }}</span></a>
<meta itemprop="position" content="3" />
</li>
<li class="current" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem">
<a itemprop="item" href="/zeige/{{ .AT.Slug.String }}/episoden"><span itemprop="name">Episoden</span></a>
<meta itemprop="position" content="4" />
</li>
<meta itemprop="numberOfItems" content="4" />
</ul>
<ul class="small-block-grid-2 medium-block-grid-4 large-block-grid-5">
{{ range .data }}
<li itemscope itemtype="http://schema.org/Episode">
<a class="th" href="/lets-play/{{ .LP.Slug.String }}/{{ .EP.Slug.String }}" itemprop="url">
{{ if .EP.ThumbS.Valid }}
<img alt="" src="{{ .EP.ThumbS.String }}" itemprop="thumbnailUrl" />
{{ else }}
<img alt="" src="https://placeholdit.imgix.net/~text?txtsize=36&txt=Kein%20Thumbnail&w=265&h=149" />
{{ end }}
</a>
<span itemprop="partOfSeries" itemscope itemtype="http://schema.org/TVSeries">
<a href="/lets-play/{{ .LP.Slug.String }}" itemprop="url"><strong itemprop="name">{{ .LP.Name.String }}</strong></a>:
</span>
<br /><a href="/lets-play/{{ .LP.Slug.String }}/{{ .EP.Slug.String }}"><span itemprop="name">{{ .EP.Name.String }}</span></a>
</li>
{{ end }}
</ul>
</div>
</div>
{{ template "footer.html" . }}

View file

@ -0,0 +1,40 @@
{{ template "header.html" . }}
<div class="row">
<div class="large-12 columns">
<h1>{{ .title }}</h1>
<ul class="breadcrumbs" itemscope itemtype="http://schema.org/BreadcrumbList">
<li itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem">
<a itemprop="item" href="/"><span itemprop="name">Home</span></a>
<meta itemprop="position" content="1" />
</li>
<li itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem">
<a itemprop="item" href="/zeige"><span itemprop="name">Sprecher</span></a>
<meta itemprop="position" content="2" />
</li>
<li itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem">
<a itemprop="item" href="/zeige/{{ .AT.Slug.String }}"><span itemprop="name">{{ .AT.Name.String }}</span></a>
<meta itemprop="position" content="3" />
</li>
<li class="current" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem">
<a itemprop="item" href="/zeige/{{ .AT.Slug.String }}/lets-play"><span itemprop="name">Let's Plays</span></a>
<meta itemprop="position" content="4" />
</li>
<meta itemprop="numberOfItems" content="4" />
</ul>
<ul class="small-block-grid-3 medium-block-grid-5 large-block-grid-5">
{{ range .data }}
<li itemscope itemtype="http://schema.org/TVSeries">
<a class="th" href="/lets-play/{{ .LP.Slug.String }}" itemprop="url">
{{ if .LP.PosterS.Valid }}
<img alt="" src="{{ .LP.PosterS.String }}" itemprop="thumbnailUrl" />
{{ else }}
<img alt="" src="https://placeholdit.imgix.net/~text?txtsize=24&txt=Kein%20Cover&w=178&h=265" />
{{ end }}
</a>
<br /><a href="/lets-play/{{ .LP.Slug.String }}"><strong itemprop="name">{{ .LP.Name.String }}</strong></a>
</li>
{{ end }}
</ul>
</div>
</div>
{{ template "footer.html" . }}

View file

@ -0,0 +1,40 @@
{{ template "header.html" . }}
<div class="row">
<div class="large-12 columns">
<h1>{{ .title }}</h1>
<ul class="breadcrumbs" itemscope itemtype="http://schema.org/BreadcrumbList">
<li itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem">
<a itemprop="item" href="/"><span itemprop="name">Home</span></a>
<meta itemprop="position" content="1" />
</li>
<li itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem">
<a itemprop="item" href="/zeige"><span itemprop="name">Sprecher</span></a>
<meta itemprop="position" content="2" />
</li>
<li itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem">
<a itemprop="item" href="/zeige/{{ .AT.Slug.String }}"><span itemprop="name">{{ .AT.Name.String }}</span></a>
<meta itemprop="position" content="3" />
</li>
<li class="current" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem">
<a itemprop="item" href="/zeige/{{ .AT.Slug.String }}/testet"><span itemprop="name">Let's Tests</span></a>
<meta itemprop="position" content="4" />
</li>
<meta itemprop="numberOfItems" content="4" />
</ul>
<ul class="small-block-grid-2 medium-block-grid-4 large-block-grid-5">
{{ range .data }}
<li itemscope itemtype="http://schema.org/Movie">
<a class="th" href="/testet/{{ .LT.Slug.String }}" itemprop="url">
{{ if .LT.ThumbS.Valid }}
<img alt="" src="{{ .LT.ThumbS.String }}" itemprop="thumbnailUrl" />
{{ else }}
<img alt="" src="https://placeholdit.imgix.net/~text?txtsize=36&txt=Kein%20Thumbnail&w=265&h=149" />
{{ end }}
</a>
<br /><a href="/testet/{{ .LT.Slug.String }}"><strong itemprop="name">{{ .LT.Name.String }}</strong></a>
</li>
{{ end }}
</ul>
</div>
</div>
{{ template "footer.html" . }}

View file

@ -23,28 +23,28 @@
<meta itemprop="numberOfItems" content="3" /> <meta itemprop="numberOfItems" content="3" />
</ul> </ul>
{{ if .data.LPs }} {{ if .data.LPs }}
<h2>Aktuelle Let's Plays</h2> <h2>Aktuelle Let's Plays <small><a href="/zeige/{{ .data.AT.Slug.String }}/lets-play">mehr</a></small></h2>
<ul class="small-block-grid-2 medium-block-grid-3 large-block-grid-5"> <ul class="small-block-grid-2 medium-block-grid-3 large-block-grid-5">
{{ range .data.LPs }} {{ range .data.LPs }}
<li itemscope itemtype="http://schema.org/TVSeries"> <li itemscope itemtype="http://schema.org/TVSeries">
<a class="th" href="/lets-play/{{ .Slug.String }}/" itemprop="url"> <a class="th" href="/lets-play/{{ .Slug.String }}" itemprop="url">
{{ if .PosterS.Valid }} {{ if .PosterS.Valid }}
<img alt="" src="{{ .PosterS.String }}" itemprop="thumbnailUrl" /> <img alt="" src="{{ .PosterS.String }}" itemprop="thumbnailUrl" />
{{ else }} {{ else }}
<img alt="" src="https://placeholdit.imgix.net/~text?txtsize=12&txt=Kein%20Cover&w=178&h=265" /> <img alt="" src="https://placeholdit.imgix.net/~text?txtsize=12&txt=Kein%20Cover&w=178&h=265" />
{{ end }} {{ end }}
</a> </a>
<br /><a href="/lets-play/{{ .Slug.String }}/"><strong itemprop="name">{{ .Name.String }}</strong></a> <br /><a href="/lets-play/{{ .Slug.String }}"><strong itemprop="name">{{ .Name.String }}</strong></a>
</li> </li>
{{ end }} {{ end }}
</ul> </ul>
{{ end }} {{ end }}
{{ if .data.EPs }} {{ if .data.EPs }}
<h2>Aktuelle Episoden</h2> <h2>Aktuelle Episoden <small><a href="/zeige/{{ .data.AT.Slug.String }}/episoden">mehr</a></small></h2>
<ul class="small-block-grid-2 medium-block-grid-3 large-block-grid-5"> <ul class="small-block-grid-2 medium-block-grid-3 large-block-grid-5">
{{ range .data.EPs }} {{ range .data.EPs }}
<li itemscope itemtype="http://schema.org/Episode"> <li itemscope itemtype="http://schema.org/Episode">
<a class="th" href="/lets-play/{{ .LP.Slug.String }}/{{ .EP.Slug.String }}/" itemprop="url"> <a class="th" href="/lets-play/{{ .LP.Slug.String }}/{{ .EP.Slug.String }}" itemprop="url">
{{ if .EP.ThumbS.Valid }} {{ if .EP.ThumbS.Valid }}
<img alt="" src="{{ .EP.ThumbS.String }}" itemprop="thumbnailUrl" /> <img alt="" src="{{ .EP.ThumbS.String }}" itemprop="thumbnailUrl" />
{{ else }} {{ else }}
@ -52,26 +52,26 @@
{{ end }} {{ end }}
</a> </a>
<span itemprop="partOfSeries" itemscope itemtype="http://schema.org/TVSeries"> <span itemprop="partOfSeries" itemscope itemtype="http://schema.org/TVSeries">
<a href="/lets-play/{{ .LP.Slug.String }}/" itemprop="url"><strong itemprop="name">{{ .LP.Name.String }}</strong></a>: <a href="/lets-play/{{ .LP.Slug.String }}" itemprop="url"><strong itemprop="name">{{ .LP.Name.String }}</strong></a>:
</span> </span>
<br /><a href="/lets-play/{{ .LP.Slug.String }}/{{ .EP.Slug.String }}/"><span itemprop="name">{{ .EP.Name.String }}</span></a> <br /><a href="/lets-play/{{ .LP.Slug.String }}/{{ .EP.Slug.String }}"><span itemprop="name">{{ .EP.Name.String }}</span></a>
</li> </li>
{{ end }} {{ end }}
</ul> </ul>
{{ end }} {{ end }}
{{ if .data.LTs }} {{ if .data.LTs }}
<h2>Aktuelle Let's Tests</h2> <h2>Aktuelle Let's Tests <small><a href="/zeige/{{ .data.AT.Slug.String }}/testet">mehr</a></small></h2>
<ul class="small-block-grid-2 medium-block-grid-3 large-block-grid-5"> <ul class="small-block-grid-2 medium-block-grid-3 large-block-grid-5">
{{ range .data.LTs }} {{ range .data.LTs }}
<li itemscope itemtype="http://schema.org/Movie"> <li itemscope itemtype="http://schema.org/Movie">
<a class="th" href="/testet/{{ .Slug.String }}/" itemprop="url"> <a class="th" href="/testet/{{ .Slug.String }}" itemprop="url">
{{ if .ThumbS.Valid }} {{ if .ThumbS.Valid }}
<img alt="" src="{{ .ThumbS.String }}" itemprop="thumbnailUrl" /> <img alt="" src="{{ .ThumbS.String }}" itemprop="thumbnailUrl" />
{{ else }} {{ else }}
<img alt="" src="https://placeholdit.imgix.net/~text?txtsize=36&txt=Kein%20Thumbnail&w=265&h=149" /> <img alt="" src="https://placeholdit.imgix.net/~text?txtsize=36&txt=Kein%20Thumbnail&w=265&h=149" />
{{ end }} {{ end }}
</a> </a>
<br /><a href="/testet/{{ .Slug.String }}/"><strong itemprop="name">{{ .Name.String }}</strong></a> <br /><a href="/testet/{{ .Slug.String }}"><strong itemprop="name">{{ .Name.String }}</strong></a>
</li> </li>
{{ end }} {{ end }}
</ul> </ul>

View file

@ -9,8 +9,8 @@
<iframe width="213" height="120" src="//www.youtube.com/embed/{{ .data.EP.Youtube.String }}" frameborder="0" allowfullscreen></iframe> <iframe width="213" height="120" src="//www.youtube.com/embed/{{ .data.EP.Youtube.String }}" frameborder="0" allowfullscreen></iframe>
</div> </div>
<div class="medium-3 medium-push-9 columns"> <div class="medium-3 medium-push-9 columns">
<h5 itemprop="partOfSeries" itemscope itemtype="http://schema.org/TVSeries"><i class="fa fa-gamepad fix-icon"></i> <a href="/lets-play/{{ .data.LP.Slug.String}}/" itemprop="url"><span itemprop="name">{{ .data.LP.Name.String }}</span></a></h5> <h5 itemprop="partOfSeries" itemscope itemtype="http://schema.org/TVSeries"><i class="fa fa-gamepad fix-icon"></i> <a href="/lets-play/{{ .data.LP.Slug.String}}" itemprop="url"><span itemprop="name">{{ .data.LP.Name.String }}</span></a></h5>
<h5 itemprop="director" itemscope itemtype="http://schema.org/Person"><i class="fa fa-user fix-icon"></i> <a href="/zeige/{{ .data.AT.Slug.String }}/" itemprop="url"><span itemprop="name">{{ .data.AT.Name.String }}</span></a></h5> <h5 itemprop="director" itemscope itemtype="http://schema.org/Person"><i class="fa fa-user fix-icon"></i> <a href="/zeige/{{ .data.AT.Slug.String }}" itemprop="url"><span itemprop="name">{{ .data.AT.Name.String }}</span></a></h5>
<div itemprop="aggregateRating" itemscope itemtype="http://schema.org/AggregateRating"> <div itemprop="aggregateRating" itemscope itemtype="http://schema.org/AggregateRating">
<meta itemprop="bestRating" content="10" /> <meta itemprop="bestRating" content="10" />
<meta itemprop="worstRating" content="0" /> <meta itemprop="worstRating" content="0" />

View file

@ -10,7 +10,7 @@
</div> </div>
</div> </div>
<div class="small-12 medium-4 medium-pull-4 columns"> <div class="small-12 medium-4 medium-pull-4 columns">
<p><a href="http://addons.kodi.tv/show/plugin.video.gronkh.de/">Gronkh.DE in Kodi</a></p> <p><a href="http://addons.kodi.tv/show/plugin.video.gronkh.de/">Gronkh.de in Kodi</a></p>
</div> </div>
<div class="small-12 medium-4 columns"> <div class="small-12 medium-4 columns">
<p>Copyright © 2010 - 2015<br /><a href="http://www.gronkh.de/">gronkh.de</a> — Fair&nbsp;use</p> <p>Copyright © 2010 - 2015<br /><a href="http://www.gronkh.de/">gronkh.de</a> — Fair&nbsp;use</p>

View file

@ -47,9 +47,9 @@
</li> </li>
</ul> </ul>
<ul class="left"> <ul class="left">
<li {{ if eq .title "Let's Plays" }}class="active"{{ end }}><a href="/lets-play/">Let's Plays</a></li> <li {{ if eq .title "Let's Plays" }}class="active"{{ end }}><a href="/lets-play">Let's Plays</a></li>
<li {{ if eq .title "Let's Tests" }}class="active"{{ end }}><a href="/testet/">Let's Tests</a></li> <li {{ if eq .title "Let's Tests" }}class="active"{{ end }}><a href="/testet">Let's Tests</a></li>
<li {{ if eq .title "Sprecher" }}class="active"{{ end }}><a href="/zeige/">Sprecher</a></li> <li {{ if eq .title "Sprecher" }}class="active"{{ end }}><a href="/zeige">Sprecher</a></li>
</ul> </ul>
</section> </section>
</nav> </nav>

View file

@ -12,7 +12,7 @@
<ul class="small-block-grid-2 medium-block-grid-4 large-block-grid-5"> <ul class="small-block-grid-2 medium-block-grid-4 large-block-grid-5">
{{ range .data }} {{ range .data }}
<li itemscope itemtype="http://schema.org/Episode"> <li itemscope itemtype="http://schema.org/Episode">
<a class="th" href="/lets-play/{{ .LP.Slug.String }}/{{ .EP.Slug.String }}/" itemprop="url"> <a class="th" href="/lets-play/{{ .LP.Slug.String }}/{{ .EP.Slug.String }}" itemprop="url">
{{ if .EP.ThumbS.Valid }} {{ if .EP.ThumbS.Valid }}
<img alt="" src="{{ .EP.ThumbS.String }}" itemprop="thumbnailUrl" /> <img alt="" src="{{ .EP.ThumbS.String }}" itemprop="thumbnailUrl" />
{{ else }} {{ else }}
@ -20,11 +20,11 @@
{{ end }} {{ end }}
</a> </a>
<span itemprop="partOfSeries" itemscope itemtype="http://schema.org/TVSeries"> <span itemprop="partOfSeries" itemscope itemtype="http://schema.org/TVSeries">
<a href="/lets-play/{{ .LP.Slug.String }}/" itemprop="url"><strong itemprop="name">{{ .LP.Name.String }}</strong></a>: <a href="/lets-play/{{ .LP.Slug.String }}" itemprop="url"><strong itemprop="name">{{ .LP.Name.String }}</strong></a>:
</span> </span>
<br /><a href="/lets-play/{{ .LP.Slug.String }}/{{ .EP.Slug.String }}/"><span itemprop="name">{{ .EP.Name.String }}</span></a> <br /><a href="/lets-play/{{ .LP.Slug.String }}/{{ .EP.Slug.String }}"><span itemprop="name">{{ .EP.Name.String }}</span></a>
<span itemprop="director" itemscope itemtype="http://schema.org/Person"> <span itemprop="director" itemscope itemtype="http://schema.org/Person">
<br />von <a href="/zeige/{{ .AT.Slug.String }}/" itemprop="url"><span itemprop="name">{{ .AT.Name.String }}</span></a> <br />von <a href="/zeige/{{ .AT.Slug.String }}" itemprop="url"><span itemprop="name">{{ .AT.Name.String }}</span></a>
</span> </span>
</li> </li>
{{ end }} {{ end }}

View file

@ -6,7 +6,7 @@
<h1 id="lpName" class="small-12 columns" itemprop="name">{{ .data.LP.Name.String }}</h1> <h1 id="lpName" class="small-12 columns" itemprop="name">{{ .data.LP.Name.String }}</h1>
<div class="medium-3 large-2 columns"> <div class="medium-3 large-2 columns">
{{ if .data.LP.PosterB.Valid }}<a class="th show-for-medium-up" href="{{ .data.LP.PosterB.String }}" data-reveal-id="coverModal">{{ end }}<img alt="" src="{{ .data.LP.PosterS.String }}" itemprop="thumbnailUrl" />{{ if .data.LP.PosterB.Valid }}</a>{{ end }} {{ if .data.LP.PosterB.Valid }}<a class="th show-for-medium-up" href="{{ .data.LP.PosterB.String }}" data-reveal-id="coverModal">{{ end }}<img alt="" src="{{ .data.LP.PosterS.String }}" itemprop="thumbnailUrl" />{{ if .data.LP.PosterB.Valid }}</a>{{ end }}
<h5 itemprop="director" itemscope itemtype="http://schema.org/Person"><i class="fa fa-user fix-icon"></i> <a href="/zeige/{{ .data.AT.Slug.String }}/" itemprop="url"><span itemprop="name">{{ .data.AT.Name.String }}</span></a></h5> <h5 itemprop="director" itemscope itemtype="http://schema.org/Person"><i class="fa fa-user fix-icon"></i> <a href="/zeige/{{ .data.AT.Slug.String }}" itemprop="url"><span itemprop="name">{{ .data.AT.Name.String }}</span></a></h5>
</div> </div>
<div class="small-12 medium-9 large-10 columns"> <div class="small-12 medium-9 large-10 columns">
<ul class="breadcrumbs" itemscope itemtype="http://schema.org/BreadcrumbList"> <ul class="breadcrumbs" itemscope itemtype="http://schema.org/BreadcrumbList">

View file

@ -9,7 +9,7 @@
<iframe width="213" height="120" src="//www.youtube.com/embed/{{ .data.LT.Youtube.String }}" frameborder="0" allowfullscreen></iframe> <iframe width="213" height="120" src="//www.youtube.com/embed/{{ .data.LT.Youtube.String }}" frameborder="0" allowfullscreen></iframe>
</div> </div>
<div class="medium-3 medium-push-9 columns"> <div class="medium-3 medium-push-9 columns">
<h5 itemprop="director" itemscope itemtype="http://schema.org/Person"><i class="fa fa-user fix-icon"></i> <a href="/zeige/{{ .data.AT.Slug.String }}/" itemprop="url"><span itemprop="name">{{ .data.AT.Name.String }}</span></a></h5> <h5 itemprop="director" itemscope itemtype="http://schema.org/Person"><i class="fa fa-user fix-icon"></i> <a href="/zeige/{{ .data.AT.Slug.String }}" itemprop="url"><span itemprop="name">{{ .data.AT.Name.String }}</span></a></h5>
<div itemprop="aggregateRating" itemscope itemtype="http://schema.org/AggregateRating"> <div itemprop="aggregateRating" itemscope itemtype="http://schema.org/AggregateRating">
<meta itemprop="bestRating" content="10" /> <meta itemprop="bestRating" content="10" />
<meta itemprop="worstRating" content="0" /> <meta itemprop="worstRating" content="0" />

View file

@ -124,6 +124,68 @@ func GetAt(c *gin.Context) {
} }
} }
func GetAtLps(c *gin.Context) {
if aslug, ok := CleanParam(c.Param("aslug")); ok {
var AT database.Author
if database.Db.Where("slug = ?", aslug).First(&AT).Error == nil {
var LPs []database.LetsPlay
database.Db.Model(&AT).Where("aired IS NOT NULL").Order("name asc").Related(&LPs)
var data []gin.H
for _, LP := range LPs {
data = append(data, gin.H{"LP": LP})
}
c.HTML(http.StatusOK, "alps.html", gin.H{
"title": "Let's Plays von " + AT.Name.String,
"AT": AT,
"data": data,
"page": "ats",
})
}
}
}
func GetAtLts(c *gin.Context) {
if aslug, ok := CleanParam(c.Param("aslug")); ok {
var AT database.Author
if database.Db.Where("slug = ?", aslug).First(&AT).Error == nil {
var LTs []database.LetsTest
database.Db.Model(&AT).Where("aired IS NOT NULL").Order("name asc").Related(&LTs)
var data []gin.H
for _, LT := range LTs {
data = append(data, gin.H{"LT": LT})
}
c.HTML(http.StatusOK, "alts.html", gin.H{
"title": "Let's Tests von " + AT.Name.String,
"AT": AT,
"data": data,
"page": "ats",
})
}
}
}
func GetAtEps(c *gin.Context) {
if aslug, ok := CleanParam(c.Param("aslug")); ok {
var AT database.Author
if database.Db.Where("slug = ?", aslug).First(&AT).Error == nil {
var EPs []database.Episode
database.Db.Model(&AT).Where("aired IS NOT NULL").Order("aired desc").Related(&EPs)
var data []gin.H
for _, EP := range EPs {
var LP database.LetsPlay
database.Db.Model(&EP).Related(&LP)
data = append(data, gin.H{"EP" : EP, "LP" : LP})
}
c.HTML(http.StatusOK, "aeps.html", gin.H{
"title": "Episoden von " + AT.Name.String,
"AT": AT,
"data": data,
"page": "ats",
})
}
}
}
func GetLEpisode(c *gin.Context) { func GetLEpisode(c *gin.Context) {
if lslug, ok := CleanParam(c.Param("lslug")); ok { if lslug, ok := CleanParam(c.Param("lslug")); ok {
//LP in URL //LP in URL