diff --git a/lib.js b/lib.js index 15e7fcc..b5db160 100644 --- a/lib.js +++ b/lib.js @@ -407,7 +407,17 @@ exports.isValidID = (id) => { return mongoose.Types.ObjectId.isValid(id); } - +/** + * + * @param {String} cookie + * @param {String} name + * @returns + */ +exports.cookieParser = (cookie, name)=> +{ + if(!cookie.includes(name)) return null + return cookie.split(name+'=')[1].split(';')[0]; +} /** * @argument {Response} res - Response: express response object. * @argument {String} name - Name of the cookie. @@ -466,13 +476,3 @@ exports.Crypto = class Crypto return Math.floor(Math.random() * (max - min)) + min; } } -/** - * - * @param {String} cookie - * @param {String} name - * @returns - */ -exports.cookieParser = (cookie, name)=> -{ - return cookie.split(name+'=')[1].split(';')[0]; -} \ No newline at end of file diff --git a/public/css/home.css b/public/css/home.css index 558286b..4bc4056 100644 --- a/public/css/home.css +++ b/public/css/home.css @@ -438,7 +438,7 @@ button:hover } .chapterNavButton { - background-color: var(--purple-heart-400-50); + background-color: var(--purple-heart-500-25); width: 100px; height: 30px; border: 2px solid var(--accent); @@ -840,7 +840,7 @@ button:hover } .spacer { - width: 25%; + width: 0%; } .chapterOverview { @@ -896,4 +896,10 @@ button:hover height: auto; border: 0 solid transparent; border-radius: 5px; + box-sizing: border-box; + cursor: pointer; +} +.flexBox > .inView +{ + border: 3px solid var(--accent); } \ No newline at end of file diff --git a/views/display.ejs b/views/display.ejs index ad65949..3ec4709 100644 --- a/views/display.ejs +++ b/views/display.ejs @@ -1,12 +1,12 @@