causefx / Organizr

HTPC/Homelab Services Organizer - Written in PHP
GNU General Public License v3.0
5.1k stars 289 forks source link

A static website with a light background has its background turn dark when viewed in an iframe #1022

Closed ghost closed 5 years ago

ghost commented 5 years ago
Organizr Version: 2.0.0-beta.800
Branch: Develop
WebSever: Caddy
Operating System: Debian

Problem Description:

I have a static website with a light background that I serve from my server with the webserver Caddy as well as an instance of the backup software Duplicati which has a Web GUI which is being proxied by Caddy. Both sites look fine when I access them via their respective URLs, but when I add them to Organizr in an iframe and access them that way, the background on these sites is inexplicably dark.

Here are some screenshots where you can see the issue.

Static website

screencapture-about-datahoarder-xyz-2019-01-08-15_13_20

screencapture-datahoarder-xyz-2019-01-08-15_13_33

Duplicati

screencapture-duplicati-datahoarder-xyz-ngax-index-html-2019-01-08-15_13_58

screencapture-datahoarder-xyz-2019-01-08-15_25_09


Reproduction Steps:

Reproducing the issue with a static website

  1. Download this sample page from my website.
  2. Extract it on your local machine.
  3. Rename the .html file to index.html
  4. Point your webserver at the extracted directory.
  5. Add the URL of the site to Organizr in an iframe.
  6. Access the site via Organizr.

Reproducing the issue with Duplicati

  1. Download an install Duplicati on your machine.
  2. Proxy the connection to Duplicati with a reverse proxy.
  3. Add the URL for Duplicati to Organizr in an iframe.
  4. Access the site via Organizr.

Errors on screen? If so paste here:

N/A

Roxedus commented 5 years ago

The problem is that these webpages "rdepend" on the browser using white as a fallback color, so they dont define the color in their css. When loading a iframe, it inherits the background, and when its not defined, this is what happens.

GilbN commented 5 years ago

@whalehub in custom css add

.frame-Duplicati{background-color:white}

Duplicati is the name of the Tab

causefx commented 5 years ago

you can set orgs frame background to white if you like so it can inherit that color.

ghost commented 5 years ago

@gilbN That fixed the issue for me, many thanks for your help!