mirror of
https://github.com/PretendoNetwork/website.git
synced 2026-04-18 06:59:13 -05:00
Import lists from json
This commit is contained in:
parent
79fbbb917e
commit
754b9be789
28
feature-lists.json
Normal file
28
feature-lists.json
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
[
|
||||
{
|
||||
"title": "Thing",
|
||||
"features": [
|
||||
{
|
||||
"name": "Feature A",
|
||||
"checked": true
|
||||
},
|
||||
{
|
||||
"name": "Feature B",
|
||||
"checked": false
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"title": "Another list",
|
||||
"features": [
|
||||
{
|
||||
"name": "Some other A",
|
||||
"checked": true
|
||||
},
|
||||
{
|
||||
"name": "Feature B",
|
||||
"checked": false
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
|
|
@ -2,24 +2,14 @@ const getLocale = require('../../util/getLocale');
|
|||
const { Router } = require('express');
|
||||
const router = new Router();
|
||||
|
||||
const featureLists = require('../../feature-lists.json');
|
||||
|
||||
router.get('/', (req, res) => {
|
||||
const tmpLocale = getLocale('US', 'en');
|
||||
res.render('home', {
|
||||
layout: 'main',
|
||||
locale: tmpLocale,
|
||||
featuredFeatureList: {
|
||||
title: 'Thing',
|
||||
features: [
|
||||
{
|
||||
name: 'Feature A',
|
||||
checked: true
|
||||
},
|
||||
{
|
||||
name: 'Feature B',
|
||||
checked: false
|
||||
}
|
||||
]
|
||||
}
|
||||
featuredFeatureList: featureLists[0]
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user