diff --git a/docs/config.md b/docs/config.md index fde1f7c4..917a6b69 100644 --- a/docs/config.md +++ b/docs/config.md @@ -125,6 +125,25 @@ If you are migrating from Google Takeout, you may run the following command to m occ memories:migrate-google-takeout ``` +## Customization + +### Header Logo + +Nextcloud supports customizing the logo for your instance. To properly theme the logo to match the user's theme, the logo you use in `Admninistration => Theming` must follow the following criteria: + +- It must be an SVG file. +- The `viewBox` attribute on the `` element must be set appropriately. +- All paths that correspond to white areas must have the `fill` attribute set to `currentColor`. These areas will then automatically be colored according to the user's theme. +- Since Nextcloud doesn't support `currentColor`, you must set the default value for the color (e.g. `white`) as an inline style on the `` element (``). + +A sample SVG that follows these criteria is shown below (from [here](https://github.com/pulsejet/memories/blob/master/src/assets/nextcloud.svg)): + +```xml +--8<-- "src/assets/nextcloud.svg" +``` + +Note that you may skip these steps and also use a PNG file, but the logo will not be colored according to the user's theme. This can be especially troublesome since Nextcloud mostly shows the logo on a dark background while Memories uses both light and dark backgrounds. + ## Other notes - For optimal performance, enable HTTP/2 on your reverse proxy (nginx/apache) diff --git a/src/assets/nextcloud.svg b/src/assets/nextcloud.svg index 1f37a2b5..744a5ce4 100644 --- a/src/assets/nextcloud.svg +++ b/src/assets/nextcloud.svg @@ -1 +1,3 @@ - + + + diff --git a/src/components/MobileHeader.vue b/src/components/MobileHeader.vue index a33ce673..6d6b86f7 100644 --- a/src/components/MobileHeader.vue +++ b/src/components/MobileHeader.vue @@ -8,7 +8,7 @@ > @@ -17,6 +17,7 @@ @@ -80,13 +116,22 @@ export default defineComponent({ .logo { width: 62px; + height: 90%; position: absolute; - top: 60%; + top: 10%; left: 50%; - transform: translate(-50%, -50%); + transform: translateX(-50%); > a { - color: var(--color-primary); + :deep svg { + color: var(--color-primary) !important; + } + + > * { + width: 100%; + height: 100%; + object-fit: contain; + } } } }