1
0
Fork 0
mirror of https://github.com/codex-team/codex.docs.git synced 2025-07-20 13:49:41 +02:00

Landing + mobile adoptation (#38)

* Landing + mobile adoptation

* replace svg

* small updates

* use landing as iframe

* Delete .codexdocsrc

* remove unused

* updates

* Delete _index.twig

* update header shrink in chrome

* Delete .codexdocsrc

* remove focus
This commit is contained in:
Peter Savchenko 2019-02-15 17:56:56 +03:00 committed by GitHub
parent d1e48cbb64
commit 044c24c950
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
30 changed files with 429 additions and 1068 deletions

View file

@ -40,8 +40,8 @@ module.exports = class RCParser {
return RCParser.DEFAULTS;
}
const file = fs.readFileSync(rcPath, {encoding: 'UTF-8'});
const rConfig = {};
const file = fs.readFileSync(rcPath, { encoding: 'UTF-8' });
const rConfig = RCParser.DEFAULTS;
let userConfig;
try {
@ -51,8 +51,11 @@ module.exports = class RCParser {
return RCParser.DEFAULTS;
}
rConfig.title = userConfig.title || RCParser.DEFAULTS.title;
rConfig.menu = userConfig.menu || RCParser.DEFAULTS.menu;
for (let option in userConfig) {
if (userConfig.hasOwnProperty(option)) {
rConfig[option] = userConfig[option] || RCParser.DEFAULTS[option] || undefined;
}
}
if (!(rConfig.menu instanceof Array)) {
console.log('Menu section in the rc file must be an array.');
@ -70,7 +73,7 @@ module.exports = class RCParser {
return false;
}
const {title, uri} = option;
const { title, uri } = option;
if (!title || typeof title !== 'string') {
console.log(`Menu option #${i} title must be a string.`);