mirror of
				https://github.com/BBaoVanC/bobatheme.git
				synced 2025-10-30 17:53:28 -05:00 
			
		
		
		
	Improve date element in page metadata
This commit is contained in:
		| @@ -19,9 +19,6 @@ copy_to_clipboard: | ||||
|  | ||||
|  | ||||
| # Meta items | ||||
| long_date: | ||||
|   other: "{{ .Date.Format `January 2, 2006` }}" | ||||
|  | ||||
| wordcount: | ||||
|   one: "{{ . }} word" | ||||
|   other: "{{ . }} words" | ||||
|   | ||||
| @@ -3,9 +3,7 @@ | ||||
|         {{ if .Date }} | ||||
|             <span class="page-metadata-item" aria-label="{{ i18n "aria_post_meta_date" }}"> | ||||
|                 {{ partial "icon.html" "calendar" }} | ||||
|                 <time datetime="{{ .Date.Format "2006-01-02" }}" pubdate> | ||||
|                     {{ i18n "long_date" (dict "Date" .Date "Data" .Site.Data) }} | ||||
|                 </time> | ||||
|                 {{ partial "time-element.html" .Date }} | ||||
|             </span> | ||||
|  | ||||
|             {{/* TODO: make this be a tooltip */}} | ||||
| @@ -13,9 +11,7 @@ | ||||
|             {{ if ne (time.Format "2006-01-02" .Lastmod) (time.Format "2006-01-02" .Date) }} | ||||
|                 <span class="page-metadata-item" aria-label="{{ i18n "aria_post_meta_modified_date" }}"> | ||||
|                     {{ partial "icon.html" "pencil" }} | ||||
|                     <time datetime="{{ .Lastmod.Format "2006-01-02" }}" pubdate> | ||||
|                         {{ i18n "long_date" (dict "Date" .Lastmod "Data" .Site.Data) }} | ||||
|                     </time> | ||||
|                     {{ partial "time-element.html" .Lastmod }} | ||||
|                     {{ end }} | ||||
|                 </span> | ||||
|             */}} | ||||
|   | ||||
| @@ -3,9 +3,7 @@ | ||||
|         {{ if .Date }} | ||||
|             <span class="page-metadata-item" aria-label="date"> | ||||
|                 {{ partial "icon.html" "calendar" }} | ||||
|                 <time datetime="{{ .Date.Format "2006-01-02" }}" pubdate> | ||||
|                     {{ i18n "long_date" (dict "Date" .Date "Data" .Site.Data) }} | ||||
|                 </time> | ||||
|                 {{ partial "time-element.html" .Date }} | ||||
|             </span> | ||||
|         {{ end }} | ||||
|  | ||||
|   | ||||
							
								
								
									
										3
									
								
								layouts/partials/time-element.html
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										3
									
								
								layouts/partials/time-element.html
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,3 @@ | ||||
| <time datetime="{{ .Format "2006-01-02T15:04:05Z07:00" }}" title="{{ . }}"> | ||||
|     {{ .Format "January 2, 2006" }} | ||||
| </time> | ||||
		Reference in New Issue
	
	Block a user