Created
January 28, 2020 00:25
-
-
Save jamesozzie/d4298097082b52a019af602ccae7a109 to your computer and use it in GitHub Desktop.
AMP-Sidebar: WordPress AMP sidebar plugin. To use simple add the [jz-sidebar] shortcode into a widget or template file. Apply any menu to the newly created "AMP sidebar menu" menu once activated. Appears in AMP URLs only.
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
amp-sidebar nav { | |
padding: 0 20px; | |
} | |
.sidenav-btn{display:none} | |
[amp] .sidenav-btn{display:inline} | |
#sidenav { | |
background-color: #222; | |
width: 305px; | |
-moz-box-shadow: 0.2rem 0 1rem rgba(0, 0, 0, 0.5); | |
-webkit-box-shadow: 0.2rem 0 1rem rgba(0, 0, 0, 0.5); | |
box-shadow: 0.2rem 0 1rem rgba(0, 0, 0, 0.5); | |
text-align: right; | |
} | |
#sidenav li, #sidenav h3 { | |
list-style: none; | |
border: 0; | |
border-bottom: 1px solid #555; | |
text-align: left; | |
font-weight: normal; | |
outline: none; | |
} | |
#sidenav h3 {} | |
#sidenav li a { | |
color: #fff; | |
text-decoration: none; | |
width: 90%; | |
display: inline-block; | |
} | |
#sidenav li.sidebar-parent-container { | |
border-bottom: 0; | |
} | |
.sidebar_socialaccounts { | |
padding: 30px 20px; | |
} | |
.header-top { | |
display: flex; | |
} | |
.sidenav-btn { | |
padding-top: 0.5rem; | |
/* fix for iOS responsiveness*/ | |
z-index: 9999; | |
} | |
.sidenav-close { | |
padding: 10px 10px 0 0; | |
} | |
amp-accordion section h3::after { | |
position: absolute; | |
right: 17px; | |
-moz-transform: rotate(90deg); | |
-webkit-transform: rotate(90deg); | |
-ms-transform: rotate(90deg); | |
transform: rotate(90deg); | |
} | |
amp-accordion section[expanded] h3::after { | |
content: '⟨'; | |
} | |
amp-accordion section:not([expanded]) h3::after { | |
/* Unicode: U+276F, UTF-8: E2 9D AF content: '\00276F';*/ | |
content: '⟩'; | |
} | |
@keyframes opening { | |
0% { | |
height: 0; | |
} | |
100% { | |
height: 250px; | |
} | |
} | |
.af_sidenav_btn { | |
text-align: right; | |
width: 100%; | |
} | |
path { | |
stroke: #fff; | |
} | |
.af_sidebar ul, .af_sidebar ol { | |
margin: 0 0 0em 0em; | |
padding: 0; | |
line-height: 50px; | |
} | |
.af_sidebar ul, .af_sidebar ol, #sidenav a { | |
font-size: 16px; | |
line-height: 50px; | |
} | |
.af_sidebar ul li a, .af_sidebar ol li a { | |
padding: 0px 0; | |
line-height: 50px; | |
} | |
.af_sidebar amp-accordion a { | |
padding: 0px 0; | |
line-height: 50px; | |
} | |
.af_sidebar .nested-accordion { | |
background: transparent; | |
border: 1px solid #fff; | |
} | |
.af_sidebar amp-accordion section[expanded] h3::after { | |
stroke: #fff; | |
color: #ffff; | |
padding: 10px 0; | |
font-size: 16px; | |
} | |
.af_sidebar amp-accordion section:not([expanded]) h3::after { | |
font-size: 16px; | |
color: #ffff; | |
padding: 10px 0; | |
} | |
.af_sidebar li.sidebar-parent-container ul li a::before { | |
content: "-"; | |
padding-right: 15px; | |
} | |
.af_sidebar section h3::after { | |
color: #efefef; | |
font-size: 16px; | |
padding: 10px 0; | |
content: "⟨"; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment