├── 404.php ├── README ├── archive.php ├── attachment.php ├── author.php ├── category.php ├── comments.php ├── css └── screen.less ├── editor-style-rtl.css ├── editor-style.css ├── footer.php ├── functions.php ├── header.php ├── images ├── icon-copy.png ├── max.png ├── min.png ├── pear.png ├── sb-black.png ├── tag-bg.png ├── temp-img.png ├── thumb.png └── tile.png ├── index.php ├── js └── less.js ├── license.txt ├── loop-attachment.php ├── loop-page.php ├── loop-single.php ├── loop.php ├── onecolumn-page.php ├── page.php ├── search.php ├── sidebar-footer.php ├── sidebar.php ├── single.php ├── style.css └── tag.php /404.php: -------------------------------------------------------------------------------- 1 | 11 | 12 |
13 |
14 | 15 |
16 |

17 |
18 |

19 | 20 |
21 |
22 | 23 |
24 |
25 | 29 | 30 | -------------------------------------------------------------------------------- /README: -------------------------------------------------------------------------------- 1 | Pears are common patterns of markup & style. 2 | 3 | Pears is an open source WordPress theme. I'll admit the code 4 | is a bit rough, initially based on the default 'twentyone' theme. 5 | 6 | I wanted a handy way of collecting HTML & CSS pattern pairs. 7 | Often used modules with a minimal of style applied. It's become 8 | a valuable learning tool, whereby breaking interfaces down into 9 | small pieces make it easier to learn and improve running code. 10 | 11 | HOW TO ADD CODE PATTERNS 12 | 13 | - Each pattern is a post in WordPress. 14 | - Add markup in a custom field named 'html'. 15 | - Add style in a custom field named 'css'. 16 | - Use the main content field for optional notes. 17 | 18 | Learn more and see it in action here: 19 | http://pea.rs 20 | 21 | Enjoy. 22 | 23 | Dan Cederholm 24 | Salem, Massachusetts 25 | February, 2012 26 | http://simplebits.com 27 | -------------------------------------------------------------------------------- /archive.php: -------------------------------------------------------------------------------- 1 | 16 | 17 |
18 |
19 | 20 | 30 | 31 |

32 | 33 | %s', 'twentyten' ), get_the_date() ); ?> 34 | 35 | %s', 'twentyten' ), get_the_date( 'F Y' ) ); ?> 36 | 37 | %s', 'twentyten' ), get_the_date( 'Y' ) ); ?> 38 | 39 | 40 | 41 |

42 | 43 | 56 | 57 |
58 |
59 | 60 | 61 | 62 | -------------------------------------------------------------------------------- /attachment.php: -------------------------------------------------------------------------------- 1 | 11 | 12 |
13 |
14 | 15 | 22 | 23 |
24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /author.php: -------------------------------------------------------------------------------- 1 | 11 | 12 |
13 |
14 | 15 | 26 | 27 |

" . get_the_author() . "" ); ?>

28 | 29 | 32 |
33 |
34 | 35 |
36 |
37 |

38 | 39 |
40 |
41 | 42 | 43 | 56 |
57 |
58 | 59 | 60 | 61 | -------------------------------------------------------------------------------- /category.php: -------------------------------------------------------------------------------- 1 | 11 | 12 |
13 |
14 | 15 |

' . single_cat_title( '', false ) . '' ); 17 | ?>

18 | ' . $category_description . '
'; 22 | 23 | /* Run the loop for the category page to output the posts. 24 | * If you want to overload this in a child theme then include a file 25 | * called loop-category.php and that will be used instead. 26 | */ 27 | get_template_part( 'loop', 'category' ); 28 | ?> 29 | 30 |
31 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /comments.php: -------------------------------------------------------------------------------- 1 | 15 | 16 |
17 | 18 |

19 |
20 | 28 | 29 | 32 | 33 | 34 |

' . get_the_title() . '' ); 37 | ?>

38 | 39 | 1 && get_option( 'page_comments' ) ) : // Are there comments to navigate through? ?> 40 | 44 | 45 | 46 |
    47 | 'twentyten_comment' ) ); 55 | ?> 56 |
57 | 58 | 1 && get_option( 'page_comments' ) ) : // Are there comments to navigate through? ?> 59 | 63 | 64 | 65 | 72 |

