├── README.md ├── amp-theme.php ├── archive.php ├── footer.php ├── functions.php ├── header.php ├── index.php ├── loop.php ├── page.php ├── search.php ├── single.php └── style.php /README.md: -------------------------------------------------------------------------------- 1 | # AMP Theme Framework 2 | 3 | [logo]: https://ampforwp.com/wp-content/uploads/2017/09/amp-theme-framework-logo.png 4 | 5 | AMP Theme Framework - Create themes on AMP. https://ampforwp.com/amp-theme-framework/ 6 | 7 | ## How to Create theme for AMP 8 | Documentation - https://ampforwp.com/amp-theme-framework/#docs 9 | 10 | Getting Started with AMP Themes - https://ampforwp.com/tutorials/article/getting-started-amp-framework/ 11 | -------------------------------------------------------------------------------- /amp-theme.php: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /footer.php: -------------------------------------------------------------------------------- 1 | 2 | 5 | -------------------------------------------------------------------------------- /functions.php: -------------------------------------------------------------------------------- 1 | 2 |
3 | 4 |
5 | 6 |
7 | 8 |
9 | 10 | 'https://twitter.com/ampforwp', 12 | 'facebook' => 'https://facebook.com/ampforwp' 13 | ]);?> 14 | 'open-button']); ?> 15 |
16 | 17 |
18 | 19 |
20 | 21 | 22 | 'start', 23 | 'id'=>'sidebar', 24 | 'layout'=>'nodisplay', 25 | 'side'=>'right' 26 | ] ); ?> 27 | 'close-button']); ?> 28 | 29 | 30 | 31 | 'end']); ?> 32 | 33 |
-------------------------------------------------------------------------------- /index.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /loop.php: -------------------------------------------------------------------------------- 1 | 2 |
3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | -------------------------------------------------------------------------------- /page.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /search.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /single.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /style.php: -------------------------------------------------------------------------------- 1 | /**** 2 | * AMP Framework Reset 3 | *****/ 4 | body{ font-family: sans-serif; font-size: 16px; line-height:1.4; } 5 | ol, ul{ list-style-position: inside } 6 | p, ol, ul, figure{ margin: 0 0 1em; padding: 0; } 7 | a, a:active, a:visited{ color:#ed1c24; text-decoration: none } 8 | a:hover, a:active, a:focus{} 9 | pre{ white-space: pre-wrap;} 10 | .left{float:left} 11 | .right{float:right} 12 | .hidden{ display:none } 13 | .clearfix{ clear:both } 14 | blockquote{ background: #f1f1f1; margin: 10px 0 20px 0; padding: 15px;} 15 | blockquote p:last-child {margin-bottom: 0;} 16 | .amp-wp-unknown-size img {object-fit: contain;} 17 | .amp-wp-enforced-sizes{ max-width: 100% } 18 | /* Image Alignment */ 19 | .alignright { 20 | float: right; 21 | } 22 | .alignleft { 23 | float: left; 24 | } 25 | .aligncenter { 26 | display: block; 27 | margin-left: auto; 28 | margin-right: auto; 29 | } 30 | amp-iframe { max-width: 100%; margin-bottom : 20px; } 31 | 32 | /* Captions */ 33 | .wp-caption { 34 | padding: 0; 35 | } 36 | .wp-caption-text { 37 | font-size: 12px; 38 | line-height: 1.5em; 39 | margin: 0; 40 | padding: .66em 10px .75em; 41 | text-align: center; 42 | } 43 | 44 | /* AMP Media */ 45 | amp-iframe, 46 | amp-youtube, 47 | amp-instagram, 48 | amp-vine { 49 | margin: 0 -16px 1.5em; 50 | } 51 | amp-carousel > amp-img > img { 52 | object-fit: contain; 53 | } 54 | 55 | 56 | /**** 57 | * Container 58 | *****/ 59 | .container { 60 | max-width: 600px; 61 | margin: 0 auto; 62 | padding: 0px 10px; 63 | } 64 | 65 | /**** 66 | * AMP Sidebar 67 | *****/ 68 | amp-sidebar { 69 | width: 250px; 70 | } 71 | 72 | /* AMP Sidebar Toggle button */ 73 | .amp-sidebar-button{ 74 | position:relative; 75 | } 76 | .amp-sidebar-toggle { 77 | } 78 | .amp-sidebar-toggle span { 79 | display: block; 80 | height: 2px; 81 | margin-bottom: 5px; 82 | width: 22px; 83 | background: #000; 84 | } 85 | .amp-sidebar-toggle span:nth-child(2){ 86 | top: 7px; 87 | } 88 | .amp-sidebar-toggle span:nth-child(3){ 89 | top:14px; 90 | } 91 | 92 | /* AMP Sidebar close button */ 93 | .amp-sidebar-close{ 94 | background: #333; 95 | display: inline-block; 96 | padding: 5px 10px; 97 | font-size: 12px; 98 | color: #fff; 99 | } 100 | 101 | /**** 102 | * AMP Navigation Menu with Dropdown Support 103 | *****/ 104 | .toggle-navigation ul{ 105 | list-style-type: none; 106 | margin: 0; 107 | padding: 0; 108 | display: inline-block; 109 | width: 100% 110 | } 111 | .toggle-navigation ul li{ 112 | font-size: 13px; 113 | border-bottom: 1px solid rgba(0, 0, 0, 0.11); 114 | padding: 11px 0px; 115 | width: 25%; 116 | float: left; 117 | text-align: center; 118 | margin-top: 6px 119 | } 120 | .toggle-navigation ul ul{ 121 | display: none 122 | } 123 | .toggle-navigation ul li a{ 124 | color: #eee; 125 | padding: 15px; 126 | } 127 | .toggle-navigation{ 128 | display: none; 129 | background: #444; 130 | } 131 | 132 | 133 | /**** 134 | * Header 135 | *****/ 136 | .amp-logo { 137 | width:190px; 138 | height:36px; 139 | } 140 | .header h1{ 141 | font-size: 1.5em; 142 | } 143 | .header .right{ 144 | margin: 16px 5px 0px 5px; 145 | } 146 | .amp-phone, .amp-social, .amp-sidebar-button{ 147 | display:inline-flex 148 | } 149 | .amp-phone{ 150 | top: 4px; 151 | } 152 | .header .amp-social{ 153 | margin: 0px 19px; 154 | } 155 | .amp-sidebar-button{ 156 | top: 6px; 157 | } 158 | 159 | 160 | /**** 161 | * Loop 162 | *****/ 163 | .loop-post{ 164 | display: inline-block; 165 | width: 100%; 166 | margin: 6px 0px; 167 | } 168 | .loop-post .loop-img{ 169 | float: left; 170 | margin-right: 15px; 171 | } 172 | .loop-post h2{ 173 | font-size: 1.2em; 174 | margin: 0px 0px 8px 0px; 175 | } 176 | .loop-post p{ 177 | font-size: 14px; 178 | color: #333; 179 | margin-bottom:6px; 180 | } 181 | .loop-post ul{ 182 | list-style-type: none; 183 | display: inline-flex; 184 | margin: 0px; 185 | font-size: 14px; 186 | color: #666; 187 | } 188 | .loop-post ul li{ 189 | margin-right:2px; 190 | } 191 | .loop-date{ 192 | font-size:12px; 193 | } 194 | 195 | 196 | /**** 197 | * Single 198 | *****/ 199 | /** Related Posts **/ 200 | .amp-related-posts ul{ 201 | list-style-type:none; 202 | } 203 | .amp-related-posts ul li{ 204 | display: inline-block; 205 | line-height: 1.3; 206 | margin-bottom: 5px; 207 | } 208 | .amp-related-posts amp-img{ 209 | float: left; 210 | width: 100px; 211 | margin: 0px 10px 0px 0px; 212 | } 213 | 214 | 215 | /**** 216 | * Comments 217 | *****/ 218 | .comments_list ul{ 219 | margin:0; 220 | padding:0 221 | } 222 | .comments_list ul.children{ 223 | padding-bottom:10px; 224 | margin-left: 4%; 225 | width: 96%; 226 | } 227 | .comments_list ul li p{ 228 | margin: 0; 229 | font-size: 14px; 230 | clear: both; 231 | padding-top: 5px; 232 | } 233 | .comments_list ul li .says{ 234 | margin-right: 4px; 235 | } 236 | .comments_list ul li .comment-body{ 237 | padding: 10px 0px 15px 0px; 238 | } 239 | .comments_list li li{ 240 | margin: 20px 20px 10px 20px; 241 | background: #f7f7f7; 242 | box-shadow: none; 243 | border: 1px solid #eee; 244 | } 245 | .comments_list li li li{ 246 | margin:20px 20px 10px 20px 247 | } 248 | .comment-author{ float:left } 249 | 250 | 251 | /**** 252 | * Footer 253 | *****/ 254 | .footer{ 255 | padding: 30px 0px 20px 0px; 256 | font-size: 12px; 257 | text-align: center; 258 | } 259 | 260 | 261 | /**** 262 | * RTL Styles 263 | *****/ 264 | 265 | --------------------------------------------------------------------------------