mirror of
				https://github.com/ItsDrike/itsdrike.com.git
				synced 2025-11-03 19:56:36 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			25 lines
		
	
	
	
		
			635 B
		
	
	
	
		
			HTML
		
	
	
	
	
	
			
		
		
	
	
			25 lines
		
	
	
	
		
			635 B
		
	
	
	
		
			HTML
		
	
	
	
	
	
<h1 class="display-4">{{ .Title }}</h1>
 | 
						|
{{ if .Params.subtitle }}
 | 
						|
  <h5 class="my-3">{{ markdownify .Params.subtitle | emojify }}</h5>
 | 
						|
{{ end }}
 | 
						|
 | 
						|
{{ if .IsPage }}
 | 
						|
  <p>{{ partial "content-details.html" . }}</p>
 | 
						|
{{ end }}
 | 
						|
 | 
						|
{{ if .Content }}
 | 
						|
  <hr>
 | 
						|
 | 
						|
  <div class="content mt-3">
 | 
						|
    {{ if .TableOfContents }}
 | 
						|
      <!-- Get the amount of headers using regex -->
 | 
						|
      {{ $headers := findRE "<h[1-6].*?>(.|\n])+?</h[1-6]>" .Content }}
 | 
						|
      {{ if ge (len $headers) 4 }}
 | 
						|
        <div class="float-lg-end ml-lg-3 mb-3 p-3">
 | 
						|
          {{ .TableOfContents }}
 | 
						|
        </div>
 | 
						|
      {{ end }}
 | 
						|
    {{ end }}
 | 
						|
    {{ .Content }}
 | 
						|
  </div>
 | 
						|
{{ end }}
 |