mirror of
https://github.com/codex-team/codex.docs.git
synced 2025-07-28 01:29:42 +02:00
Some design updates (#70)
* Auth page styles improved * styles updated * upd bundles
This commit is contained in:
parent
7c7c0d62d9
commit
c7219f8943
20 changed files with 288 additions and 48 deletions
|
@ -1,5 +1,5 @@
|
|||
const urlify = require('../utils/urlify');
|
||||
const { pages: pagesDb } = require('../utils/database/index');
|
||||
const translateString = require('../utils/translation');
|
||||
|
||||
/**
|
||||
* @typedef {Object} PageData
|
||||
|
@ -116,14 +116,7 @@ class Page {
|
|||
* @return {string}
|
||||
*/
|
||||
transformTitleToUri() {
|
||||
return translateString(this.title
|
||||
.replace(/ /g, ' ')
|
||||
.replace(/[^a-zA-Z0-9А-Яа-яЁё ]/g, ' ')
|
||||
.replace(/ +/g, ' ')
|
||||
.trim()
|
||||
.toLowerCase()
|
||||
.split(' ')
|
||||
.join('-'));
|
||||
return urlify(this.title);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue