Welcome to Code Forum!

Join a community that supports you and your coding journey from day one. We strive to be a friendly, supportive community that empowers everyone to be better developers. By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!
  • Guest, before posting your code please take these rules into consideration:
    • It is required to use our BBCode feature to display your code. While within the editor click < / > or >_ and place your code within the BB Code prompt. This helps others with finding a solution by making it easier to read and easier to copy.
    • You can also use markdown to share your code. When using markdown your code will be automatically converted to BBCode. For help with markdown check out the markdown guide.
    • Don't share a wall of code. All we want is the problem area, the code related to your issue.

    GIF shows where to locate </> in the thread and or post editor toolbar.
    To learn more about how to use our BBCode feature, review our "How to post your code into threads" here.

    Thank you, Code Forum.

HTML & CSS Color generator code for Jcink mobile view

Bryn

Coder
First of all, I have been referred to by someone I know regarding quite a tricky problem regarding the development of a new skin for my forum (which runs on Jcink). The new skin, while on a test board for now, has a color slider originally made by Reid but for some reason, it's completely absent from the forum's Mobile Version and I personally don't want any mobile users feel left out from this nice little feature whenever it's released.

For anyone curious, here are the codes for the color slider itself:
HTML:
<style>
.slide_input {
    margin-left: 10px;
}

#css_display, #blahs {
    width: 50%;
}

span.bleh table {
    width: 100%;
    margin: 10px auto;
    padding: 10px;
}

div.ui-slider-range {
    width: 0 !important;
}
</style>

HTML:
<span class="bleh">
<table class="tableborder">
    <tr><td colspan="2" style="text-align: right">Color generator by Reid</td></tr>
    <tr><td>Hue:</td><td style="display: flex"> <input type="text" id="hue_slider" class="slide_input" value="199"/></td></tr>
    <tr><td>Saturation:</td><td style="display: flex"> <input type="text" id="sat_slider" class="slide_input" value="75"/></td></tr>
    <tr><td>Lightness:</td><td style="display: flex"> <input type="text" id="light_slider" class="slide_input" value="35"/></td></tr>
    <tr><td colspan="2"><button type="button" id="reset_theme">Reset to original colors</button></td></tr>
</table></span>

And here is the line of code containing the JavaScript that allows it to work:
HTML:
<script src="https://files.jcink.net/uploads/cory/rotate_colors.js"></script>

And the link to the test board containing the new skin project is here: Jsandbox

Do note that the color sliders exist in the Light, Dark and Mixed versions of the skin.

If anybody can help tweaking the above codes so that it can be safely used for mobile view, I would really appreciate it.
 
First of all, I have been referred to by someone I know regarding quite a tricky problem regarding the development of a new skin for my forum (which runs on Jcink). The new skin, while on a test board for now, has a color slider originally made by Reid but for some reason, it's completely absent from the forum's Mobile Version and I personally don't want any mobile users feel left out from this nice little feature whenever it's released.

For anyone curious, here are the codes for the color slider itself:
HTML:
<style>
.slide_input {
    margin-left: 10px;
}

#css_display, #blahs {
    width: 50%;
}

span.bleh table {
    width: 100%;
    margin: 10px auto;
    padding: 10px;
}

div.ui-slider-range {
    width: 0 !important;
}
</style>

HTML:
<span class="bleh">
<table class="tableborder">
    <tr><td colspan="2" style="text-align: right">Color generator by Reid</td></tr>
    <tr><td>Hue:</td><td style="display: flex"> <input type="text" id="hue_slider" class="slide_input" value="199"/></td></tr>
    <tr><td>Saturation:</td><td style="display: flex"> <input type="text" id="sat_slider" class="slide_input" value="75"/></td></tr>
    <tr><td>Lightness:</td><td style="display: flex"> <input type="text" id="light_slider" class="slide_input" value="35"/></td></tr>
    <tr><td colspan="2"><button type="button" id="reset_theme">Reset to original colors</button></td></tr>
</table></span>

And here is the line of code containing the JavaScript that allows it to work:
HTML:
<script src="https://files.jcink.net/uploads/cory/rotate_colors.js"></script>

And the link to the test board containing the new skin project is here: Jsandbox

Do note that the color sliders exist in the Light, Dark and Mixed versions of the skin.

If anybody can help tweaking the above codes so that it can be safely used for mobile view, I would really appreciate it.

It appears to not even be in the DOM on mobile so some script/component isn't even being sent to mobile devices. When I inspected Safari on my phone, it isn't even in the DOM.


The phone in the screenshot is my actual iPhone being mirrored on my laptop. It is not a simulator.

Here's a vid of the inspector:
 
Last edited:
That's something that my right-hand man of the forum (Cory, who is my forum's official Developer) to try and sort out... and perhaps tweaking the mobile layout might make it suddenly appear in mobile view.

And I can allow anybody else to try and do this should Cory be unable to do so, where I can make them an "Assistant" that way (which allows them to access certain parts of the Admin CP, such as Skins & Templates).
 
That's something that my right-hand man of the forum (Cory, who is my forum's official Developer) to try and sort out... and perhaps tweaking the mobile layout might make it suddenly appear in mobile view.

And I can allow anybody else to try and do this should Cory be unable to do so, where I can make them an "Assistant" that way (which allows them to access certain parts of the Admin CP, such as Skins & Templates).

It's not just being hidden from view. It's literally not in the code that the browser receives to display the page. Whatever is controlling whether or not you see a mobile layout or desktop layout - which doesn't appear to be the CSS - is most likely also controlling whether you get the color sliders or not.
 
Just to say, the reason why the sliders are completely absent from mobile view is because mobile view generally ignores whatever's in the board wrappers and because of this, something about a "mobile logo" macro would have to be added in, to which Cory will test out whenever he can.

Thanks for your assistance so far @tomliv :thumbsup:
 
Bumping this... to say that Cory hasn't had the time to do what I stated and, I wonder if anybody can help make the colour sliders visible for these skins when viewing on mobile mode. Either any of you can provide me code for this to happen, or volunteer to be an "Assistant" if you join the test board to do this, I'm open for anything 🙂
 
Back
Top Bottom