mirror of
				https://codeberg.org/forgejo/forgejo.git
				synced 2025-10-31 06:21:11 +00:00 
			
		
		
		
	Use data-tooltip-content for tippy tooltip (#23649)
Follow: * #23574 * Remove all ".tooltip[data-content=...]" Major changes: * Remove "tooltip" class, use "[data-tooltip-content=...]" instead of ".tooltip[data-content=...]" * Remove legacy `data-position`, it's dead code since last Fomantic Tooltip -> Tippy Tooltip refactoring * Rename reaction attribute from `data-content` to `data-reaction-content` * Add comments for some `data-content`: `{{/* used by the form */}}` * Remove empty "ui" class * Use "text color" for SVG icons (a few)
This commit is contained in:
		
					parent
					
						
							
								87f0f7e670
							
						
					
				
			
			
				commit
				
					
						8d5fbeb7a2
					
				
			
		
					 77 changed files with 209 additions and 228 deletions
				
			
		|  | @ -233,7 +233,7 @@ func TimeSince(then time.Time, lang translation.Locale) template.HTML { | |||
| } | ||||
| 
 | ||||
| func htmlTimeSince(then, now time.Time, lang translation.Locale) template.HTML { | ||||
| 	return template.HTML(fmt.Sprintf(`<span class="time-since tooltip" data-content="%s" data-tooltip-interactive="true">%s</span>`, | ||||
| 	return template.HTML(fmt.Sprintf(`<span class="time-since" data-tooltip-content="%s" data-tooltip-interactive="true">%s</span>`, | ||||
| 		then.In(setting.DefaultUILocation).Format(GetTimeFormat(lang.Language())), | ||||
| 		timeSince(then, now, lang))) | ||||
| } | ||||
|  | @ -244,7 +244,7 @@ func TimeSinceUnix(then TimeStamp, lang translation.Locale) template.HTML { | |||
| } | ||||
| 
 | ||||
| func htmlTimeSinceUnix(then, now TimeStamp, lang translation.Locale) template.HTML { | ||||
| 	return template.HTML(fmt.Sprintf(`<span class="time-since tooltip" data-content="%s" data-tooltip-interactive="true">%s</span>`, | ||||
| 	return template.HTML(fmt.Sprintf(`<span class="time-since" data-tooltip-content="%s" data-tooltip-interactive="true">%s</span>`, | ||||
| 		then.FormatInLocation(GetTimeFormat(lang.Language()), setting.DefaultUILocation), | ||||
| 		timeSinceUnix(int64(then), int64(now), lang))) | ||||
| } | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue