-
-
Save iamanit/c2edc746cf3de1cb4815c3d4a51fffa7 to your computer and use it in GitHub Desktop.
CSS Map
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
The following CSS block and Sidebar Markup will add a map with all the existing State subreddits for the LibertarianPartyUSA Network. | |
It will also add a Button to direct users to /r/LibertarianPartyUSA | |
Currently this Map Has around 35 state subreddits plus Puerto Rico and more will be added as they are created. Check back for updates at: | |
https://gist.github.com/iamanit/c2edc746cf3de1cb4815c3d4a51fffa7 | |
Existing CSS should not be affected by this code, but this code may be affected by existing CSS. | |
----------------- | |
Directions: | |
1. Download and Upload the following file to your Stylesheet, and name it USAMap. | |
https://b.thumbs.redditmedia.com/8GP59BA7FmziA5eZ1j4Z0Zc-ZqwIuwvdesLTCyU8rUw.png | |
2. Copy this code to your Stylesheet at https://www.reddit.com/r/{YOUR SUBNAME}/about/stylesheet/ | |
3. Copy the Sidebar Markup to your Sidebar - Note the numbered list. | |
This CSS will takeover any numbered lists, so take that into account when remodeling your sidebar. | |
4. Change the Color of the button to match your subreddit theming. | |
[](#yellowbutton) will set it to the official Libertarian Yellow, and [](#graybutton) will set it to Libertarian Gray. | |
There are also blue red and green buttons. Use those anywhere in the sidebar. | |
------------------*/ | |
/* --- LPUSA map ---- */ | |
:root .side ol { | |
overflow:hidden; | |
background:url(%%USAMap%%) center/cover; | |
background-size: contain; | |
background-repeat: no-repeat; | |
background-position: left left; | |
width:280px; | |
height:207px; | |
display:block; | |
padding:0; | |
padding-top:1px; | |
} | |
:root .side ol li { | |
list-style:none; | |
position:relative; | |
display:block; | |
position: relative ; | |
margin:0;padding:0; | |
margin-top:-8px; | |
width:8px;height:8px;overflow:visible; | |
box-sizing: border-box; | |
} | |
:root .side ol a { | |
box-sizing: border-box; | |
position:relative; | |
top:-30px; | |
left:0px; | |
font-size:0; | |
display:inline-block; | |
background: #ff874b; | |
border-radius:50%; | |
width:8px; height:8px; | |
box-shadow: 0 0 3px white; | |
padding-left:-20px; | |
} | |
:root .side ol a:first-child { | |
margin-top:10px; | |
} | |
:root .side ol a:hover { | |
/*font-size:8pt; | |
font-weight:bold; | |
overflow:visible; | |
white-space:nowrap; | |
color:ff874b; | |
text-decoration:none; | |
z-index:9999999; | |
text-shadow: 0 0 3px black;*/ | |
box-shadow: 0 0 10px white,0 0 3px white,0 0 3px white,0 0 3px white,0 0 3px white; | |
} | |
/*:root .side ol a[href="/r/Alaska"]{left: 16px; top:168px} */ | |
:root .side ol a[href="/r/AlabamaLibertarians"]{left: 176px; top:142px} | |
:root .side ol a[href="/r/ArkansasLibertarians"]{left: 144px; top:130px} | |
:root .side ol a[href="/r/ArizonaLibertarians"]{left: 44px; top:130px} | |
:root .side ol a[href="/r/LPCalifornia"]{left: 9px; top:109px} | |
:root .side ol a[href="/r/coloradolibertarian"]{left: 77px; top:102px} | |
:root .side ol a[href="/r/CTLibertarians"]{left: 256px; top:54px} | |
/* :root .side ol a[href="/r/delaware"]{left: 242px; top:90px} */ | |
:root .side ol a[href="/r/lpfl"]{left: 208px; top:171px} | |
:root .side ol a[href="/r/GeorgiaLibertarians"]{left: 194px; top:142px} | |
/* :root .side ol a[href="/r/hawaii"]{left: 72px; top:187px} */ | |
:root .side ol a[href="/r/IowaLibertarians"]{left: 136px; top:84px} | |
:root .side ol a[href="/r/IdahoLibertarians"]{left: 42px; top:67px} | |
:root .side ol a[href="/r/IllinoisLibertarians"]{left: 158px; top:94px} | |
:root .side ol a[href="/r/HoosierLibertarians"]{left: 173px; top:93px} | |
:root .side ol a[href="/r/KansasLibertarians"]{left: 113px; top:107px} | |
:root .side ol a[href="/r/LibertarianKentucky"]{left: 183px; top:110px} | |
:root .side ol a[href="/r/LouisianaLibertarians"]{left: 145px; top:150px} | |
:root .side ol a[href="/r/mass_libertarians"]{left: 261px; top:44px} | |
:root .side ol a[href="/r/MDLibertarians"]{left: 230px; top:87px} | |
:root .side ol a[href="/r/MaineLibertarians"]{left: 268px; top:13px} | |
:root .side ol a[href="/r/MILibertarians"]{left: 178px; top:74px} | |
:root .side ol a[href="/r/MinnesotaLibertarians"]{left: 131px; top:55px} | |
:root .side ol a[href="/r/MissouriLibertarians"]{left: 141px; top:107px} | |
:root .side ol a[href="/r/MSLibertarians"]{left: 161px; top:145px} | |
/* :root .side ol a[href="/r/montana"]{left: 66px; top:47px} */ | |
:root .side ol a[href="/r/NCLibertarians"]{left: 217px; top:123px} | |
:root .side ol a[href="/r/LPND/"]{left: 106px; top:50px} | |
/* :root .side ol a[href="/r/nebraska"]{left: 107px; top:89px} */ | |
:root .side ol a[href="/r/NH_Libertarians"]{left: 260px; top:32px} | |
:root .side ol a[href="/r/NewJerseyLibertarians"]{left: 247px; top:77px} | |
:root .side ol a[href="/r/newmexicolp"]{left: 73px; top:132px} | |
:root .side ol a[href="/r/NevadaLibertarians"]{left: 26px; top:92px} | |
:root .side ol a[href="/r/NYLibertarians"]{left: 234px; top:43px} | |
:root .side ol a[href="/r/LibertarianPartyOhio"]{left: 189px; top:93px} | |
:root .side ol a[href="/r/OKLibertarians"]{left: 119px; top:129px} | |
:root .side ol a[href="/r/OregonLibertarians"]{left: 15px; top:59px} | |
:root .side ol a[href="/r/PaLibertarian"]{left: 220px; top:70px} | |
/* :root .side ol a[href="/r/rhodeisland"]{left: 268px; top:54px} */ | |
:root .side ol a[href="/r/SCLibertarians"]{left: 207px; top:132px} | |
:root .side ol a[href="/r/SDLibertarians"]{left: 106px; top:69px} | |
:root .side ol a[href="/r/TennesseeLibertarians"]{left: 175px; top:122px} | |
:root .side ol a[href="/r/TexasLibertarians"]{left: 110px; top:157px} | |
:root .side ol a[href="/r/UtahLibertarians"]{left: 49px; top:100px} | |
:root .side ol a[href="/r/VirginiaLibertarians"]{left: 222px; top:106px} | |
/* :root .side ol a[href="/r/vermont"]{left: 250px; top:22px} */ | |
:root .side ol a[href="/r/WALibertarians"]{left: 23px; top:38px} | |
:root .side ol a[href="/r/WisconsinLibertarians"]{left: 153px; top:66px} | |
/* :root .side ol a[href="/r/westvirginia"]{left: 205px; top:96px} */ | |
:root .side ol a[href="/r/WYLibertarians"]{left: 73px; top:76px} | |
:root .side ol a[href="/r/washingtondc"]:after, | |
:root .side ol a[href="/r/PuertoRicoLP"]:after { | |
color: #333; | |
font-size: 8pt; | |
text-align: center; | |
width: 23px; | |
padding: 1px 0 1px 0; | |
margin: -1px -24px -1px 0; | |
display: inline-block; | |
position: relative; | |
font-weight: bold; | |
border-radius: 25%; | |
background: #f3b300; | |
left: 265px; | |
margin-top: 20px; | |
transition: .25s ease; | |
} | |
:root .side ol a[href="/r/DCLP"]:hover:after, | |
:root .side ol a[href="/r/PuertoRicoLP"]:hover:after { | |
background:#ff874b; | |
} | |
:root .side ol a { | |
box-sizing: border-box; | |
position: relative; | |
top: -30px; | |
left: 10px; | |
font-size: 0; | |
display: inline-block; | |
background: #f3b300; | |
border-radius: 50%; | |
width: 8px; | |
height: 8px; | |
transition: .25s ease; | |
box-shadow:none!important; | |
} | |
:root .side ol a:hover { | |
background: #ff874b; | |
} | |
:root .side ol a[href="/r/DCLP"]:after | |
{ | |
content:"DC"; | |
top:110px; | |
left:253px; | |
} | |
:root .side ol a[href="/r/PuertoRicoLP"]:after | |
{ | |
content:"PR"; | |
top:195px; | |
left:233px; | |
} | |
/* --- End LPUSA Map --- */ | |
/* --- LPUSA Button Markup --- */ | |
.md a[href="#redbutton"] + a:hover, | |
.md a[href="#greenbutton"] + a:hover, | |
.md a[href="#bluebutton"] + a:hover, | |
.md a[href="#graybutton"] + a:hover, | |
.md a[href="#yellowbutton"] + a:hover, | |
/* .pretty-button:hover, ---Commented out because it hoverstates all links gray | |
.pretty-button.pressed, ---Will fix this when i can | |
a:hover {background: #444!important } */ | |
a[href="#redbutton"] + a, | |
a[href="#greenbutton"] + a, | |
a[href="#bluebutton"] + a, | |
a[href="#graybutton"] + a, | |
a[href="#yellowbutton"] + a | |
{ | |
display: block; | |
padding: 10px; | |
border-radius: 3px; | |
text-align: center; | |
font-weight: 700; | |
color: #fff!important; | |
transition: .1s | |
} | |
.md a[href="#redbutton"] + a {background: #d24d33 } | |
.md a[href="#greenbutton"] + a {background: #82b965 } | |
.md a[href="#bluebutton"] + a {background: #3b8dbd } | |
.md a[href="#graybutton"] + a {background: gray } | |
.md a[href="#yellowbutton"] + a {background: #E5C601 } | |
/* --- End LPUSA Button Markup --- */ |
Author
iamanit
commented
Nov 27, 2016
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment