Skip to content

Instantly share code, notes, and snippets.

View phenomlab's full-sized avatar

Mark Cutting phenomlab

View GitHub Profile
@phenomlab
phenomlab / category-list.css
Last active July 13, 2023 17:37
Category List CSS
li#thecategories {
min-width: 250px;
font-size: 90%;
overflow: auto;
height: calc(100vh - 110px);
}
ul.tree-branch {
border-left: 1px solid var(--bs-link-color);
margin-left: 22px;
}
@phenomlab
phenomlab / category-list.js
Last active July 13, 2023 17:23
NodeBB - Dynamic Category List
$(document).ready(function() {
$.getJSON('/api/categories', function(data, status) {
$.each(data.categories, function(key, value) {
var categorylist = $(" \
<li class='dropdown-item tree-root'><span class='category-menu'><i class='fal " + this.icon + "'></i><a style='display: inherit;' class='dropdown-item rounded-1' href='/category/" + this.slug + "'>" + this.name + "</a></span></li> \
<ul class='tree-branch' style='list-style: none;'>" +
this.children.map(c => `<li class='dropdown-item tree-node'><span class='category-menu-tree-node'><i class='fal ${c.icon}'></i><a class='dropdown-item rounded-1' style='display: inherit;' href='/category/${c.slug}'>${c.name}</a></span></li>`).join(" ") +
"</ul>"
);
if ($(window).width() < 767) {
2-D, two-dimensional
2FA, two-factor authentication
2G, second generation
3-D, three-dimensional
3G, 3rd Generation
3GPP, 3rd Generation Partnership Project
5G, 5th Generation
24x7, 24 hours a day seven days a week
24/7, 24 hours a day seven days a week
AA, Anti-alias