Quantcast
Channel: phpBB.com
Viewing all articles
Browse latest Browse all 1314

Extensions in Development • Re: [3.3][DEV] ACP Styled

$
0
0
Hello,
I'd like to find a random image script that would work better than the on I'm using.
The images are not random with reloads, only with ctrl-F5 - Looking for a better way to make that work.
By keeping your current file structure:

admin_light_image.css

Code:

#page-header {background-image: var(--random-header, url("../images/header_bg_light.jpg"));background-repeat: no-repeat;background-size: 100% 150%;background-position: 50% 25%;}
admin_dark_image.css

Code:

#page-header {background-image: var(--random-header, url("../images/header_bg_dark.jpg"));background-repeat: no-repeat;background-size: 100% 150%;background-position: 50% 25%;}
acp_overall_header_head_append.html

Code:

{% set theme = 'light' %}{% if ACP_DARK_STYLE %}{% set theme = 'dark' %}{% endif %}{% INCLUDECSS 'admin_' ~ theme ~ '.css' %}{% if ACP_HEADER_IMAGE %}{% set random = random(1, 9) %}{% INCLUDECSS 'admin_' ~ theme ~ '_image.css' %}<style>#page-header{--random-header: url(/ext/sniper/acpstyled/adm/images/header_bg_{{ theme }}.jpg/header_bg{{ random }}.jpg);}</style>{% endif %}

Statistics: Posted by cabot — Wed Jun 19, 2024 10:05 am



Viewing all articles
Browse latest Browse all 1314

Trending Articles