73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | -------------------------------------------------------------------------------- /css/screen.less: -------------------------------------------------------------------------------- 1 | /* 2 | Title: Master styles for screen media 3 | Author: dan@simplebits.com 4 | */ 5 | 6 | /* LESS variables 7 | --------------------------------------------- */ 8 | 9 | @text-color: #3e4549; 10 | @link-color: #2790ae; 11 | @link-hover-color: #0f6780; 12 | 13 | @font-mono: Monaco, monospace; 14 | @font-small: 12px; 15 | @font-medium: 13px; 16 | @font-large: 18px; 17 | 18 | /* LESS mixins 19 | --------------------------------------------- */ 20 | 21 | .rounded (@radius: 6px) { 22 | -webkit-border-radius: @radius; 23 | -moz-border-radius: @radius; 24 | border-radius: @radius; 25 | } 26 | .box-shadow (@x: 0, @y: 0, @blur: 2px, @color: #000) { 27 | -webkit-box-shadow: @arguments; 28 | -moz-box-shadow: @arguments; 29 | box-shadow: @arguments; 30 | } 31 | .box-sizing (@type: border-box) { 32 | -webkit-box-sizing: @type; 33 | -moz-box-sizing: @type; 34 | -o-box-sizing: @type; 35 | box-sizing: @type; 36 | } 37 | .transition (@property, @duration: .2s, @timing: ease-in-out) { 38 | -webkit-transition: @arguments; 39 | -moz-transition: @arguments; 40 | -o-transition: @arguments; 41 | transition: @arguments; 42 | } 43 | .tab-size (@spaces: 2) { 44 | -webkit-tab-size: @spaces; 45 | -moz-tab-size: @spaces; 46 | -o-tab-size: @spaces; 47 | tab-size: @spaces; 48 | } 49 | 50 | /* reset styles 51 | --------------------------------------------- */ 52 | 53 | html, body, div, span, applet, object, iframe, 54 | h1, h2, h3, h4, h5, h6, p, blockquote, pre, 55 | a, abbr, acronym, address, big, cite, code, 56 | del, dfn, em, img, ins, kbd, q, s, samp, 57 | small, strike, strong, sub, sup, tt, var, 58 | b, u, i, center, 59 | dl, dt, dd, ol, ul, li, 60 | fieldset, form, label, legend, 61 | table, caption, tbody, tfoot, thead, tr, th, td, 62 | article, aside, canvas, details, embed, 63 | figure, figcaption, footer, header, hgroup, 64 | menu, nav, output, ruby, section, summary, 65 | time, mark, audio, video { 66 | margin: 0; 67 | padding: 0; 68 | border: 0; 69 | font-size: 100%; 70 | vertical-align: baseline; 71 | } 72 | 73 | /* HTML5 display-role reset for older browsers */ 74 | article, aside, details, figcaption, figure, 75 | footer, header, hgroup, menu, nav, section { 76 | display: block; 77 | } 78 | body { 79 | line-height: 1; 80 | } 81 | ol, ul { 82 | list-style: none; 83 | } 84 | blockquote, q { 85 | quotes: none; 86 | } 87 | blockquote:before, blockquote:after, 88 | q:before, q:after { 89 | content: ''; 90 | content: none; 91 | } 92 | table { 93 | border-collapse: collapse; 94 | border-spacing: 0; 95 | } 96 | :focus { 97 | outline: none; 98 | } 99 | 100 | /* general styles 101 | --------------------------------------------- */ 102 | 103 | body { 104 | padding: 0 0 15px 0; 105 | font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; 106 | color: @text-color; 107 | font-size: 100%; 108 | background: #e6eaec url(../images/tile.png); 109 | } 110 | 111 | /* links */ 112 | 113 | a:link, a:visited { 114 | color: @link-color; 115 | text-decoration: none; 116 | outline: none; 117 | } 118 | a:hover { 119 | color: @link-hover-color; 120 | } 121 | 122 | /* page structure 123 | --------------------------------------------- */ 124 | 125 | div.wrap { 126 | position: relative; 127 | } 128 | div.main { 129 | margin-left: 160px; 130 | padding: 0 20px; 131 | .transition(margin, .4s, ease-in-out); 132 | } 133 | body.expanded div.main { 134 | margin-left: 15px; 135 | } 136 | #nav { 137 | font-size: @font-small; 138 | .box-sizing(border-box); 139 | } 140 | #pears-footer { 141 | margin: 10px 20px; 142 | text-align: center; 143 | } 144 | 145 | /* header 146 | --------------------------------------------- */ 147 | 148 | header[role="banner"] { 149 | margin: 15px 20px 15px 20px; 150 | .transition(margin, .4s, ease-in-out); 151 | } 152 | body.expanded header[role="banner"] { 153 | margin-left: 35px; 154 | } 155 | #logo { 156 | display: block; 157 | min-height: 46px; 158 | padding: 0 0 0 40px; 159 | font-size: 25px; 160 | line-height: 46px; 161 | white-space: nowrap; 162 | color: @text-color; 163 | background: url(../images/pear.png) no-repeat 0 50%; 164 | overflow: hidden; 165 | } 166 | #logo em { 167 | padding: 0 0 0 0; 168 | font-style: normal; 169 | color: #91969a; 170 | .transition(opacity, .4s, ease); 171 | } 172 | 173 | /* main styles 174 | --------------------------------------------- */ 175 | 176 | div.mod { 177 | margin: 0 0 20px 0; 178 | padding: 20px; 179 | background: #fff; 180 | .rounded; 181 | .box-sizing(border-box); 182 | .box-shadow(1px, 1px, 2px, rgba(0,0,0,.1)); 183 | } 184 | div.mod h3.label { 185 | float: left; 186 | margin: 0 0 10px -20px; 187 | padding: 6px 10px; 188 | font-size: @font-small; 189 | font-weight: normal; 190 | letter-spacing: 1px; 191 | text-transform: uppercase; 192 | color: #fff; 193 | background: #a1cf32; 194 | .rounded(4px); 195 | border-top-left-radius: 0; 196 | border-bottom-left-radius: 0; 197 | } 198 | div.mod h3.label a { 199 | color: #fff; 200 | } 201 | div.mod h4 { 202 | float: left; 203 | width: 50%; 204 | padding: 2px 15px; 205 | font-size: @font-large; 206 | font-weight: normal; 207 | } 208 | div.mod h4 span.sep { 209 | color: #bbb; 210 | } 211 | div.mod a.clip { 212 | float: left; 213 | margin: 2px 0 0 10px; 214 | opacity: 0; 215 | .transition(opacity); 216 | } 217 | div.mod:hover a.clip { 218 | opacity: .7; 219 | } 220 | div.mod:hover a.clip:hover { 221 | opacity: 1; 222 | } 223 | div#pattern.mod div#pattern-wrap { 224 | clear: left; 225 | padding: 20px 60px; 226 | } 227 | div#markup.mod { 228 | float: left; 229 | width: 49%; 230 | background: rgba(255,255,255,.6); 231 | } 232 | div#style.mod { 233 | float: right; 234 | width: 49%; 235 | background: rgba(255,255,255,.6); 236 | } 237 | div.mod textarea.mod-ta { 238 | width: 100%; 239 | border: none; 240 | height: 500px; 241 | font-family: @font-mono; 242 | font-size: @font-small; 243 | line-height: 1.4; 244 | white-space: pre; 245 | color: @text-color; 246 | background: none; 247 | outline: none; 248 | .tab-size; 249 | } 250 | 251 | /* pattern notes */ 252 | 253 | #pattern-notes h3.label { 254 | background: #bac1c5; 255 | } 256 | #pattern-notes p { 257 | clear: left; 258 | line-height: 1.4; 259 | color: #8b959a; 260 | } 261 | #pattern-notes code { 262 | font-family: @font-mono; 263 | font-size: @font-medium; 264 | } 265 | #pattern-notes pre { 266 | display: block; 267 | margin: 12px 0 0 0; 268 | padding: 15px 0 0 0; 269 | font-family: @font-mono; 270 | font-size: @font-small; 271 | line-height: 1.4; 272 | white-space: pre; 273 | color: @text-color; 274 | border-top: 1px solid #ddd; 275 | } 276 | 277 | /* nav styles 278 | --------------------------------------------- */ 279 | 280 | #nav { 281 | position: absolute; 282 | top: 0; 283 | left: 0; 284 | width: 160px; 285 | margin: 0 0 15px 0; 286 | padding: 20px 0; 287 | background: #575d60; 288 | .rounded; 289 | border-top-left-radius: 0; 290 | border-bottom-left-radius: 0; 291 | -webkit-transition: left .4s ease-in-out; 292 | -moz-transition: left .4s ease-in-out; 293 | -o-transition: left .4s ease-in-out; 294 | transition: left .4s ease-in-out; 295 | } 296 | body.expanded #nav { 297 | left: -140px; 298 | } 299 | #nav-toggle { 300 | position: absolute; 301 | display: block; 302 | top: 0; 303 | right: 0; 304 | width: 20px; 305 | height: 100%; 306 | text-indent: -9999px; 307 | background: url(../images/min.png) no-repeat 6px 50%; 308 | opacity: .3; 309 | } 310 | #nav-toggle:hover { 311 | background-color: rgba(255,255,255,.15); 312 | opacity: .6; 313 | } 314 | body.expanded #nav-toggle { 315 | background-image: url(../images/max.png); 316 | } 317 | #nav h2 { 318 | margin: 0 20px 4px 20px; 319 | font-size: @font-small; 320 | font-weight: normal; 321 | text-transform: uppercase; 322 | letter-spacing: 2px; 323 | } 324 | #nav h2 a { 325 | color: #fff; 326 | } 327 | #nav ul { 328 | margin: 0 20px 15px 0; 329 | padding: 0 0 10px 0; 330 | border-bottom: 1px solid rgba(255,255,255,.1); 331 | } 332 | #nav div.nav-item:hover ul { 333 | display: block; 334 | } 335 | #nav ul:last-of-type { 336 | margin-bottom: 0; 337 | padding-bottom: 0; 338 | border-bottom: none; 339 | } 340 | #nav ul li a { 341 | display: block; 342 | padding: 5px 8px 5px 20px; 343 | color: rgba(255,255,255,.5); 344 | background: transparent; 345 | .rounded(4px); 346 | border-top-left-radius: 0; 347 | border-bottom-left-radius: 0; 348 | } 349 | #nav ul li a:hover { 350 | color: rgba(255,255,255,.8); 351 | background: rgba(255,255,255,.1); 352 | } 353 | 354 | /* footer 355 | --------------------------------------------- */ 356 | 357 | #pears-footer p.cc { 358 | margin: 8px 0 20px 0; 359 | font-size: @font-medium; 360 | } 361 | #pears-footer #sb img { 362 | opacity: .3; 363 | .transition(opacity); 364 | } 365 | #pears-footer #sb:hover img { 366 | opacity: .5; 367 | } 368 | 369 | /* misc. 370 | --------------------------------------------- */ 371 | 372 | hr, .hide { 373 | display: none; 374 | } 375 | a img { 376 | border: none; 377 | } 378 | 379 | /* custom selection colors */ 380 | 381 | ::-moz-selection { 382 | color: #fff; 383 | color: rgba(255,255,255,.85); 384 | background: #a1cf32; 385 | } 386 | ::selection { 387 | color: #fff; 388 | color: rgba(255,255,255,.85); 389 | background: #a1cf32; 390 | } 391 | 392 | /* self-clear floats */ 393 | 394 | .group:after { 395 | content: "."; 396 | display: block; 397 | height: 0; 398 | clear: both; 399 | visibility: hidden; 400 | } 401 | 402 | /* IE patches 403 | --------------------------------------------- */ 404 | 405 | /* self-clear floats */ 406 | 407 | * html .group { /* IE6 */ 408 | height: 1%; 409 | } 410 | *:first-child+html .group { /* IE7 */ 411 | min-height: 1px; 412 | } 413 | 414 | /* responsiveness 415 | --------------------------------------------- */ 416 | 417 | @media screen and (max-width: 700px) { 418 | #logo em { 419 | opacity: 0; 420 | } 421 | div.main { 422 | margin-left: 0; 423 | padding: 0 10px; 424 | } 425 | #nav { 426 | position: static; 427 | left: auto; 428 | width: auto; 429 | padding: 20px; 430 | .rounded; 431 | } 432 | #nav-toggle { 433 | display: none; 434 | } 435 | #nav h2 { 436 | margin-left: 8px; 437 | } 438 | #nav ul { 439 | margin-right: 0; 440 | -webkit-column-count: 2; 441 | -moz-column-count: 2; 442 | column-count: 2; 443 | } 444 | #nav ul li a { 445 | padding: 5px 8px; 446 | .rounded(4px); 447 | } 448 | div#pattern.mod div#pattern-wrap { 449 | padding: 10px 0; 450 | } 451 | div#markup.mod, 452 | div#style.mod { 453 | float: none; 454 | width: 100%; 455 | } 456 | div.mod h4 { 457 | width: auto; 458 | } 459 | } 460 | -------------------------------------------------------------------------------- /editor-style-rtl.css: -------------------------------------------------------------------------------- 1 | /* 2 | Theme Name: Twenty Ten 3 | */ 4 | /* 5 | Used to style the TinyMCE editor. 6 | */ 7 | html .mceContentBody{ 8 | direction:rtl; 9 | unicode-bidi:embed; 10 | float:right; 11 | } 12 | * { 13 | font-family: Arial, Tahoma, sans-serif; 14 | } 15 | /* Text elements */ 16 | ul { 17 | margin: 0 -18px 18px 0; 18 | } 19 | ol { 20 | margin: 0 -18px 18px 0; 21 | } 22 | dd { 23 | margin-right: 0; 24 | } 25 | blockquote { 26 | font-style: normal; 27 | } 28 | table { 29 | text-align: right; 30 | margin: 0 0 24px -1px; 31 | } 32 | html .mceContentBody{ 33 | direction:rtl; 34 | unicode-bidi:embed; 35 | float:right; 36 | } 37 | * { 38 | font-family: Arial, Tahoma, sans-serif; 39 | } 40 | /* Text elements */ 41 | ul { 42 | margin: 0 -18px 18px 0; 43 | } 44 | ol { 45 | margin: 0 -18px 18px 0; 46 | } 47 | dd { 48 | margin-right: 0; 49 | } 50 | blockquote { 51 | font-style: normal; 52 | } 53 | table { 54 | text-align: right; 55 | margin: 0 0 24px -1px; 56 | } -------------------------------------------------------------------------------- /editor-style.css: -------------------------------------------------------------------------------- 1 | /* 2 | Theme Name: Twenty Ten 3 | Description: Used to style the TinyMCE editor. 4 | */ 5 | html .mceContentBody { 6 | max-width: 640px; 7 | } 8 | * { 9 | color: #444; 10 | font-family: Georgia, "Bitstream Charter", serif; 11 | line-height: 1.5; 12 | } 13 | p, 14 | dl, 15 | td, 16 | th, 17 | ul, 18 | ol, 19 | blockquote { 20 | font-size: 16px; 21 | } 22 | tr th, 23 | thead th, 24 | label, 25 | tr th, 26 | thead th { 27 | font-family: "Helvetica Neue", Arial, Helvetica, "Nimbus Sans L", sans-serif; 28 | } 29 | pre { 30 | font-family: "Courier 10 Pitch", Courier, monospace; 31 | } 32 | code, code var { 33 | font-family: Monaco, Consolas, "Andale Mono", "DejaVu Sans Mono", monospace; 34 | } 35 | body, input, textarea { 36 | font-size: 12px; 37 | line-height: 18px; 38 | } 39 | hr { 40 | background-color: #e7e7e7; 41 | border: 0; 42 | clear: both; 43 | height: 1px; 44 | margin-bottom: 18px; 45 | } 46 | /* Text elements */ 47 | p { 48 | margin-bottom: 18px; 49 | } 50 | ul { 51 | list-style: square; 52 | margin: 0 0 18px 1.5em; 53 | } 54 | ol { 55 | list-style: decimal; 56 | margin: 0 0 18px 1.5em; 57 | } 58 | ol ol { 59 | list-style: upper-alpha; 60 | } 61 | ol ol ol { 62 | list-style: lower-roman; 63 | } 64 | ol ol ol ol { 65 | list-style: lower-alpha; 66 | } 67 | ul ul, 68 | ol ol, 69 | ul ol, 70 | ol ul { 71 | margin-bottom: 0; 72 | } 73 | dl { 74 | margin: 0 0 24px 0; 75 | } 76 | dt { 77 | font-weight: bold; 78 | } 79 | dd { 80 | margin-bottom: 18px; 81 | } 82 | strong { 83 | color: #000; 84 | font-weight: bold; 85 | } 86 | cite, 87 | em, 88 | i { 89 | border: none; 90 | font-style: italic; 91 | } 92 | big { 93 | font-size: 131.25%; 94 | } 95 | ins { 96 | background: #ffc; 97 | border: none; 98 | color: #333; 99 | } 100 | del { 101 | text-decoration: line-through; 102 | color: #555; 103 | } 104 | blockquote { 105 | font-style: italic; 106 | padding: 0 3em; 107 | } 108 | blockquote cite, 109 | blockquote em, 110 | blockquote i { 111 | font-style: normal; 112 | } 113 | pre { 114 | background: #f7f7f7; 115 | color: #222; 116 | line-height: 18px; 117 | margin-bottom: 18px; 118 | padding: 1.5em; 119 | } 120 | abbr, 121 | acronym { 122 | border-bottom: 1px dotted #666; 123 | cursor: help; 124 | } 125 | ins { 126 | text-decoration: none; 127 | } 128 | sup, 129 | sub { 130 | font-size: 10px; 131 | height: 0; 132 | line-height: 1; 133 | position: relative; 134 | vertical-align: baseline; 135 | } 136 | sup { 137 | bottom: 1ex; 138 | } 139 | sub { 140 | top: .5ex; 141 | } 142 | a:link { 143 | color: #06c; 144 | } 145 | a:visited { 146 | color: #743399; 147 | } 148 | a:active, 149 | a:hover { 150 | color: #ff4b33; 151 | } 152 | p, 153 | ul, 154 | ol, 155 | dd, 156 | pre, 157 | hr { 158 | margin-bottom: 24px; 159 | } 160 | ul ul, 161 | ol ol, 162 | ul ol, 163 | ol ul { 164 | margin-bottom: 0; 165 | } 166 | pre, 167 | kbd, 168 | tt, 169 | var { 170 | font-size: 15px; 171 | line-height: 21px; 172 | } 173 | code { 174 | font-size: 13px; 175 | } 176 | strong, 177 | b, 178 | dt, 179 | th { 180 | color: #000; 181 | } 182 | h1, 183 | h2, 184 | h3, 185 | h4, 186 | h5, 187 | h6 { 188 | color: #000; 189 | font-weight: normal; 190 | line-height: 1.5em; 191 | margin: 0 0 20px 0; 192 | } 193 | h1 { 194 | font-size: 2.4em; 195 | } 196 | h2 { 197 | font-size: 1.8em; 198 | } 199 | h3 { 200 | font-size: 1.4em; 201 | } 202 | h4 { 203 | font-size: 1.2em; 204 | } 205 | h5 { 206 | font-size: 1em; 207 | } 208 | h6 { 209 | font-size: 0.9em; 210 | } 211 | table { 212 | border: 1px solid #e7e7e7 !important; 213 | border-collapse: collapse; 214 | border-spacing: 0; 215 | margin: 0 -1px 24px 0; 216 | text-align: left; 217 | width: 100%; 218 | } 219 | tr th, 220 | thead th { 221 | border: none !important; 222 | color: #888; 223 | font-size: 12px; 224 | font-weight: bold; 225 | line-height: 18px; 226 | padding: 9px 24px; 227 | } 228 | tr td { 229 | border: none !important; 230 | border-top: 1px solid #e7e7e7 !important; 231 | padding: 6px 24px; 232 | } 233 | img { 234 | margin: 0; 235 | } 236 | img.size-auto, 237 | img.size-large, 238 | img.size-full, 239 | img.size-medium { 240 | max-width: 100%; 241 | height: auto; 242 | } 243 | .alignleft, 244 | img.alignleft { 245 | display: inline; 246 | float: left; 247 | margin-right: 24px; 248 | margin-top: 4px; 249 | } 250 | .alignright, 251 | img.alignright { 252 | display: inline; 253 | float: right; 254 | margin-left: 24px; 255 | margin-top: 4px; 256 | } 257 | .aligncenter, 258 | img.aligncenter { 259 | clear: both; 260 | display: block; 261 | margin-left: auto; 262 | margin-right: auto; 263 | } 264 | img.alignleft, 265 | img.alignright, 266 | img.aligncenter { 267 | margin-bottom: 12px; 268 | } 269 | .wp-caption { 270 | background: #f1f1f1; 271 | border: none; 272 | -khtml-border-radius: 0; 273 | -moz-border-radius: 0; 274 | -webkit-border-radius: 0; 275 | border-radius: 0; 276 | color: #888; 277 | font-size: 12px; 278 | line-height: 18px; 279 | margin-bottom: 20px; 280 | max-width: 632px !important; /* prevent too-wide images from breaking layout */ 281 | padding: 4px; 282 | text-align: center; 283 | } 284 | .wp-caption img { 285 | margin: 5px; 286 | } 287 | .wp-caption p.wp-caption-text { 288 | margin: 0 0 4px; 289 | } 290 | .wp-smiley { 291 | margin: 0; 292 | } -------------------------------------------------------------------------------- /footer.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 11 | 12 | 13 | 14 | 15 | 42 | 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /functions.php: -------------------------------------------------------------------------------- 1 | 26 | * add_action( 'after_setup_theme', 'my_child_theme_setup' ); 27 | * function my_child_theme_setup() { 28 | * // We are providing our own filter for excerpt_length (or using the unfiltered value) 29 | * remove_filter( 'excerpt_length', 'twentyten_excerpt_length' ); 30 | * ... 31 | * } 32 | * 33 | * 34 | * For more information on hooks, actions, and filters, see http://codex.wordpress.org/Plugin_API. 35 | * 36 | * @package WordPress 37 | * @subpackage Twenty_Ten 38 | * @since Twenty Ten 1.0 39 | */ 40 | 41 | /** 42 | * Set the content width based on the theme's design and stylesheet. 43 | * 44 | * Used to set the width of images and content. Should be equal to the width the theme 45 | * is designed for, generally via the style.css stylesheet. 46 | */ 47 | if ( ! isset( $content_width ) ) 48 | $content_width = 640; 49 | 50 | /** Tell WordPress to run twentyten_setup() when the 'after_setup_theme' hook is run. */ 51 | add_action( 'after_setup_theme', 'twentyten_setup' ); 52 | 53 | if ( ! function_exists( 'twentyten_setup' ) ): 54 | /** 55 | * Sets up theme defaults and registers support for various WordPress features. 56 | * 57 | * Note that this function is hooked into the after_setup_theme hook, which runs 58 | * before the init hook. The init hook is too late for some features, such as indicating 59 | * support post thumbnails. 60 | * 61 | * To override twentyten_setup() in a child theme, add your own twentyten_setup to your child theme's 62 | * functions.php file. 63 | * 64 | * @uses add_theme_support() To add support for post thumbnails and automatic feed links. 65 | * @uses register_nav_menus() To add support for navigation menus. 66 | * @uses add_custom_background() To add support for a custom background. 67 | * @uses add_editor_style() To style the visual editor. 68 | * @uses load_theme_textdomain() For translation/localization support. 69 | * @uses add_custom_image_header() To add support for a custom header. 70 | * @uses register_default_headers() To register the default custom header images provided with the theme. 71 | * @uses set_post_thumbnail_size() To set a custom post thumbnail size. 72 | * 73 | * @since Twenty Ten 1.0 74 | */ 75 | function twentyten_setup() { 76 | 77 | // This theme styles the visual editor with editor-style.css to match the theme style. 78 | add_editor_style(); 79 | 80 | // Post Format support. You can also use the legacy "gallery" or "asides" (note the plural) categories. 81 | add_theme_support( 'post-formats', array( 'aside', 'gallery' ) ); 82 | 83 | // This theme uses post thumbnails 84 | add_theme_support( 'post-thumbnails' ); 85 | 86 | // Add default posts and comments RSS feed links to head 87 | add_theme_support( 'automatic-feed-links' ); 88 | 89 | // Make theme available for translation 90 | // Translations can be filed in the /languages/ directory 91 | load_theme_textdomain( 'twentyten', TEMPLATEPATH . '/languages' ); 92 | 93 | $locale = get_locale(); 94 | $locale_file = TEMPLATEPATH . "/languages/$locale.php"; 95 | if ( is_readable( $locale_file ) ) 96 | require_once( $locale_file ); 97 | 98 | // This theme uses wp_nav_menu() in one location. 99 | register_nav_menus( array( 100 | 'primary' => __( 'Primary Navigation', 'twentyten' ), 101 | ) ); 102 | 103 | // This theme allows users to set a custom background 104 | add_custom_background(); 105 | 106 | // Your changeable header business starts here 107 | if ( ! defined( 'HEADER_TEXTCOLOR' ) ) 108 | define( 'HEADER_TEXTCOLOR', '' ); 109 | 110 | // No CSS, just IMG call. The %s is a placeholder for the theme template directory URI. 111 | if ( ! defined( 'HEADER_IMAGE' ) ) 112 | define( 'HEADER_IMAGE', '%s/images/headers/path.jpg' ); 113 | 114 | // The height and width of your custom header. You can hook into the theme's own filters to change these values. 115 | // Add a filter to twentyten_header_image_width and twentyten_header_image_height to change these values. 116 | define( 'HEADER_IMAGE_WIDTH', apply_filters( 'twentyten_header_image_width', 940 ) ); 117 | define( 'HEADER_IMAGE_HEIGHT', apply_filters( 'twentyten_header_image_height', 198 ) ); 118 | 119 | // We'll be using post thumbnails for custom header images on posts and pages. 120 | // We want them to be 940 pixels wide by 198 pixels tall. 121 | // Larger images will be auto-cropped to fit, smaller ones will be ignored. See header.php. 122 | set_post_thumbnail_size( HEADER_IMAGE_WIDTH, HEADER_IMAGE_HEIGHT, true ); 123 | 124 | // Don't support text inside the header image. 125 | if ( ! defined( 'NO_HEADER_TEXT' ) ) 126 | define( 'NO_HEADER_TEXT', true ); 127 | 128 | // Add a way for the custom header to be styled in the admin panel that controls 129 | // custom headers. See twentyten_admin_header_style(), below. 130 | add_custom_image_header( '', 'twentyten_admin_header_style' ); 131 | 132 | // ... and thus ends the changeable header business. 133 | 134 | // Default custom headers packaged with the theme. %s is a placeholder for the theme template directory URI. 135 | register_default_headers( array( 136 | 'berries' => array( 137 | 'url' => '%s/images/headers/berries.jpg', 138 | 'thumbnail_url' => '%s/images/headers/berries-thumbnail.jpg', 139 | /* translators: header image description */ 140 | 'description' => __( 'Berries', 'twentyten' ) 141 | ), 142 | 'cherryblossom' => array( 143 | 'url' => '%s/images/headers/cherryblossoms.jpg', 144 | 'thumbnail_url' => '%s/images/headers/cherryblossoms-thumbnail.jpg', 145 | /* translators: header image description */ 146 | 'description' => __( 'Cherry Blossoms', 'twentyten' ) 147 | ), 148 | 'concave' => array( 149 | 'url' => '%s/images/headers/concave.jpg', 150 | 'thumbnail_url' => '%s/images/headers/concave-thumbnail.jpg', 151 | /* translators: header image description */ 152 | 'description' => __( 'Concave', 'twentyten' ) 153 | ), 154 | 'fern' => array( 155 | 'url' => '%s/images/headers/fern.jpg', 156 | 'thumbnail_url' => '%s/images/headers/fern-thumbnail.jpg', 157 | /* translators: header image description */ 158 | 'description' => __( 'Fern', 'twentyten' ) 159 | ), 160 | 'forestfloor' => array( 161 | 'url' => '%s/images/headers/forestfloor.jpg', 162 | 'thumbnail_url' => '%s/images/headers/forestfloor-thumbnail.jpg', 163 | /* translators: header image description */ 164 | 'description' => __( 'Forest Floor', 'twentyten' ) 165 | ), 166 | 'inkwell' => array( 167 | 'url' => '%s/images/headers/inkwell.jpg', 168 | 'thumbnail_url' => '%s/images/headers/inkwell-thumbnail.jpg', 169 | /* translators: header image description */ 170 | 'description' => __( 'Inkwell', 'twentyten' ) 171 | ), 172 | 'path' => array( 173 | 'url' => '%s/images/headers/path.jpg', 174 | 'thumbnail_url' => '%s/images/headers/path-thumbnail.jpg', 175 | /* translators: header image description */ 176 | 'description' => __( 'Path', 'twentyten' ) 177 | ), 178 | 'sunset' => array( 179 | 'url' => '%s/images/headers/sunset.jpg', 180 | 'thumbnail_url' => '%s/images/headers/sunset-thumbnail.jpg', 181 | /* translators: header image description */ 182 | 'description' => __( 'Sunset', 'twentyten' ) 183 | ) 184 | ) ); 185 | } 186 | endif; 187 | 188 | if ( ! function_exists( 'twentyten_admin_header_style' ) ) : 189 | /** 190 | * Styles the header image displayed on the Appearance > Header admin panel. 191 | * 192 | * Referenced via add_custom_image_header() in twentyten_setup(). 193 | * 194 | * @since Twenty Ten 1.0 195 | */ 196 | function twentyten_admin_header_style() { 197 | ?> 198 | 209 | ' . __( 'Continue reading ', 'twentyten' ) . ''; 249 | } 250 | 251 | /** 252 | * Replaces "[...]" (appended to automatically generated excerpts) with an ellipsis and twentyten_continue_reading_link(). 253 | * 254 | * To override this in a child theme, remove the filter and add your own 255 | * function tied to the excerpt_more filter hook. 256 | * 257 | * @since Twenty Ten 1.0 258 | * @return string An ellipsis 259 | */ 260 | function twentyten_auto_excerpt_more( $more ) { 261 | return ' …' . twentyten_continue_reading_link(); 262 | } 263 | add_filter( 'excerpt_more', 'twentyten_auto_excerpt_more' ); 264 | 265 | /** 266 | * Adds a pretty "Continue Reading" link to custom post excerpts. 267 | * 268 | * To override this link in a child theme, remove the filter and add your own 269 | * function tied to the get_the_excerpt filter hook. 270 | * 271 | * @since Twenty Ten 1.0 272 | * @return string Excerpt with a pretty "Continue Reading" link 273 | */ 274 | function twentyten_custom_excerpt_more( $output ) { 275 | if ( has_excerpt() && ! is_attachment() ) { 276 | $output .= twentyten_continue_reading_link(); 277 | } 278 | return $output; 279 | } 280 | add_filter( 'get_the_excerpt', 'twentyten_custom_excerpt_more' ); 281 | 282 | /** 283 | * Remove inline styles printed when the gallery shortcode is used. 284 | * 285 | * Galleries are styled by the theme in Twenty Ten's style.css. This is just 286 | * a simple filter call that tells WordPress to not use the default styles. 287 | * 288 | * @since Twenty Ten 1.2 289 | */ 290 | add_filter( 'use_default_gallery_style', '__return_false' ); 291 | 292 | /** 293 | * Deprecated way to remove inline styles printed when the gallery shortcode is used. 294 | * 295 | * This function is no longer needed or used. Use the use_default_gallery_style 296 | * filter instead, as seen above. 297 | * 298 | * @since Twenty Ten 1.0 299 | * @deprecated Deprecated in Twenty Ten 1.2 for WordPress 3.1 300 | * 301 | * @return string The gallery style filter, with the styles themselves removed. 302 | */ 303 | function twentyten_remove_gallery_css( $css ) { 304 | return preg_replace( "##s", '', $css ); 305 | } 306 | // Backwards compatibility with WordPress 3.0. 307 | if ( version_compare( $GLOBALS['wp_version'], '3.1', '<' ) ) 308 | add_filter( 'gallery_style', 'twentyten_remove_gallery_css' ); 309 | 310 | if ( ! function_exists( 'twentyten_comment' ) ) : 311 | /** 312 | * Template for comments and pingbacks. 313 | * 314 | * To override this walker in a child theme without modifying the comments template 315 | * simply create your own twentyten_comment(), and that function will be used instead. 316 | * 317 | * Used as a callback by wp_list_comments() for displaying the comments. 318 | * 319 | * @since Twenty Ten 1.0 320 | */ 321 | function twentyten_comment( $comment, $args, $depth ) { 322 | $GLOBALS['comment'] = $comment; 323 | switch ( $comment->comment_type ) : 324 | case '' : 325 | ?> 326 |
  • id="li-comment-"> 327 |
    328 |
    329 | 330 | says:', 'twentyten' ), sprintf( '%s', get_comment_author_link() ) ); ?> 331 |
    332 | comment_approved == '0' ) : ?> 333 | 334 |
    335 | 336 | 337 | 343 | 344 |
    345 | 346 |
    347 | $depth, 'max_depth' => $args['max_depth'] ) ) ); ?> 348 |
    349 |
    350 | 351 | 356 |
  • 357 |

    358 | __( 'Primary Widget Area', 'twentyten' ), 377 | 'id' => 'primary-widget-area', 378 | 'description' => __( 'The primary widget area', 'twentyten' ), 379 | 'before_widget' => '
  • ', 380 | 'after_widget' => '
  • ', 381 | 'before_title' => '

    ', 382 | 'after_title' => '

    ', 383 | ) ); 384 | 385 | // Area 2, located below the Primary Widget Area in the sidebar. Empty by default. 386 | register_sidebar( array( 387 | 'name' => __( 'Secondary Widget Area', 'twentyten' ), 388 | 'id' => 'secondary-widget-area', 389 | 'description' => __( 'The secondary widget area', 'twentyten' ), 390 | 'before_widget' => '
  • ', 391 | 'after_widget' => '
  • ', 392 | 'before_title' => '

    ', 393 | 'after_title' => '

    ', 394 | ) ); 395 | 396 | // Area 3, located in the footer. Empty by default. 397 | register_sidebar( array( 398 | 'name' => __( 'First Footer Widget Area', 'twentyten' ), 399 | 'id' => 'first-footer-widget-area', 400 | 'description' => __( 'The first footer widget area', 'twentyten' ), 401 | 'before_widget' => '
  • ', 402 | 'after_widget' => '
  • ', 403 | 'before_title' => '

    ', 404 | 'after_title' => '

    ', 405 | ) ); 406 | 407 | // Area 4, located in the footer. Empty by default. 408 | register_sidebar( array( 409 | 'name' => __( 'Second Footer Widget Area', 'twentyten' ), 410 | 'id' => 'second-footer-widget-area', 411 | 'description' => __( 'The second footer widget area', 'twentyten' ), 412 | 'before_widget' => '
  • ', 413 | 'after_widget' => '
  • ', 414 | 'before_title' => '

    ', 415 | 'after_title' => '

    ', 416 | ) ); 417 | 418 | // Area 5, located in the footer. Empty by default. 419 | register_sidebar( array( 420 | 'name' => __( 'Third Footer Widget Area', 'twentyten' ), 421 | 'id' => 'third-footer-widget-area', 422 | 'description' => __( 'The third footer widget area', 'twentyten' ), 423 | 'before_widget' => '
  • ', 424 | 'after_widget' => '
  • ', 425 | 'before_title' => '

    ', 426 | 'after_title' => '

    ', 427 | ) ); 428 | 429 | // Area 6, located in the footer. Empty by default. 430 | register_sidebar( array( 431 | 'name' => __( 'Fourth Footer Widget Area', 'twentyten' ), 432 | 'id' => 'fourth-footer-widget-area', 433 | 'description' => __( 'The fourth footer widget area', 'twentyten' ), 434 | 'before_widget' => '
  • ', 435 | 'after_widget' => '
  • ', 436 | 'before_title' => '

    ', 437 | 'after_title' => '

    ', 438 | ) ); 439 | } 440 | /** Register sidebars by running twentyten_widgets_init() on the widgets_init hook. */ 441 | add_action( 'widgets_init', 'twentyten_widgets_init' ); 442 | 443 | /** 444 | * Removes the default styles that are packaged with the Recent Comments widget. 445 | * 446 | * To override this in a child theme, remove the filter and optionally add your own 447 | * function tied to the widgets_init action hook. 448 | * 449 | * This function uses a filter (show_recent_comments_widget_style) new in WordPress 3.1 450 | * to remove the default style. Using Twenty Ten 1.2 in WordPress 3.0 will show the styles, 451 | * but they won't have any effect on the widget in default Twenty Ten styling. 452 | * 453 | * @since Twenty Ten 1.0 454 | */ 455 | function twentyten_remove_recent_comments_style() { 456 | add_filter( 'show_recent_comments_widget_style', '__return_false' ); 457 | } 458 | add_action( 'widgets_init', 'twentyten_remove_recent_comments_style' ); 459 | 460 | if ( ! function_exists( 'twentyten_posted_on' ) ) : 461 | /** 462 | * Prints HTML with meta information for the current post-date/time and author. 463 | * 464 | * @since Twenty Ten 1.0 465 | */ 466 | function twentyten_posted_on() { 467 | printf( __( 'Posted on %2$s by %3$s', 'twentyten' ), 468 | 'meta-prep meta-prep-author', 469 | sprintf( '%3$s', 470 | get_permalink(), 471 | esc_attr( get_the_time() ), 472 | get_the_date() 473 | ), 474 | sprintf( '%3$s', 475 | get_author_posts_url( get_the_author_meta( 'ID' ) ), 476 | sprintf( esc_attr__( 'View all posts by %s', 'twentyten' ), get_the_author() ), 477 | get_the_author() 478 | ) 479 | ); 480 | } 481 | endif; 482 | 483 | if ( ! function_exists( 'twentyten_posted_in' ) ) : 484 | /** 485 | * Prints HTML with meta information for the current post (category, tags and permalink). 486 | * 487 | * @since Twenty Ten 1.0 488 | */ 489 | function twentyten_posted_in() { 490 | // Retrieves tag list of current post, separated by commas. 491 | $tag_list = get_the_tag_list( '', ', ' ); 492 | if ( $tag_list ) { 493 | $posted_in = __( 'This entry was posted in %1$s and tagged %2$s. Bookmark the permalink.', 'twentyten' ); 494 | } elseif ( is_object_in_taxonomy( get_post_type(), 'category' ) ) { 495 | $posted_in = __( 'This entry was posted in %1$s. Bookmark the permalink.', 'twentyten' ); 496 | } else { 497 | $posted_in = __( 'Bookmark the permalink.', 'twentyten' ); 498 | } 499 | // Prints the string, replacing the placeholders. 500 | printf( 501 | $posted_in, 502 | get_the_category_list( ', ' ), 503 | $tag_list, 504 | get_permalink(), 505 | the_title_attribute( 'echo=0' ) 506 | ); 507 | } 508 | endif; 509 | 510 | add_action( 'add_meta_boxes', 'pears_add_meta_box' ); 511 | add_action( 'save_post', 'pears_save_post' ); 512 | 513 | function pears_add_meta_box() { 514 | 515 | add_meta_box( 516 | 'pears', 517 | 'Pears', 518 | 'pears_meta_box', 519 | 'post', 520 | 'normal', 521 | 'high' 522 | ); 523 | 524 | } 525 | 526 | function pears_meta_box( $post ) { 527 | wp_nonce_field( plugin_basename( __FILE__ ), 'pears_noncename' ); 528 | 529 | $html = get_post_meta($post->ID,'html',true); 530 | $css = get_post_meta($post->ID,'css',true); 531 | 532 | echo '

    These fields are for the HTML markup and CSS styles. The post body can be used for notes.

    '; 533 | echo ''; 534 | echo '

    '; 535 | echo ' '; 536 | echo '

    '; 537 | } 538 | 539 | function pears_save_post( $post_id ) { 540 | 541 | // Ignore if doing an autosave 542 | if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) 543 | return; 544 | 545 | // verify data came from pears meta box 546 | if ( !wp_verify_nonce( $_POST['pears_noncename'], plugin_basename( __FILE__ ) ) ) 547 | return; 548 | 549 | // Check user permissions 550 | if ( 'post' == $_POST['post_type'] ) { 551 | if ( !current_user_can( 'edit_page', $post_id ) ) 552 | return; 553 | } 554 | else{ 555 | if ( !current_user_can( 'edit_post', $post_id ) ) 556 | return; 557 | } 558 | 559 | $html_data = $_POST['html']; 560 | update_post_meta($post_id, 'html', $html_data); 561 | 562 | $css_data = $_POST['css']; 563 | update_post_meta($post_id, 'css', $css_data); 564 | } 565 | -------------------------------------------------------------------------------- /header.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Pears <?php wp_title('/', true, 'left'); ?> 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 20 | 21 | 22 | 23 | 24 | > 25 | 26 | 31 | 32 |
    33 |
    34 | -------------------------------------------------------------------------------- /images/icon-copy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simplebits/Pears/bd6211cdd2bf08682716e0a0b080ebee5b90da0b/images/icon-copy.png -------------------------------------------------------------------------------- /images/max.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simplebits/Pears/bd6211cdd2bf08682716e0a0b080ebee5b90da0b/images/max.png -------------------------------------------------------------------------------- /images/min.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simplebits/Pears/bd6211cdd2bf08682716e0a0b080ebee5b90da0b/images/min.png -------------------------------------------------------------------------------- /images/pear.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simplebits/Pears/bd6211cdd2bf08682716e0a0b080ebee5b90da0b/images/pear.png -------------------------------------------------------------------------------- /images/sb-black.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simplebits/Pears/bd6211cdd2bf08682716e0a0b080ebee5b90da0b/images/sb-black.png -------------------------------------------------------------------------------- /images/tag-bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simplebits/Pears/bd6211cdd2bf08682716e0a0b080ebee5b90da0b/images/tag-bg.png -------------------------------------------------------------------------------- /images/temp-img.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simplebits/Pears/bd6211cdd2bf08682716e0a0b080ebee5b90da0b/images/temp-img.png -------------------------------------------------------------------------------- /images/thumb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simplebits/Pears/bd6211cdd2bf08682716e0a0b080ebee5b90da0b/images/thumb.png -------------------------------------------------------------------------------- /images/tile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simplebits/Pears/bd6211cdd2bf08682716e0a0b080ebee5b90da0b/images/tile.png -------------------------------------------------------------------------------- /index.php: -------------------------------------------------------------------------------- 1 | 17 | 18 |
    19 |
    20 | 21 | 28 |
    29 |
    30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /js/less.js: -------------------------------------------------------------------------------- 1 | // 2 | // LESS - Leaner CSS v1.1.3 3 | // http://lesscss.org 4 | // 5 | // Copyright (c) 2009-2011, Alexis Sellier 6 | // Licensed under the Apache 2.0 License. 7 | // 8 | // 9 | // LESS - Leaner CSS v1.1.3 10 | // http://lesscss.org 11 | // 12 | // Copyright (c) 2009-2011, Alexis Sellier 13 | // Licensed under the Apache 2.0 License. 14 | // 15 | (function(a,b){function v(a,b){var c="less-error-message:"+p(b),e=[""].join("\n"),f=document.createElement("div"),g,h;f.id=c,f.className="less-error-message",h="

    "+(a.message||"There is an error in your .less file")+"

    "+'

    '+b+" ",a.extract&&(h+="on line "+a.line+", column "+(a.column+1)+":

    "+e.replace(/\[(-?\d)\]/g,function(b,c){return parseInt(a.line)+parseInt(c)||""}).replace(/\{(\d)\}/g,function(b,c){return a.extract[parseInt(c)]||""}).replace(/\{current\}/,a.extract[1].slice(0,a.column)+''+a.extract[1].slice(a.column)+"")),f.innerHTML=h,q([".less-error-message ul, .less-error-message li {","list-style-type: none;","margin-right: 15px;","padding: 4px 0;","margin: 0;","}",".less-error-message label {","font-size: 12px;","margin-right: 15px;","padding: 4px 0;","color: #cc7777;","}",".less-error-message pre {","color: #ee4444;","padding: 4px 0;","margin: 0;","display: inline-block;","}",".less-error-message pre.ctx {","color: #dd4444;","}",".less-error-message h3 {","font-size: 20px;","font-weight: bold;","padding: 15px 0 5px 0;","margin: 0;","}",".less-error-message a {","color: #10a","}",".less-error-message .error {","color: red;","font-weight: bold;","padding-bottom: 2px;","border-bottom: 1px dashed red;","}"].join("\n"),{title:"error-message"}),f.style.cssText=["font-family: Arial, sans-serif","border: 1px solid #e00","background-color: #eee","border-radius: 5px","-webkit-border-radius: 5px","-moz-border-radius: 5px","color: #e00","padding: 15px","margin-bottom: 15px"].join(";"),d.env=="development"&&(g=setInterval(function(){document.body&&(document.getElementById(c)?document.body.replaceChild(f,document.getElementById(c)):document.body.insertBefore(f,document.body.firstChild),clearInterval(g))},10))}function u(a){d.env=="development"&&typeof console!="undefined"&&console.log("less: "+a)}function t(a){return a&&a.parentNode.removeChild(a)}function s(){if(a.XMLHttpRequest)return new XMLHttpRequest;try{return new ActiveXObject("MSXML2.XMLHTTP.3.0")}catch(b){u("browser doesn't support AJAX.");return null}}function r(a,b,c,e){function i(b,c,d){b.status>=200&&b.status<300?c(b.responseText,b.getResponseHeader("Last-Modified")):typeof d=="function"&&d(b.status,a)}var f=s(),h=g?!1:d.async;typeof f.overrideMimeType=="function"&&f.overrideMimeType("text/css"),f.open("GET",a,h),f.setRequestHeader("Accept",b||"text/x-less, text/css; q=0.9, */*; q=0.5"),f.send(null),g?f.status===0?c(f.responseText):e(f.status,a):h?f.onreadystatechange=function(){f.readyState==4&&i(f,c,e)}:i(f,c,e)}function q(a,b,c){var d,e=b.href?b.href.replace(/\?.*$/,""):"",f="less:"+(b.title||p(e));(d=document.getElementById(f))===null&&(d=document.createElement("style"),d.type="text/css",d.media=b.media||"screen",d.id=f,document.getElementsByTagName("head")[0].appendChild(d));if(d.styleSheet)try{d.styleSheet.cssText=a}catch(g){throw new Error("Couldn't reassign styleSheet.cssText.")}else(function(a){d.childNodes.length>0?d.firstChild.nodeValue!==a.nodeValue&&d.replaceChild(a,d.firstChild):d.appendChild(a)})(document.createTextNode(a));c&&h&&(u("saving "+e+" to cache."),h.setItem(e,a),h.setItem(e+":timestamp",c))}function p(a){return a.replace(/^[a-z]+:\/\/?[^\/]+/,"").replace(/^\//,"").replace(/\?.*$/,"").replace(/\.[^\.\/]+$/,"").replace(/[^\.\w-]+/g,"-").replace(/\./g,":")}function o(b,c,e,f){var g=a.location.href.replace(/[#?].*$/,""),i=b.href.replace(/\?.*$/,""),j=h&&h.getItem(i),k=h&&h.getItem(i+":timestamp"),l={css:j,timestamp:k};/^(https?|file):/.test(i)||(i.charAt(0)=="/"?i=a.location.protocol+"//"+a.location.host+i:i=g.slice(0,g.lastIndexOf("/")+1)+i),r(b.href,b.type,function(a,g){if(!e&&l&&g&&(new Date(g)).valueOf()===(new Date(l.timestamp)).valueOf())q(l.css,b),c(null,b,{local:!0,remaining:f});else try{(new d.Parser({optimization:d.optimization,paths:[i.replace(/[\w\.-]+$/,"")],mime:b.type})).parse(a,function(a,d){if(a)return v(a,i);try{c(d,b,{local:!1,lastModified:g,remaining:f}),t(document.getElementById("less-error-message:"+p(i)))}catch(a){v(a,i)}})}catch(h){v(h,i)}},function(a,b){throw new Error("Couldn't load "+b+" ("+a+")")})}function n(a,b){for(var c=0;c>>0;for(var d=0;d>>0,c=Array(b),d=arguments[1];for(var e=0;e>>0,c=0;if(b===0&&arguments.length===1)throw new TypeError;if(arguments.length>=2)var d=arguments[1];else for(;;){if(c in this){d=this[c++];break}if(++c>=b)throw new TypeError}for(;c=b)return-1;c<0&&(c+=b);for(;ck&&(j[f]=j[f].slice(c-k),k=c)}function q(){j[f]=g,c=h,k=c}function p(){g=j[f],h=c,k=c}var b,c,f,g,h,i,j,k,l,m=this,n=function(){},o=this.imports={paths:a&&a.paths||[],queue:[],files:{},mime:a&&a.mime,push:function(b,c){var e=this;this.queue.push(b),d.Parser.importer(b,this.paths,function(a){e.queue.splice(e.queue.indexOf(b),1),e.files[b]=a,c(a),e.queue.length===0&&n()},a)}};this.env=a=a||{},this.optimization="optimization"in this.env?this.env.optimization:1,this.env.filename=this.env.filename||null;return l={imports:o,parse:function(d,g){var h,l,m,o,p,q,r=[],t,u=null;c=f=k=i=0,j=[],b=d.replace(/\r\n/g,"\n"),j=function(c){var d=0,e=/[^"'`\{\}\/\(\)]+/g,f=/\/\*(?:[^*]|\*+[^\/*])*\*+\/|\/\/.*/g,g=0,h,i=c[0],j,k;for(var l=0,m,n;l0)throw{type:"Syntax",message:"Missing closing `}`",filename:a.filename};return c.map(function(a){return a.join("")})}([[]]),h=new e.Ruleset([],s(this.parsers.primary)),h.root=!0,h.toCSS=function(c){var d,f,g;return function(g,h){function n(a){return a?(b.slice(0,a).match(/\n/g)||"").length:null}var i=[];g=g||{},typeof h=="object"&&!Array.isArray(h)&&(h=Object.keys(h).map(function(a){var b=h[a];b instanceof e.Value||(b instanceof e.Expression||(b=new e.Expression([b])),b=new e.Value([b]));return new e.Rule("@"+a,b,!1,0)}),i=[new e.Ruleset(null,h)]);try{var j=c.call(this,{frames:i}).toCSS([],{compress:g.compress||!1})}catch(k){f=b.split("\n"),d=n(k.index);for(var l=k.index,m=-1;l>=0&&b.charAt(l)!=="\n";l--)m++;throw{type:k.type,message:k.message,filename:a.filename,index:k.index,line:typeof d=="number"?d+1:null,callLine:k.call&&n(k.call)+1,callExtract:f[n(k.call)],stack:k.stack,column:m,extract:[f[d-1],f[d],f[d+1]]}}return g.compress?j.replace(/(\s)+/g,"$1"):j}}(h.eval);if(c=0&&b.charAt(v)!=="\n";v--)w++;u={name:"ParseError",message:"Syntax Error on line "+p,index:c,filename:a.filename,line:p,column:w,extract:[q[p-2],q[p-1],q[p]]}}this.imports.queue.length>0?n=function(){g(u,h)}:g(u,h)},parsers:{primary:function(){var a,b=[];while((a=s(this.mixin.definition)||s(this.rule)||s(this.ruleset)||s(this.mixin.call)||s(this.comment)||s(this.directive))||s(/^[\s\n]+/))a&&b.push(a);return b},comment:function(){var a;if(b.charAt(c)==="/"){if(b.charAt(c+1)==="/")return new e.Comment(s(/^\/\/.*/),!0);if(a=s(/^\/\*(?:[^*]|\*+[^\/*])*\*+\/\n?/))return new e.Comment(a)}},entities:{quoted:function(){var a,d=c,f;b.charAt(d)==="~"&&(d++,f=!0);if(b.charAt(d)==='"'||b.charAt(d)==="'"){f&&s("~");if(a=s(/^"((?:[^"\\\r\n]|\\.)*)"|'((?:[^'\\\r\n]|\\.)*)'/))return new e.Quoted(a[0],a[1]||a[2],f)}},keyword:function(){var a;if(a=s(/^[A-Za-z-]+/))return new e.Keyword(a)},call:function(){var a,b,d=c;if(!!(a=/^([\w-]+|%)\(/.exec(j[f]))){a=a[1].toLowerCase();if(a==="url")return null;c+=a.length;if(a==="alpha")return s(this.alpha);s("("),b=s(this.entities.arguments);if(!s(")"))return;if(a)return new e.Call(a,b,d)}},arguments:function(){var a=[],b;while(b=s(this.expression)){a.push(b);if(!s(","))break}return a},literal:function(){return s(this.entities.dimension)||s(this.entities.color)||s(this.entities.quoted)},url:function(){var a;if(b.charAt(c)==="u"&&!!s(/^url\(/)){a=s(this.entities.quoted)||s(this.entities.variable)||s(this.entities.dataURI)||s(/^[-\w%@$\/.&=:;#+?~]+/)||"";if(!s(")"))throw new Error("missing closing ) for url()");return new e.URL(a.value||a.data||a instanceof e.Variable?a:new e.Anonymous(a),o.paths)}},dataURI:function(){var a;if(s(/^data:/)){a={},a.mime=s(/^[^\/]+\/[^,;)]+/)||"",a.charset=s(/^;\s*charset=[^,;)]+/)||"",a.base64=s(/^;\s*base64/)||"",a.data=s(/^,\s*[^)]+/);if(a.data)return a}},variable:function(){var a,d=c;if(b.charAt(c)==="@"&&(a=s(/^@@?[\w-]+/)))return new e.Variable(a,d)},color:function(){var a;if(b.charAt(c)==="#"&&(a=s(/^#([a-fA-F0-9]{6}|[a-fA-F0-9]{3})/)))return new e.Color(a[1])},dimension:function(){var a,d=b.charCodeAt(c);if(!(d>57||d<45||d===47))if(a=s(/^(-?\d*\.?\d+)(px|%|em|pc|ex|in|deg|s|ms|pt|cm|mm|rad|grad|turn)?/))return new e.Dimension(a[1],a[2])},javascript:function(){var a,d=c,f;b.charAt(d)==="~"&&(d++,f=!0);if(b.charAt(d)==="`"){f&&s("~");if(a=s(/^`([^`]*)`/))return new e.JavaScript(a[1],c,f)}}},variable:function(){var a;if(b.charAt(c)==="@"&&(a=s(/^(@[\w-]+)\s*:/)))return a[1]},shorthand:function(){var a,b;if(!!t(/^[@\w.%-]+\/[@\w.-]+/)&&(a=s(this.entity))&&s("/")&&(b=s(this.entity)))return new e.Shorthand(a,b)},mixin:{call:function(){var a=[],d,f,g,h=c,i=b.charAt(c);if(i==="."||i==="#"){while(d=s(/^[#.](?:[\w-]|\\(?:[a-fA-F0-9]{1,6} ?|[^a-fA-F0-9]))+/))a.push(new e.Element(f,d)),f=s(">");s("(")&&(g=s(this.entities.arguments))&&s(")");if(a.length>0&&(s(";")||t("}")))return new e.mixin.Call(a,g,h)}},definition:function(){var a,d=[],f,g,h,i;if(!(b.charAt(c)!=="."&&b.charAt(c)!=="#"||t(/^[^{]*(;|})/)))if(f=s(/^([#.](?:[\w-]|\\(?:[a-fA-F0-9]{1,6} ?|[^a-fA-F0-9]))+)\s*\(/)){a=f[1];while(h=s(this.entities.variable)||s(this.entities.literal)||s(this.entities.keyword)){if(h instanceof e.Variable)if(s(":"))if(i=s(this.expression))d.push({name:h.name,value:i});else throw new Error("Expected value");else d.push({name:h.name});else d.push({value:h});if(!s(","))break}if(!s(")"))throw new Error("Expected )");g=s(this.block);if(g)return new e.mixin.Definition(a,d,g)}}},entity:function(){return s(this.entities.literal)||s(this.entities.variable)||s(this.entities.url)||s(this.entities.call)||s(this.entities.keyword)||s(this.entities.javascript)||s(this.comment)},end:function(){return s(";")||t("}")},alpha:function(){var a;if(!!s(/^\(opacity=/i))if(a=s(/^\d+/)||s(this.entities.variable)){if(!s(")"))throw new Error("missing closing ) for alpha()");return new e.Alpha(a)}},element:function(){var a,b,c;c=s(this.combinator),a=s(/^(?:[.#]?|:*)(?:[\w-]|\\(?:[a-fA-F0-9]{1,6} ?|[^a-fA-F0-9]))+/)||s("*")||s(this.attribute)||s(/^\([^)@]+\)/);if(a)return new e.Element(c,a)},combinator:function(){var a,d=b.charAt(c);if(d===">"||d==="&"||d==="+"||d==="~"){c++;while(b.charAt(c)===" ")c++;return new e.Combinator(d)}if(d===":"&&b.charAt(c+1)===":"){c+=2;while(b.charAt(c)===" ")c++;return new e.Combinator("::")}return b.charAt(c-1)===" "?new e.Combinator(" "):new e.Combinator(null)},selector:function(){var a,d,f=[],g,h;while(d=s(this.element)){g=b.charAt(c),f.push(d);if(g==="{"||g==="}"||g===";"||g===",")break}if(f.length>0)return new e.Selector(f)},tag:function(){return s(/^[a-zA-Z][a-zA-Z-]*[0-9]?/)||s("*")},attribute:function(){var a="",b,c,d;if(!!s("[")){if(b=s(/^[a-zA-Z-]+/)||s(this.entities.quoted))(d=s(/^[|~*$^]?=/))&&(c=s(this.entities.quoted)||s(/^[\w-]+/))?a=[b,d,c.toCSS?c.toCSS():c].join(""):a=b;if(!s("]"))return;if(a)return"["+a+"]"}},block:function(){var a;if(s("{")&&(a=s(this.primary))&&s("}"))return a},ruleset:function(){var a=[],b,d,g;p();if(g=/^([.#: \w-]+)[\s\n]*\{/.exec(j[f]))c+=g[0].length-1,a=[new e.Selector([new e.Element(null,g[1])])];else while(b=s(this.selector)){a.push(b),s(this.comment);if(!s(","))break;s(this.comment)}if(a.length>0&&(d=s(this.block)))return new e.Ruleset(a,d);i=c,q()},rule:function(){var a,d,g=b.charAt(c),k,l;p();if(g!=="."&&g!=="#"&&g!=="&")if(a=s(this.variable)||s(this.property)){a.charAt(0)!="@"&&(l=/^([^@+\/'"*`(;{}-]*);/.exec(j[f]))?(c+=l[0].length-1,d=new e.Anonymous(l[1])):a==="font"?d=s(this.font):d=s(this.value),k=s(this.important);if(d&&s(this.end))return new e.Rule(a,d,k,h);i=c,q()}},"import":function(){var a;if(s(/^@import\s+/)&&(a=s(this.entities.quoted)||s(this.entities.url))&&s(";"))return new e.Import(a,o)},directive:function(){var a,d,f,g;if(b.charAt(c)==="@"){if(d=s(this["import"]))return d;if(a=s(/^@media|@page|@-[-a-z]+/)){g=(s(/^[^{]+/)||"").trim();if(f=s(this.block))return new e.Directive(a+" "+g,f)}else if(a=s(/^@[-a-z]+/))if(a==="@font-face"){if(f=s(this.block))return new e.Directive(a,f)}else if((d=s(this.entity))&&s(";"))return new e.Directive(a,d)}},font:function(){var a=[],b=[],c,d,f,g;while(g=s(this.shorthand)||s(this.entity))b.push(g);a.push(new e.Expression(b));if(s(","))while(g=s(this.expression)){a.push(g);if(!s(","))break}return new e.Value(a)},value:function(){var a,b=[],c;while(a=s(this.expression)){b.push(a);if(!s(","))break}if(b.length>0)return new e.Value(b)},important:function(){if(b.charAt(c)==="!")return s(/^! *important/)},sub:function(){var a;if(s("(")&&(a=s(this.expression))&&s(")"))return a},multiplication:function(){var a,b,c,d;if(a=s(this.operand)){while((c=s("/")||s("*"))&&(b=s(this.operand)))d=new e.Operation(c,[d||a,b]);return d||a}},addition:function(){var a,d,f,g;if(a=s(this.multiplication)){while((f=s(/^[-+]\s+/)||b.charAt(c-1)!=" "&&(s("+")||s("-")))&&(d=s(this.multiplication)))g=new e.Operation(f,[g||a,d]);return g||a}},operand:function(){var a,d=b.charAt(c+1);b.charAt(c)==="-"&&(d==="@"||d==="(")&&(a=s("-"));var f=s(this.sub)||s(this.entities.dimension)||s(this.entities.color)||s(this.entities.variable)||s(this.entities.call);return a?new e.Operation("*",[new e.Dimension(-1),f]):f},expression:function(){var a,b,c=[],d;while(a=s(this.addition)||s(this.entity))c.push(a);if(c.length>0)return new e.Expression(c)},property:function(){var a;if(a=s(/^(\*?-?[-a-z_0-9]+)\s*:/))return a[1]}}}},typeof a!="undefined"&&(d.Parser.importer=function(a,b,c,d){a.charAt(0)!=="/"&&b.length>0&&(a=b[0]+a),o({href:a,title:a,type:d.mime},c,!0)}),function(a){function d(a){return Math.min(1,Math.max(0,a))}function c(b){if(b instanceof a.Dimension)return parseFloat(b.unit=="%"?b.value/100:b.value);if(typeof b=="number")return b;throw{error:"RuntimeError",message:"color functions take numbers as parameters"}}function b(b){return a.functions.hsla(b.h,b.s,b.l,b.a)}a.functions={rgb:function(a,b,c){return this.rgba(a,b,c,1)},rgba:function(b,d,e,f){var g=[b,d,e].map(function(a){return c(a)}),f=c(f);return new a.Color(g,f)},hsl:function(a,b,c){return this.hsla(a,b,c,1)},hsla:function(a,b,d,e){function h(a){a=a<0?a+1:a>1?a-1:a;return a*6<1?g+(f-g)*a*6:a*2<1?f:a*3<2?g+(f-g)*(2/3-a)*6:g}a=c(a)%360/360,b=c(b),d=c(d),e=c(e);var f=d<=.5?d*(b+1):d+b-d*b,g=d*2-f;return this.rgba(h(a+1/3)*255,h(a)*255,h(a-1/3)*255,e)},hue:function(b){return new a.Dimension(Math.round(b.toHSL().h))},saturation:function(b){return new a.Dimension(Math.round(b.toHSL().s*100),"%")},lightness:function(b){return new a.Dimension(Math.round(b.toHSL().l*100),"%")},alpha:function(b){return new a.Dimension(b.toHSL().a)},saturate:function(a,c){var e=a.toHSL();e.s+=c.value/100,e.s=d(e.s);return b(e)},desaturate:function(a,c){var e=a.toHSL();e.s-=c.value/100,e.s=d(e.s);return b(e)},lighten:function(a,c){var e=a.toHSL();e.l+=c.value/100,e.l=d(e.l);return b(e)},darken:function(a,c){var e=a.toHSL();e.l-=c.value/100,e.l=d(e.l);return b(e)},fadein:function(a,c){var e=a.toHSL();e.a+=c.value/100,e.a=d(e.a);return b(e)},fadeout:function(a,c){var e=a.toHSL();e.a-=c.value/100,e.a=d(e.a);return b(e)},spin:function(a,c){var d=a.toHSL(),e=(d.h+c.value)%360;d.h=e<0?360+e:e;return b(d)},mix:function(b,c,d){var e=d.value/100,f=e*2-1,g=b.toHSL().a-c.toHSL().a,h=((f*g==-1?f:(f+g)/(1+f*g))+1)/2,i=1-h,j=[b.rgb[0]*h+c.rgb[0]*i,b.rgb[1]*h+c.rgb[1]*i,b.rgb[2]*h+c.rgb[2]*i],k=b.alpha*e+c.alpha*(1-e);return new a.Color(j,k)},greyscale:function(b){return this.desaturate(b,new a.Dimension(100))},e:function(b){return new a.Anonymous(b instanceof a.JavaScript?b.evaluated:b)},escape:function(b){return new a.Anonymous(encodeURI(b.value).replace(/=/g,"%3D").replace(/:/g,"%3A").replace(/#/g,"%23").replace(/;/g,"%3B").replace(/\(/g,"%28").replace(/\)/g,"%29"))},"%":function(b){var c=Array.prototype.slice.call(arguments,1),d=b.value;for(var e=0;e255?255:a<0?0:a).toString(16);return a.length===1?"0"+a:a}).join("")},operate:function(b,c){var d=[];c instanceof a.Color||(c=c.toColor());for(var e=0;e<3;e++)d[e]=a.operate(b,this.rgb[e],c.rgb[e]);return new a.Color(d,this.alpha+c.alpha)},toHSL:function(){var a=this.rgb[0]/255,b=this.rgb[1]/255,c=this.rgb[2]/255,d=this.alpha,e=Math.max(a,b,c),f=Math.min(a,b,c),g,h,i=(e+f)/2,j=e-f;if(e===f)g=h=0;else{h=i>.5?j/(2-e-f):j/(e+f);switch(e){case a:g=(b-c)/j+(b":a.compress?">":" > "}[this.value]}}(c("less/tree")),function(a){a.Expression=function(a){this.value=a},a.Expression.prototype={eval:function(b){return this.value.length>1?new a.Expression(this.value.map(function(a){return a.eval(b)})):this.value.length===1?this.value[0].eval(b):this},toCSS:function(a){return this.value.map(function(b){return b.toCSS(a)}).join(" ")}}}(c("less/tree")),function(a){a.Import=function(b,c){var d=this;this._path=b,b instanceof a.Quoted?this.path=/\.(le?|c)ss$/.test(b.value)?b.value:b.value+".less":this.path=b.value.value||b.value,this.css=/css$/.test(this.path),this.css||c.push(this.path,function(a){if(!a)throw new Error("Error parsing "+d.path);d.root=a})},a.Import.prototype={toCSS:function(){return this.css?"@import "+this._path.toCSS()+";\n":""},eval:function(b){var c;if(this.css)return this;c=new a.Ruleset(null,this.root.rules.slice(0));for(var d=0;d0){c=this.arguments&&this.arguments.map(function(b){return b.eval(a)});for(var g=0;g0&&c>this.params.length)return!1;d=Math.min(c,this.arity);for(var e=0;e1?Array.prototype.push.apply(d,e.find(new a.Selector(b.elements.slice(1)),c)):d.push(e);break}});return this._lookups[g]=d},toCSS:function(b,c){var d=[],e=[],f=[],g=[],h,i;if(!this.root)if(b.length===0)g=this.selectors.map(function(a){return[a]});else for(var j=0;j0&&(h=g.map(function(a){return a.map(function(a){return a.toCSS(c)}).join("").trim()}).join(c.compress?",":g.length>3?",\n":", "),d.push(h,(c.compress?"{":" {\n ")+e.join(c.compress?"":"\n ")+(c.compress?"}":"\n}\n"))),d.push(f);return d.join("")+(c.compress?"\n":"")}}}(c("less/tree")),function(a){a.Selector=function(a){this.elements=a,this.elements[0].combinator.value===""&&(this.elements[0].combinator.value=" ")},a.Selector.prototype.match=function(a){return this.elements[0].value===a.elements[0].value?!0:!1},a.Selector.prototype.toCSS=function(a){if(this._css)return this._css;return this._css=this.elements.map(function(b){return typeof b=="string"?" "+b.trim():b.toCSS(a)}).join("")}}(c("less/tree")),function(b){b.URL=function(b,c){b.data?this.attrs=b:(!/^(?:https?:\/|file:\/|data:\/)?\//.test(b.value)&&c.length>0&&typeof a!="undefined"&&(b.value=c[0]+(b.value.charAt(0)==="/"?b.value.slice(1):b.value)),this.value=b,this.paths=c)},b.URL.prototype={toCSS:function(){return"url("+(this.attrs?"data:"+this.attrs.mime+this.attrs.charset+this.attrs.base64+this.attrs.data:this.value.toCSS())+")"},eval:function(a){return this.attrs?this:new b.URL(this.value.eval(a),this.paths)}}}(c("less/tree")),function(a){a.Value=function(a){this.value=a,this.is="value"},a.Value.prototype={eval:function(b){return this.value.length===1?this.value[0].eval(b):new a.Value(this.value.map(function(a){return a.eval(b)}))},toCSS:function(a){return this.value.map(function(b){return b.toCSS(a)}).join(a.compress?",":", ")}}}(c("less/tree")),function(a){a.Variable=function(a,b){this.name=a,this 16 | .index=b},a.Variable.prototype={eval:function(b){var c,d,e=this.name;e.indexOf("@@")==0&&(e="@"+(new a.Variable(e.slice(1))).eval(b).value);if(c=a.find(b.frames,function(a){if(d=a.variable(e))return d.value.eval(b)}))return c;throw{message:"variable "+e+" is undefined",index:this.index}}}}(c("less/tree")),c("less/tree").find=function(a,b){for(var c=0,d;c1?"["+a.value.map(function(a){return a.toCSS(!1)}).join(", ")+"]":a.toCSS(!1)};var g=location.protocol==="file:"||location.protocol==="chrome:"||location.protocol==="chrome-extension:"||location.protocol==="resource:";d.env=d.env||(location.hostname=="127.0.0.1"||location.hostname=="0.0.0.0"||location.hostname=="localhost"||location.port.length>0||g?"development":"production"),d.async=!1,d.poll=d.poll||(g?1e3:1500),d.watch=function(){return this.watchMode=!0},d.unwatch=function(){return this.watchMode=!1},d.env==="development"?(d.optimization=0,/!watch/.test(location.hash)&&d.watch(),d.watchTimer=setInterval(function(){d.watchMode&&n(function(a,b,c){a&&q(a.toCSS(),b,c.lastModified)})},d.poll)):d.optimization=3;var h;try{h=typeof a.localStorage=="undefined"?null:a.localStorage}catch(i){h=null}var j=document.getElementsByTagName("link"),k=/^text\/(x-)?less$/;d.sheets=[];for(var l=0;l 17 | 18 | 19 | 20 | post_parent ) ) : ?> 21 |

    ← %s', 'twentyten' ), get_the_title( $post->post_parent ) ); 24 | ?>

    25 | 26 | 27 |
    > 28 |

    29 | 30 | 65 | 66 |
    67 |
    68 | $post->post_parent, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => 'ASC', 'orderby' => 'menu_order ID' ) ) ); 70 | foreach ( $attachments as $k => $attachment ) { 71 | if ( $attachment->ID == $post->ID ) 72 | break; 73 | } 74 | $k++; 75 | // If there is more than 1 image attachment in a gallery 76 | if ( count( $attachments ) > 1 ) { 77 | if ( isset( $attachments[ $k ] ) ) 78 | // get the URL of the next image attachment 79 | $next_attachment_url = get_attachment_link( $attachments[ $k ]->ID ); 80 | else 81 | // or get the URL of the first image attachment 82 | $next_attachment_url = get_attachment_link( $attachments[ 0 ]->ID ); 83 | } else { 84 | // or, if there's only 1 image attachment, get the URL of the image 85 | $next_attachment_url = wp_get_attachment_url(); 86 | } 87 | ?> 88 |

    ID, array( $attachment_width, $attachment_height ) ); // filterable image width with, essentially, no limit for image height. 92 | ?>

    93 | 94 | 98 | 99 | 100 | 101 |
    102 |
    post_excerpt ) ) the_excerpt(); ?>
    103 | 104 | →', 'twentyten' ) ); ?> 105 | '' ) ); ?> 106 | 107 |
    108 | 109 |
    110 | 111 | ', '' ); ?> 112 |
    113 |
    114 | 115 | 116 | 117 | -------------------------------------------------------------------------------- /loop-page.php: -------------------------------------------------------------------------------- 1 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /loop-single.php: -------------------------------------------------------------------------------- 1 | 17 | 18 | 19 | 20 | 23 | 24 |
    25 |

    Pattern

    26 | 27 |

    28 | 29 |
    30 | ID, $key, true); ?> 31 |
    32 |
    33 | 34 |
    35 |
    36 |

    HTML

    copy 37 | 40 |
    41 | 42 |
    43 |

    CSS

    copy 44 | 47 |
    48 |
    49 | 50 | post_content != "") {?> 51 |
    52 |

    Notes

    53 | 54 |
    55 | 56 | 57 | -------------------------------------------------------------------------------- /loop.php: -------------------------------------------------------------------------------- 1 | get_template_part( 'loop', 'index' ); 15 | * 16 | * @package WordPress 17 | * @subpackage Twenty_Ten 18 | * @since Twenty Ten 1.0 19 | */ 20 | ?> 21 | 22 | 23 | max_num_pages > 1 ) : ?> 24 | 28 | 29 | 30 | 31 | 32 |
    33 |

    34 |
    35 |

    36 | 37 |
    38 |
    39 | 40 | 41 | 56 | 57 | 58 | 59 | 60 | ID ) ) || in_category( _x( 'gallery', 'gallery category slug', 'twentyten' ) ) ) : ?> 61 |
    > 62 |

    63 | 64 | 67 | 68 |
    69 | 70 | 71 | 72 | $post->ID, 'post_type' => 'attachment', 'post_mime_type' => 'image', 'orderby' => 'menu_order', 'order' => 'ASC', 'numberposts' => 999 ) ); 74 | if ( $images ) : 75 | $total_images = count( $images ); 76 | $image = array_shift( $images ); 77 | $image_img_tag = wp_get_attachment_image( $image->ID, 'thumbnail' ); 78 | ?> 79 | 82 |

    %2$s photo.', 'This gallery contains %2$s photos.', $total_images, 'twentyten' ), 83 | 'href="' . get_permalink() . '" title="' . sprintf( esc_attr__( 'Permalink to %s', 'twentyten' ), the_title_attribute( 'echo=0' ) ) . '" rel="bookmark"', 84 | number_format_i18n( $total_images ) 85 | ); ?>

    86 | 87 | 88 | 89 |
    90 | 91 |
    92 | ID ) ) : ?> 93 | 94 | | 95 | 96 | 97 | | 98 | 99 | 100 | | ', '' ); ?> 101 |
    102 |
    103 | 104 | 105 | 106 | ID ) ) || in_category( _x( 'asides', 'asides category slug', 'twentyten' ) ) ) : ?> 107 |
    > 108 | 109 | 110 |
    111 | 112 |
    113 | 114 |
    115 | →', 'twentyten' ) ); ?> 116 |
    117 | 118 | 119 |
    120 | 121 | | 122 | 123 | | ', '' ); ?> 124 |
    125 |
    126 | 127 | 128 | 129 | 130 |
    > 131 |

    132 | 133 | 136 | 137 | 138 |
    139 | 140 |
    141 | 142 |
    143 | →', 'twentyten' ) ); ?> 144 | '' ) ); ?> 145 |
    146 | 147 | 148 |
    149 | 150 | 151 | Posted in %2$s', 'twentyten' ), 'entry-utility-prep entry-utility-prep-cat-links', get_the_category_list( ', ' ) ); ?> 152 | 153 | | 154 | 155 | 159 | 160 | Tagged %2$s', 'twentyten' ), 'entry-utility-prep entry-utility-prep-tag-links', $tags_list ); ?> 161 | 162 | | 163 | 164 | 165 | | ', '' ); ?> 166 |
    167 |
    168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | max_num_pages > 1 ) : ?> 177 | 181 | 182 | -------------------------------------------------------------------------------- /onecolumn-page.php: -------------------------------------------------------------------------------- 1 | 16 | 17 |
    18 |
    19 | 20 | 27 | 28 |
    29 |
    30 | 31 | 32 | -------------------------------------------------------------------------------- /page.php: -------------------------------------------------------------------------------- 1 | 16 | 17 |
    18 |
    19 | 20 | 27 | 28 |
    29 |
    30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /search.php: -------------------------------------------------------------------------------- 1 | 11 | 12 |
    13 |
    14 | 15 | 16 |

    ' . get_search_query() . '' ); ?>

    17 | 24 | 25 |
    26 |

    27 |
    28 |

    29 | 30 |
    31 |
    32 | 33 |
    34 |
    35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /sidebar-footer.php: -------------------------------------------------------------------------------- 1 | 10 | 11 | 25 | 26 | 61 | -------------------------------------------------------------------------------- /sidebar.php: -------------------------------------------------------------------------------- 1 | 2 | 48 | 49 | -------------------------------------------------------------------------------- /single.php: -------------------------------------------------------------------------------- 1 | 11 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /style.css: -------------------------------------------------------------------------------- 1 | /* 2 | Theme Name: Pears 3 | Theme URI: http://patternpea.rs 4 | Description: Official theme for Pears. 5 | Author: Dan Cederholm 6 | Version: 1 7 | License: GNU General Public License 8 | License URI: license.txt 9 | */ -------------------------------------------------------------------------------- /tag.php: -------------------------------------------------------------------------------- 1 | 11 | 12 |
    13 |
    14 | 15 |

    ' . single_tag_title( '', false ) . '' ); 17 | ?>

    18 | 19 | 26 |
    27 |
    28 | 29 | 30 | 31 | --------------------------------------------------------------------------------