2019-11-04 00:52:34 +00:00
/ * *
* @ id photo
* @ name Photo
2019-11-21 20:59:22 +00:00
* @ description A different theme that looks great with a high-res photo behind it . Check the comment at the top of the CSS file for instructions on how to configure the photo behind it and the background colour . Credit for the default background image is unknown , but open an issue and I 'll add it right away if you' re the author .
2019-11-04 00:52:34 +00:00
* @ author Starbeamrainbowlabs
* @ author_link https : / / starbeamrainbowlabs . com /
* @ minversion v0 . 20
* /
2019-11-10 17:20:13 +00:00
/ *
To use this theme , copy the following into your custom css ;
2019-11-04 00:52:34 +00:00
: root {
2019-11-10 17:20:13 +00:00
--image-url : url ( "https://imgur.com/NSIDIeo.jpg" ) ;
2019-11-04 00:52:34 +00:00
--bg-colour : hsl ( 20 , 66 % , 44 % ) ;
2019-11-10 17:20:13 +00:00
}
. . . . changing URL to point to an image ( can be absolute or relative ) , and the background colour to a colour that will be displayed behind the image . It works best if the image has relatively plain bottom edge , as then it blends with the background colour better .
* /
: root {
2019-11-15 11:33:12 +00:00
--bg-colour : hsl ( 20 , 66 % , 44 % ) ;
--image-url : url ( "https://i.imgur.com/NSIDIeo.jpg" ) ;
2019-11-10 17:20:13 +00:00
2019-11-15 11:33:12 +00:00
/* --image-url: url("https://imgur.com/6KfDsYS.png"); */
/* --bg-colour: #34243D; */
2019-11-04 00:52:34 +00:00
--bg-a : hsla ( 0 , 0 % , 95 % , 0 . 5 ) ;
--bg-b : hsla ( 0 , 0 % , 95 % , 0 . 8 ) ;
--text-a : hsl ( 0 , 0 % , 10 % ) ;
2019-11-10 15:44:43 +00:00
--text-b : hsl ( 0 , 0 % , 25 % ) ;
2019-11-04 00:52:34 +00:00
--shadow-a : hsla ( 0 , 0 % , 25 % , 0 . 3 ) ;
--panel-padding : 0 . 7em ;
2019-11-10 15:44:43 +00:00
--addition : # 09b400 ;
--deletion : # cf1c11 ;
--nochange : # 847bc7 ;
counter-reset : search-results ;
2019-11-04 00:52:34 +00:00
}
html , body { font-size : 100 % ; }
body {
2019-11-10 17:20:13 +00:00
margin : 0 ;
2019-11-04 00:52:34 +00:00
display : grid ;
grid-template-columns : 1fr 4fr 1fr ;
2020-05-26 23:12:04 +00:00
grid-template-rows : repeat ( 7 , auto ) ;
2019-11-04 00:52:34 +00:00
grid-template-areas : "side-left header side-right"
"side-left nav-top side-right"
"side-left content side-right"
2020-05-26 23:12:04 +00:00
"side-left similar-suggestions side-right"
2019-11-04 00:52:34 +00:00
"side-left comments side-right"
"side-left footer side-right"
"side-left nav-bottom side-right" ;
background : var ( --image-url ) no-repeat top center / contain ,
var ( --bg-colour ) ;
color : var ( --text-a ) ;
2019-11-10 15:44:43 +00:00
font-family : sans-serif ;
2019-11-04 00:52:34 +00:00
}
2020-05-26 23:12:04 +00:00
body > nav , main , . similar-page-suggestions , . comments , footer {
2019-11-04 00:52:34 +00:00
margin : 1em 0 ;
background : var ( --bg-a ) ;
padding : var ( --panel-padding ) ;
box-shadow : 0 . 5em 0 . 5em 0 . 5em var ( --shadow-a ) ;
}
nav . top { grid-area : nav-top ; }
nav . bottom { grid-area : nav-bottom ; }
body > nav {
display : flex ;
flex-direction : row ;
align-items : center ;
justify-content : space-evenly ;
}
. nav-more { position : relative ; }
. nav-more label { font-weight : bolder ; cursor : pointer ; }
. nav-more input [ type = checkbox ] { display : none ; }
. nav-more-menu {
z-index : 10000 ;
position : absolute ; top : 2 . 6rem ; right : 100000px ;
text-align : left ;
background : var ( --bg-b ) ;
}
input [ type = checkbox ] : checked ~ . nav-more-menu { top : 2.15 em ; right : -2.7 em ; }
nav . mega-menu > span { flex : 1 ; line-height : 2 ; display : inline-block ; margin : 0 ; padding : 0.3 rem 0.5 rem ; }
nav . mega-menu { display : flex ; flex-direction : row ; padding-bottom : 0.4 em ; }
nav . mega-menu . category { min-width : 7.5 em ; padding : 0.3 em 1 em ; }
nav . mega-menu strong { display : block ; }
nav . mega-menu span { display : block ; }
h1 {
grid-area : header ;
text-align : center ;
}
. logo { max-width : 1.75 em ; vertical-align : middle ; }
main { grid-area : content ; position : relative ; }
. jump-to-comments { position : absolute ; top : var ( - - panel - padding ) ; right : var ( - - panel - padding ) ; }
main > h1 : first-child , . comments > h2 : first-child { margin-top : 0 ; }
2019-11-10 15:44:43 +00:00
table { border-collapse : collapse ; }
tr : nth-child ( 2n ) { background : var ( - - bg - a ) ; }
th , td { padding : 0.25 em 0.45 em ; }
2020-05-09 14:41:04 +00:00
pre , code , input , textarea { font-size : 1 rem ; }
img , video , audio { max-width : 100 % ; }
2019-11-04 00:52:34 +00:00
2020-05-23 19:38:01 +00:00
. spoiler { background : #333333 ; border-radius : 0.2 em ; color : transparent ; }
. spoiler : target { background : transparent ; color : inherit ; }
/* Ref https://devdocs.io/html/element/del#Accessibility_concerns it's better than nothing, but I'm not happy with it. How would a screen reader user skipt he spsoiler if they don't want to hear it? */
. spoiler :: before , . spoiler :: after {
clip-path : inset ( 100 % ) ; clip : rect ( 1px , 1px , 1px , 1px ) ;
position : absolute ; width : 1px ; height : 1px ;
overflow : hidden ; white-space : nowrap ;
}
. spoiler :: before { content : " [spoiler start] " ; }
. spoiler :: after { content : " [spoiler end] " ; }
2019-11-10 15:44:43 +00:00
main label { font-weight : bold ; display : inline-block ; min-width : 12 em ; }
textarea { min-height : 10 em ; }
textarea , # tags , # search-box {
width : 100 % ;
2019-11-04 00:52:34 +00:00
box-sizing : border-box ;
2019-11-10 15:44:43 +00:00
}
2020-07-08 20:38:03 +00:00
. fit-text-mirror { position : absolute ; top : 0 ; left : -10000 vw ; word-wrap : break-word ; white-space : pre-wrap ; }
2020-01-26 21:04:39 +00:00
. awesomplete { width : 100 % ; }
2019-11-10 15:44:43 +00:00
textarea , input : not ( [ type = submit ] ) : not ( [ type = button ] ) {
font-family : "Ubuntu" , sans-serif ;
2019-11-10 17:20:13 +00:00
/* font-weight: light; */
2019-11-10 15:44:43 +00:00
font-size : 1 . 1em ;
background : var ( --bg-b ) ;
margin : 0 . 5em 0 ;
padding : 0 . 5em ;
border : 0 ;
box-shadow : inset 0 0 0 . 5em var ( --shadow-a ) ;
2019-11-04 00:52:34 +00:00
}
2020-05-09 14:41:04 +00:00
input [ type = submit ] . large { width : 100 % ; }
2019-11-10 15:44:43 +00:00
input [ type = submit ] {
2020-05-09 14:41:04 +00:00
box-sizing : border-box ;
2019-11-10 15:44:43 +00:00
margin : 0 . 25em 0 ;
padding : 0 . 1em 0 . 25em ;
font-weight : bold ;
font-size : 1 . 25em ;
}
. matching-tags-display {
--parent-margin : 0 . 7em ;
width : calc ( 100 % + ( var ( --parent-margin ) * 2 ) ) ; box-sizing : border-box ;
background : var ( --bg-b ) ;
margin-left : calc ( 0em - var ( --parent-margin ) ) ;
padding : 1em ;
}
. page-list { list-style-type : none ; margin : 0.3 rem ; padding : 0.3 rem ; }
. page-list li : not ( . header ) { margin : 0.3 rem ; padding : 0.3 rem ; }
. page-list li . size { margin-left : 0.7 rem ; color : var ( - - text - b ) ; }
. page-list li . editor { display : inline-block ; margin : 0 0.5 rem ; }
. page-list li . tags { margin : 0 1 rem ; }
. tag-list { list-style-type : none ; margin : 0.5 rem ; padding : 0.5 rem ; }
. tag-list li { display : inline-block ; margin : 1 rem ; }
. mini-tag { background : var ( - - bg - b ) ; padding : 0.2 rem 0.4 rem ; text-decoration : none ; }
. larger { color : var ( - - addition ) ; }
. smaller , . deletion { color : var ( - - deletion ) ; }
. nochange { color : var ( - - nochange ) ; font-style : italic ; }
. significant { font-weight : bolder ; font-size : 1.1 rem ; }
. deletion , . deletion > . editor { text-decoration : line-through ; }
. highlighted-diff { white-space : pre-wrap ; }
. diff-added { background-color : rgba ( 31 , 171 , 36 , 0.6 ) ; color : var ( - - addition ) ; }
. diff-removed { background-color : rgba ( 255 , 96 , 96 , 0.6 ) ; color : var ( - - deletion ) ; }
. newpage :: before { content : "N" ; margin : 0 0.3 em 0 -1 em ; font-weight : bolder ; text-decoration : underline dotted ; }
. move :: before { content : "\\1f69a" ; font-size : 1.25 em ; margin : 0 0.1 em 0 -1.1 em ; }
. upload :: before { content : "\\1f845" ; margin : 0 0.1 em 0 -1.1 em ; }
. new-comment :: before { content : "\\1f4ac" ; margin : 0 0.1 em 0 -1.1 em ; }
. reversion :: before { content : "\\231b" ; margin : 0 0.1 em 0 -1.1 em ; }
. search-result {
position : relative ;
counter-increment : search-results ;
margin-left : 1 . 25em ;
}
. search-result :: before {
position : absolute ;
top : 0 . 2em ; left : -1 . 25em ;
content : counter ( search-results ) ;
font-size : 1 . 25em ; color : var ( --text-b ) ;
}
2020-05-09 14:41:04 +00:00
. grid-large { display : grid ; grid-template-columns : repeat ( auto - fit , minmax ( 20 em , 1 fr ) ) ; grid-auto-rows : min-content ; grid-gap : 1 em ; justify-content : center ; }
. theme-item { justify-self : center ; text-align : center ; }
. theme-item label { min-width : auto ; }
2019-11-10 15:44:43 +00:00
. stacked-bar { display : flex ; }
2020-05-26 23:12:04 +00:00
/* TODO: Actually refine this properly */
. similar-page-suggestions { grid-area : similar-suggestions ; }
2020-05-26 12:16:33 +00:00
. similar-page-suggestions > h2 { text-align : center ; }
2020-07-28 21:21:56 +00:00
. similar-page-suggestions-list { list-style-type : none ;
padding : 0 ; display : grid ; grid : auto / repeat ( auto-fit , minmax ( min ( 15em , 100 % ) , 1fr ) ) ; justify-items : center ; grid-gap : 1em ; }
2019-11-10 15:44:43 +00:00
2019-11-04 00:52:34 +00:00
. comments { grid-area : comments ; }
2019-11-10 15:44:43 +00:00
. avatar { vertical-align : middle ; max-height : 1.5 em ; }
figure > . avatar , . avatar ~ figcaption { display : inline-block ; }
2019-11-04 00:52:34 +00:00
footer { grid-area : footer ; }
2019-11-10 17:20:13 +00:00
@ media ( max-width : 640px ) {
body { grid-template-columns : 1 fr 16 fr 1 fr ; }
nav { flex-direction : column !important ; }
nav > span { padding : 0.5 em ; }
2020-07-28 21:21:56 +00:00
. nav-more {
align-self : normal ;
}
. nav-more > label { display : block ; text-align : center ; }
input [ type = checkbox ] : checked ~ . nav-more-menu {
position : static ;
margin-top : 1em ;
}
2019-11-10 17:20:13 +00:00
}