color: #ccc;
height: 1px;
}
+
+.tab {
+ overflow: hidden;
+ border: 1px solid #ccc;
+ background-color: #f1f1f1;
+}
+
+.tab button {
+ background-color: inherit;
+ float: left;
+ border: none;
+ outline: none;
+ cursor: pointer;
+ padding: 14px 16px;
+ transition: 0.3s;
+}
+
+.tab button:hover {
+ background-color: #ddd;
+}
+
+.tab button.active {
+ background-color: #ccc;
+}
+
+.tabcontent {
+ display: none;
+ padding: 6px 12px;
+ border: 1px solid #ccc;
+ border-top: none;
+}
--- /dev/null
+function openTab(evt, tabName) {
+
+ var i, tabcontent, tablinks;
+
+ tabcontent = document.getElementsByClassName("tabcontent");
+ for (i = 0; i < tabcontent.length; i++) {
+ tabcontent[i].style.display = "none";
+ }
+
+ tablinks = document.getElementsByClassName("tablinks");
+ for (i = 0; i < tablinks.length; i++) {
+ tablinks[i].className = tablinks[i].className.replace(" active", "");
+ }
+
+ document.getElementById(tabName).style.display = "block";
+ evt.currentTarget.className += " active";
+}
<t:title>Search - Factor Documentation</t:title>
<t:style t:include="resource:extra/webapps/help/search.css" />
+ <t:script t:include="resource:extra/webapps/help/search.js" />
<t:html t:name="navbar"/>
<div class="page">
- <t:if t:value="articles">
- <h2>Articles</h2>
+
+ <h2>Search results for '<t:label name="search" />'</h2>
+
+ <div class="tab">
+ <button class="tablinks" onclick="openTab(event, 'words')">Words</button>
+ <button class="tablinks" onclick="openTab(event, 'vocabs')">Vocabs</button>
+ <button class="tablinks" onclick="openTab(event, 'articles')">Articles</button>
+ </div>
+
+ <div id="words" class="tabcontent">
+ <t:if t:value="words">
<ul>
- <t:each t:name="articles">
+ <t:each t:name="words">
<li> <t:link t:name="value" /> </li>
</t:each>
</ul>
</t:if>
+ </div>
+ <div id="vocabs" class="tabcontent">
<t:if t:value="vocabs">
- <h2>Vocabularies</h2>
<ul>
<t:each t:name="vocabs">
<li> <t:link t:name="value" /> </li>
</t:each>
</ul>
</t:if>
+ </div>
- <t:if t:value="words">
- <h2>Words</h2>
+ <div id="articles" class="tabcontent">
+ <t:if t:value="articles">
<ul>
- <t:each t:name="words">
+ <t:each t:name="articles">
<li> <t:link t:name="value" /> </li>
</t:each>
</ul>
</t:if>
+ </div>
<br />
+ <div class="footer">
<p style="font-size: smaller;">
This documentation was generated offline from a
<code>load-all</code> image. If you want, you can also
</p>
</div>
+ </div>
+
</t:chloe>