mirror of
				https://github.com/yanislav-igonin/micrach
				synced 2025-11-04 02:27:02 +03:00 
			
		
		
		
	feat: header component
This commit is contained in:
		
							parent
							
								
									21c82b47e9
								
							
						
					
					
						commit
						2809a418a2
					
				
							
								
								
									
										17
									
								
								templates/header.html
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										17
									
								
								templates/header.html
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,17 @@
 | 
			
		||||
{{ define "header" }}
 | 
			
		||||
 | 
			
		||||
{{ if . }}
 | 
			
		||||
<a href="/" class="thread-title-link">
 | 
			
		||||
  <h1 class="display-1 text-center thread-title">
 | 
			
		||||
    {{ if ne . "" }}
 | 
			
		||||
    {{ . }}
 | 
			
		||||
    {{ else }}
 | 
			
		||||
    Welcome to Micrach
 | 
			
		||||
    {{ end }}
 | 
			
		||||
  </h1>
 | 
			
		||||
</a>
 | 
			
		||||
{{ else }}
 | 
			
		||||
<h1 class="display-1 text-center">Welcome to Micrach</h1>
 | 
			
		||||
{{ end }}
 | 
			
		||||
 | 
			
		||||
{{ end }}
 | 
			
		||||
@ -8,7 +8,7 @@
 | 
			
		||||
</head>
 | 
			
		||||
 | 
			
		||||
<body>
 | 
			
		||||
  <h1 class="display-1 text-center">Welcome to Micrach</h1>
 | 
			
		||||
  {{ template "header" }}
 | 
			
		||||
 | 
			
		||||
  <div class="container">
 | 
			
		||||
    {{ template "post-form" .FormData }}
 | 
			
		||||
 | 
			
		||||
@ -11,15 +11,7 @@
 | 
			
		||||
</head>
 | 
			
		||||
 | 
			
		||||
<body>
 | 
			
		||||
  <a href="/" class="thread-title-link">
 | 
			
		||||
    <h1 class="display-1 text-center thread-title">
 | 
			
		||||
      {{ if ne $FirstPost.Title "" }}
 | 
			
		||||
      {{$FirstPost.Title}}
 | 
			
		||||
      {{ else }}
 | 
			
		||||
      Welcome to Micrach
 | 
			
		||||
      {{ end }}
 | 
			
		||||
    </h1>
 | 
			
		||||
  </a>
 | 
			
		||||
  {{ template "header" $FirstPost.Title }}
 | 
			
		||||
 | 
			
		||||
  <div class="container">
 | 
			
		||||
    {{ template "post-form" .FormData }}
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user