diff --git a/stylesheets/Main.scss b/stylesheets/Main.scss index 6b492cf170f..c88ee79ee58 100644 --- a/stylesheets/Main.scss +++ b/stylesheets/Main.scss @@ -33,6 +33,10 @@ @use "commons/Matchseries"; @use "commons/MatchTable"; @use "commons/NavigationCard"; +@use "commons/LiquipediaLinks"; +@use "commons/Timeline"; +@use "commons/SpellCard"; +@use "commons/Placement"; @use "commons/Miscellaneous"; @use "commons/BigMatch"; @use "commons/BootstrapVisibility"; diff --git a/stylesheets/commons/Faction.scss b/stylesheets/commons/Faction.scss index 0e00d8f9f00..aba97ab89bf 100644 --- a/stylesheets/commons/Faction.scss +++ b/stylesheets/commons/Faction.scss @@ -141,3 +141,23 @@ Author(s): hjpalpha background: var( --clr-forest-20, #d1ffcc ) !important; } } + +/******************************************************************************* +Template(s): Race icons on the Warcraft wiki +Author(s): FO-nTTaX +*******************************************************************************/ +.wiki-warcraft .race-icon-small img { + width: 19px; + height: 19px; +} + +/******************************************************************************* +Template(s): Player Faction Icons +Author(s): salle +*******************************************************************************/ +.faction img { + width: 18px; + height: 18px; + vertical-align: middle; + image-rendering: -webkit-optimize-contrast; +} diff --git a/stylesheets/commons/Icons.scss b/stylesheets/commons/Icons.scss index a312c83d001..de10d73bc44 100644 --- a/stylesheets/commons/Icons.scss +++ b/stylesheets/commons/Icons.scss @@ -238,3 +238,98 @@ https://liquipedia.net/commons/Infobox_Icons @include icon-make-image( zhangyutv, "//liquipedia.net/commons/images/c/cf/InfoboxIcon_ZhangyuTV.png" ); @include icon-make-image( zhanqitv, "//liquipedia.net/commons/images/b/b0/InfoboxIcon_ZhanqiTV.png" ); } + +/******************************************************************************* +Template(s): info-icon +Author(s): FO-nTTaX +*******************************************************************************/ +.info-icon { + cursor: pointer; + height: 12px; + width: 12px; + background-image: url( data:image/svg+xml;utf8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2012%2012%22%3E%3Cdefs%3E%3Cstyle%3E.c%7Bfill%3A%23616161%7D.i%7Bfill%3A%23fff%7D%3C%2Fstyle%3E%3C%2Fdefs%3E%3Ccircle%20class%3D%22c%22%20cx%3D%226%22%20cy%3D%226%22%20r%3D%226%22%2F%3E%3Crect%20class%3D%22i%22%20x%3D%225%22%20y%3D%222%22%20width%3D%222%22%20height%3D%222%22%2F%3E%3Cpolygon%20class%3D%22i%22%20points%3D%224%205%204%206%205%206%205%209%204%209%204%2010%208%2010%208%209%207%209%207%205%204%205%22%2F%3E%3C%2Fsvg%3E ); + background-size: contain; + background-repeat: no-repeat; + background-color: transparent; + image-rendering: -webkit-optimize-contrast; + display: inline-block; +} + +/******************************************************************************* +Template(s): 16px Icons +Author(s): iMarbot +*******************************************************************************/ +.icon-16px { + vertical-align: middle; + display: inline-flex; + justify-content: center; + align-items: center; + min-height: 16px; + min-width: 16px; +} + +.icon-16px img { + max-width: 16px; + max-height: 16px; + height: auto; + width: auto; +} + +.icon-16px a { + display: contents; +} + +/* dark mode support */ +.icon-16px.darkmode { + display: none; +} + +[ data-darkreader-scheme="dark" ], +.theme--dark { + .icon-16px.lightmode { + display: none; + } + + .icon-16px.darkmode { + display: inline-flex; + } +} + +/******************************************************************************* +Template: Darkmode 32px icons +Author(s): iMarbot +*******************************************************************************/ +[ data-darkreader-scheme="dark" ], +.theme--dark { + & .vodlink img, + .group-table-header-right img { + &[ src*="VOD_Icon" ], + &[ src*="Match_Info_Stats" ], + &[ src*="/Trial.png" ], + &[ src*="/Substitution.png" ], + &[ src*="Reviews32" ], + &[ src*="Preview_Icon32" ], + &[ src*="LiveReport32" ], + &[ src*="Interview32" ], + &[ src*="Highlights_Icon32" ], + &[ src*="Captain_Icon" ], + &[ src*="Recap_Icon" ] { + filter: invert( 1 ); + } + } + + & img[ src*="Vod.svg" ], + & img[ src*="Vod-" ] { + /* Changes the color of the VOD icon to Secondary 80 ( B3B3B3 ) */ + filter: invert( 79% ) sepia( 1% ) saturate( 0% ) hue-rotate( 121deg ) brightness( 93% ) contrast( 85% ); + } + + & img.player-role-icon, + .rts-team-list-icon-tag img { + &[ src*="/Trial.png" ], + &[ src*="/Substitution.png" ], + &[ src*="Captain_Icon" ] { + filter: invert( 1 ); + } + } +} diff --git a/stylesheets/commons/Images.scss b/stylesheets/commons/Images.scss index db63d596aa1..10aee0731cb 100644 --- a/stylesheets/commons/Images.scss +++ b/stylesheets/commons/Images.scss @@ -60,3 +60,41 @@ div.thumbinner { .tright .thumbinner { min-width: 6.25rem; } + +/******************************************************************************* +Template(s): Images without license information +Author(s): FO-nTTaX +*******************************************************************************/ +.logged-in img.image-license-issue { + border: 5px solid #ff0000 !important; + box-sizing: border-box !important; +} + +/******************************************************************************* +Template(s): Darkmode images on file pages +Author(s): FO-nTTaX, iMarbot +*******************************************************************************/ +html:not( [ data-darkreader-scheme="dark" ] ):not( .theme--dark ) { + #file img[ src*="darkmode" ]:not( :hover ), + .searchResultImage img[ src*="darkmode" ], + .gallerybox img[ src*="darkmode" ] { + background-color: #272727; + } +} + +#file img[ src*="lightmode" ]:not( :hover ), +.searchResultImage img[ src*="lightmode" ], +.gallerybox img[ src*="lightmode" ] { + @at-root [ data-darkreader-scheme="dark" ] & { + background-color: #808080; + } + + @at-root .theme--dark & { + background-color: #d8d8d8; + } +} + +.filehistory a img[ src*="darkmode" ], +#file img[ src*="darkmode" ]:hover { + background: url( data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAAAAAA6mKC9AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAHElEQVQY02MUZoAADijNxIAG6CPAArP/x8C6AwCutQE9GsmfRAAAAABJRU5ErkJggg== ) repeat; +} diff --git a/stylesheets/commons/Infobox.scss b/stylesheets/commons/Infobox.scss index 0e7bf6fe077..6092cb034fa 100644 --- a/stylesheets/commons/Infobox.scss +++ b/stylesheets/commons/Infobox.scss @@ -444,3 +444,45 @@ Author(s): iMarbot padding: 15px 15px 0; } } + +/******************************************************************************* +Template(s): InfoboxIconSmall +Author(s): iMarbot +*******************************************************************************/ +.infobox-icon-small img { + max-width: 20px; + max-height: 20px; + vertical-align: top; +} + +.infobox-icon-small .team-template-image img { + max-width: unset; + max-height: unset; +} + +.infobox-icon-small span.league-icon-small-image { + width: 20px; + height: 20px; +} + +/******************************************************************************* +Template(s): Upcoming and ongoing games of +Author(s): FO-nTTaX +*******************************************************************************/ +.infobox-upcoming-ongoing-matches { + width: 100%; + + @media ( min-width: 601px ) { + float: right; + clear: right; + max-width: 300px; + margin: 0 0 10px 10px; + } + + #{&}-header { + font-size: 130%; + font-weight: bold; + text-align: center; + padding: 2px; + } +} diff --git a/stylesheets/commons/LiquipediaLinks.scss b/stylesheets/commons/LiquipediaLinks.scss new file mode 100644 index 00000000000..602de7d74a0 --- /dev/null +++ b/stylesheets/commons/LiquipediaLinks.scss @@ -0,0 +1,109 @@ +/******************************************************************************* +Template(s): Liquipedia links +Author(s): FO-nTTaX, Elysienna +*******************************************************************************/ +@keyframes badgePopAnimation { + 0% { + transform: scale( 0 ); + } + + 50% { + transform: scale( 1.2 ); + } + + 100% { + transform: scale( 1 ); + } +} + +@keyframes badgeTooltipAnimation { + 0% { + transform: translateX( 97% ); + opacity: 0; + } + + 20% { + transform: translateX( 100% ); + opacity: 1; + } + + 90% { + transform: translateX( 100% ); + opacity: 1; + } + + 99% { + transform: translateX( 97% ); + opacity: 0; + } + + 100% { + visibility: hidden; + pointer-events: none; + } +} + +.liquipedia-links-badge { + position: absolute; + top: 0.0625rem; + padding: 0.125rem 0.25rem; + right: 0; + font-size: 0.75rem; + display: flex; + animation-name: badgePopAnimation; + animation-delay: 1s; + animation-duration: 0.4s; + animation-fill-mode: forwards; + transform: scale( 0 ); + border-radius: 0.5rem; + + &--tooltip { + background-color: #ffffff; + position: absolute; + color: var( --clr-secondary-39 ); + border-radius: 0.25rem; + font-size: 0.75rem; + font-family: "Open Sans", sans-serif; + font-weight: bold; + padding: 0.125rem 0.25rem; + top: 0.0625rem; + right: -0.5rem; + z-index: 1; + opacity: 0; + box-shadow: 0 0 0.625rem 0 rgba( 0, 0, 0, 0.5 ); + animation-name: badgePopAnimation; + animation-delay: 2s; + animation-duration: 4s; + animation-fill-mode: forwards; + line-height: 1.2; + + @media screen and ( max-width: 767px ) { + width: 30vw; + white-space: normal; + } + + &::before { + content: ""; + position: absolute; + top: 0.25rem; + left: -0.3125rem; + width: 0; + height: 0; + border-top: 4px solid transparent; + border-bottom: 4px solid transparent; + border-right: 5px solid var( --clr-primary-100 ); + } + } + + &-mobile { + position: relative; + top: -5px; + padding: 2px 4px; + left: 0; + margin-right: 3px; + } +} + +.menu-italic { + font-style: italic; +} diff --git a/stylesheets/commons/Mainpage.scss b/stylesheets/commons/Mainpage.scss index e3bad969567..448627c84eb 100644 --- a/stylesheets/commons/Mainpage.scss +++ b/stylesheets/commons/Mainpage.scss @@ -769,3 +769,27 @@ Author(s): FO-nTTaX #images-taken-on-this-day img[ src*="darkmode" ] { background-color: #272727; } + +/******************************************************************************* +Template: Sad box for main page +Author(s): FO-nTTaX +*******************************************************************************/ +.sadbox { + border: 1px solid #000000; + color: #ffffff; + font-size: 18px; + text-align: center; + border-radius: 0.5rem; + overflow: hidden; + + a { + background-color: #464646; + color: #ffffff !important; + display: block; + padding: 10px; + + &:hover { + background-color: #232323; + } + } +} diff --git a/stylesheets/commons/Miscellaneous.scss b/stylesheets/commons/Miscellaneous.scss index 045fd4d3d9d..680778352ba 100644 --- a/stylesheets/commons/Miscellaneous.scss +++ b/stylesheets/commons/Miscellaneous.scss @@ -8,15 +8,6 @@ Author(s): FO-nTTaX /* isolation: isolate; */ } -/******************************************************************************* -Template(s): Images without license information -Author(s): FO-nTTaX -*******************************************************************************/ -.logged-in img.image-license-issue { - border: 5px solid #ff0000 !important; - box-sizing: border-box !important; -} - /******************************************************************************* Template(s): Documentation Author(s): FO-nTTaX @@ -64,22 +55,6 @@ Author(s): FO-nTTaX display: none; } -/******************************************************************************* -Template(s): info-icon -Author(s): FO-nTTaX -*******************************************************************************/ -.info-icon { - cursor: pointer; - height: 12px; - width: 12px; - background-image: url( data:image/svg+xml;utf8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2012%2012%22%3E%3Cdefs%3E%3Cstyle%3E.c%7Bfill%3A%23616161%7D.i%7Bfill%3A%23fff%7D%3C%2Fstyle%3E%3C%2Fdefs%3E%3Ccircle%20class%3D%22c%22%20cx%3D%226%22%20cy%3D%226%22%20r%3D%226%22%2F%3E%3Crect%20class%3D%22i%22%20x%3D%225%22%20y%3D%222%22%20width%3D%222%22%20height%3D%222%22%2F%3E%3Cpolygon%20class%3D%22i%22%20points%3D%224%205%204%206%205%206%205%209%204%209%204%2010%208%2010%208%209%207%209%207%205%204%205%22%2F%3E%3C%2Fsvg%3E ); - background-size: contain; - background-repeat: no-repeat; - background-color: transparent; - image-rendering: -webkit-optimize-contrast; - display: inline-block; -} - /******************************************************************************* Template(s): Flags Author(s): FO-nTTaX, salle @@ -156,116 +131,6 @@ Author(s): FO-nTTaX } } -/******************************************************************************* -Template(s): Liquipedia links -Author(s): FO-nTTaX, Elysienna -*******************************************************************************/ -@keyframes badgePopAnimation { - 0% { - transform: scale( 0 ); - } - - 50% { - transform: scale( 1.2 ); - } - - 100% { - transform: scale( 1 ); - } -} - -@keyframes badgeTooltipAnimation { - 0% { - transform: translateX( 97% ); - opacity: 0; - } - - 20% { - transform: translateX( 100% ); - opacity: 1; - } - - 90% { - transform: translateX( 100% ); - opacity: 1; - } - - 99% { - transform: translateX( 97% ); - opacity: 0; - } - - 100% { - visibility: hidden; - pointer-events: none; - } -} - -.liquipedia-links-badge { - position: absolute; - top: 0.0625rem; - padding: 0.125rem 0.25rem; - right: 0; - font-size: 0.75rem; - display: flex; - animation-name: badgePopAnimation; - animation-delay: 1s; - animation-duration: 0.4s; - animation-fill-mode: forwards; - transform: scale( 0 ); - border-radius: 0.5rem; - - &--tooltip { - background-color: #ffffff; - position: absolute; - color: var( --clr-secondary-39 ); - border-radius: 0.25rem; - font-size: 0.75rem; - font-family: "Open Sans", sans-serif; - font-weight: bold; - padding: 0.125rem 0.25rem; - top: 0.0625rem; - right: -0.5rem; - z-index: 1; - opacity: 0; - box-shadow: 0 0 0.625rem 0 rgba( 0, 0, 0, 0.5 ); - animation-name: badgePopAnimation; - animation-delay: 2s; - animation-duration: 4s; - animation-fill-mode: forwards; - line-height: 1.2; - - @media screen and ( max-width: 767px ) { - width: 30vw; - white-space: normal; - } - - &::before { - content: ""; - position: absolute; - top: 0.25rem; - left: -0.3125rem; - width: 0; - height: 0; - border-top: 4px solid transparent; - border-bottom: 4px solid transparent; - border-right: 5px solid var( --clr-primary-100 ); - } - } - - &-mobile { - position: relative; - top: -5px; - padding: 2px 4px; - left: 0; - margin-right: 3px; - } -} - -.menu-italic { - font-style: italic; -} - /******************************************************************************* Template(s): Box Author(s): FO-nTTaX @@ -320,38 +185,6 @@ Author(s): FO-nTTaX font-size: 51px !important; } -/******************************************************************************* -Template(s): Prizepool Tables -Author(s): FO-nTTaX -*******************************************************************************/ -@media ( max-width: 767px ) { - .prizepooltable { - min-width: 100%; - } -} - -/******************************************************************************* -Template(s): Upcoming and ongoing games of -Author(s): FO-nTTaX -*******************************************************************************/ -.infobox-upcoming-ongoing-matches { - width: 100%; - - @media ( min-width: 601px ) { - float: right; - clear: right; - max-width: 300px; - margin: 0 0 10px 10px; - } - - #{&}-header { - font-size: 130%; - font-weight: bold; - text-align: center; - padding: 2px; - } -} - /******************************************************************************* Template(s): LeagueIconSmall Author(s): FO-nTTaX @@ -396,124 +229,6 @@ span.icon-small.darkmode { } } -/******************************************************************************* -Template(s): Race icons on the Warcraft wiki -Author(s): FO-nTTaX -*******************************************************************************/ -.wiki-warcraft .race-icon-small img { - width: 19px; - height: 19px; -} - -/******************************************************************************* -Template(s): Timelines -Author(s): FO-nTTaX -*******************************************************************************/ -.timeline { - border: 1px solid var( --table-border-color, #dddddd ); - vertical-align: middle; -} - -.timeline-inner { - overflow: hidden; -} - -.timeline-heading { - font-size: 200%; - text-align: center; - vertical-align: middle; - border-bottom: 1px solid var( --table-border-color, #dddddd ); -} - -.timeline-row { - vertical-align: middle; - - &:nth-of-type( 2n ) { - background-color: #eeeeee; - } - - > div { - vertical-align: middle; - display: inline-block; - position: relative; - height: 35px; - padding: 4px; - - &:nth-of-type( 1 ) { - width: 150px; - line-height: 27px; - font-weight: bold; - } - - &:nth-of-type( 2 ) { - width: calc( 100% - 150px ); - } - } -} - -.timeline-period { - position: absolute; - top: 5px; - height: 25px; - background-color: #bbbbbb; -} - -.timeline-lines { - display: flex; - justify-content: space-between; - padding-left: 150px; -} - -.timeline-line { - width: 0; - border-left: 1px solid var( --table-border-color, #333333 ); - opacity: 0.5; - height: 5000px; - margin-top: -5000px; - pointer-events: none; -} - -.timeline-footer { - display: flex; - justify-content: space-between; - height: 92px; - padding-left: 150px; - border-top: 1px solid var( --table-border-color, #dddddd ); - - &-date { - width: 24px; - - &-inner { - padding: 4px; - transform: rotate( 90deg ); - margin-top: 0; - } - } -} - -.timeline-header-sc { - padding: 0; - text-align: center; - margin: 0 0 0 0 !important; - float: right; - table-layout: fixed; -} - -.timeline-now-sc { - position: absolute; - height: 100%; - border-right: 1px dotted var( --table-border-color, #9a9a9a ); - width: 1px; -} - -.timeline-team-element-sc { - border: 1px solid #9a9a9a; - padding-top: 5px; - height: 40px; - background-color: var( --table-variant-background-color, #eeeeee ); - text-align: center; -} - /******************************************************************************* Template(s): Progress bars Author(s): FO-nTTaX @@ -558,104 +273,6 @@ Author(s): FO-nTTaX } } -/******************************************************************************* -Template(s): SpellCard -Author(s): FO-nTTaX, Rapture -*******************************************************************************/ -.spellcard-wrapper { - display: flex; - flex-wrap: wrap; - margin: 10px 0; - - .hr { - height: 0.125rem; - } - - @media ( max-width: 600px ) { - display: block; - } -} - -.spellcard { - display: inline-block; - max-width: 550px; - clear: both; - border-width: 1px; - border-style: solid; - background-color: var( --clr-surface-2, #eeeeee ); - margin-right: 1em; - - @media ( max-width: 600px ) { - margin-right: 0; - max-width: none; - } - - @media ( min-width: 2560px ) { - /* spazer's test changes */ - /* Make spellcards wider for wide screens */ - max-width: 700px; - } -} - -.spellcard-description { - display: inline-block; - width: calc( 100% - 124px ); - border-width: 1px 0; - border-style: solid; - padding: 5px 0; - margin: 0 5px; - - @media ( max-width: 600px ) { - width: auto; - } -} - -.spellcard-infotable { - display: block; - clear: left; - vertical-align: top; - padding-bottom: 5px; - margin: 5px 5px 0 5px; - - th { - display: inline; - padding-right: 5px; - vertical-align: top; - white-space: nowrap; - } - - td { - display: inline-block; - vertical-align: top; - } -} - -.spellcard-interactions { - display: block; - vertical-align: top; - - th { - padding: 3px 5px 0 0; - vertical-align: top; - } - - td { - padding-top: 3px; - vertical-align: top; - } -} - -.spellcard-notes { - display: inline-block; - vertical-align: top; - flex: 1 0 400px; - padding-top: 5px; - - @media ( max-width: 600px ) { - flex: none; - } -} - /* Allow limiting of which header levels are shown in a TOC;