You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

68 lines
2.9 KiB

{{define "content"}}
<article class="events-page">
<section class="hero">
<div class="hero-content">
<div class="hero-text">
<h1>Events: {{.DTag}}</h1>
<p class="lead">Found {{len .EventCards}} event{{if ne (len .EventCards) 1}}s{{end}} with this d-tag</p>
</div>
</div>
</section>
<section class="events-grid">
{{if .EventCards}}
<div class="events-container">
{{range .EventCards}}
<div class="event-card">
<a href="{{.URL}}" class="event-card-link">
{{if and .Image (ne .Image "")}}
<div class="event-card-image">
<img src="{{.Image}}" alt="{{.Title}}" />
</div>
{{end}}
<div class="event-card-content">
<div class="event-card-header">
<h3 class="event-card-title">{{.Title}}</h3>
<span class="event-card-kind">
{{if eq .Kind 30818}}
<span class="icon-inline">{{icon "book-open"}}</span> Wiki
{{else if eq .Kind 30041}}
<span class="icon-inline">{{icon "file-text"}}</span> Blog
{{else if eq .Kind 30023}}
<span class="icon-inline">{{icon "file-text"}}</span> Article
{{else}}
<span class="icon-inline">{{icon "file"}}</span> Kind {{.Kind}}
{{end}}
</span>
</div>
{{if .Summary}}
<p class="event-card-summary">{{truncate .Summary 200}}</p>
{{end}}
<div class="event-card-meta">
{{if .Author}}
<span class="event-card-author">
<span class="icon-inline">{{icon "user"}}</span>
{{template "user-badge-simple" (dict "Pubkey" .Author "Profiles" $.Profiles)}}
</span>
{{end}}
{{if .Time}}
<span class="event-card-date">
<span class="icon-inline">{{icon "clock"}}</span> {{.Time}}
</span>
{{end}}
</div>
</div>
</a>
</div>
{{end}}
</div>
{{else}}
<div class="empty-state">
<p><span class="icon-inline">{{icon "inbox"}}</span> No events found with d-tag: {{.DTag}}</p>
</div>
{{end}}
</section>
</article>
{{end}}
{{/* Feed is defined in components.html */}}