User Controls

Colorize tabs to match themes

  1. #1
    ORACLE Naturally Camouflaged
    Please add the following to the themes with their respective colors. Simple 2 minute add.

    <meta name="theme-color" content="#FFA000">


    For example black for AMOLED theme.

    Thank you Lanny.
    The following users say it would be alright if the author of this post didn't die in a fire!
  2. #2
    How about you submit a pull you lazy bitch this isn't request a feature subforum

    https://github.com/Lanny/ISS
  3. #3
    ORACLE Naturally Camouflaged
    Nobody except Lanny can compile a theme, good sir.
  4. #4
    Originally posted by ORACLE Nobody except Lanny can compile a theme, good sir.

    cum pile that william bill Bill Krozbyby dog and submit a pull
  5. #5
    ORACLE Naturally Camouflaged
    Originally posted by the man who put it in my hood cum pile that william bill Bill Krozbyby dog and submit a pull

    Suck a cock. Nobody but him can do it.
  6. #6
    Nobody but you can submit a pull
  7. #7
    Bueno motherfucker
  8. #8
    Lanny Bird of Courage
    This would be a simple enough change that I'd say just do a PR, BUT it gets a little tricky with how the themes are set up. Basically the server side view of themes is "a user's theme is one of X values, load a stylesheet corresponding to the theme". The UI code knows lots of stuff about a theme, like what the dominant color is, but the server side doesn't. So the config had to be changed to allow "theme attributes", e.g. the theme color (since the meta tag in question is generated as part of templateing, which is server side). And then this broke other things that expected the theme configuration to be a certain format. I changed the theme config so adding more "theme attributes" in the future will be easier and not require this kind of hoop jumping, but it involves enough of the config mechanism that I wouldn't really expect anyone to do it without being pretty familiar with the code. This ended up being the code change necessary if anyone happens to be interested:

    https://github.com/Lanny/ISS/commit/77ee5bc592405735e939e6a9168282767ebc311d

    tl;dr: it's kind of complicated so I just went ahead and did it myself.

    Falcon: I don't have device with an appropriate OS to test this. It should be live now. Could you try it out with the three themes and let me know if it looks OK? Please screenshot if not.
    The following users say it would be alright if the author of this post didn't die in a fire!
  9. #9
    ORACLE Naturally Camouflaged
    Originally posted by Lanny This would be a simple enough change that I'd say just do a PR, BUT it gets a little tricky with how the themes are set up. Basically the server side view of themes is "a user's theme is one of X values, load a stylesheet corresponding to the theme". The UI code knows lots of stuff about a theme, like what the dominant color is, but the server side doesn't. So the config had to be changed to allow "theme attributes", e.g. the theme color (since the meta tag in question is generated as part of templateing, which is server side). And then this broke other things that expected the theme configuration to be a certain format. I changed the theme config so adding more "theme attributes" in the future will be easier and not require this kind of hoop jumping, but it involves enough of the config mechanism that I wouldn't really expect anyone to do it without being pretty familiar with the code. This ended up being the code change necessary if anyone happens to be interested:

    https://github.com/Lanny/ISS/commit/77ee5bc592405735e939e6a9168282767ebc311d

    tl;dr: it's kind of complicated so I just went ahead and did it myself.

    Falcon: I don't have device with an appropriate OS to test this. It should be live now. Could you try it out with the three themes and let me know if it looks OK? Please screenshot if not.

    My nigga. Thanks I will test it now. It definitely works for AMOLED now!
  10. #10
    ORACLE Naturally Camouflaged
    Oh shit it actually looks really nice for the &T theme too. Bibliotek works too, but it's just white so yeah
  11. #11
    ORACLE Naturally Camouflaged
    If you want to also support iOS and Safari, you can add this to the header, same values

    <meta name="apple-mobile-web-app-status-bar-style" content="{% get_theme_color request.user %}">
  12. #12
    Star Trek VI: The Undiscovered Country Dark Matter [my scoffingly uncritical tinning]
    Earlier I thought my browser had been updated. Good change.
  13. #13
    ORACLE Naturally Camouflaged
    Submitted a PR for iOS and Safari now that it's super simple. I don't have any Apple stuff tho so someones gotta testicle it
    The following users say it would be alright if the author of this post didn't die in a fire!
  14. #14
    ORACLE Naturally Camouflaged
    Whoops made the commit on branch but didn't submit PR. Should be up now.
    The following users say it would be alright if the author of this post didn't die in a fire!
  15. #15
    Lanny Bird of Courage
    The iOS one is actually a bit more complicated. Normal safari ignores it, it only applies when you do the "add to my homescreen" thing. And that does this thing where if you trigger a full navigation (like this site does all the time) then you get kicked back to normal safari. I'd like to set up turbolinks optionally so that would work appropriately, but that's going to involve some significant work to not break the js/no-js mechanisms for stuff like post editing, quotes, etc plus I think there's going to have to be some cache busting code on the UI. So it goes on the back burner, but it's probably only a weekend of work.
    The following users say it would be alright if the author of this post didn't die in a fire!
  16. #16
    ORACLE Naturally Camouflaged
    Originally posted by Lanny The iOS one is actually a bit more complicated. Normal safari ignores it, it only applies when you do the "add to my homescreen" thing. And that does this thing where if you trigger a full navigation (like this site does all the time) then you get kicked back to normal safari. I'd like to set up turbolinks optionally so that would work appropriately, but that's going to involve some significant work to not break the js/no-js mechanisms for stuff like post editing, quotes, etc plus I think there's going to have to be some cache busting code on the UI. So it goes on the back burner, but it's probably only a weekend of work.

    "It just works"

  17. #17
    WellHung Black Hole
    Op ur a fucking faggot who cares about gay stuff.
Jump to Top