diff --git a/admin-client/src/admin.scss b/admin-client/src/admin.scss index a8f5e92..b8c0d0a 100644 --- a/admin-client/src/admin.scss +++ b/admin-client/src/admin.scss @@ -79,126 +79,141 @@ border: 2px solid $borderColor; border-radius: $borderRadius; position: relative; + } + + .cover-photo { + position: relative; + height: 350px; + flex: 0 0 350px; + margin-bottom: 3px; + cursor: pointer; + width: 100%; + max-width: 100%; + border-radius: $borderRadius; + box-shadow: #333 5px 5px 5px; + overflow: hidden; - .cover-photo { - position: relative; - height: 350px; - flex: 0 0 350px; - margin-bottom: 3px; - cursor: pointer; + img { width: 100%; - max-width: 100%; - border-radius: $borderRadius; - box-shadow: #333 5px 5px 5px; - overflow: hidden; - - img { - width: 100%; - transform: scale(1); + transform: scale(1); + } + + &:hover { + img, + svg { + transform: scale(1.05); } + } - &:hover { - img, - svg { - transform: scale(1.05); - } + .file-name { + position: absolute; + bottom: 0; + background: white; + width: 100%; + text-align: center; + font-size: 0.8em; + font-style: italic; + line-height: 1.2em; + padding: 0 20px; + } + + &.cover-photo--no-img { + //padding-left: calc(350px / 2 - 37.5px); + display: flex; + align-items: center; + flex-direction: column; + justify-content: center; + + #page-loader { + padding: 9px; } - .file-name { - position: absolute; - bottom: 0; - background: white; - width: 100%; - text-align: center; - font-size: 0.8em; - font-style: italic; - line-height: 1.2em; - padding: 0 20px; + svg.no-photos { + width: 75px; + height: 75px; + color: $accentColor; } + } + } - &.cover-photo--no-img { - //padding-left: calc(350px / 2 - 37.5px); - display: flex; - align-items: center; - flex-direction: column; - justify-content: center; + .card-details { + flex: 1 1 auto; + margin-left: 25px; + margin-top: 25px; - #page-loader { - padding: 9px; - } + @media(max-width: 968px) { + margin-left: 0; + width: 100%; + max-width: 450px; + } - svg.no-photos { - width: 75px; - height: 75px; - color: $accentColor; - } - } + &.card-details--flex { + flex: 0 0 100%; + display: flex; + align-items: flex-start; + justify-content: center; } - .card-details { - flex: 1 1 auto; - margin-left: 25px; - margin-top: 25px; + .card-details-left { + flex: 0 0 50%; + } - @media(max-width: 968px) { - margin-left: 0; - width: 100%; - max-width: 450px; - } + .card-details-right { + flex: 0 0 50%; + } - .input-element { - margin-bottom: 25px; - - .input-error { - visibility: hidden; - position: absolute; - bottom: -1.4em; - left: 25px; - font-size: 11pt; - color: red; - font-style: italic; - } + .input-element { + margin-bottom: 25px; + + .input-error { + visibility: hidden; + position: absolute; + bottom: -1.4em; + left: 25px; + font-size: 11pt; + color: red; + font-style: italic; } } + } + + .input-buttons { + display: flex; + justify-content: space-between; + + @media(max-width: 968px) { + flex-direction: column; + } - .input-buttons { + .left-buttons { display: flex; - justify-content: space-between; - @media(max-width: 968px) { - flex-direction: column; + button { + margin-right: 15px; } - .left-buttons { - display: flex; - + @media(max-width: 968px) { + justify-content: space-between; + margin-bottom: 15px; button { - margin-right: 15px; - } - - @media(max-width: 968px) { - justify-content: space-between; - margin-bottom: 15px; - button { - margin-right: 0; - } + margin-right: 0; } } + } - .right-buttons { - display: flex; + .right-buttons { + display: flex; - button { - margin-left: 15px; - } + button { + margin-left: 15px; + } - @media(max-width: 968px) { - justify-content: space-between; - margin-bottom: 15px; + @media(max-width: 968px) { + justify-content: space-between; + margin-bottom: 15px; - button { - margin-left: 0; - } + button { + margin-left: 0; } } } @@ -239,4 +254,57 @@ font-size: 1rem; margin-bottom: 15px; } +} + +.pos--rel { + position: relative; +} +.pointer { + cursor: pointer; +} +.pad { + padding: 15px; +} +.bold { + font-weight: bold; +} + +.border { + border: 2px solid $borderColor; +} + +.border--round { + border-radius: $borderRadius; +} + +.inline-block { + display: inline-block; +} + +.flex { + display: flex; + align-items: center; + justify-content: center; +} + +.flex--vert { + flex-direction: column; +} +.flex--vert-sm { + @media(max-width: 768px) { + flex-direction: column; + } +} +.flex--align-center-sm { + @media(max-width: 768px) { + align-items: center; + } +} + +.flex--stretch { + justify-content: space-between; +} + +.flex--align-start { + align-items: flex-start; } \ No newline at end of file diff --git a/admin-client/src/index.js b/admin-client/src/index.js index 8810770..ef93c99 100644 --- a/admin-client/src/index.js +++ b/admin-client/src/index.js @@ -15,10 +15,10 @@ import '@fontsource/roboto/500.css'; import '@fontsource/roboto/700.css'; import Keycloak from "./services/authentication/keycloak"; -import PortfolioManager from "./pages/portfolio-manager"; -import AlbumManager from "./pages/album-manager"; +import InstanceAlbumsPage from "./pages/instance-albums-page"; +import AlbumPage from "./pages/album-page"; import {InstancesPage} from "./pages/instances-page"; -import {NoAccessPage} from "./pages/no-access"; +import {NoAccessPage} from "./pages/no-access-page"; import {InstancesProvider} from "./services/instances/instances-context"; import {AdminLayout} from "./layout"; import {Home} from "@mui/icons-material"; @@ -37,8 +37,8 @@ const router = createBrowserRouter( } handle={{ crumb: (routeData) => albums }}> - } /> - } handle={{ + } /> + } handle={{ crumb: (routeData) => {routeData.params.albumId} }}/> diff --git a/admin-client/src/models/instance.js b/admin-client/src/models/instance.js index 31e6e9b..95694f2 100644 --- a/admin-client/src/models/instance.js +++ b/admin-client/src/models/instance.js @@ -7,6 +7,7 @@ export class Instance { this.title = instance?.title; this.subtitle = instance?.subtitle; this.coverPhoto = instance?.coverPhoto ? new Photo(instance.coverPhoto) : null; + this.homeLayout = instance?.homeLayout; this.urls = instance?.urls?.map(u => u) || []; } } \ No newline at end of file diff --git a/admin-client/src/pages/album-manager.js b/admin-client/src/pages/album-page.js similarity index 99% rename from admin-client/src/pages/album-manager.js rename to admin-client/src/pages/album-page.js index 4c73add..07655d4 100644 --- a/admin-client/src/pages/album-manager.js +++ b/admin-client/src/pages/album-page.js @@ -9,10 +9,10 @@ import DragAndDrop from "../components/drag-and-drop/drag-and-drop"; import {Album} from "../models/album"; import Loader from "../components/Loader"; -import "./album-manager.scss"; +import "./album-page.scss"; import {useInstances} from "../services/instances/use-instances"; -function AlbumManager() { +function AlbumPage() { const {state} = useLocation(); const {album} = state; // Read values passed on state const {selectedInstance} = useInstances(); @@ -299,4 +299,4 @@ function AlbumManager() { ; } -export default AlbumManager; \ No newline at end of file +export default AlbumPage; \ No newline at end of file diff --git a/admin-client/src/pages/album-manager.scss b/admin-client/src/pages/album-page.scss similarity index 100% rename from admin-client/src/pages/album-manager.scss rename to admin-client/src/pages/album-page.scss diff --git a/admin-client/src/pages/portfolio-manager.js b/admin-client/src/pages/instance-albums-page.js similarity index 98% rename from admin-client/src/pages/portfolio-manager.js rename to admin-client/src/pages/instance-albums-page.js index aeca1fd..a913756 100644 --- a/admin-client/src/pages/portfolio-manager.js +++ b/admin-client/src/pages/instance-albums-page.js @@ -13,10 +13,10 @@ import Loader from "../components/Loader"; import {Button, TextField} from "@mui/material"; import {Album} from "../models/album"; -import "./portfolio-manager.scss" +import "./instance-albums-page.scss" import {useInstances} from "../services/instances/use-instances"; -function PortfolioManager() { +function InstanceAlbumsPage() { const navigate = useNavigate(); const {selectedInstance} = useInstances(); @@ -208,4 +208,4 @@ function PortfolioManager() { } -export default PortfolioManager; \ No newline at end of file +export default InstanceAlbumsPage; \ No newline at end of file diff --git a/admin-client/src/pages/portfolio-manager.scss b/admin-client/src/pages/instance-albums-page.scss similarity index 100% rename from admin-client/src/pages/portfolio-manager.scss rename to admin-client/src/pages/instance-albums-page.scss diff --git a/admin-client/src/pages/instances-page.js b/admin-client/src/pages/instances-page.js index d592df3..4a68f7c 100644 --- a/admin-client/src/pages/instances-page.js +++ b/admin-client/src/pages/instances-page.js @@ -6,8 +6,7 @@ import {useAuth} from "../services/authentication/use-auth"; import {useInstances} from "../services/instances/use-instances"; import {Instance} from "../models/instance"; import { - AddAPhoto, AddCircle, - ArrowRightAltOutlined, Edit, RemoveCircle + AddAPhoto, AddCircle, ArrowRightAltOutlined, Edit, RadioButtonChecked, RadioButtonUnchecked, RemoveCircle } from "@mui/icons-material"; import "./instances-page.scss"; @@ -16,12 +15,7 @@ import DragAndDrop from "../components/drag-and-drop/drag-and-drop"; export function InstancesPage() { const navigate = useNavigate(); const { - instances, - createInstance, - deleteInstance, - updateInstance, - uploadCoverPhoto, - instanceApiError + instances, createInstance, deleteInstance, updateInstance, uploadCoverPhoto, instanceApiError } = useInstances(); const [instancesToUpdate, setInstancesToUpdate] = useState(null); const {userData} = useAuth(); @@ -59,9 +53,10 @@ export function InstancesPage() { } const instanceHasChanges = (idx) => { - return (instancesToUpdate[idx].title || "") !== (instances[idx]?.title || "") || - (instancesToUpdate[idx].subtitle || "") !== (instances[idx]?.subtitle || "") || - JSON.stringify(instancesToUpdate[idx].urls) !== JSON.stringify(instances[idx]?.urls); + return (instancesToUpdate[idx].title || "") !== (instances[idx]?.title || "") + || (instancesToUpdate[idx].subtitle || "") !== (instances[idx]?.subtitle || "") + || JSON.stringify(instancesToUpdate[idx].urls) !== JSON.stringify(instances[idx]?.urls) + || instancesToUpdate[idx].homeLayout !== instances[idx]?.homeLayout; } const handleCreateInstance = async () => { await createInstance(new Instance({ @@ -92,7 +87,20 @@ export function InstancesPage() { const handleDrop = async (e, idx) => { await handleFiles(e, idx) } - + const handleSelectLayout = (idx, layout) => { + instancesToUpdate[idx].homeLayout = layout; + setInstancesToUpdate([...instancesToUpdate]); + } + const homeLayouts = [{ + id: 1, + name: "Layout 1" + }, { + id: 2, + name: "Layout 2" + }, { + id: 3, + name: "Layout 3" + }] return
@@ -120,87 +128,101 @@ export function InstancesPage() { }
- {instancesToUpdate?.map((instance, idx) => -
-
- handleDrop(e, idx)} - onClick={(e) => fileInputRefs.current[idx].click(e)} - isLoading={isUploading[idx]}> - {!isUploading[idx] && instance.coverPhoto - ? <> - {instance.coverPhoto.name}/ -
- - : - } -
- fileInputRefs.current[idx] = element} - accept="image/*" - onChange={(e) => handleFiles(e, idx)}> -
-
-
- handleInstanceTitleChange(e, idx)} - /> -
-
- handleInstanceSubtitleChange(e, idx)} - /> -
-
- handleNewInstanceUrlChange(e, idx)} - InputProps={{ - endAdornment: ( - + {instancesToUpdate?.map((instance, idx) =>
+
+ handleDrop(e, idx)} + onClick={(e) => fileInputRefs.current[idx].click(e)} + isLoading={isUploading[idx]}> + {!isUploading[idx] && instance.coverPhoto ? <> + {instance.coverPhoto.name}/ +
+ : } +
+ fileInputRefs.current[idx] = element} + accept="image/*" + onChange={(e) => handleFiles(e, idx)}> +
+
+
+
+
+ handleInstanceTitleChange(e, idx)} + /> +
+
+ handleInstanceSubtitleChange(e, idx)} + /> +
+
+ handleNewInstanceUrlChange(e, idx)} + InputProps={{ + endAdornment: ( handleAddNewInstanceUrl(e, idx)}> - - ) - }}/> -
- {instance.urls.map(url =>
- handleDeleteUrl(e, idx, url)}> - - - {url} -
)} + ) + }}/> +
+ {instance.urls.map(url =>
+ handleDeleteUrl(e, idx, url)}> + + + {url} +
)} +
-
-
- - -
-
- +
+
+ Home layout: +
+ {homeLayouts.map(layout => +
handleSelectLayout(idx, layout.id)}> + {instance.homeLayout === layout.id ? : + } + + {layout.name} +
+ )} +
+
+
+ + +
+
+ +
+
- )} +
)}
; } \ No newline at end of file diff --git a/admin-client/src/pages/instances-page.scss b/admin-client/src/pages/instances-page.scss index d2a686d..1b4e3e0 100644 --- a/admin-client/src/pages/instances-page.scss +++ b/admin-client/src/pages/instances-page.scss @@ -13,9 +13,11 @@ img { position: relative; } + .btn-edit-photo { display: none; } + &:hover { .btn-edit-photo { position: absolute; @@ -27,6 +29,7 @@ width: 100%; height: 100%; background-color: rgba(255, 255, 255, 0.2); + svg { color: white; font-size: 48px; @@ -70,5 +73,4 @@ } } } - } \ No newline at end of file diff --git a/admin-client/src/pages/no-access.js b/admin-client/src/pages/no-access-page.js similarity index 100% rename from admin-client/src/pages/no-access.js rename to admin-client/src/pages/no-access-page.js diff --git a/client/src/components/home-layouts/home-layout1.js b/client/src/components/home-layouts/home-layout1.js new file mode 100644 index 0000000..eec8e2c --- /dev/null +++ b/client/src/components/home-layouts/home-layout1.js @@ -0,0 +1,20 @@ +import {NavLink} from "react-router-dom"; +import {ArrowRightAlt} from "@mui/icons-material"; +import "./home-layout1.scss"; + +export function HomeLayout1({instance}) { + return
+
+ {instance.coverPhoto?.name} +
+
+
+

{instance.title}

+

{instance.subtitle}

+ + ENTER + +
+
+
; +} \ No newline at end of file diff --git a/client/src/public/pages/home-page.scss b/client/src/components/home-layouts/home-layout1.scss similarity index 80% rename from client/src/public/pages/home-page.scss rename to client/src/components/home-layouts/home-layout1.scss index 039a2be..9418391 100644 --- a/client/src/public/pages/home-page.scss +++ b/client/src/components/home-layouts/home-layout1.scss @@ -1,4 +1,4 @@ -#home { +#homeLayout1 { height: 100vh; width: 100vw; display: grid; @@ -36,15 +36,17 @@ padding: 60px; max-width: 620px; text-align: center; + @media(max-width: 600px) { + padding: 0; + max-width: 90vw; + } h1 { text-align: center; display: inline-block; font-size: 37px; line-height: 1em; - margin: 0; - margin-bottom: 22px; - //font-family: proxima-nova; + margin: 0 0 22px; font-weight: 700; font-style: normal; text-transform: uppercase; @@ -65,29 +67,38 @@ letter-spacing: .28em; line-height: 1.7em; color: #333; - margin: 0; - margin-bottom: 36px; + margin: 0 0 36px; } .goto-website-link { text-rendering: optimizeLegibility; white-space: nowrap; - line-height: 1em; //font-family: proxima-nova; - font-weight: 500; font-style: normal; - font-size: 14px; text-transform: uppercase; letter-spacing: 0; text-align: center; - padding: 1em calc(1.44em - 0em) 1em 1.44em; - display: inline-block; + padding: 1em 1.44em; text-decoration: none; background-color: transparent; color: #333; border: 2px solid #333; + display: inline-block; + height: calc(22px + 2em); transition: background-color 170ms ease-in-out, color 170ms ease-in-out; - //transition: color 170ms ease-in-out, border-color 170ms ease-in-out; + + span { + display: inline-block; + vertical-align: top; + line-height: 22px; + font-size: 14px; + font-weight: 500; + } + + svg { + margin-left: 5px; + font-size: 22px; + } &:hover { background-color: black; diff --git a/client/src/components/home-layouts/home-layout2.js b/client/src/components/home-layouts/home-layout2.js new file mode 100644 index 0000000..2171b28 --- /dev/null +++ b/client/src/components/home-layouts/home-layout2.js @@ -0,0 +1,20 @@ +import {NavLink} from "react-router-dom"; +import {ArrowRightAlt} from "@mui/icons-material"; +import "./home-layout2.scss"; + +export function HomeLayout2({instance}) { + return
+
+
+

