1
0
Fork 0
mirror of https://github.com/codex-team/codex.docs.git synced 2025-07-22 14: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

@ -1,4 +1,4 @@
const {aliases: aliasesDb} = require('../utils/database/index');
const { aliases: aliasesDb } = require('../utils/database/index');
const binaryMD5 = require('../utils/crypto');
/**
@ -40,10 +40,10 @@ class Alias {
*/
static async get(aliasName) {
const hash = binaryMD5(aliasName);
let data = await aliasesDb.findOne({hash: hash, deprecated: false});
let data = await aliasesDb.findOne({ hash: hash, deprecated: false });
if (!data) {
data = await aliasesDb.findOne({hash: hash});
data = await aliasesDb.findOne({ hash: hash });
}
return new Alias(data);
@ -79,7 +79,7 @@ class Alias {
this._id = insertedRow._id;
} else {
await aliasesDb.update({_id: this._id}, this.data);
await aliasesDb.update({ _id: this._id }, this.data);
}
return this;
@ -91,7 +91,7 @@ class Alias {
* @param {AliasData} aliasData
*/
set data(aliasData) {
const {id, type, hash, deprecated} = aliasData;
const { id, type, hash, deprecated } = aliasData;
this.id = id || this.id;
this.type = type || this.type;
@ -131,7 +131,7 @@ class Alias {
* @returns {Promise<Alias>}
*/
async destroy() {
await aliasesDb.remove({_id: this._id});
await aliasesDb.remove({ _id: this._id });
delete this._id;