mirror of
				https://github.com/yanislav-igonin/micrach
				synced 2025-11-04 02:27:02 +03:00 
			
		
		
		
	
		
			
				
	
	
		
			48 lines
		
	
	
		
			1.2 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
			
		
		
	
	
			48 lines
		
	
	
		
			1.2 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
{{ $FirstPost:= index .Thread 0 }}
 | 
						||
 | 
						||
<!DOCTYPE html>
 | 
						||
<html lang="en">
 | 
						||
 | 
						||
<head>
 | 
						||
  {{ template "static" }}
 | 
						||
  {{ template "meta-tags-dynamic" $FirstPost }}
 | 
						||
  <link href="/static/styles/thread.css" rel="stylesheet">
 | 
						||
  <link href="/static/styles/post.css" rel="stylesheet">
 | 
						||
</head>
 | 
						||
 | 
						||
<body>
 | 
						||
  {{ template "header" $FirstPost.Title }}
 | 
						||
 | 
						||
  <div class="container">
 | 
						||
    {{ template "post-form" .FormData }}
 | 
						||
    
 | 
						||
    <div id="postsСontainer">
 | 
						||
      {{ range $Post := .Thread }}
 | 
						||
      <div class="post-container mb-4">
 | 
						||
 | 
						||
        {{ $filesLength := len $Post.Files }}
 | 
						||
        {{ if gt $filesLength 0 }}
 | 
						||
        <div class="files-container">
 | 
						||
          {{ range $File := $Post.Files }}
 | 
						||
          <div class="file-container">
 | 
						||
            <a href="/uploads/{{$FirstPost.ID}}/o/{{$File.ID}}.{{$File.Ext}}" target="blank">
 | 
						||
              <img src="/uploads/{{$FirstPost.ID}}/t/{{$File.ID}}.{{$File.Ext}}" class="file" alt="Uploaded picture">
 | 
						||
            </a>
 | 
						||
          </div>
 | 
						||
          {{ end }}
 | 
						||
        </div>
 | 
						||
        {{ end }}
 | 
						||
 | 
						||
        <div class="p-2">
 | 
						||
          <p class="card-text line-break text-break">{{$Post.Text}}</p>
 | 
						||
        </div>
 | 
						||
 | 
						||
      </div>
 | 
						||
      {{end}}
 | 
						||
    </div>
 | 
						||
  </div>
 | 
						||
 | 
						||
  {{ template "footer" }}
 | 
						||
</body>
 | 
						||
 | 
						||
</html> |