Files
dokuwiki-plugin-botmon/style.less
Sascha Leib a301cf8b6b CSS updates
2025-09-05 16:43:38 +02:00

407 lines
10 KiB
Plaintext

#botmon__admin {
section[role="tabpanel"] {
margin: .25rem 0;
}
/* grid layout classes (taken from the Ad-Hoc Wrap plugin) */
.grid-2-columns,
.grid-3-columns {
display: grid;
}
.grid-2-columns {
grid-template-columns: 1fr 1fr;
grid-gap: 0 .5em;
}
.grid-3-columns {
grid-template-columns: 1fr 1fr 1fr;
grid-gap: 0 .33em;
}
/* the "today" tab: */
#botmon__today {
/* item header */
header {
background-color: #F0F0F0;
color: #333;
border: #CCC solid 1px;
border-radius: .5rem .5rem 0 0;
margin: .5rem 0 1pt 0;
padding: .25rem .5rem;
font-size: 1rem;
line-height: 1.25;
}
/* list formatting */
dl {
& {
border-left: #555 solid 1px;
padding-left: .5rem;
margin: 0;
font-size: 1rem;
line-height: 1.5;
}
&:first-child {
border-left: none;
padding-left: 0;
}
dt {
margin-bottom: .2em;
}
dd {
display: flex;
justify-content: space-between;
padding: 0; margin: 0;
}
dd:nth-child(even) {
background-color: #EEE;
}
}
/* Content */
#botmon__today__content {
& details {
& {
margin: 0 0 1pt 0;
text-align: left;
}
summary {
& {
display: flex;
justify-content: flex-start;
align-items: center;
column-gap: .25em;
font-weight: bold;
font-size: 1rem;
line-height: 1.5;
margin: 0;
padding: .25em;
color: #333;
cursor: pointer;
}
&::marker, &::before {
content: none;
display: none;
}
&::before {
content: '';
display: inline-block;
width: 1.25em; height: 1.25em;
background: transparent url('img/chevron.svg') center no-repeat;
background-size: 1.25em;
transform: rotate(-90deg);
transition-duration: .25s;
}
}
&[open] {
& > summary::before {
transform: rotate(0deg);
}
}
& > div {
padding: .5rem;
border: #CCC solid 1px;
border-top-width: 0;
border-radius: 0 0 .25rem .25rem;
}
& details summary {
background-color: transparent;
border: transparent none 0;
}
}
& > details > summary {
background-color: #F0F0F0;
border: #CCC solid 1px;
}
}
/* visitor lists: */
#botmon__today__visitorlists {
details ul {
margin: 0;
padding: 0;
list-style: none;
}
details ul > li {
margin: 0 0 0 .75rem;
padding: 0;
color: #000;
}
details ul > li > details {
border: #ccc solid 1px;
border-radius: .5em;
}
details ul > li > details > summary {
display: flex;
justify-content: space-between;
align-items: center;
column-gap: .5em;
font-weight: normal;
font-size: 1rem;
line-height: 1.5;
background-color: #F0F0F0;
border-bottom: #CCC solid 1px;
border-radius: .5em;
}
details ul > li > details > summary > span {
display: flex;
align-items: center;
column-gap: .25em;
}
details ul > li > details > summary > span:first-child {
flex-grow: 1;
}
details ul > li > details > summary > span > span {
display: flex;
align-items: center;
column-gap: .25em;
height: 1.5em;
overflow: hidden;
}
details ul > li > details > summary > span > span::before {
content: '';
display: inline-block;
min-width: 1.25em; height: 1em;
text-align: center;
background: transparent url('img/placeholder.svg') center no-repeat;
background-size: 1em;
}
details ul > li > details > summary > span > span.icon {
width: 1.25em;
overflow: hidden;
}
details ul > li > details > summary > span > span[title] {
cursor: help;
}
dl.visitor_details {
& {
display: grid;
grid-template-columns: min-content auto;
border-left: transparent none 0;
}
dt {
grid-column: 1;
white-space: nowrap;
}
dd {
grid-column: 2;
display: inline-block;
background-color: transparent;
}
dd.pages {
& {
}
ul {
li {
& {
display: flex;
justify-content: space-between;
align-items: center;
}
}
}
}
}
dd.has_icon::before {
content: '';
display: inline-block;
width: 1.25em; height: 1.25em;
background: transparent url('img/placeholder.svg') center no-repeat;
background-size: 1em;
}
ul.eval {
li {
display: flex;
justify-content: space-between;
align-items: center;
}
li:nth-child(odd) {
background-color: #EEE;
}
li.total {
border-top: #333 solid 1px;
font-style: italic;
}
}
/* bot icons */
span.bot::before, dd.bot::before { background-image: url('img/robot.svg') }
span.bot_bingbot::before, dd.bot_bingbot::before { background-image: url('img/bing.svg') }
span.bot_googlebot::before, dd.bot_googlebot::before,
span.bot_googleads::before, dd.bot_googleads::before,
span.bot_googleapi::before, dd.bot_googleapi::before { background-image: url('img/google.svg') }
span.bot_applebot::before, dd.bot_applebot::before { background-image: url('img/apple.svg') }
span.bot_openai::before, dd.bot_openai::before { background-image: url('img/openai.svg') }
span.bot_metabots::before, dd.bot_metabots::before { background-image: url('img/meta.svg') }
span.bot_yandexbots::before, dd.bot_yandexbots::before { background-image: url('img/yandex.svg') }
span.bot_seznambot::before, dd.bot_seznambot::before { background-image: url('img/seznam.svg') }
/* user info */
span.user_known::before { background-image: url('img/user.svg') }
/* platform icons */
span.platform_win10::before, dd.platform_win10::before { background-image: url('img/win11.svg') }
span.platform_macos::before, dd.platform_macos::before { background-image: url('img/apple.svg') }
span.platform_linux::before, dd.platform_linux::before { background-image: url('img/linux.svg') }
span.platform_ios::before, dd.platform_ios::before { background-image: url('img/ios.svg') }
span.platform_android::before, dd.platform_android::before { background-image: url('img/android.svg') }
span.platform_winold::before, dd.platform_winold::before { background-image: url('img/winold.png') }
span.platform_macosold::before, dd.platform_macosold::before { background-image: url('img/macos.svg') }
span.platform_tizen::before, dd.platform_tizen::before { background-image: url('img/tizen.png') }
span.platform_hmos::before, dd.platform_hmos::before { background-image: url('img/hmos.svg') }
span.platform_chromium::before, dd.platform_chromium::before { background-image: url('img/chromium.svg') }
span.platform_bsd::before, dd.platform_bsd::before { background-image: url('img/freebsd.png') }
/* browser icons */
span.client_opera::before, dd.client_opera::before { background-image: url('img/opera.svg') }
span.client_msie::before, dd.client_msie::before { background-image: url('img/msie.svg') }
span.client_brave::before, dd.client_brave::before { background-image: url('img/brave.svg') }
span.client_msedge::before, dd.client_msedge::before { background-image: url('img/msedge.svg') }
span.client_chrome::before, dd.client_chrome::before { background-image: url('img/chrome.svg') }
span.client_chromeold::before, dd.client_chromeold::before { background-image: url('img/chromeold.svg') }
span.client_safari::before, dd.client_safari::before { background-image: url('img/safari.png') }
span.client_ddg::before, dd.client_ddg::before { background-image: url('img/ddg.svg') }
span.client_firefox::before, dd.client_firefox::before { background-image: url('img/firefox.png') }
span.client_samsung::before, dd.client_samsung::before { background-image: url('img/samsung.svg') }
span.client_uc::before, dd.client_uc::before { background-image: url('img/uc.svg') }
span.client_huawei::before, dd.client_huawei::before { background-image: url('img/huawei.png') }
span.client_vivaldi::before, dd.client_vivaldi::before { background-image: url('img/vivaldi.svg') }
span.client_aol::before, dd.client_aol::before { background-image: url('img/aol.png') }
/* ip address type */
span.ip6::before, dd.ip6::before { background-image: url('img/ip6.svg') }
span.ip4::before, dd.ip4::before { background-image: url('img/ip4.svg') }
span.ip0::before, dd.ip0::before { background-image: url('img/localhost.svg') }
/* user agent */
span.agent::before { background-image: url('img/info.svg') }
/* pageviews */
span.pageviews {
border: #999 solid 1px;
padding: 0 2px;
font-size: smaller;
border-radius: .25em;
}
span.pageviews::before { background-image: url('img/page.svg') }
}
/* item footer */
footer {
& {
display: flex;
align-items: center;
column-gap: .25rem;
background-color: #F0F0F0;
color: #333;
border: #CCC solid 1px;
border-radius: 0 0 .5rem .5rem;
margin: 1pt 0 0 0;
padding: .25rem .5rem;
line-height: 1.25;
}
& > svg {
width: 1.25em; height: 1.25em;
fill: #333;
flex-shrink: 0;
}
& > span {
font-size: .96rem;
line-height: 1.25rem;
}
& > span.error {
color: #961D1B;
font-weight: bold;
}
}
}
}
/* dark mode overrides */
@media (prefers-color-scheme: dark) {
body.darkmode.mode_admin #botmon__admin {
#botmon__today {
header {
background-color: #0c0c0d;
color: #adadb3;
border-color: #666;
}
/* list formatting */
dl {
& {
border-left-color: #777;
}
dt {
color: #adadb3;
}
dd:nth-child(even) {
background-color: #333337;
}
}
#botmon__today__content > details {
summary {
& {
background-color: #0c0c0d;
color: #adadb3;
border-color: #666;
}
&::after {
color: #76b0fd;
}
}
& > div {
border-color: #666;
}
}
/* visitor lists: */
#botmon__today__visitorlists {
details ul > li {
color: #aeaeae;
}
}
ul.eval {
li:nth-child(odd) {
background-color: #202022;
}
li.total {
border-top-color: #CCC;
}
}
footer {
& {
background-color: #0c0c0d;
color: #adadb3;
border-color: #CCC;
}
& > svg {
fill: #777;
}
& > span.error {
color: #961D1B;
}
}
}
}
}
/* layout overrides for narrow screens: */
@media (max-width: 670px) {
#botmon__admin {
.grid-2-columns,
.grid-3-columns {
grid-template-columns: 100%;
}
}
}