{instance.title}

+

{instance.subtitle}

+ + ENTER + +
+
+
+ {instance.coverPhoto?.name} +
+
; +} \ No newline at end of file diff --git a/client/src/components/home-layouts/home-layout2.scss b/client/src/components/home-layouts/home-layout2.scss new file mode 100644 index 0000000..986da72 --- /dev/null +++ b/client/src/components/home-layouts/home-layout2.scss @@ -0,0 +1,110 @@ +#homeLayout2 { + height: 100vh; + width: 100vw; + display: grid; + grid-template-columns: 1fr 1fr; + + @media(max-width: 1200px) { + grid-template-columns: 1fr; + grid-template-rows: 1fr 1fr; + } + + .cover-photo { + overflow: hidden; + display: flex; + justify-content: center; + align-items: center; + + img { + width: 100%; + height: 100%; + object-position: 50% 50%; + object-fit: cover; + } + } + + .instance-details { + display: flex; + justify-content: center; + flex-direction: column; + + .box { + position: static !important; + transform: none; + margin-left: auto; + margin-right: auto; + padding: 60px; + max-width: 620px; + text-align: center; + @media(max-width: 600px) { + padding: 0; + max-width: 90vw; + } + + h1 { + text-align: center; + display: inline-block; + font-size: 37px; + line-height: 1em; + margin: 0 0 22px; + font-weight: 700; + font-style: normal; + text-transform: uppercase; + letter-spacing: .1em; + color: #333; + + @media(max-width: 600px) { + font-size: 24px; + } + } + + h2 { + //font-family: minion-pro; + font-size: 19px; + font-weight: 400; + font-style: normal; + text-transform: uppercase; + letter-spacing: .28em; + line-height: 1.7em; + color: #333; + margin: 0 0 36px; + } + + .goto-website-link { + text-rendering: optimizeLegibility; + white-space: nowrap; + //font-family: proxima-nova; + font-style: normal; + text-transform: uppercase; + letter-spacing: 0; + text-align: center; + padding: 1em 1.44em; + text-decoration: none; + background-color: transparent; + color: #333; + border: 2px solid #333; + display: inline-block; + height: calc(22px + 2em); + transition: background-color 170ms ease-in-out, color 170ms ease-in-out; + + span { + display: inline-block; + vertical-align: top; + line-height: 22px; + font-size: 14px; + font-weight: 500; + } + + svg { + margin-left: 5px; + font-size: 22px; + } + + &:hover { + background-color: black; + color: white; + } + } + } + } +} \ No newline at end of file diff --git a/client/src/components/home-layouts/home-layout3.js b/client/src/components/home-layouts/home-layout3.js new file mode 100644 index 0000000..0334a5f --- /dev/null +++ b/client/src/components/home-layouts/home-layout3.js @@ -0,0 +1,20 @@ +import {NavLink} from "react-router-dom"; +import {ArrowRightAlt} from "@mui/icons-material"; +import "./home-layout3.scss"; + +export function HomeLayout3({instance}) { + return
+
+ {instance.coverPhoto?.name} +
+
+

