aboutsummaryrefslogtreecommitdiffstats
path: root/internal/port/tpl/gemini.html
diff options
context:
space:
mode:
authorFeuerfuchs <git@feuerfuchs.dev>2020-05-18 18:51:19 +0200
committerFeuerfuchs <git@feuerfuchs.dev>2020-05-18 18:51:19 +0200
commitc772716e98e11181d301deadeca52856ac18f085 (patch)
tree25039bd7739039c000ab748b1547b5e5514d0b7a /internal/port/tpl/gemini.html
parentWIP: Refactoring (diff)
downloadgopherproxy-c772716e98e11181d301deadeca52856ac18f085.tar.gz
gopherproxy-c772716e98e11181d301deadeca52856ac18f085.tar.bz2
gopherproxy-c772716e98e11181d301deadeca52856ac18f085.zip
Improved Gemini support
Diffstat (limited to 'internal/port/tpl/gemini.html')
-rw-r--r--internal/port/tpl/gemini.html11
1 files changed, 8 insertions, 3 deletions
diff --git a/internal/port/tpl/gemini.html b/internal/port/tpl/gemini.html
index df50d50..8d20da1 100644
--- a/internal/port/tpl/gemini.html
+++ b/internal/port/tpl/gemini.html
@@ -35,11 +35,16 @@
35 {{- else if eq .Type "REFLOW_TEXT" -}} 35 {{- else if eq .Type "REFLOW_TEXT" -}}
36 <div class="section"><p class="section__content">{{- .Text -}}</p></div> 36 <div class="section"><p class="section__content">{{- .Text -}}</p></div>
37 {{- else if eq .Type "LINK" -}} 37 {{- else if eq .Type "LINK" -}}
38 <div class="section"><span class="section__type">=></span><a class="section__content" href="{{ .URL }}">{{- .Text -}}</a></div> 38 {{- $linkCls := "link" -}}
39 {{- $url := string .URL -}}
40 {{- if or (hasSuffix $url ".jpg") (hasSuffix $url ".jpeg") (hasSuffix $url ".png") (hasSuffix $url ".gif") -}}
41 {{- $linkCls = "link--IMG" -}}
42 {{- end -}}
43 <div class="section"><span class="section__type"> =></span><a class="section__content {{ $linkCls }}" href="{{ .URL }}">{{- .Text -}}</a></div>
39 {{- else if eq .Type "HEADING_1" -}} 44 {{- else if eq .Type "HEADING_1" -}}
40 <div class="section"><span class="section__type">#</span><h1 class="section__content">{{- .Text -}}</h1></div> 45 <div class="section"><span class="section__type"> #</span><h1 class="section__content">{{- .Text -}}</h1></div>
41 {{- else if eq .Type "HEADING_2" -}} 46 {{- else if eq .Type "HEADING_2" -}}
42 <div class="section"><span class="section__type">##</span><h2 class="section__content">{{- .Text -}}</h2></div> 47 <div class="section"><span class="section__type"> ##</span><h2 class="section__content">{{- .Text -}}</h2></div>
43 {{- else if eq .Type "HEADING_3" -}} 48 {{- else if eq .Type "HEADING_3" -}}
44 <div class="section"><span class="section__type">###</span><h3 class="section__content">{{- .Text -}}</h3></div> 49 <div class="section"><span class="section__type">###</span><h3 class="section__content">{{- .Text -}}</h3></div>
45 {{- else if eq .Type "LIST" -}} 50 {{- else if eq .Type "LIST" -}}