Template:HTML:Element Navigation

<%

    // Parameter : none
    // Live (Bottom of page) : https://developer.mozilla.org/en-US/docs/Web/HTML/Element/base

%><table class="HTMLElmNav">
    <thead>
		<tr>
			<th><%
var loc = env.locale,
    base = "/" + loc + "/docs/",
    ABC = "ABCDEFGHIJKLMNOPQRSTUVWXYZ".split("") /* this is Array ! */ ,
    ABC_len = ABC.length,
    words = [],
    lastPathToHTMLElementPage = "/Element";


/*	=	=	=	=	=	=	Localize =	=	=	=	=	=	=	=	=	*/
switch(loc) {
	case "ja" :
		words = [ "HTML 要素", "クイックリンク:", "HTML カテゴリ" ];
		break;
	case "de" :
		words = [ "HTML Elemente", "Links:", "HTML-Kategorie" ];
		break;
	case "es" :
		words = [ "Elementos HTML", "Enlaces rápidos:", "Categoría HTML" ];
		lastPathToHTMLElementPage = "/Elemento";
		break;
	case "fr" :
		words = [ "Éléments HTML", "Liens rapides :", "Catégorie HTML" ];
		break;
	case "pl" :
		words = [ "Element HTML", "Zobacz także:", "Kategoria HTML" ];
		break;
	case "ru" :
		words = [ "Элементы HTML", "Быстрые ссылки:", "HTML Category" ];
		break;
	case "zh-CN" :
		words = [ "HTML元素", "快速链接", "HTML Category" ];
		break;
	case "zh-TW" :
		words = [ "HTML 元素", "快速鏈接:", "HTML元素" ];
		/* URL是錯的? 如果是這樣,嘗試刪除註釋掉這裡. 祝你好運 ! */
		/* lastPathToHTMLElementPage = "_元素"; */
		break;
	default :
		words = [ "HTML Elements", "Quick Links", "HTML Category" ];
		break;
}
/*	=	=	=	=	=	=	=	=	=	=	=	=	=	=	=	=	=	*/


var newSlug = ( loc === "en-US" || loc === "ja" || loc === "fr") ?  "Web/" : "";


%><a href="<%- base %><%- newSlug %>HTML<%= lastPathToHTMLElementPage %>"><%= words[0] %></a></th>
		</tr>
	</thead>
	<tbody>
		<tr>
			<td><%
	for(var i = 0; i < ABC_len; ++i) {
		%><a href="<%- base %><%- newSlug %>HTML<%= lastPathToHTMLElementPage %>#<%= ABC[i] %>"><%= ABC[i] %></a>&nbsp;<%
	} %></td>
			</tr>
			<tr>
				<td>(<%= words[1] %> <a href="<%- base %>tag/HTML"><%= words[2] %></a>)</td>
			</tr>
	</tbody>
</table>
Search for pages that use Template:HTML:Element Navigation to see example use cases and how many pages use this macro.

Document Tags and Contributors

Tags:
Last updated by: ethertank,