Skip to content

Instantly share code, notes, and snippets.

@iamanit

iamanit/MapCSS Secret

Last active June 7, 2018 16:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save iamanit/c2edc746cf3de1cb4815c3d4a51fffa7 to your computer and use it in GitHub Desktop.
Save iamanit/c2edc746cf3de1cb4815c3d4a51fffa7 to your computer and use it in GitHub Desktop.
CSS Map
/*
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 --- */
---
#Welcome to The Official Subreddit for <State> Libertarians
We are the official <State> representation in the Libertarian Party USA network of subreddits.
[](#yellowbutton) [Libertarian Party USA](https://www.reddit.com/r/LibertarianPartyUSA)
---
#Other State's Subreddits:
1. /r/AlabamaLibertarians
1. /r/ArkansasLibertarians
1. /r/ArizonaLibertarians
1. /r/LPCalifornia
1. /r/coloradolibertarian
1. /r/CTLibertarians
1. /r/lpfl
1. /r/GeorgiaLibertarians
1. /r/IdahoLibertarians
1. /r/IllinoisLibertarians
1. /r/IowaLibertarians
1. /r/HoosierLibertarians
1. /r/KansasLibertarians
1. /r/LibertarianKentucky
1. /r/LouisianaLibertarians
1. /r/mass_libertarians
1. /r/MDLibertarians
1. /r/MaineLibertarians
1. /r/MinnesotaLibertarians
1. /r/MILibertarians
1. /r/MissouriLibertarians
1. /r/MSLibertarians
1. /r/NCLibertarians
1. /r/NewJerseyLibertarians
1. /r/newmexicolp
1. /r/NevadaLibertarians
1. /r/NH_Libertarians
1. /r/NYLibertarians
1. /r/OKLibertarians
1. /r/LibertarianPartyOhio
1. /r/OregonLibertarians
1. /r/PaLibertarian
1. /r/SCLibertarians
1. /r/SDLibertarians
1. /r/TennesseeLibertarians
1. /r/TexasLibertarians
1. r/UtahLibertarians
1. /r/VirginiaLibertarians
1. /r/WALibertarians
1. /r/WisconsinLibertarians
1. /r/WYLibertarians
1. /r/PuertoRicoLP
---
@iamanit
Copy link
Author

iamanit commented Nov 27, 2016

8gp59ba7fmzia5ez1j4z0zc-zqwiuwvdesltcyu8ruw

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment