mirror of
				https://github.com/Wonderfall/hugo-WonderMod.git
				synced 2025-10-30 19:35:26 +01:00 
			
		
		
		
	Mark External link with an SVG icon
in profile-mode buttons and Menu
This commit is contained in:
		| @@ -131,6 +131,14 @@ | ||||
|                         {{- .Name -}} | ||||
|                         {{ .Post -}} | ||||
|                     </span> | ||||
|                     {{- if (findRE "://" .URL) }} | ||||
|                     <svg fill="none" shape-rendering="geometricPrecision" stroke="currentColor" stroke-linecap="round" | ||||
|                         stroke-linejoin="round" stroke-width="2.5" viewBox="0 0 24 24" height="12" width="12"> | ||||
|                         <path d="M18 13v6a2 2 0 01-2 2H5a2 2 0 01-2-2V8a2 2 0 012-2h6"></path> | ||||
|                         <path d="M15 3h6v6"></path> | ||||
|                         <path d="M10 14L21 3"></path> | ||||
|                     </svg> | ||||
|                     {{- end }} | ||||
|                 </a> | ||||
|             </li> | ||||
|             {{- end }} | ||||
|   | ||||
| @@ -35,7 +35,17 @@ | ||||
|         <div class="buttons"> | ||||
|             {{- range . }} | ||||
|             <a class="button" href="{{ trim .url " " }}" rel="noopener" title="{{ .name }}"> | ||||
|                 <span class="button-inner">{{ .name }}</span> | ||||
|                 <span class="button-inner"> | ||||
|                     {{ .name }} | ||||
|                     {{- if (findRE "://" .url) }} | ||||
|                     <svg fill="none" shape-rendering="geometricPrecision" stroke="currentColor" stroke-linecap="round" | ||||
|                         stroke-linejoin="round" stroke-width="2.5" viewBox="0 0 24 24" height="14" width="14"> | ||||
|                         <path d="M18 13v6a2 2 0 01-2 2H5a2 2 0 01-2-2V8a2 2 0 012-2h6"></path> | ||||
|                         <path d="M15 3h6v6"></path> | ||||
|                         <path d="M10 14L21 3"></path> | ||||
|                     </svg> | ||||
|                     {{- end }} | ||||
|                 </span> | ||||
|             </a> | ||||
|             {{- end }} | ||||
|         </div> | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Aditya Telange
					Aditya Telange