• Resolved shane

    (@ms_johnson)


    i am creating a site that will allow visitors to our observatory & nature center to scan qr codes on our property signs. our campus is open 24/7 and we’re in the mojave desert.

    it’s very BRIGHT in the day and very DARK at night. my concern is that some users will not be able to see their smartphone/table screens.

    do you know of a responsive theme that already has an option for a user to switch between a black or white background?

    thanks!
    shane

Viewing 3 replies - 1 through 3 (of 3 total)
  • Great idea Shane.
    Two ways I can see this happening.
    In javascript dynamically reassign all the colors.

    OR in your child theme:
    Hook the “body_class” function, depending upon the time of day add a class of either “isDay” or “isNight”
    Code your css so that every color setting has two variations which depend upon the body class.
    Also add a javascript control which will flip the body class.

    Have you searched the theme catalogue to see if anyone has done this for you already ?

    Thread Starter shane

    (@ms_johnson)

    thanks ross.

    my php isn’t what it needs to be for your suggestion. however, you did inspire me to keep searching and it turns out there may already be an answer out there – wpchameleon (although now i can’t get boy george outta my head!).

    it makes it simple to adjust the css according to my wants and allows the user to choose which version they want to look at via a sidebar widget:

    https://campus-tours.skysthelimit29.org/nature-trail/nt12/

    thanks again!

    Thread Starter shane

    (@ms_johnson)

    we’ll mark this resolved

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Responsive theme with black/white background selector’ is closed to new replies.