inital setup
This commit is contained in:
		
							
								
								
									
										8
									
								
								layouts/shortcodes/collapse.html
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										8
									
								
								layouts/shortcodes/collapse.html
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,8 @@ | ||||
| {{ if .Get "summary" }} | ||||
| {{ else }} | ||||
| {{ warnf "missing value for param 'summary': %s" .Position }} | ||||
| {{ end }} | ||||
| <p><details {{ if (eq (.Get "openByDefault") true) }} open=true {{ end }}> | ||||
|   <summary markdown="span">{{ .Get "summary" | markdownify }}</summary> | ||||
|   {{ .Inner | markdownify }} | ||||
| </details></p> | ||||
							
								
								
									
										31
									
								
								layouts/shortcodes/figure.html
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										31
									
								
								layouts/shortcodes/figure.html
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,31 @@ | ||||
| <figure{{ if or (.Get "class") (eq (.Get "align") "center") }} class=" | ||||
|            {{- if eq (.Get "align") "center" }}align-center {{ end }} | ||||
|            {{- with .Get "class" }}{{ . }}{{- end }}" | ||||
| {{- end -}}> | ||||
|     {{- if .Get "link" -}} | ||||
|         <a href="{{ .Get "link" }}"{{ with .Get "target" }} target="{{ . }}"{{ end }}{{ with .Get "rel" }} rel="{{ . }}"{{ end }}> | ||||
|     {{- end }} | ||||
|     <img loading="lazy" src="{{ .Get "src" }}{{- if eq (.Get "align") "center" }}#center{{- end }}" | ||||
|          {{- if or (.Get "alt") (.Get "caption") }} | ||||
|          alt="{{ with .Get "alt" }}{{ . }}{{ else }}{{ .Get "caption" | markdownify| plainify }}{{ end }}" | ||||
|          {{- end -}} | ||||
|          {{- with .Get "width" }} width="{{ . }}"{{ end -}} | ||||
|          {{- with .Get "height" }} height="{{ . }}"{{ end -}} | ||||
|     /> <!-- Closing img tag --> | ||||
|     {{- if .Get "link" }}</a>{{ end -}} | ||||
|     {{- if or (or (.Get "title") (.Get "caption")) (.Get "attr") -}} | ||||
|         <figcaption> | ||||
|             {{ with (.Get "title") -}} | ||||
|                 {{ . }} | ||||
|             {{- end -}} | ||||
|             {{- if or (.Get "caption") (.Get "attr") -}}<p> | ||||
|                 {{- .Get "caption" | markdownify -}} | ||||
|                 {{- with .Get "attrlink" }} | ||||
|                     <a href="{{ . }}"> | ||||
|                 {{- end -}} | ||||
|                 {{- .Get "attr" | markdownify -}} | ||||
|                 {{- if .Get "attrlink" }}</a>{{ end }}</p> | ||||
|             {{- end }} | ||||
|         </figcaption> | ||||
|     {{- end }} | ||||
| </figure> | ||||
							
								
								
									
										5
									
								
								layouts/shortcodes/inTextImg.html
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										5
									
								
								layouts/shortcodes/inTextImg.html
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,5 @@ | ||||
| {{- $Img := (.Get "url") }} | ||||
| {{- $height := (.Get "height") }} | ||||
| {{- $alt := (.Get "alt") }} | ||||
|  | ||||
| <img class="in-text" height="{{ $height | default `15` }}" src="{{$Img}}" alt="{{$alt}}"> | ||||
							
								
								
									
										15
									
								
								layouts/shortcodes/ltr.html
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										15
									
								
								layouts/shortcodes/ltr.html
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,15 @@ | ||||
| {{ $.Scratch.Set "md" false }} | ||||
|  | ||||
| {{ if .IsNamedParams }} | ||||
| {{ $.Scratch.Set "md" (.Get "md") }} | ||||
| {{ else }} | ||||
| {{ $.Scratch.Set "md" (.Get 0) }} | ||||
| {{ end }} | ||||
|  | ||||
| <div dir="ltr"> | ||||
|   {{ if eq ($.Scratch.Get "md") false }} | ||||
|     {{ .Inner }} | ||||
|   {{ else }} | ||||
|     {{ .Inner | markdownify }} | ||||
|   {{ end }} | ||||
| </div> | ||||
							
								
								
									
										2
									
								
								layouts/shortcodes/rawhtml.html
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										2
									
								
								layouts/shortcodes/rawhtml.html
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,2 @@ | ||||
| <!-- raw html --> | ||||
| {{- .Inner -}} | ||||
							
								
								
									
										15
									
								
								layouts/shortcodes/rtl.html
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										15
									
								
								layouts/shortcodes/rtl.html
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,15 @@ | ||||
| {{ $.Scratch.Set "md" false }} | ||||
|  | ||||
| {{ if .IsNamedParams }} | ||||
| {{ $.Scratch.Set "md" (.Get "md") }} | ||||
| {{ else }} | ||||
| {{ $.Scratch.Set "md" (.Get 0) }} | ||||
| {{ end }} | ||||
|  | ||||
| <div dir="rtl"> | ||||
|   {{ if eq ($.Scratch.Get "md") false }} | ||||
|     {{ .Inner }} | ||||
|   {{ else }} | ||||
|     {{ .Inner | markdownify }} | ||||
|   {{ end }} | ||||
| </div> | ||||
		Reference in New Issue
	
	Block a user