diff --git a/sass/ajouter-un-album.scss b/sass/ajouter-un-album.scss index 294a23d..3cdd43b 100644 --- a/sass/ajouter-un-album.scss +++ b/sass/ajouter-un-album.scss @@ -4,40 +4,61 @@ padding: 0 .75rem; } - .list{ - padding: 0.5rem 0.75rem; - border-bottom: 1px solid #dbdbdb; + .list { + margin-top: 2rem; - &:nth-child(2n) { - background-color: #fafafa; - } + .item{ + padding: 0.5rem 0.75rem; + border-bottom: 1px solid #dbdbdb; - .title { - font-weight: 800; - font-size: 1.4rem; - } + @include respond-to("large") { + &:nth-child(2n) { + background-color: #fafafa; + } + } + @include respond-to("large-up") { + border-left: 1px solid #dbdbdb; - .grid { - margin-top: 0.75rem; - } - - img { - border: 2px solid #4a4a4a; - } - - .items { - span { - margin-right: 0.6rem; - - &::after { - content: ","; + &:first-child, + &:nth-child(2) { + border-top: 1px solid #dbdbdb; } + &:nth-child(2n), &:last-child { - &::after { - margin-right: 0; - content: ""; - } + border-right: 1px solid #dbdbdb; + margin-right: -1px; + } + } + + .title { + font-weight: 800; + font-size: 1.4rem; + } + + .grid { + margin-top: 0.75rem; + } + + img { + border: 2px solid #4a4a4a; + cursor: pointer; + } + } + } + + .items { + span { + margin-right: 0.6rem; + + &::after { + content: ","; + } + + &:last-child { + &::after { + margin-right: 0; + content: ""; } } } diff --git a/src/app.js b/src/app.js index fdfe77b..d64e63c 100644 --- a/src/app.js +++ b/src/app.js @@ -12,7 +12,6 @@ import config, { env, mongoDbUri, secret } from "./config"; import { isXhr } from "./helpers"; import indexRouter from "./routes"; -import addAlbumRouter from "./routes/addAlbum"; import importAlbumRouterApiV1 from "./routes/api/v1/albums"; import importSearchRouterApiV1 from "./routes/api/v1/search"; @@ -81,7 +80,6 @@ app.use( ); app.use("/", indexRouter); -app.use("/ajouter-un-album", addAlbumRouter); app.use("/api/v1/albums", importAlbumRouterApiV1); app.use("/api/v1/search", importSearchRouterApiV1); diff --git a/src/routes/addAlbum.js b/src/routes/addAlbum.js deleted file mode 100644 index 4bd8c8b..0000000 --- a/src/routes/addAlbum.js +++ /dev/null @@ -1,35 +0,0 @@ -import express from "express"; -import { ensureLoggedIn } from "connect-ensure-login"; - -import Pages from "../middleware/Albums"; - -import render from "../libs/format"; - -// eslint-disable-next-line new-cap -const router = express.Router(); - -router.route("/").get(ensureLoggedIn("/connexion"), (req, res, next) => { - try { - const page = new Pages(req, "ajouter-un-album/search"); - - render(res, page); - } catch (err) { - next(err); - } -}); - -router - .route("/:discogsId") - .get(ensureLoggedIn("/connexion"), async (req, res, next) => { - try { - const page = new Pages(req, "ajouter-un-album/form"); - - await page.getFormAddOne(); - - render(res, page); - } catch (err) { - next(err); - } - }); - -export default router; diff --git a/src/routes/index.js b/src/routes/index.js index 578fd63..ed2c1f1 100644 --- a/src/routes/index.js +++ b/src/routes/index.js @@ -77,6 +77,18 @@ router } }); +router + .route("/ajouter-un-album") + .get(ensureLoggedIn("/connexion"), (req, res, next) => { + try { + const page = new Pages(req, "ajouter-un-album"); + + render(res, page); + } catch (err) { + next(err); + } + }); + router .route("/ma-collection") .get(ensureLoggedIn("/connexion"), async (req, res, next) => { diff --git a/views/pages/ajouter-un-album/search.ejs b/views/pages/ajouter-un-album.ejs similarity index 94% rename from views/pages/ajouter-un-album/search.ejs rename to views/pages/ajouter-un-album.ejs index 564dabd..67f83f9 100644 --- a/views/pages/ajouter-un-album/search.ejs +++ b/views/pages/ajouter-un-album.ejs @@ -13,12 +13,12 @@ -