12 changed files with 1687 additions and 135 deletions
@ -1,5 +1,8 @@ |
|||||||
{ |
{ |
||||||
"dependencies": { |
"dependencies": { |
||||||
"gc-parser": "git+https://git.imwald.eu/silberengel/gc-parser.git" |
"gc-parser": "git+https://git.imwald.eu/silberengel/gc-parser.git" |
||||||
|
}, |
||||||
|
"devDependencies": { |
||||||
|
"highlight.js": "^11.11.1" |
||||||
} |
} |
||||||
} |
} |
||||||
|
|||||||
@ -0,0 +1,10 @@ |
|||||||
|
pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}/*! |
||||||
|
Theme: GitHub Dark |
||||||
|
Description: Dark theme as seen on github.com |
||||||
|
Author: github.com |
||||||
|
Maintainer: @Hirse |
||||||
|
Updated: 2021-05-15 |
||||||
|
|
||||||
|
Outdated base version: https://github.com/primer/github-syntax-dark |
||||||
|
Current colors taken from GitHub's CSS |
||||||
|
*/.hljs{color:#c9d1d9;background:#0d1117}.hljs-doctag,.hljs-keyword,.hljs-meta .hljs-keyword,.hljs-template-tag,.hljs-template-variable,.hljs-type,.hljs-variable.language_{color:#ff7b72}.hljs-title,.hljs-title.class_,.hljs-title.class_.inherited__,.hljs-title.function_{color:#d2a8ff}.hljs-attr,.hljs-attribute,.hljs-literal,.hljs-meta,.hljs-number,.hljs-operator,.hljs-selector-attr,.hljs-selector-class,.hljs-selector-id,.hljs-variable{color:#79c0ff}.hljs-meta .hljs-string,.hljs-regexp,.hljs-string{color:#a5d6ff}.hljs-built_in,.hljs-symbol{color:#ffa657}.hljs-code,.hljs-comment,.hljs-formula{color:#8b949e}.hljs-name,.hljs-quote,.hljs-selector-pseudo,.hljs-selector-tag{color:#7ee787}.hljs-subst{color:#c9d1d9}.hljs-section{color:#1f6feb;font-weight:700}.hljs-bullet{color:#f2cc60}.hljs-emphasis{color:#c9d1d9;font-style:italic}.hljs-strong{color:#c9d1d9;font-weight:700}.hljs-addition{color:#aff5b4;background-color:#033a16}.hljs-deletion{color:#ffdcd7;background-color:#67060c} |
||||||
File diff suppressed because one or more lines are too long
@ -0,0 +1,68 @@ |
|||||||
|
{{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 */}} |
||||||
Loading…
Reference in new issue