{instance.title}

+

{instance.subtitle}

+ + ENTER + +
+
+
+
; +} \ No newline at end of file diff --git a/client/src/components/home-layouts/home-layout3.scss b/client/src/components/home-layouts/home-layout3.scss new file mode 100644 index 0000000..fc8869b --- /dev/null +++ b/client/src/components/home-layouts/home-layout3.scss @@ -0,0 +1,110 @@ +#homeLayout3 { + height: 100vh; + width: 100vw; + + .cover-photo { + overflow: hidden; + display: flex; + justify-content: center; + align-items: center; + + img { + position: absolute; + top: 0; + width: 100%; + height: 100%; + object-position: 50% 50%; + object-fit: cover; + } + } + + .instance-details { + margin-top: calc(50vh - 125px); + height: 250px; + width: 100vw; + background-color: white; + display: flex; + justify-content: center; + flex-direction: column; + position: relative; + + .box { + position: static !important; + transform: none; + margin-left: auto; + margin-right: auto; + padding: 60px; + max-width: 620px; + text-align: center; + @media(max-width: 600px) { + padding: 0; + max-width: 90vw; + } + + h1 { + text-align: center; + display: inline-block; + font-size: 37px; + line-height: 1em; + margin: 0 0 22px; + font-weight: 700; + font-style: normal; + text-transform: uppercase; + letter-spacing: .1em; + color: #333; + + @media(max-width: 600px) { + font-size: 24px; + } + } + + h2 { + //font-family: minion-pro; + font-size: 19px; + font-weight: 400; + font-style: normal; + text-transform: uppercase; + letter-spacing: .28em; + line-height: 1.7em; + color: #333; + margin: 0 0 36px; + } + + .goto-website-link { + text-rendering: optimizeLegibility; + white-space: nowrap; + //font-family: proxima-nova; + font-style: normal; + text-transform: uppercase; + letter-spacing: 0; + text-align: center; + padding: 1em 1.44em; + text-decoration: none; + background-color: transparent; + color: #333; + border: 2px solid #333; + display: inline-block; + height: calc(22px + 2em); + transition: background-color 170ms ease-in-out, color 170ms ease-in-out; + + span { + display: inline-block; + vertical-align: top; + line-height: 22px; + font-size: 14px; + font-weight: 500; + } + + svg { + margin-left: 5px; + font-size: 22px; + } + + &:hover { + background-color: black; + color: white; + } + } + } + } +} \ No newline at end of file diff --git a/client/src/models/instance.js b/client/src/models/instance.js index 69ba8ac..0ef42d6 100644 --- a/client/src/models/instance.js +++ b/client/src/models/instance.js @@ -7,5 +7,6 @@ export class Instance { this.title = instance?.title; this.subtitle = instance?.subtitle; this.coverPhoto = instance?.coverPhoto ? new Photo(instance.coverPhoto) : null; + this.homeLayout = instance?.homeLayout; } } \ No newline at end of file diff --git a/client/src/public/pages/album.js b/client/src/public/pages/album.js index 4902b5f..fbb1004 100644 --- a/client/src/public/pages/album.js +++ b/client/src/public/pages/album.js @@ -30,7 +30,7 @@ export default function AlbumPage() { dangerouslySetInnerHTML={{__html: selectedAlbum.description.replace(/\n/g, "
")}}>
}
- {selectedAlbum.photos &&
+ {selectedAlbum.photos &&
{selectedAlbum.photos.map((photo, idx) =>
setSelectedPhotoIndex(idx)}> @@ -41,11 +41,11 @@ export default function AlbumPage() {
-
-
- {photo.name} -
-
+ {/*
*/} + {/*
*/} + {/* {photo.name}*/} + {/*
*/} + {/*
*/}
)}
} diff --git a/client/src/public/pages/home-page.js b/client/src/public/pages/home-page.js index 420f149..02396c4 100644 --- a/client/src/public/pages/home-page.js +++ b/client/src/public/pages/home-page.js @@ -1,23 +1,15 @@ import {useCurrentInstance} from "../../services/current-instance/use-current-instance"; -import "./home-page.scss"; -import {NavLink} from "react-router-dom"; +import {HomeLayout1} from "../../components/home-layouts/home-layout1"; +import {HomeLayout2} from "../../components/home-layouts/home-layout2"; +import {HomeLayout3} from "../../components/home-layouts/home-layout3"; export function HomePage() { const {instance} = useCurrentInstance(); - - return instance &&
-
- {instance.coverPhoto?.name} -
-
-
-

{instance.title}

-

{instance.subtitle}

- - GO TO WEBSITE - -
-
-
; + return instance && instance.homeLayout === 3 + ? + : instance.homeLayout === 2 + ? + : + ; } \ No newline at end of file diff --git a/client/src/public/public.scss b/client/src/public/public.scss index e76a8a8..d996153 100644 --- a/client/src/public/public.scss +++ b/client/src/public/public.scss @@ -191,6 +191,10 @@ html:has(#photoViewer) { column-gap: 30px; margin-bottom: 4em; + &.photo-grid-layout--no-details { + row-gap: 30px; + } + //@media (max-width: 1920px) { // grid-template-columns: repeat(4, 1fr); //} diff --git a/server/src/models/portfolio/instance.js b/server/src/models/portfolio/instance.js index 0975c04..1df51a0 100644 --- a/server/src/models/portfolio/instance.js +++ b/server/src/models/portfolio/instance.js @@ -10,6 +10,7 @@ export class Instance { this.title = instance?.title; this.subtitle = instance?.subtitle; this.coverPhoto = instance?.coverPhoto ? new Photo(instance?.coverPhoto) : null; + this.homeLayout = instance?.homeLayout; this.urls = instance?.urls || []; } @@ -23,6 +24,8 @@ export class Instance { subtitle; /** @type {Photo} **/ coverPhoto; + /** @type {Number} **/ + homeLayout; /** @type {string[]} **/ urls; } \ No newline at end of file diff --git a/server/src/services/instances.js b/server/src/services/instances.js index 414a3da..14968b5 100644 --- a/server/src/services/instances.js +++ b/server/src/services/instances.js @@ -38,6 +38,7 @@ class InstancesService { instance.title = instanceToUpdate.title; instance.subtitle = instanceToUpdate.subtitle; instance.urls = instanceToUpdate.urls; + instance.homeLayout = instanceToUpdate.homeLayout; try { await db.instances.update(instance);