From c772716e98e11181d301deadeca52856ac18f085 Mon Sep 17 00:00:00 2001 From: Feuerfuchs Date: Mon, 18 May 2020 18:51:19 +0200 Subject: Improved Gemini support --- internal/port/tpl/gemini.html | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'internal/port/tpl/gemini.html') 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 @@ {{- else if eq .Type "REFLOW_TEXT" -}}

{{- .Text -}}

{{- else if eq .Type "LINK" -}} -
=>{{- .Text -}}
+ {{- $linkCls := "link" -}} + {{- $url := string .URL -}} + {{- if or (hasSuffix $url ".jpg") (hasSuffix $url ".jpeg") (hasSuffix $url ".png") (hasSuffix $url ".gif") -}} + {{- $linkCls = "link--IMG" -}} + {{- end -}} +
=>{{- .Text -}}
{{- else if eq .Type "HEADING_1" -}} -
#

{{- .Text -}}

+
#

{{- .Text -}}

{{- else if eq .Type "HEADING_2" -}} -
##

{{- .Text -}}

+
##

{{- .Text -}}

{{- else if eq .Type "HEADING_3" -}}
###

{{- .Text -}}

{{- else if eq .Type "LIST" -}} -- cgit v1.2.3-70-g09d2