UNPKG

glintcms-starter-glintcms

Version:

This is a WebSite implementation with GlintCMS. It shows how you can use GlintCMS.

14 lines (9 loc) 255 B
var c = require('./config'); module.exports = function activePage(pathname) { var active = {}; var p = pathname.replace('/', ''); Object.keys(c.slides).forEach(function(id) { active[id] = (id == p) ? 'active' : ''; }); return active; };