├── .github └── workflows │ ├── deploy-to-production.yml │ └── deploy-to-staging.yml ├── README.md ├── acf-json ├── group_60b5f41d4f46f.json └── group_60b609db674d3.json ├── assets ├── css │ └── selectr.css └── js │ ├── intensity-toggle.js │ └── selectr.js ├── fonts ├── Rubik-Bold-Extra.woff2 ├── Rubik-Bold.ttf └── Rubik-Bold.woff2 ├── footer.php ├── functions.php ├── header.php ├── images ├── AE_AwardforDigitalHumanity2021.png ├── Branch_power_logo_blue.svg ├── Branch_power_logo_green.svg ├── Branch_power_logo_orange.svg ├── Branch_text_logo.svg ├── Climate_Action_Tech_Logo.svg ├── Contents_icon.svg ├── Works_offline_symbol.svg ├── branch-power-logo-green.svg ├── branch_black-01.svg ├── branch_blue-01.svg ├── branch_blue-02.svg ├── branch_green-01.svg ├── branch_green-02.svg ├── branch_orange-01.svg ├── branch_orange-02.svg ├── branch_red-01.svg ├── energy.svg └── solid-placeholder.php ├── inc ├── contents-sidebar.php ├── custom-header.php ├── custom-posts-and-taxonomies.php ├── customizer.php ├── jetpack.php ├── rewrite_rules.php ├── template-functions.php └── template-tags.php ├── index.php ├── js └── gridintensity.browser.min.js ├── sidebar.php ├── style.css ├── taxonomy-issue.php └── template-parts ├── carbon-switcher └── carbon-switcher.php ├── content-none.php ├── content-page.php ├── content-post.php ├── content-search.php └── content.php /.github/workflows/deploy-to-production.yml: -------------------------------------------------------------------------------- 1 | name: Deploy to production 2 | 3 | on: 4 | push: 5 | branches: [ production ] 6 | 7 | jobs: 8 | build: 9 | 10 | runs-on: ubuntu-20.04 11 | 12 | steps: 13 | - name: Deploy to server 14 | uses: appleboy/ssh-action@master 15 | with: 16 | host: ${{ secrets.HOST }} 17 | username: ${{ secrets.USERNAME }} 18 | port: ${{ secrets.PORT }} 19 | key: ${{ secrets.SSHKEY }} 20 | script: deploy-branch.sh 21 | -------------------------------------------------------------------------------- /.github/workflows/deploy-to-staging.yml: -------------------------------------------------------------------------------- 1 | name: Deploy to staging 2 | 3 | on: 4 | push: 5 | branches: [ staging ] 6 | 7 | jobs: 8 | build: 9 | 10 | runs-on: ubuntu-20.04 11 | 12 | steps: 13 | - name: Deploy to server (staging) 14 | uses: appleboy/ssh-action@master 15 | with: 16 | host: ${{ secrets.HOST }} 17 | username: ${{ secrets.USERNAME }} 18 | port: ${{ secrets.PORT }} 19 | key: ${{ secrets.STAGING_SSHKEY }} 20 | script: deploy-branch-staging.sh 21 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Branch Theme 2 | 3 | This is the repo containing the WordPress theme for the Branch magazine site. 4 | -------------------------------------------------------------------------------- /acf-json/group_60b5f41d4f46f.json: -------------------------------------------------------------------------------- 1 | { 2 | "key": "group_60b5f41d4f46f", 3 | "title": "Home", 4 | "fields": [ 5 | { 6 | "key": "field_60b5f423eb770", 7 | "label": "Featured issue", 8 | "name": "featured_issue", 9 | "type": "taxonomy", 10 | "instructions": "", 11 | "required": 0, 12 | "conditional_logic": 0, 13 | "wrapper": { 14 | "width": "", 15 | "class": "", 16 | "id": "" 17 | }, 18 | "taxonomy": "issue", 19 | "field_type": "select", 20 | "allow_null": 0, 21 | "add_term": 0, 22 | "save_terms": 0, 23 | "load_terms": 0, 24 | "return_format": "id", 25 | "multiple": 0 26 | } 27 | ], 28 | "location": [ 29 | [ 30 | { 31 | "param": "page", 32 | "operator": "==", 33 | "value": "228" 34 | } 35 | ] 36 | ], 37 | "menu_order": 0, 38 | "position": "side", 39 | "style": "default", 40 | "label_placement": "top", 41 | "instruction_placement": "label", 42 | "hide_on_screen": "", 43 | "active": true, 44 | "description": "", 45 | "modified": 1622537315 46 | } -------------------------------------------------------------------------------- /acf-json/group_60b609db674d3.json: -------------------------------------------------------------------------------- 1 | { 2 | "key": "group_60b609db674d3", 3 | "title": "Issues", 4 | "fields": [ 5 | { 6 | "key": "field_60b6274b99f47", 7 | "label": "Issue month", 8 | "name": "issue_month", 9 | "type": "text", 10 | "instructions": "", 11 | "required": 0, 12 | "conditional_logic": 0, 13 | "wrapper": { 14 | "width": "", 15 | "class": "", 16 | "id": "" 17 | }, 18 | "default_value": "", 19 | "placeholder": "", 20 | "prepend": "", 21 | "append": "", 22 | "maxlength": "" 23 | }, 24 | { 25 | "key": "field_60b609e3b72e9", 26 | "label": "Featured image", 27 | "name": "featured_image", 28 | "type": "image", 29 | "instructions": "", 30 | "required": 0, 31 | "conditional_logic": 0, 32 | "wrapper": { 33 | "width": "", 34 | "class": "", 35 | "id": "" 36 | }, 37 | "return_format": "array", 38 | "preview_size": "medium", 39 | "library": "all", 40 | "min_width": "", 41 | "min_height": "", 42 | "min_size": "", 43 | "max_width": "", 44 | "max_height": "", 45 | "max_size": "", 46 | "mime_types": "" 47 | }, 48 | { 49 | "key": "field_60b60a5183190", 50 | "label": "Featured image caption", 51 | "name": "featured_image_caption", 52 | "type": "wysiwyg", 53 | "instructions": "Ideal for adding a credit for the image artist.", 54 | "required": 0, 55 | "conditional_logic": 0, 56 | "wrapper": { 57 | "width": "", 58 | "class": "", 59 | "id": "" 60 | }, 61 | "default_value": "", 62 | "tabs": "all", 63 | "toolbar": "basic", 64 | "media_upload": 1, 65 | "delay": 0 66 | } 67 | ], 68 | "location": [ 69 | [ 70 | { 71 | "param": "taxonomy", 72 | "operator": "==", 73 | "value": "issue" 74 | } 75 | ] 76 | ], 77 | "menu_order": 0, 78 | "position": "normal", 79 | "style": "default", 80 | "label_placement": "top", 81 | "instruction_placement": "label", 82 | "hide_on_screen": "", 83 | "active": true, 84 | "description": "Taxonomy pages", 85 | "modified": 1622550375 86 | } -------------------------------------------------------------------------------- /assets/css/selectr.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * Selectr 2.4.13 3 | * http://mobius.ovh/docs/selectr 4 | * 5 | * Released under the MIT license 6 | */ 7 | .selectr-container { 8 | position: relative; 9 | display: inline-block; 10 | margin-bottom: -5px; 11 | margin-left: 0.75em; 12 | width: 100%; 13 | } 14 | 15 | @media screen and (min-width: 33em) { 16 | .selectr-container { 17 | width: auto; 18 | } 19 | } 20 | 21 | .selectr-container li { 22 | list-style: none; 23 | } 24 | 25 | .selectr-hidden { 26 | position: absolute; 27 | overflow: hidden; 28 | clip: rect(0px, 0px, 0px, 0px); 29 | width: 1px; 30 | height: 1px; 31 | margin: -1px; 32 | padding: 0; 33 | border: 0 none; 34 | } 35 | 36 | .selectr-visible { 37 | position: absolute; 38 | left: 0; 39 | top: 0; 40 | width: 100%; 41 | height: 100%; 42 | opacity: 0; 43 | z-index: 11; 44 | } 45 | 46 | .selectr-desktop.multiple .selectr-visible { 47 | display: none; 48 | } 49 | 50 | .selectr-desktop.multiple.native-open .selectr-visible { 51 | top: 100%; 52 | min-height: 200px !important; 53 | height: auto; 54 | opacity: 1; 55 | display: block; 56 | } 57 | 58 | .selectr-container.multiple.selectr-mobile .selectr-selected { 59 | z-index: 0; 60 | } 61 | 62 | .selectr-selected { 63 | position: relative; 64 | z-index: 1; 65 | box-sizing: border-box; 66 | width: 100%; 67 | cursor: pointer; 68 | } 69 | 70 | .selectr-selected::before { 71 | position: absolute; 72 | top: 40%; 73 | right: 0; 74 | width: 0; 75 | height: 0; 76 | content: ''; 77 | -o-transform: rotate(0deg) translate3d(0px, -50%, 0px); 78 | -ms-transform: rotate(0deg) translate3d(0px, -50%, 0px); 79 | -moz-transform: rotate(0deg) translate3d(0px, -50%, 0px); 80 | -webkit-transform: rotate(0deg) translate3d(0px, -50%, 0px); 81 | transform: rotate(0deg) translate3d(0px, -50%, 0px); 82 | border-width: 10px 5px 0 5px; 83 | border-style: solid; 84 | border-color: #212121 transparent transparent; 85 | } 86 | 87 | .selectr-container.open .selectr-selected::before, 88 | .selectr-container.native-open .selectr-selected::before { 89 | border-width: 0 4px 4px 4px; 90 | border-style: solid; 91 | border-color: transparent transparent #6c7a86; 92 | } 93 | 94 | .selectr-label { 95 | display: none; 96 | overflow: hidden; 97 | white-space: nowrap; 98 | text-overflow: ellipsis; 99 | padding-left: 5px; 100 | padding-right: 15px; 101 | position: relative; 102 | border-bottom: solid 3px var(--hl-colour); 103 | } 104 | 105 | .selectr-placeholder { 106 | color: #6c7a86; 107 | } 108 | 109 | .selectr-tags { 110 | margin: 0; 111 | padding: 0; 112 | white-space: normal; 113 | } 114 | 115 | .has-selected .selectr-tags { 116 | margin: 0 0 -2px; 117 | } 118 | 119 | .selectr-tag { 120 | list-style: none; 121 | position: relative; 122 | float: left; 123 | padding: 2px 25px 2px 8px; 124 | margin: 0 2px 2px 0; 125 | cursor: default; 126 | color: #fff; 127 | border: medium none; 128 | border-radius: 10px; 129 | background: #acb7bf none repeat scroll 0 0; 130 | } 131 | 132 | .selectr-container.multiple.has-selected .selectr-selected { 133 | padding: 5px 28px 5px 5px; 134 | } 135 | 136 | .selectr-options-container { 137 | position: absolute; 138 | z-index: 10000; 139 | top: calc(100% + 1.2em ); /* Same as vertical padding on ssecondary nav bar */ 140 | right: 0; 141 | display: none; 142 | box-sizing: border-box; 143 | min-width: 260px; 144 | border-width: 0 1px 1px; 145 | border-style: solid; 146 | border-color: transparent #999 #999; 147 | border-radius: 0 0 3px 3px; 148 | background-color: var(--bg-colour); 149 | } 150 | 151 | .selectr-container.open .selectr-options-container { 152 | display: block; 153 | } 154 | 155 | .selectr-input-container { 156 | position: relative; 157 | display: none; 158 | } 159 | 160 | .selectr-clear, 161 | .selectr-input-clear, 162 | .selectr-tag-remove { 163 | position: absolute; 164 | top: 50%; 165 | right: 22px; 166 | width: 20px; 167 | height: 20px; 168 | padding: 0; 169 | cursor: pointer; 170 | -o-transform: translate3d(0px, -50%, 0px); 171 | -ms-transform: translate3d(0px, -50%, 0px); 172 | -moz-transform: translate3d(0px, -50%, 0px); 173 | -webkit-transform: translate3d(0px, -50%, 0px); 174 | transform: translate3d(0px, -50%, 0px); 175 | border: medium none; 176 | background-color: transparent; 177 | z-index: 11; 178 | } 179 | 180 | .selectr-clear, 181 | .selectr-input-clear { 182 | display: none; 183 | } 184 | 185 | .selectr-container.has-selected .selectr-clear, 186 | .selectr-input-container.active .selectr-input-clear { 187 | display: block; 188 | } 189 | 190 | .selectr-selected .selectr-tag-remove { 191 | right: 2px; 192 | } 193 | 194 | .selectr-clear::before, 195 | .selectr-clear::after, 196 | .selectr-input-clear::before, 197 | .selectr-input-clear::after, 198 | .selectr-tag-remove::before, 199 | .selectr-tag-remove::after { 200 | position: absolute; 201 | top: 5px; 202 | left: 9px; 203 | width: 2px; 204 | height: 10px; 205 | content: ' '; 206 | background-color: #6c7a86; 207 | } 208 | 209 | .selectr-tag-remove::before, 210 | .selectr-tag-remove::after { 211 | top: 4px; 212 | width: 3px; 213 | height: 12px; 214 | background-color: #fff; 215 | } 216 | 217 | .selectr-clear:before, 218 | .selectr-input-clear::before, 219 | .selectr-tag-remove::before { 220 | -o-transform: rotate(45deg); 221 | -ms-transform: rotate(45deg); 222 | -moz-transform: rotate(45deg); 223 | -webkit-transform: rotate(45deg); 224 | transform: rotate(45deg); 225 | } 226 | 227 | .selectr-clear:after, 228 | .selectr-input-clear::after, 229 | .selectr-tag-remove::after { 230 | -o-transform: rotate(-45deg); 231 | -ms-transform: rotate(-45deg); 232 | -moz-transform: rotate(-45deg); 233 | -webkit-transform: rotate(-45deg); 234 | transform: rotate(-45deg); 235 | } 236 | 237 | .selectr-input-container.active, 238 | .selectr-input-container.active .selectr-clear { 239 | display: block; 240 | } 241 | 242 | .selectr-input { 243 | top: 5px; 244 | left: 5px; 245 | box-sizing: border-box; 246 | width: calc(100% - 30px); 247 | margin: 10px 15px; 248 | padding: 7px 30px 7px 9px; 249 | border: 1px solid #999; 250 | border-radius: 3px; 251 | } 252 | 253 | .selectr-notice { 254 | display: none; 255 | box-sizing: border-box; 256 | width: 100%; 257 | padding: 8px 16px; 258 | border-top: 1px solid #999; 259 | border-radius: 0 0 3px 3px; 260 | background-color: #fff; 261 | } 262 | 263 | .selectr-container.notice .selectr-notice { 264 | display: block; 265 | } 266 | 267 | .selectr-container.notice .selectr-selected { 268 | border-radius: 3px 3px 0 0; 269 | } 270 | 271 | .selectr-options { 272 | position: relative; 273 | top: calc(100% + 2px); 274 | display: none; 275 | overflow-x: auto; 276 | overflow-y: scroll; 277 | /* max-height: 200px; */ 278 | margin: 0; 279 | padding: 0; 280 | } 281 | 282 | .selectr-container.open .selectr-options, 283 | .selectr-container.open .selectr-input-container, 284 | .selectr-container.notice .selectr-options-container { 285 | display: block; 286 | } 287 | 288 | .selectr-option { 289 | position: relative; 290 | display: block; 291 | padding: 1.2em; 292 | list-style: outside none none; 293 | cursor: pointer; 294 | font-weight: normal; 295 | border-top: 1px solid #999; 296 | } 297 | 298 | .selectr-options.optgroups > .selectr-option { 299 | padding-left: 25px; 300 | } 301 | 302 | .selectr-optgroup { 303 | font-weight: bold; 304 | padding: 0; 305 | } 306 | 307 | .selectr-optgroup--label { 308 | font-weight: bold; 309 | margin-top: 10px; 310 | padding: 5px 15px; 311 | } 312 | 313 | .selectr-match { 314 | text-decoration: underline; 315 | } 316 | 317 | .selectr-option.selected { 318 | color: #fff; 319 | background-color: var(--hl-colour); 320 | } 321 | 322 | .selectr-option.active { 323 | color: #fff; 324 | background-color: #111; 325 | } 326 | 327 | .selectr-option.disabled { 328 | opacity: 0.4; 329 | } 330 | 331 | .selectr-option.excluded { 332 | display: none; 333 | } 334 | 335 | .selectr-container.open .selectr-selected { 336 | border-color: #999 #999 transparent #999; 337 | border-radius: 3px 3px 0 0; 338 | } 339 | 340 | .selectr-container.open .selectr-selected::after { 341 | -o-transform: rotate(180deg) translate3d(0px, 50%, 0px); 342 | -ms-transform: rotate(180deg) translate3d(0px, 50%, 0px); 343 | -moz-transform: rotate(180deg) translate3d(0px, 50%, 0px); 344 | -webkit-transform: rotate(180deg) translate3d(0px, 50%, 0px); 345 | transform: rotate(180deg) translate3d(0px, 50%, 0px); 346 | } 347 | 348 | .selectr-disabled { 349 | opacity: .6; 350 | } 351 | 352 | .selectr-empty, 353 | .has-selected .selectr-placeholder { 354 | display: none; 355 | } 356 | 357 | .has-selected .selectr-label { 358 | display: inline-block; 359 | } 360 | 361 | /* TAGGABLE */ 362 | .taggable .selectr-selected { 363 | padding: 4px 28px 4px 4px; 364 | } 365 | 366 | .taggable .selectr-selected::after { 367 | display: table; 368 | content: " "; 369 | clear: both; 370 | } 371 | 372 | .taggable .selectr-label { 373 | width: auto; 374 | } 375 | 376 | .taggable .selectr-tags { 377 | float: left; 378 | display: block; 379 | } 380 | 381 | .taggable .selectr-placeholder { 382 | display: none; 383 | } 384 | 385 | .input-tag { 386 | float: left; 387 | min-width: 90px; 388 | width: auto; 389 | } 390 | 391 | .selectr-tag-input { 392 | border: medium none; 393 | padding: 3px 10px; 394 | width: 100%; 395 | font-family: inherit; 396 | font-weight: inherit; 397 | font-size: inherit; 398 | } 399 | 400 | .selectr-input-container.loading::after { 401 | position: absolute; 402 | top: 50%; 403 | right: 20px; 404 | width: 20px; 405 | height: 20px; 406 | content: ''; 407 | -o-transform: translate3d(0px, -50%, 0px); 408 | -ms-transform: translate3d(0px, -50%, 0px); 409 | -moz-transform: translate3d(0px, -50%, 0px); 410 | -webkit-transform: translate3d(0px, -50%, 0px); 411 | transform: translate3d(0px, -50%, 0px); 412 | 413 | -o-transform-origin: 50% 0 0; 414 | -ms-transform-origin: 50% 0 0; 415 | -moz-transform-origin: 50% 0 0; 416 | -webkit-transform-origin: 50% 0 0; 417 | transform-origin: 50% 0 0; 418 | 419 | -moz-animation: 500ms linear 0s normal forwards infinite running spin; 420 | -webkit-animation: 500ms linear 0s normal forwards infinite running spin; 421 | animation: 500ms linear 0s normal forwards infinite running spin; 422 | border-width: 3px; 423 | border-style: solid; 424 | border-color: #aaa #ddd #ddd; 425 | border-radius: 50%; 426 | } 427 | 428 | @-webkit-keyframes spin { 429 | 0% { 430 | -webkit-transform: rotate(0deg) translate3d(0px, -50%, 0px); 431 | transform: rotate(0deg) translate3d(0px, -50%, 0px); 432 | } 433 | 100% { 434 | -webkit-transform: rotate(360deg) translate3d(0px, -50%, 0px); 435 | transform: rotate(360deg) translate3d(0px, -50%, 0px); 436 | } 437 | } 438 | @keyframes spin { 439 | 0% { 440 | -webkit-transform: rotate(0deg) translate3d(0px, -50%, 0px); 441 | transform: rotate(0deg) translate3d(0px, -50%, 0px); 442 | } 443 | 100% { 444 | -webkit-transform: rotate(360deg) translate3d(0px, -50%, 0px); 445 | transform: rotate(360deg) translate3d(0px, -50%, 0px); 446 | } 447 | } 448 | .selectr-container.open.inverted .selectr-selected { 449 | border-color: transparent #999 #999; 450 | border-radius: 0 0 3px 3px; 451 | } 452 | 453 | .selectr-container.inverted .selectr-options-container { 454 | border-width: 1px 1px 0; 455 | border-color: #999 #999 transparent; 456 | border-radius: 3px 3px 0 0; 457 | background-color: #fff; 458 | } 459 | 460 | .selectr-container.inverted .selectr-options-container { 461 | top: auto; 462 | bottom: calc(100% - 1px); 463 | } 464 | 465 | .selectr-container ::-webkit-input-placeholder { 466 | color: #6c7a86; 467 | opacity: 1; 468 | } 469 | 470 | .selectr-container ::-moz-placeholder { 471 | color: #6c7a86; 472 | opacity: 1; 473 | } 474 | 475 | .selectr-container :-ms-input-placeholder { 476 | color: #6c7a86; 477 | opacity: 1; 478 | } 479 | 480 | .selectr-container ::placeholder { 481 | color: #6c7a86; 482 | opacity: 1; 483 | } 484 | -------------------------------------------------------------------------------- /assets/js/intensity-toggle.js: -------------------------------------------------------------------------------- 1 | /** 2 | * JS functions that power the grid intensity toggle functionality. 3 | */ 4 | 5 | 6 | 7 | tippy('#tooltip', { 8 | content: 'This site changes its design based on the quantity of fossil fuels on the grid to stay inside a carbon budget at all times. Learn more', 9 | allowHTML: true, 10 | interactive: true, 11 | }); 12 | 13 | 14 | /** 15 | * Initialise the select box styling framework. 16 | * We're using Selectr: https://github.com/Mobius1/Selectr 17 | * It was the only non JQuery plugin I could find, but sadly its not under active dev anymore. 18 | */ 19 | 20 | let intensities = [ 21 | { value: 'live', text: 'live' }, 22 | { value: 'low', text: 'low' }, 23 | { value: 'moderate', text: 'moderate' }, 24 | { value: 'high', text: 'high' } 25 | ] 26 | 27 | const selectedIntensity = getWithExpiry( 'selected-intensity' ); 28 | 29 | intensities.forEach(intensity => { 30 | if (!selectedIntensity && 'live' == intensity.value) { 31 | intensity['selected'] = true; 32 | } else if (selectedIntensity == intensity.value) { 33 | intensity['selected'] = true; 34 | } 35 | }); 36 | 37 | var selector = new Selectr( '#carbon-switcher-toggle', { 38 | data: intensities, 39 | defaultSelected: false, 40 | searchable: false, 41 | width: 260 42 | }); 43 | 44 | // Attach event listener to the select element. 45 | selector.on('selectr.select', async function(option) { 46 | 47 | // Change the intensity back to the live value. 48 | if ( option.value === 'live' ) { 49 | 50 | // Set to immediately expire, which means on reload the core way it fetches intensity is used instead. 51 | setWithExpiry( 'grid-intensity', 'unset', 0 ); 52 | setWithExpiry( 'selected-intensity', 'unset', 0 ); 53 | location.reload(); 54 | 55 | } else { 56 | // Change the intensity to another user selected intensity. 57 | setWithExpiry( 'grid-intensity', option.value, 3600000 ); 58 | setWithExpiry( 'selected-intensity', option.value, 3600000 ); 59 | location.reload(); 60 | } 61 | }); 62 | -------------------------------------------------------------------------------- /fonts/Rubik-Bold-Extra.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/climateaction-tech/branch-theme/25525c50b081482d9165791ce99ad037c5f87230/fonts/Rubik-Bold-Extra.woff2 -------------------------------------------------------------------------------- /fonts/Rubik-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/climateaction-tech/branch-theme/25525c50b081482d9165791ce99ad037c5f87230/fonts/Rubik-Bold.ttf -------------------------------------------------------------------------------- /fonts/Rubik-Bold.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/climateaction-tech/branch-theme/25525c50b081482d9165791ce99ad037c5f87230/fonts/Rubik-Bold.woff2 -------------------------------------------------------------------------------- /footer.php: -------------------------------------------------------------------------------- 1 | 13 | 14 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /functions.php: -------------------------------------------------------------------------------- 1 | tag in the document head, and expect WordPress to 39 | * provide it for us. 40 | */ 41 | add_theme_support( 'title-tag' ); 42 | 43 | /* 44 | * Enable support for Post Thumbnails on posts and pages. 45 | * 46 | * @link https://developer.wordpress.org/themes/functionality/featured-images-post-thumbnails/ 47 | */ 48 | add_theme_support( 'post-thumbnails' ); 49 | 50 | // This theme uses wp_nav_menu() in one location. 51 | register_nav_menus( 52 | array( 53 | 'menu-1' => esc_html__( 'Primary', 'branch' ), 54 | ) 55 | ); 56 | 57 | /* 58 | * Switch default core markup for search form, comment form, and comments 59 | * to output valid HTML5. 60 | */ 61 | add_theme_support( 62 | 'html5', 63 | array( 64 | 'search-form', 65 | 'comment-form', 66 | 'comment-list', 67 | 'gallery', 68 | 'caption', 69 | 'style', 70 | 'script', 71 | ) 72 | ); 73 | 74 | // Set up the WordPress core custom background feature. 75 | add_theme_support( 76 | 'custom-background', 77 | apply_filters( 78 | 'branch_custom_background_args', 79 | array( 80 | 'default-color' => 'ffffff', 81 | 'default-image' => '', 82 | ) 83 | ) 84 | ); 85 | 86 | // Add theme support for selective refresh for widgets. 87 | add_theme_support( 'customize-selective-refresh-widgets' ); 88 | 89 | /** 90 | * Add support for core custom logo. 91 | * 92 | * @link https://codex.wordpress.org/Theme_Logo 93 | */ 94 | add_theme_support( 95 | 'custom-logo', 96 | array( 97 | 'height' => 250, 98 | 'width' => 250, 99 | 'flex-width' => true, 100 | 'flex-height' => true, 101 | ) 102 | ); 103 | } 104 | endif; 105 | add_action( 'after_setup_theme', 'branch_setup' ); 106 | 107 | /** 108 | * Set the content width in pixels, based on the theme's design and stylesheet. 109 | * 110 | * Priority 0 to make it available to lower priority callbacks. 111 | * 112 | * @global int $content_width 113 | */ 114 | function branch_content_width() { 115 | $GLOBALS['content_width'] = apply_filters( 'branch_content_width', 640 ); 116 | } 117 | add_action( 'after_setup_theme', 'branch_content_width', 0 ); 118 | 119 | /** 120 | * Register widget area. 121 | * 122 | * @link https://developer.wordpress.org/themes/functionality/sidebars/#registering-a-sidebar 123 | */ 124 | function branch_widgets_init() { 125 | register_sidebar( 126 | array( 127 | 'name' => esc_html__( 'Sidebar', 'branch' ), 128 | 'id' => 'sidebar-1', 129 | 'description' => esc_html__( 'Add widgets here.', 'branch' ), 130 | 'before_widget' => '
', 131 | 'after_widget' => '
', 132 | 'before_title' => '

', 133 | 'after_title' => '

', 134 | ) 135 | ); 136 | } 137 | add_action( 'widgets_init', 'branch_widgets_init' ); 138 | 139 | /** 140 | * Enqueue scripts and styles. 141 | */ 142 | function branch_scripts() { 143 | wp_enqueue_style( 'branch-style', get_stylesheet_uri(), array(), filemtime( get_template_directory() . '/style.css' ) ); 144 | wp_enqueue_style( 'selectr-style', get_template_directory_uri() . '/assets/css/selectr.css', array(), filemtime( get_template_directory() . '/assets/css/selectr.css' ) ); 145 | wp_style_add_data( 'branch-style', 'rtl', 'replace' ); 146 | 147 | /* Footer scripts */ 148 | // First two need to go first or seems to break stuff. 149 | wp_enqueue_script( 'popperjs', 'https://unpkg.com/@popperjs/core@2', array(), '2.9.2', true ); 150 | wp_enqueue_script( 'tippyjs', 'https://unpkg.com/tippy.js@6', array(), '6.3.1', true ); 151 | 152 | wp_enqueue_script( 'intensity-toggle', get_template_directory_uri() . '/assets/js/intensity-toggle.js', array( 'selectr' ), filemtime( get_template_directory() . '/assets/js/intensity-toggle.js' ), true ); 153 | wp_enqueue_script( 'selectr', get_template_directory_uri() . '/assets/js/selectr.js', array(), filemtime( get_template_directory() . '/assets/js/selectr.js' ), true ); 154 | } 155 | add_action( 'wp_enqueue_scripts', 'branch_scripts' ); 156 | 157 | function branch_grid_intensity() { 158 | ?> 159 | 160 | 161 | 367 | query_vars['post__not_in'] = array( $footer_page->ID ); 438 | } 439 | } 440 | add_filter( 'parse_query', 'exclude_footer_page_from_admin' ); 441 | 442 | /** 443 | * Always lazyload images to ensure high-resolution images aren't downloaded 444 | * during periods of moderate or high carbon intensity. 445 | */ 446 | function always_lazyload_images() { 447 | return 0; 448 | } 449 | add_filter( 'wp_omit_loading_attr_threshold', 'always_lazyload_images', 10, 0 ); 450 | -------------------------------------------------------------------------------- /header.php: -------------------------------------------------------------------------------- 1 | section and everything up until
6 | * 7 | * @link https://developer.wordpress.org/themes/basics/template-files/#template-partials 8 | * 9 | * @package Branch 10 | */ 11 | 12 | ?> 13 | 14 | > 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | > 27 | 28 |
29 | 30 | 31 | 71 | 72 |
73 | 78 | 81 | 84 | 85 | 86 |
87 | 88 |
89 | 90 |
91 | 92 |
93 | 94 |
95 | Unknown grid intensity 96 |
97 | -------------------------------------------------------------------------------- /images/AE_AwardforDigitalHumanity2021.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/climateaction-tech/branch-theme/25525c50b081482d9165791ce99ad037c5f87230/images/AE_AwardforDigitalHumanity2021.png -------------------------------------------------------------------------------- /images/Branch_power_logo_blue.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | Group 8 Copy 13 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /images/Branch_power_logo_green.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | Group 8 Copy 13 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /images/Branch_power_logo_orange.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | Group 8 Copy 13 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /images/Branch_text_logo.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | branch 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /images/Climate_Action_Tech_Logo.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | Group 46 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | -------------------------------------------------------------------------------- /images/Contents_icon.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | Group 3 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /images/Works_offline_symbol.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | Group 11 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /images/branch-power-logo-green.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /images/branch_black-01.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 8 | 12 | 13 | -------------------------------------------------------------------------------- /images/branch_blue-01.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 8 | 12 | 13 | -------------------------------------------------------------------------------- /images/branch_blue-02.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 8 | 12 | 13 | -------------------------------------------------------------------------------- /images/branch_green-01.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 8 | 14 | 15 | -------------------------------------------------------------------------------- /images/branch_green-02.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 8 | 14 | 15 | -------------------------------------------------------------------------------- /images/branch_orange-01.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 8 | 11 | 12 | -------------------------------------------------------------------------------- /images/branch_orange-02.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 8 | 11 | 12 | -------------------------------------------------------------------------------- /images/branch_red-01.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 8 | 14 | 15 | -------------------------------------------------------------------------------- /images/energy.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /images/solid-placeholder.php: -------------------------------------------------------------------------------- 1 | isset($_GET['bg']) ? sanitize_hex_color_no_hash( $_GET['bg'] ) : 'ffdd9c', 14 | "width" => isset($_GET['w']) ? filter_var( $_GET['w'], FILTER_SANITIZE_NUMBER_INT ) : 400, 15 | "height" => isset($_GET['h']) ? filter_var( $_GET['h'], FILTER_SANITIZE_NUMBER_INT ) : 300, 16 | ]; 17 | 18 | $background = explode(",",hex2rgb($settings['background'])); 19 | 20 | $options = [ 21 | 'options' => [ 22 | 'default' => 100, 23 | 'min_range' => 1, 24 | 'max_range' => 2000 25 | ] 26 | ]; 27 | 28 | $width = filter_var( $settings['width'], FILTER_VALIDATE_INT, $options ); 29 | $height = filter_var( $settings['height'], FILTER_VALIDATE_INT, $options ); 30 | 31 | $image = @imagecreate($width, $height) or die("Cannot Initialize new GD image stream"); 32 | 33 | $background_color = imagecolorallocate($image, $background[0], $background[1], $background[2]); 34 | 35 | imagettftext($image, $font_size, 0, $x, $y, $text_color, $font, $text); 36 | 37 | header('Content-Type: image/png'); 38 | 39 | imagepng($image); 40 | 41 | imagedestroy($image); 42 | 43 | 44 | // Convert color code to rgb 45 | function hex2rgb($hex) { 46 | $hex = str_replace("#", "", $hex); 47 | 48 | switch(strlen($hex)){ 49 | case 1: 50 | $hex = $hex.$hex; 51 | case 2: 52 | $r = hexdec($hex); 53 | $g = hexdec($hex); 54 | $b = hexdec($hex); 55 | break; 56 | case 3: 57 | $r = hexdec(substr($hex,0,1).substr($hex,0,1)); 58 | $g = hexdec(substr($hex,1,1).substr($hex,1,1)); 59 | $b = hexdec(substr($hex,2,1).substr($hex,2,1)); 60 | break; 61 | default: 62 | $r = hexdec(substr($hex,0,2)); 63 | $g = hexdec(substr($hex,2,2)); 64 | $b = hexdec(substr($hex,4,2)); 65 | break; 66 | } 67 | 68 | $rgb = array($r, $g, $b); 69 | return implode(",", $rgb); 70 | } 71 | -------------------------------------------------------------------------------- /inc/contents-sidebar.php: -------------------------------------------------------------------------------- 1 | ID, 'issue' ); 18 | 19 | // Output if there's a term and no errors. 20 | if ( ! is_wp_error( $terms ) && ! empty( $terms ) && is_object( $terms[0] ) ) : 21 | echo term_description( $terms[0]->term_id, 'issue' ); 22 | endif; 23 | 24 | elseif ( is_tax( 'issue' ) ) : 25 | 26 | // Output taxonomy description. 27 | echo term_description( get_queried_object_id(), 'issue' ); 28 | 29 | else : 30 | // $toc = get_page_by_title( 'contents' ); 31 | // echo apply_filters( 'the_content', $toc->post_content ); 32 | //echo 'What should we output here?'; 33 | 34 | $issues = get_terms( 35 | 'issue', 36 | array( 37 | 'orderby' => 'ASC', 38 | 'hide_empty' => 0, 39 | ), 40 | ); 41 | 42 | if ( ! empty( $issues ) && ! is_wp_error( $issues ) ) { 43 | 44 | foreach ( $issues as $term ) { 45 | echo '

' . esc_html( $term->name ) . '

'; 46 | } 47 | } 48 | 49 | endif; 50 | } 51 | -------------------------------------------------------------------------------- /inc/custom-header.php: -------------------------------------------------------------------------------- 1 | 8 | * 9 | * @link https://developer.wordpress.org/themes/functionality/custom-headers/ 10 | * 11 | * @package Branch 12 | */ 13 | 14 | /** 15 | * Set up the WordPress core custom header feature. 16 | * 17 | * @uses branch_header_style() 18 | */ 19 | function branch_custom_header_setup() { 20 | add_theme_support( 21 | 'custom-header', 22 | apply_filters( 23 | 'branch_custom_header_args', 24 | array( 25 | 'default-image' => '', 26 | 'default-text-color' => '000000', 27 | 'width' => 1000, 28 | 'height' => 250, 29 | 'flex-height' => true, 30 | 'wp-head-callback' => 'branch_header_style', 31 | ) 32 | ) 33 | ); 34 | } 35 | add_action( 'after_setup_theme', 'branch_custom_header_setup' ); 36 | 37 | if ( ! function_exists( 'branch_header_style' ) ) : 38 | /** 39 | * Styles the header image and text displayed on the blog. 40 | * 41 | * @see branch_custom_header_setup(). 42 | */ 43 | function branch_header_style() { 44 | $header_text_color = get_header_textcolor(); 45 | 46 | /* 47 | * If no custom options for text are set, let's bail. 48 | * get_header_textcolor() options: Any hex value, 'blank' to hide text. Default: add_theme_support( 'custom-header' ). 49 | */ 50 | if ( get_theme_support( 'custom-header', 'default-text-color' ) === $header_text_color ) { 51 | return; 52 | } 53 | 54 | // If we get this far, we have custom styles. Let's do this. 55 | ?> 56 | 76 | _x( 'Issues', 'taxonomy general name', 'branch' ), 19 | 'singular_name' => _x( 'Issue', 'taxonomy singular name', 'branch' ), 20 | 'search_items' => __( 'Search issues', 'branch' ), 21 | 'all_items' => __( 'All issues', 'branch' ), 22 | 'parent_item' => __( 'Parent issue', 'branch' ), 23 | 'parent_item_colon' => __( 'Parent issue:', 'branch' ), 24 | 'edit_item' => __( 'Edit issue', 'branch' ), 25 | 'update_item' => __( 'Update issue', 'branch' ), 26 | 'add_new_item' => __( 'Add new issue', 'branch' ), 27 | 'new_item_name' => __( 'New issue name', 'branch' ), 28 | 'menu_name' => __( 'Issues', 'branch' ), 29 | ); 30 | 31 | register_taxonomy( 32 | 'issue', 33 | 'post', 34 | array( 35 | 'hierarchical' => true, 36 | 'label' => __( 'Issues', 'branch' ), 37 | 'labels' => $labels, 38 | 'public' => true, 39 | 'show_ui' => true, 40 | 'show_in_rest' => true, 41 | 'query_var' => 'issue', 42 | 'rewrite' => array( 43 | 'slug' => 'issues', 44 | 'with_front' => false, 45 | ), 46 | ) 47 | ); 48 | } 49 | } 50 | 51 | 52 | -------------------------------------------------------------------------------- /inc/customizer.php: -------------------------------------------------------------------------------- 1 | get_setting( 'blogname' )->transport = 'postMessage'; 15 | $wp_customize->get_setting( 'blogdescription' )->transport = 'postMessage'; 16 | $wp_customize->get_setting( 'header_textcolor' )->transport = 'postMessage'; 17 | 18 | if ( isset( $wp_customize->selective_refresh ) ) { 19 | $wp_customize->selective_refresh->add_partial( 20 | 'blogname', 21 | array( 22 | 'selector' => '.site-title a', 23 | 'render_callback' => 'branch_customize_partial_blogname', 24 | ) 25 | ); 26 | $wp_customize->selective_refresh->add_partial( 27 | 'blogdescription', 28 | array( 29 | 'selector' => '.site-description', 30 | 'render_callback' => 'branch_customize_partial_blogdescription', 31 | ) 32 | ); 33 | } 34 | } 35 | add_action( 'customize_register', 'branch_customize_register' ); 36 | 37 | /** 38 | * Render the site title for the selective refresh partial. 39 | * 40 | * @return void 41 | */ 42 | function branch_customize_partial_blogname() { 43 | bloginfo( 'name' ); 44 | } 45 | 46 | /** 47 | * Render the site tagline for the selective refresh partial. 48 | * 49 | * @return void 50 | */ 51 | function branch_customize_partial_blogdescription() { 52 | bloginfo( 'description' ); 53 | } 54 | 55 | /** 56 | * Binds JS handlers to make Theme Customizer preview reload changes asynchronously. 57 | */ 58 | function branch_customize_preview_js() { 59 | wp_enqueue_script( 'branch-customizer', get_template_directory_uri() . '/js/customizer.js', array( 'customize-preview' ), _S_VERSION, true ); 60 | } 61 | add_action( 'customize_preview_init', 'branch_customize_preview_js' ); 62 | -------------------------------------------------------------------------------- /inc/jetpack.php: -------------------------------------------------------------------------------- 1 | 'main', 23 | 'render' => 'branch_infinite_scroll_render', 24 | 'footer' => 'page', 25 | ) 26 | ); 27 | 28 | // Add theme support for Responsive Videos. 29 | add_theme_support( 'jetpack-responsive-videos' ); 30 | 31 | // Add theme support for Content Options. 32 | add_theme_support( 33 | 'jetpack-content-options', 34 | array( 35 | 'post-details' => array( 36 | 'stylesheet' => 'branch-style', 37 | 'date' => '.posted-on', 38 | 'categories' => '.cat-links', 39 | 'tags' => '.tags-links', 40 | 'author' => '.byline', 41 | 'comment' => '.comments-link', 42 | ), 43 | 'featured-images' => array( 44 | 'archive' => true, 45 | 'post' => true, 46 | 'page' => true, 47 | ), 48 | ) 49 | ); 50 | } 51 | add_action( 'after_setup_theme', 'branch_jetpack_setup' ); 52 | 53 | /** 54 | * Custom render function for Infinite Scroll. 55 | */ 56 | function branch_infinite_scroll_render() { 57 | while ( have_posts() ) { 58 | the_post(); 59 | if ( is_search() ) : 60 | get_template_part( 'template-parts/content', 'search' ); 61 | else : 62 | get_template_part( 'template-parts/content', get_post_type() ); 63 | endif; 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /inc/rewrite_rules.php: -------------------------------------------------------------------------------- 1 | ID, 'issue' ); 51 | 52 | if ( ! is_wp_error( $terms ) && ! empty( $terms ) && is_object( $terms[0] ) ) : 53 | $taxonomy_slug = $terms[0]->slug; 54 | else : 55 | // Needed in case a post hasn't been assigned an issue. 56 | $taxonomy_slug = 'no-issue'; 57 | endif; 58 | 59 | return str_replace( '%issue%', $taxonomy_slug, $permalink ); 60 | } 61 | -------------------------------------------------------------------------------- /inc/template-functions.php: -------------------------------------------------------------------------------- 1 | ', esc_url( get_bloginfo( 'pingback_url' ) ) ); 35 | } 36 | } 37 | add_action( 'wp_head', 'branch_pingback_header' ); 38 | 39 | 40 | /** 41 | * Generate responsive image output, including srcset attributes 42 | * 43 | * @param int $image_id Id of image we wish to generate srcset for. 44 | * @param string $sizes String of sizes image will be displayed at. 45 | */ 46 | function branch_output_responsive_image_markup( $image_id, $sizes ) { 47 | 48 | $img_src = wp_get_attachment_image_url( $image_id, 'large' ); 49 | $img_srcset = wp_get_attachment_image_srcset( $image_id, 'large', wp_get_attachment_metadata( $image_id ) ); 50 | $img_alt = get_post_meta( $image_id, '_wp_attachment_image_alt', true ); 51 | 52 | $img_meta = wp_get_attachment_metadata( $image_id ); 53 | 54 | //var_dump( $img_meta ); 55 | $img_width = $img_meta['width']; 56 | //var_dump( $img_width ); 57 | ?> 58 | 59 | <?php echo esc_html( $img_alt ); ?> 60 | 61 | %2$s'; 16 | if ( get_the_time( 'U' ) !== get_the_modified_time( 'U' ) ) { 17 | $time_string = ''; 18 | } 19 | 20 | $time_string = sprintf( 21 | $time_string, 22 | esc_attr( get_the_date( DATE_W3C ) ), 23 | esc_html( get_the_date() ), 24 | esc_attr( get_the_modified_date( DATE_W3C ) ), 25 | esc_html( get_the_modified_date() ) 26 | ); 27 | 28 | $posted_on = sprintf( 29 | /* translators: %s: post date. */ 30 | esc_html_x( 'Posted on %s', 'post date', 'branch' ), 31 | '' . $time_string . '' 32 | ); 33 | 34 | echo '' . $posted_on . ''; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped 35 | 36 | } 37 | endif; 38 | 39 | if ( ! function_exists( 'branch_posted_by' ) ) : 40 | /** 41 | * Prints HTML with meta information for the current author. 42 | */ 43 | function branch_posted_by() { 44 | $byline = sprintf( 45 | /* translators: %s: post author. */ 46 | esc_html_x( 'by %s', 'post author', 'branch' ), 47 | '' . esc_html( get_the_author() ) . '' 48 | ); 49 | 50 | echo ''; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped 51 | 52 | } 53 | endif; 54 | 55 | if ( ! function_exists( 'branch_entry_footer' ) ) : 56 | /** 57 | * Prints HTML with meta information for the categories, tags and comments. 58 | */ 59 | function branch_entry_footer() { 60 | // Hide category and tag text for pages. 61 | if ( 'post' === get_post_type() ) { 62 | /* translators: used between list items, there is a space after the comma */ 63 | $categories_list = get_the_category_list( esc_html__( ', ', 'branch' ) ); 64 | if ( $categories_list ) { 65 | /* translators: 1: list of categories. */ 66 | printf( '' . esc_html__( 'Posted in %1$s', 'branch' ) . '', $categories_list ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped 67 | } 68 | 69 | /* translators: used between list items, there is a space after the comma */ 70 | $tags_list = get_the_tag_list( '', esc_html_x( ', ', 'list item separator', 'branch' ) ); 71 | if ( $tags_list ) { 72 | /* translators: 1: list of tags. */ 73 | printf( '' . esc_html__( 'Tagged %1$s', 'branch' ) . '', $tags_list ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped 74 | } 75 | } 76 | 77 | if ( ! is_single() && ! post_password_required() && ( comments_open() || get_comments_number() ) ) { 78 | echo ''; 79 | comments_popup_link( 80 | sprintf( 81 | wp_kses( 82 | /* translators: %s: post title */ 83 | __( 'Leave a Comment on %s', 'branch' ), 84 | array( 85 | 'span' => array( 86 | 'class' => array(), 87 | ), 88 | ) 89 | ), 90 | wp_kses_post( get_the_title() ) 91 | ) 92 | ); 93 | echo ''; 94 | } 95 | 96 | edit_post_link( 97 | sprintf( 98 | wp_kses( 99 | /* translators: %s: Name of current post. Only visible to screen readers */ 100 | __( 'Edit %s', 'branch' ), 101 | array( 102 | 'span' => array( 103 | 'class' => array(), 104 | ), 105 | ) 106 | ), 107 | wp_kses_post( get_the_title() ) 108 | ), 109 | '', 110 | '' 111 | ); 112 | } 113 | endif; 114 | 115 | if ( ! function_exists( 'branch_post_thumbnail' ) ) : 116 | /** 117 | * Displays an optional post thumbnail. 118 | * 119 | * Wraps the post thumbnail in an anchor element on index views, or a div 120 | * element when on single views. 121 | */ 122 | function branch_post_thumbnail() { 123 | if ( post_password_required() || is_attachment() || ! has_post_thumbnail() ) { 124 | return; 125 | } 126 | 127 | if ( is_singular() ) : 128 | ?> 129 | 130 |
131 | 132 |
133 | 134 | 135 | 136 | 150 | 151 | 17 | 18 |
19 | 20 | 25 |
26 |

27 |
28 | 52 | 53 |
54 | 55 | e)return t}return null},e.prototype.getCarbonIndex=async function(t){let e,a;if(e=t&&t.checkDate?t.checkDate:new Date,a=this.getNextInterval({checkDate:e}),!a){const t=await this.fetchIntensityData();this.localStorage.setItem("gridIntensityData",JSON.stringify(t)),this.data=t,a=this.getNextInterval({checkDate:e})}return e>Date.parse(a.to)&&(this.data=await this.fetchIntensityData(),a=this.data.data[0]),a.intensity.index},e.prototype.fetchIntensityData=async function(){const t=new Date,[e,a]=this.intensityProvider.api.forwardLooking.split("{from}"),n=`${e}${t.toISOString()}${a}/`;let i=await this.fetch(n);return this.data=await i.json(),this.data},e.prototype.fetch=fetch,e.prototype.localStorage=localStorage,e.prototype.fetchIntensityData=async function(){const t=new Date,[e,a]=this.intensityProvider.api.forwardLooking.split("{from}"),n=`${e}${t.toISOString()}${a}/`;let i=await fetch(n);return this.data=await i.json(),this.data},window.GridIntensity=e; 2 | -------------------------------------------------------------------------------- /sidebar.php: -------------------------------------------------------------------------------- 1 | 14 | 15 | 18 | -------------------------------------------------------------------------------- /style.css: -------------------------------------------------------------------------------- 1 | /*! 2 | Theme Name: Branch 3 | Theme URI: http://underscores.me/ 4 | Author: Jack Lenox 5 | Author URI: https://jacklenox.com 6 | Description: The theme for Branch magazine 7 | Version: 1.0.0 8 | Tested up to: 5.4 9 | Requires PHP: 5.6 10 | License: GNU General Public License v2 or later 11 | License URI: LICENSE 12 | Text Domain: branch 13 | Tags: carbon aware, carbon intensity 14 | 15 | This theme, like WordPress, is licensed under the GPL. 16 | Use it to make something cool, have fun, and share what you've learned. 17 | 18 | Branch is based on Underscores https://underscores.me/, (C) 2012-2020 Automattic, Inc. 19 | Underscores is distributed under the terms of the GNU GPL v2 or later. 20 | 21 | Normalizing styles have been helped along thanks to the fine work of 22 | Nicolas Gallagher and Jonathan Neal https://necolas.github.io/normalize.css/ 23 | */ 24 | 25 | /*-------------------------------------------------------------- 26 | >>> TABLE OF CONTENTS: 27 | ---------------------------------------------------------------- 28 | # Generic 29 | - Normalize 30 | - Box sizing 31 | # Base 32 | - Typography 33 | - Elements 34 | - Links 35 | - Forms 36 | ## Layouts 37 | # Components 38 | - Navigation 39 | - Posts and pages 40 | - Comments 41 | - Widgets 42 | - Media 43 | - Captions 44 | - Galleries 45 | - Carbon intensity switcher 46 | - Footer 47 | # Plugins 48 | - Jetpack infinite scroll 49 | - Tippy 50 | # Utilities 51 | - Accessibility 52 | - Alignments 53 | 54 | --------------------------------------------------------------*/ 55 | 56 | /*-------------------------------------------------------------- 57 | # Generic 58 | --------------------------------------------------------------*/ 59 | 60 | /* Normalize 61 | --------------------------------------------- */ 62 | 63 | /*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */ 64 | 65 | /* Document 66 | ========================================================================== */ 67 | 68 | /** 69 | * 1. Correct the line height in all browsers. 70 | * 2. Prevent adjustments of font size after orientation changes in iOS. 71 | */ 72 | html { 73 | line-height: 1.15; 74 | -webkit-text-size-adjust: 100%; 75 | } 76 | 77 | /* Sections 78 | ========================================================================== */ 79 | 80 | /** 81 | * Remove the margin in all browsers. 82 | */ 83 | body { 84 | margin: 0; 85 | } 86 | 87 | /** 88 | * Render the `main` element consistently in IE. 89 | */ 90 | main { 91 | display: block; 92 | } 93 | 94 | /** 95 | * Correct the font size and margin on `h1` elements within `section` and 96 | * `article` contexts in Chrome, Firefox, and Safari. 97 | */ 98 | h1 { 99 | font-size: 2em; 100 | margin: 0.67em 0; 101 | } 102 | 103 | /* Grouping content 104 | ========================================================================== */ 105 | 106 | /** 107 | * 1. Add the correct box sizing in Firefox. 108 | * 2. Show the overflow in Edge and IE. 109 | */ 110 | hr { 111 | box-sizing: content-box; 112 | height: 0; 113 | overflow: visible; 114 | } 115 | 116 | /** 117 | * 1. Correct the inheritance and scaling of font size in all browsers. 118 | * 2. Correct the odd `em` font sizing in all browsers. 119 | */ 120 | pre { 121 | font-family: monospace, monospace; 122 | font-size: 1em; 123 | } 124 | 125 | /* Text-level semantics 126 | ========================================================================== */ 127 | 128 | /** 129 | * Remove the gray background on active links in IE 10. 130 | */ 131 | a { 132 | background-color: transparent; 133 | } 134 | 135 | /** 136 | * 1. Remove the bottom border in Chrome 57- 137 | * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari. 138 | */ 139 | abbr[title] { 140 | border-bottom: none; 141 | text-decoration: underline; 142 | text-decoration: underline dotted; 143 | } 144 | 145 | /** 146 | * Add the correct font weight in Chrome, Edge, and Safari. 147 | */ 148 | b, 149 | strong { 150 | font-weight: bolder; 151 | } 152 | 153 | /** 154 | * 1. Correct the inheritance and scaling of font size in all browsers. 155 | * 2. Correct the odd `em` font sizing in all browsers. 156 | */ 157 | code, 158 | kbd, 159 | samp { 160 | font-family: monospace, monospace; 161 | font-size: 1em; 162 | } 163 | 164 | /** 165 | * Add the correct font size in all browsers. 166 | */ 167 | small { 168 | font-size: 80%; 169 | } 170 | 171 | /** 172 | * Prevent `sub` and `sup` elements from affecting the line height in 173 | * all browsers. 174 | */ 175 | sub, 176 | sup { 177 | font-size: 75%; 178 | line-height: 0; 179 | position: relative; 180 | vertical-align: baseline; 181 | } 182 | 183 | sub { 184 | bottom: -0.25em; 185 | } 186 | 187 | sup { 188 | top: -0.5em; 189 | } 190 | 191 | ::selection { 192 | background-color: #1E1E1E; 193 | color: white; 194 | } 195 | ::-moz-selection { 196 | background-color: #1E1E1E; 197 | color: white; 198 | } 199 | 200 | /* Embedded content 201 | ========================================================================== */ 202 | 203 | /** 204 | * Remove the border on images inside links in IE 10. 205 | */ 206 | img { 207 | border-style: none; 208 | } 209 | 210 | /* Forms 211 | ========================================================================== */ 212 | 213 | /** 214 | * 1. Change the font styles in all browsers. 215 | * 2. Remove the margin in Firefox and Safari. 216 | */ 217 | button, 218 | input, 219 | optgroup, 220 | select, 221 | textarea { 222 | font-family: inherit; 223 | font-size: 100%; 224 | line-height: 1.15; 225 | margin: 0; 226 | } 227 | 228 | /** 229 | * Show the overflow in IE. 230 | * 1. Show the overflow in Edge. 231 | */ 232 | button, 233 | input { 234 | overflow: visible; 235 | } 236 | 237 | /** 238 | * Remove the inheritance of text transform in Edge, Firefox, and IE. 239 | * 1. Remove the inheritance of text transform in Firefox. 240 | */ 241 | button, 242 | select { 243 | text-transform: none; 244 | } 245 | 246 | /** 247 | * Correct the inability to style clickable types in iOS and Safari. 248 | */ 249 | button, 250 | [type="button"], 251 | [type="reset"], 252 | [type="submit"] { 253 | -webkit-appearance: button; 254 | } 255 | 256 | /** 257 | * Remove the inner border and padding in Firefox. 258 | */ 259 | button::-moz-focus-inner, 260 | [type="button"]::-moz-focus-inner, 261 | [type="reset"]::-moz-focus-inner, 262 | [type="submit"]::-moz-focus-inner { 263 | border-style: none; 264 | padding: 0; 265 | } 266 | 267 | /** 268 | * Restore the focus styles unset by the previous rule. 269 | */ 270 | button:-moz-focusring, 271 | [type="button"]:-moz-focusring, 272 | [type="reset"]:-moz-focusring, 273 | [type="submit"]:-moz-focusring { 274 | outline: 1px dotted ButtonText; 275 | } 276 | 277 | /** 278 | * Correct the padding in Firefox. 279 | */ 280 | fieldset { 281 | padding: 0.35em 0.75em 0.625em; 282 | } 283 | 284 | /** 285 | * 1. Correct the text wrapping in Edge and IE. 286 | * 2. Correct the color inheritance from `fieldset` elements in IE. 287 | * 3. Remove the padding so developers are not caught out when they zero out 288 | * `fieldset` elements in all browsers. 289 | */ 290 | legend { 291 | box-sizing: border-box; 292 | color: inherit; 293 | display: table; 294 | max-width: 100%; 295 | padding: 0; 296 | white-space: normal; 297 | } 298 | 299 | /** 300 | * Add the correct vertical alignment in Chrome, Firefox, and Opera. 301 | */ 302 | progress { 303 | vertical-align: baseline; 304 | } 305 | 306 | /** 307 | * Remove the default vertical scrollbar in IE 10+. 308 | */ 309 | textarea { 310 | overflow: auto; 311 | } 312 | 313 | /** 314 | * 1. Add the correct box sizing in IE 10. 315 | * 2. Remove the padding in IE 10. 316 | */ 317 | [type="checkbox"], 318 | [type="radio"] { 319 | box-sizing: border-box; 320 | padding: 0; 321 | } 322 | 323 | /** 324 | * Correct the cursor style of increment and decrement buttons in Chrome. 325 | */ 326 | [type="number"]::-webkit-inner-spin-button, 327 | [type="number"]::-webkit-outer-spin-button { 328 | height: auto; 329 | } 330 | 331 | /** 332 | * 1. Correct the odd appearance in Chrome and Safari. 333 | * 2. Correct the outline style in Safari. 334 | */ 335 | [type="search"] { 336 | -webkit-appearance: textfield; 337 | outline-offset: -2px; 338 | } 339 | 340 | /** 341 | * Remove the inner padding in Chrome and Safari on macOS. 342 | */ 343 | [type="search"]::-webkit-search-decoration { 344 | -webkit-appearance: none; 345 | } 346 | 347 | /** 348 | * 1. Correct the inability to style clickable types in iOS and Safari. 349 | * 2. Change font properties to `inherit` in Safari. 350 | */ 351 | ::-webkit-file-upload-button { 352 | -webkit-appearance: button; 353 | font: inherit; 354 | } 355 | 356 | /* Interactive 357 | ========================================================================== */ 358 | 359 | /* 360 | * Add the correct display in Edge, IE 10+, and Firefox. 361 | */ 362 | details { 363 | display: block; 364 | } 365 | 366 | /* 367 | * Add the correct display in all browsers. 368 | */ 369 | summary { 370 | display: list-item; 371 | } 372 | 373 | /* Misc 374 | ========================================================================== */ 375 | 376 | /** 377 | * Add the correct display in IE 10+. 378 | */ 379 | template { 380 | display: none; 381 | } 382 | 383 | /** 384 | * Add the correct display in IE 10. 385 | */ 386 | [hidden] { 387 | display: none; 388 | } 389 | 390 | /* Box sizing 391 | --------------------------------------------- */ 392 | 393 | /* Inherit box-sizing to more easily change it's value on a component level. 394 | @link http://css-tricks.com/inheriting-box-sizing-probably-slightly-better-best-practice/ */ 395 | *, 396 | *::before, 397 | *::after { 398 | box-sizing: inherit; 399 | } 400 | 401 | html { 402 | box-sizing: border-box; 403 | } 404 | 405 | /*-------------------------------------------------------------- 406 | # Base 407 | --------------------------------------------------------------*/ 408 | 409 | /* Typography 410 | --------------------------------------------- */ 411 | @font-face { 412 | font-family: 'Rubik Bold'; 413 | src: url('fonts/Rubik-Bold.woff2') format('woff2'); 414 | unicode-range: U+0020-007F; 415 | } 416 | 417 | @font-face { 418 | font-family: 'Rubik Bold'; 419 | src: url('fonts/Rubik-Bold-Extra.woff2') format('woff2'); 420 | unicode-range: U+00A0-00FF, U+0100-017F; 421 | } 422 | 423 | body, 424 | button, 425 | input, 426 | select, 427 | optgroup, 428 | textarea { 429 | color: #404040; 430 | font-family: Georgia, 'Times New Roman', Times, serif; 431 | font-size: 1rem; 432 | line-height: 1.7; 433 | } 434 | 435 | h1, 436 | h2, 437 | h3, 438 | h4, 439 | h5, 440 | h6 { 441 | clear: both; 442 | font-family: 'Rubik Bold'; 443 | } 444 | 445 | p { 446 | margin-bottom: 1.5em; 447 | } 448 | 449 | dfn, 450 | cite, 451 | em, 452 | i { 453 | font-style: italic; 454 | } 455 | 456 | blockquote { 457 | margin: 0 1.5em; 458 | } 459 | 460 | address { 461 | margin: 0 0 1.5em; 462 | } 463 | 464 | pre { 465 | background: #eee; 466 | font-family: "Courier 10 Pitch", courier, monospace; 467 | line-height: 1.6; 468 | margin-bottom: 1.6em; 469 | max-width: 100%; 470 | overflow: auto; 471 | padding: 1.6em; 472 | } 473 | 474 | code, 475 | kbd, 476 | tt, 477 | var { 478 | font-family: monaco, consolas, "Andale Mono", "DejaVu Sans Mono", monospace; 479 | } 480 | 481 | abbr, 482 | acronym { 483 | border-bottom: 1px dotted #666; 484 | cursor: help; 485 | } 486 | 487 | mark, 488 | ins { 489 | background: #fff9c0; 490 | text-decoration: none; 491 | } 492 | 493 | big { 494 | font-size: 125%; 495 | } 496 | 497 | /* Elements 498 | --------------------------------------------- */ 499 | body { 500 | background: #fff; 501 | } 502 | 503 | hr { 504 | background-color: #ccc; 505 | border: 0; 506 | height: 1px; 507 | margin-bottom: 1.5em; 508 | } 509 | 510 | ul, 511 | ol { 512 | margin: 0 0 1.5em 3em; 513 | } 514 | 515 | ul { 516 | list-style: disc; 517 | } 518 | 519 | ol { 520 | list-style: decimal; 521 | } 522 | 523 | li > ul, 524 | li > ol { 525 | margin-bottom: 0; 526 | margin-left: 1.5em; 527 | } 528 | 529 | dt { 530 | font-weight: 700; 531 | } 532 | 533 | dd { 534 | margin: 0 1.5em 1.5em; 535 | } 536 | 537 | /* Make sure embeds and iframes fit their containers. */ 538 | embed, 539 | iframe, 540 | object { 541 | max-width: 100%; 542 | } 543 | 544 | img { 545 | height: auto; 546 | max-width: 100%; 547 | } 548 | 549 | figure { 550 | margin: 1em 0; 551 | } 552 | 553 | table { 554 | margin: 0 0 1.5em; 555 | width: 100%; 556 | } 557 | 558 | /* Links 559 | --------------------------------------------- */ 560 | a { 561 | color: #4169e1; 562 | } 563 | 564 | a:visited { 565 | color: #800080; 566 | } 567 | 568 | a:hover, 569 | a:focus, 570 | a:active { 571 | color: #191970; 572 | } 573 | 574 | a:focus { 575 | outline: thin dotted; 576 | } 577 | 578 | a:hover, 579 | a:active { 580 | outline: 0; 581 | } 582 | 583 | /* Forms 584 | --------------------------------------------- */ 585 | button, 586 | input[type="button"], 587 | input[type="reset"], 588 | input[type="submit"] { 589 | border: 1px solid; 590 | border-color: #ccc #ccc #bbb; 591 | border-radius: 3px; 592 | background: #e6e6e6; 593 | color: rgba(0, 0, 0, 0.8); 594 | line-height: 1; 595 | padding: 0.6em 1em 0.4em; 596 | } 597 | 598 | button:hover, 599 | input[type="button"]:hover, 600 | input[type="reset"]:hover, 601 | input[type="submit"]:hover { 602 | border-color: #ccc #bbb #aaa; 603 | } 604 | 605 | button:active, 606 | button:focus, 607 | input[type="button"]:active, 608 | input[type="button"]:focus, 609 | input[type="reset"]:active, 610 | input[type="reset"]:focus, 611 | input[type="submit"]:active, 612 | input[type="submit"]:focus { 613 | border-color: #aaa #bbb #bbb; 614 | } 615 | 616 | input[type="text"], 617 | input[type="email"], 618 | input[type="url"], 619 | input[type="password"], 620 | input[type="search"], 621 | input[type="number"], 622 | input[type="tel"], 623 | input[type="range"], 624 | input[type="date"], 625 | input[type="month"], 626 | input[type="week"], 627 | input[type="time"], 628 | input[type="datetime"], 629 | input[type="datetime-local"], 630 | input[type="color"], 631 | textarea { 632 | color: #666; 633 | border: 1px solid #ccc; 634 | border-radius: 3px; 635 | padding: 3px; 636 | } 637 | 638 | input[type="text"]:focus, 639 | input[type="email"]:focus, 640 | input[type="url"]:focus, 641 | input[type="password"]:focus, 642 | input[type="search"]:focus, 643 | input[type="number"]:focus, 644 | input[type="tel"]:focus, 645 | input[type="range"]:focus, 646 | input[type="date"]:focus, 647 | input[type="month"]:focus, 648 | input[type="week"]:focus, 649 | input[type="time"]:focus, 650 | input[type="datetime"]:focus, 651 | input[type="datetime-local"]:focus, 652 | input[type="color"]:focus, 653 | textarea:focus { 654 | color: #111; 655 | } 656 | 657 | select { 658 | border: 1px solid #ccc; 659 | } 660 | 661 | textarea { 662 | width: 100%; 663 | } 664 | 665 | /*-------------------------------------------------------------- 666 | # Variables 667 | --------------------------------------------------------------*/ 668 | :root { 669 | --logo-colour: #B7410E; 670 | --bg-colour: #F4F3F2; 671 | --hl-colour: #7D706B; 672 | --body-colour: #64564F; 673 | } 674 | 675 | /*-------------------------------------------------------------- 676 | # Layouts 677 | --------------------------------------------------------------*/ 678 | body { 679 | background-color: var(--bg-colour); 680 | position: relative; 681 | } 682 | 683 | .site-main { 684 | color: var(--body-colour); 685 | } 686 | 687 | .site-main a { 688 | color: var(--hl-colour); 689 | } 690 | 691 | /*body.low-grid-intensity {*/ 692 | /*background-color: #EEFBF7;*/ 693 | /*}*/ 694 | 695 | /*body.low-grid-intensity main.site-main a, body.low-grid-intensity main.site-main .entry-title {*/ 696 | /*color: #1cdcb4;*/ 697 | /*}*/ 698 | 699 | /*body.low-grid-intensity main.site-main {*/ 700 | /*color: #1c6244;*/ 701 | /*}*/ 702 | 703 | /*body.moderate-grid-intensity {*/ 704 | /*background-color: #EFF8FC;*/ 705 | /*}*/ 706 | 707 | /*body.moderate-grid-intensity main.site-main a, body.moderate-grid-intensity main.site-main .entry-title {*/ 708 | /*color: #51aee2;*/ 709 | /*}*/ 710 | 711 | /*body.moderate-grid-intensity main.site-main {*/ 712 | /*color: #004884;*/ 713 | /*}*/ 714 | 715 | /*body.high-grid-intensity {*/ 716 | /*background-color: #FFF8F2;*/ 717 | /*}*/ 718 | 719 | /*body.high-grid-intensity main.site-main a, body.high-grid-intensity main.site-main .entry-title {*/ 720 | /*color: #ff7900;*/ 721 | /*}*/ 722 | 723 | /*body.high-grid-intensity main.site-main {*/ 724 | /*color: #543010;*/ 725 | /*}*/ 726 | 727 | .site-header { 728 | border-bottom: 1px solid gray; 729 | padding-left: 0.75em; 730 | padding-right: 0.75em; 731 | display: flex; 732 | align-items: center; 733 | flex-wrap: wrap; 734 | } 735 | @media screen and (min-width: 37.5em) { 736 | .site-header { 737 | padding-left: 1.6em; 738 | padding-right: 1.6em; 739 | } 740 | } 741 | @media screen and (min-width: 54em) { 742 | .site-header { 743 | padding-left: 2.4em; 744 | padding-right: 2.4em; 745 | } 746 | } 747 | 748 | .logo { 749 | display: none; 750 | } 751 | @media screen and (min-width: 25em) { 752 | .logo { 753 | display: flex; 754 | } 755 | } 756 | 757 | .logo, .site-branding, .site-credit { 758 | height: 4em; 759 | } 760 | 761 | .logo img { 762 | min-width: 40px; 763 | } 764 | 765 | .site-branding { 766 | padding-right: 0.75em; 767 | } 768 | @media screen and (min-width: 25em) { 769 | .site-branding { 770 | padding-left: 0.5em; 771 | } 772 | } 773 | @media screen and (min-width: 54em) { 774 | 775 | .site-branding { 776 | padding-right: 2.4em; 777 | } 778 | } 779 | 780 | .site-title { 781 | font-family: 'Rubik Bold'; 782 | font-size: 2em; 783 | font-weight: bold; 784 | letter-spacing: -1px; 785 | margin: 0; 786 | text-transform: lowercase; 787 | height: 100%; 788 | display: flex; 789 | align-items: center; 790 | } 791 | 792 | .site-title a { 793 | color: #212121; 794 | text-decoration: none; 795 | } 796 | 797 | .site-description { 798 | position: absolute; 799 | top: -9999px; 800 | left: -9999px; 801 | } 802 | 803 | .main-navigation { 804 | align-self: center; 805 | height: auto; 806 | } 807 | .menu-main-navigation-container { 808 | height: 100%; 809 | } 810 | 811 | .main-navigation li { 812 | position: relative; 813 | font-family: 'Rubik Bold'; 814 | letter-spacing: 0.07em; 815 | text-transform: uppercase; 816 | font-size: 0.9em; 817 | } 818 | @media screen and (min-width: 26em) { 819 | .main-navigation li { 820 | border-left: 1px solid gray; 821 | } 822 | .main-navigation li:first-child { 823 | border-left: 1px solid gray; 824 | } 825 | .menu li:last-child { 826 | border-right: 1px solid gray; 827 | } 828 | } 829 | @media screen and (min-width: 37.5em) { 830 | .main-navigation li { 831 | font-size: 1em; 832 | } 833 | } 834 | 835 | .main-navigation li a { 836 | color: #212121; 837 | padding: 1em; 838 | margin-top: 4px; 839 | } 840 | @media screen and (min-width: 25em) { 841 | .main-navigation li a { 842 | padding: 1.6em; 843 | } 844 | } 845 | @media screen and (min-width: 54em) { 846 | .main-navigation li a { 847 | padding: 2.4em; 848 | } 849 | } 850 | 851 | /* .main-navigation li:first-child a { 852 | padding-left: 0.75em; 853 | } */ 854 | 855 | .site-credit { 856 | display: none; 857 | } 858 | @media screen and (min-width: 33em) { 859 | .site-credit { 860 | display: block; 861 | flex: 1 0 0; 862 | } 863 | } 864 | .site-credit__link { 865 | display: flex; 866 | justify-content: flex-end; 867 | align-items: center; 868 | height: 100%; 869 | } 870 | .site-credit__image { 871 | max-width: 90px; 872 | } 873 | 874 | .secondary-nav { 875 | padding: 1em 0.75em; 876 | display: flex; 877 | align-items: center; 878 | border-bottom: 1px solid gray; 879 | letter-spacing: 0.07em; 880 | } 881 | 882 | @media screen and (min-width: 37.5em) { 883 | .secondary-nav { 884 | padding: 1.2em 1.6em; 885 | } 886 | } 887 | @media screen and (min-width: 54em) { 888 | .secondary-nav { 889 | padding-left: 2.4em; 890 | padding-right: 2.4em; 891 | } 892 | } 893 | 894 | .nav-contents p { 895 | margin: 0; 896 | } 897 | 898 | .nav-contents p, .entry-content a.more-link { 899 | font-family: 'Rubik Bold'; 900 | text-transform: uppercase; 901 | } 902 | 903 | .entry-content .wp-block-image figure span, .entry-content figure.wp-block-image span, .entry-content li.blocks-gallery-item span { 904 | position: relative; 905 | background-color: #FFDD9C; 906 | z-index: 0; 907 | cursor: pointer; 908 | } 909 | 910 | .entry-content figcaption { 911 | margin: 0 auto 1.5em; 912 | max-width: 35em; 913 | text-align: center; 914 | } 915 | 916 | div.carbon-alt { 917 | font-style: italic; 918 | line-height: 1.3; 919 | position: absolute; 920 | padding: 5%; 921 | top: 40%; 922 | transform: translateY(-50%); 923 | width: 100%; 924 | z-index: -1; 925 | } 926 | @media screen and (min-width: 37.5em) { 927 | body:not(.page-id-675) div.carbon-alt { 928 | width: 80%; 929 | left: 10%; 930 | } 931 | 932 | body:not(.page-id-675) div.carbon-alt:not(figure.wp-block-gallery *) { 933 | font-size: 2em; 934 | } 935 | } 936 | 937 | div.show-image { 938 | position: absolute; 939 | left: 50%; 940 | transform: translateX(-50%); 941 | bottom: 15%; 942 | font-family: "Rubik Bold"; 943 | text-align: center; 944 | text-transform: uppercase; 945 | text-decoration: underline; 946 | cursor: pointer; 947 | z-index: -1; 948 | } 949 | @media screen and (max-width: 782px) { 950 | div.show-image { 951 | font-size: .7rem; 952 | } 953 | } 954 | 955 | /* Hide all images by default. How they appear depends on carbon intensity. 956 | * (Except for specifically whitelisted images and placeholders.) */ 957 | .entry-content figure.wp-block-image:not(.no-carbon) img:not(.branch-placeholder-image), 958 | .entry-content .wp-block-image figure:not(.no-carbon) img:not(.branch-placeholder-image) { 959 | display: none !important; 960 | } 961 | 962 | .entry-content a.more-link { 963 | display: block; 964 | text-align: center; 965 | text-decoration: none; 966 | position: relative; 967 | padding: 1em 0; 968 | } 969 | 970 | .entry-content a.more-link::before { 971 | content: ""; 972 | position: absolute; 973 | width: 8%; 974 | height: 1px; 975 | bottom: 3.5em; 976 | left: 46%; 977 | border-bottom: 2px solid; 978 | } 979 | 980 | .nav-contents a { 981 | color: #212121; 982 | text-decoration: none; 983 | } 984 | 985 | .nav-contents p img { 986 | margin-right: .5em; 987 | margin-bottom: -.1em; 988 | } 989 | 990 | .site-main { 991 | max-width: 60em; 992 | margin: 0 auto; 993 | padding: 0 0.75em; 994 | } 995 | @media screen and (min-width: 37.5em) { 996 | .site-main { 997 | padding-left: 1.6em; 998 | padding-right: 1.6em; 999 | } 1000 | } 1001 | @media screen and (min-width: 54em) { 1002 | .site-main { 1003 | padding-left: 2.4em; 1004 | padding-right: 2.4em; 1005 | } 1006 | } 1007 | 1008 | .site-main h1, .site-main h2, .site-main h3, .site-main h4, .site-main h5 { 1009 | text-align: center; 1010 | } 1011 | 1012 | .entry-content h2, .entry-content h3, .entry-content h5 { 1013 | margin: 3em auto 1.5em; 1014 | padding-bottom: 0.5em; 1015 | position: relative; 1016 | } 1017 | 1018 | .entry-content h4 { 1019 | letter-spacing: .1em; 1020 | max-width: 35em; 1021 | margin: 0 auto 0.8em; 1022 | text-transform: uppercase; 1023 | text-align: left; 1024 | font-size: 1.1em; 1025 | } 1026 | 1027 | .entry-content h2 a { 1028 | text-decoration: none; 1029 | } 1030 | 1031 | .entry-content h2::after, .entry-content h3::after, .entry-content h5::after { 1032 | content: ""; 1033 | position: absolute; 1034 | width: 10%; 1035 | height: 1px; 1036 | bottom: 0; 1037 | left: 45%; 1038 | border-bottom: 0.1em solid; 1039 | } 1040 | 1041 | .hentry { 1042 | border-bottom: 1px solid gray; 1043 | padding-bottom: 5em; 1044 | } 1045 | 1046 | .entry-title { 1047 | color: #212121; 1048 | font-size: 3.5em; 1049 | line-height: 1.085em; 1050 | } 1051 | 1052 | @media (max-width: 500px) { 1053 | .entry-title { 1054 | font-size: 2em; 1055 | } 1056 | } 1057 | 1058 | .entry-title a { 1059 | text-decoration: none; 1060 | } 1061 | 1062 | .entry-meta { 1063 | font-style: italic; 1064 | text-align: center; 1065 | font-size: 1.1em; 1066 | } 1067 | 1068 | .entry-content p { 1069 | font-size: 1.1em; 1070 | margin: 0 auto 1.5em; 1071 | max-width: 35em; 1072 | } 1073 | 1074 | .entry-content blockquote { 1075 | border-left-width: 7px; 1076 | border-left-style: solid; 1077 | margin: 0 auto; 1078 | font-size: 1.1em; 1079 | max-width: 32em; 1080 | text-align: left; 1081 | padding-left: 1.5em; 1082 | } 1083 | 1084 | .entry-content blockquote p { 1085 | font-style: italic; 1086 | line-height: 1.3; 1087 | padding: 0; 1088 | } 1089 | 1090 | .entry-content blockquote cite { 1091 | font-style: normal; 1092 | } 1093 | 1094 | .entry-content blockquote { 1095 | border-left-color: var(--hl-colour); 1096 | } 1097 | 1098 | .entry-content ul, .entry-content ol { 1099 | font-size: 1.1rem; 1100 | max-width: 35em; 1101 | margin: 0 auto 1.5em; 1102 | padding: 0 3em; 1103 | } 1104 | 1105 | .wp-block-image { 1106 | text-align: center; 1107 | } 1108 | .wp-block-gallery .blocks-gallery-grid { 1109 | margin-bottom: 0; 1110 | padding: 0; 1111 | } 1112 | 1113 | .wp-block-embed { 1114 | text-align: center; 1115 | } 1116 | 1117 | .wp-block-pullquote { 1118 | padding-bottom: 1em; 1119 | } 1120 | 1121 | .site-footer { 1122 | max-width: 60em; 1123 | margin: 3em auto; 1124 | padding: 0 0.75em; 1125 | } 1126 | @media screen and (min-width: 37.5em) { 1127 | .site-footer { 1128 | padding-left: 1.6em; 1129 | padding-right: 1.6em; 1130 | } 1131 | } 1132 | @media screen and (min-width: 54em) { 1133 | .site-footer { 1134 | padding-left: 2.4em; 1135 | padding-right: 2.4em; 1136 | } 1137 | } 1138 | 1139 | .site-footer a, .site-footer a span { 1140 | color: #212121; 1141 | text-decoration: none; 1142 | } 1143 | 1144 | .site-footer .wp-block-navigation-item span { 1145 | font-family: 'Rubik Bold'; 1146 | } 1147 | 1148 | .footer-nav { 1149 | margin-top: 1.5em; 1150 | } 1151 | @media screen and (min-width: 37.5em) { 1152 | .footer-nav { 1153 | margin-top: 0; 1154 | display: flex; 1155 | align-items: center; 1156 | } 1157 | } 1158 | @media screen and (max-width: 782px) { 1159 | .site-footer .wp-block-navigation__container { 1160 | justify-content: center; 1161 | } 1162 | } 1163 | 1164 | .footer-menu { 1165 | font-family: 'Rubik Bold'; 1166 | text-align: center; 1167 | flex: 1 0 0; 1168 | margin-top: 1em; 1169 | display: flex; 1170 | justify-content: center; 1171 | flex-wrap: wrap; 1172 | } 1173 | .footer-menu a { 1174 | padding: 0 0.5em 0.35em 0.5em; 1175 | } 1176 | 1177 | .site-info { 1178 | text-align: center; 1179 | margin-top: 2em; 1180 | font-size: 0.9em; 1181 | } 1182 | @media screen and (min-width: 37.5em) { 1183 | .site-info { 1184 | margin-top: 1em; 1185 | } 1186 | } 1187 | 1188 | .table-of-contents { 1189 | margin-top: -1px; 1190 | padding: 0 0.75em; 1191 | position: absolute; 1192 | background-color: var(--bg-colour); 1193 | transform: translateX(-100%); 1194 | transition: transform 0.5s; 1195 | z-index: 2; 1196 | } 1197 | @media screen and (min-width: 37.5em) { 1198 | .table-of-contents { 1199 | padding-left: 1.6em; 1200 | padding-right: 1.6em; 1201 | } 1202 | } 1203 | @media screen and (min-width: 54em) { 1204 | .table-of-contents { 1205 | padding-left: 2.4em; 1206 | padding-right: 2.4em; 1207 | } 1208 | } 1209 | 1210 | .table-of-contents-active { 1211 | transform: translateX(0); 1212 | } 1213 | 1214 | .table-of-contents a { 1215 | color: var(--hl-colour); 1216 | text-decoration: none; 1217 | } 1218 | 1219 | .blackout { 1220 | background-color: black; 1221 | left: -100%; 1222 | opacity: 0%; 1223 | position: absolute; 1224 | width: 100%; 1225 | height: 100%; 1226 | transition: opacity 0.5s; 1227 | z-index: 1; 1228 | } 1229 | 1230 | .blackout-active { 1231 | display: block; 1232 | left: 0; 1233 | opacity: 25%; 1234 | } 1235 | 1236 | .blackout-fading { 1237 | opacity: 0%; 1238 | } 1239 | 1240 | .carbon-intensity { 1241 | display: none; 1242 | } 1243 | 1244 | @media screen and (min-width: 37.5em) { 1245 | .carbon-intensity { 1246 | display: block; 1247 | text-align: right; 1248 | font-family: 'Rubik Bold'; 1249 | text-transform: uppercase; 1250 | position: fixed; 1251 | right: 0; 1252 | margin: 1em 0 0.75em 0; 1253 | margin-right: 0; 1254 | margin-bottom: 0; 1255 | transform: rotate(270deg); 1256 | transform-origin: 100% 100%; 1257 | top: 19em; 1258 | } 1259 | } 1260 | 1261 | .carbon-intensity .energy { 1262 | padding-right: .5em; 1263 | } 1264 | 1265 | .carbon-intensity .energy svg { 1266 | padding-top: .2em; 1267 | } 1268 | 1269 | .carbon-intensity .energy svg path { 1270 | fill: var(--hl-colour); 1271 | } 1272 | 1273 | 1274 | /*-------------------------------------------------------------- 1275 | # Components 1276 | --------------------------------------------------------------*/ 1277 | 1278 | /* Navigation 1279 | --------------------------------------------- */ 1280 | .main-navigation { 1281 | display: block; 1282 | /* width: 100%; */ 1283 | } 1284 | /* @media screen and (min-width: 37.5em) { 1285 | 1286 | .main-navigation { 1287 | order: 3; 1288 | width: auto; 1289 | } 1290 | } */ 1291 | 1292 | .main-navigation ul { 1293 | list-style: none; 1294 | margin: 0; 1295 | padding-left: 0; 1296 | display: flex; 1297 | justify-content: center; 1298 | align-items: center; 1299 | height: 100%; 1300 | } 1301 | 1302 | .main-navigation ul ul { 1303 | box-shadow: 0 3px 3px rgba(0, 0, 0, 0.2); 1304 | float: left; 1305 | position: absolute; 1306 | top: 100%; 1307 | left: -999em; 1308 | z-index: 99999; 1309 | } 1310 | 1311 | .main-navigation ul ul ul { 1312 | left: -999em; 1313 | top: 0; 1314 | } 1315 | 1316 | .main-navigation ul ul li:hover > ul, 1317 | .main-navigation ul ul li.focus > ul { 1318 | display: block; 1319 | left: auto; 1320 | } 1321 | 1322 | .main-navigation ul ul a { 1323 | width: 200px; 1324 | } 1325 | 1326 | .main-navigation ul li:hover > ul, 1327 | .main-navigation ul li.focus > ul { 1328 | left: auto; 1329 | } 1330 | 1331 | .main-navigation a { 1332 | display: block; 1333 | text-decoration: none; 1334 | } 1335 | 1336 | /* Small menu. */ 1337 | .menu-toggle, 1338 | .main-navigation.toggled ul { 1339 | display: block; 1340 | } 1341 | 1342 | @media screen and (min-width: 37.5em) { 1343 | 1344 | .menu-toggle { 1345 | display: none; 1346 | } 1347 | } 1348 | 1349 | .site-main .comment-navigation, 1350 | .site-main 1351 | .posts-navigation, 1352 | .site-main 1353 | .post-navigation { 1354 | margin: 0 0 1.5em; 1355 | } 1356 | 1357 | .comment-navigation .nav-links, 1358 | .posts-navigation .nav-links, 1359 | .post-navigation .nav-links { 1360 | display: flex; 1361 | } 1362 | 1363 | .comment-navigation .nav-previous, 1364 | .posts-navigation .nav-previous, 1365 | .post-navigation .nav-previous { 1366 | flex: 1 0 50%; 1367 | } 1368 | 1369 | .comment-navigation .nav-next, 1370 | .posts-navigation .nav-next, 1371 | .post-navigation .nav-next { 1372 | text-align: end; 1373 | flex: 1 0 50%; 1374 | } 1375 | 1376 | /* Posts and pages 1377 | --------------------------------------------- */ 1378 | .sticky { 1379 | display: block; 1380 | } 1381 | 1382 | .post, 1383 | .page { 1384 | margin: 0 0 1.5em; 1385 | } 1386 | 1387 | .updated:not(.published) { 1388 | display: none; 1389 | } 1390 | 1391 | .page-content, 1392 | .entry-content, 1393 | .entry-summary { 1394 | margin: 1.5em 0 0; 1395 | } 1396 | 1397 | .page-links { 1398 | clear: both; 1399 | margin: 0 0 1.5em; 1400 | } 1401 | 1402 | /* Comments 1403 | --------------------------------------------- */ 1404 | .comment-content a { 1405 | word-wrap: break-word; 1406 | } 1407 | 1408 | .bypostauthor { 1409 | display: block; 1410 | } 1411 | 1412 | /* Widgets 1413 | --------------------------------------------- */ 1414 | .widget { 1415 | margin: 0 0 1.5em; 1416 | } 1417 | 1418 | .widget select { 1419 | max-width: 100%; 1420 | } 1421 | 1422 | /* Media 1423 | --------------------------------------------- */ 1424 | .page-content .wp-smiley, 1425 | .entry-content .wp-smiley, 1426 | .comment-content .wp-smiley { 1427 | border: none; 1428 | margin-bottom: 0; 1429 | margin-top: 0; 1430 | padding: 0; 1431 | } 1432 | 1433 | /* Make sure logo link wraps around logo image. */ 1434 | .custom-logo-link { 1435 | display: inline-block; 1436 | } 1437 | 1438 | /* Captions 1439 | --------------------------------------------- */ 1440 | .wp-caption { 1441 | margin-bottom: 1.5em; 1442 | max-width: 100%; 1443 | } 1444 | 1445 | .wp-caption img[class*="wp-image-"] { 1446 | display: block; 1447 | margin-left: auto; 1448 | margin-right: auto; 1449 | } 1450 | 1451 | .wp-caption .wp-caption-text { 1452 | margin: 0.8075em 0; 1453 | } 1454 | 1455 | .wp-caption-text { 1456 | text-align: center; 1457 | } 1458 | 1459 | /* Galleries 1460 | --------------------------------------------- */ 1461 | .gallery { 1462 | margin-bottom: 1.5em; 1463 | display: grid; 1464 | grid-gap: 1.5em; 1465 | } 1466 | 1467 | .gallery-item { 1468 | display: inline-block; 1469 | text-align: center; 1470 | width: 100%; 1471 | } 1472 | 1473 | .gallery-columns-2 { 1474 | grid-template-columns: repeat(2, 1fr); 1475 | } 1476 | 1477 | .gallery-columns-3 { 1478 | grid-template-columns: repeat(3, 1fr); 1479 | } 1480 | 1481 | .gallery-columns-4 { 1482 | grid-template-columns: repeat(4, 1fr); 1483 | } 1484 | 1485 | .gallery-columns-5 { 1486 | grid-template-columns: repeat(5, 1fr); 1487 | } 1488 | 1489 | .gallery-columns-6 { 1490 | grid-template-columns: repeat(6, 1fr); 1491 | } 1492 | 1493 | .gallery-columns-7 { 1494 | grid-template-columns: repeat(7, 1fr); 1495 | } 1496 | 1497 | .gallery-columns-8 { 1498 | grid-template-columns: repeat(8, 1fr); 1499 | } 1500 | 1501 | .gallery-columns-9 { 1502 | grid-template-columns: repeat(9, 1fr); 1503 | } 1504 | 1505 | .gallery-caption { 1506 | display: block; 1507 | } 1508 | 1509 | /* Carbon intensity switcher 1510 | --------------------------------------------- */ 1511 | /* Select box before JS kicks in, to avoid unstyled content and for progressive enhancement. */ 1512 | select.select-list__linked { 1513 | border: none; 1514 | background-color: transparent; 1515 | text-transform: uppercase; 1516 | font-family: 'Rubik Bold'; 1517 | text-align: right; 1518 | } 1519 | 1520 | 1521 | .carbon-switcher { 1522 | flex: 1 0 0; 1523 | width: 100%; 1524 | padding-left: 0.75em; 1525 | text-transform: uppercase; 1526 | font-family: 'Rubik Bold'; 1527 | text-align: right; 1528 | display: flex; 1529 | align-items: end; 1530 | justify-content: flex-end; 1531 | flex-direction: column; 1532 | line-height: 1.2; 1533 | } 1534 | 1535 | @media screen and (min-width: 33em) { 1536 | .carbon-switcher { 1537 | flex-direction: row; 1538 | } 1539 | } 1540 | 1541 | .carbon-switcher > span { 1542 | width: 100%; 1543 | } 1544 | .carbon-switcher span.tooltip { 1545 | padding-right: 0.25em; 1546 | display: inline-block; 1547 | background-color: #BECDC7; 1548 | width: 1.2em; 1549 | height: 1.2em; 1550 | border-radius: 50%; 1551 | } 1552 | 1553 | @media screen and (max-width: 23em) { 1554 | .carbon-switcher span.hide-on-mobile { 1555 | display: none; 1556 | } 1557 | } 1558 | 1559 | /* Alter selectr's default width of 100% as it isn't necessary and causes a 1560 | * conflict with the Tippy tooltip. */ 1561 | .carbon-switcher .selectr-container { 1562 | width: auto; 1563 | } 1564 | 1565 | 1566 | /* Footer 1567 | --------------------------------------------- */ 1568 | 1569 | .footer-logos { 1570 | text-align: center; 1571 | } 1572 | 1573 | 1574 | 1575 | /*-------------------------------------------------------------- 1576 | # Plugins 1577 | --------------------------------------------------------------*/ 1578 | 1579 | /* Jetpack infinite scroll 1580 | --------------------------------------------- */ 1581 | 1582 | /* Hide the Posts Navigation and the Footer when Infinite Scroll is in use. */ 1583 | .infinite-scroll .posts-navigation, 1584 | .infinite-scroll.neverending .site-footer { 1585 | display: none; 1586 | } 1587 | 1588 | /* Re-display the Theme Footer when Infinite Scroll has reached its end. */ 1589 | .infinity-end.neverending .site-footer { 1590 | display: block; 1591 | } 1592 | 1593 | 1594 | /* Tippy 1595 | --------------------------------------------- */ 1596 | .tippy-box { 1597 | background-color: white; 1598 | color: #1E1E1E; 1599 | font-family: Georgia, 'Times New Roman', Times, serif; 1600 | text-transform: none; 1601 | letter-spacing: 0; 1602 | text-align: left; 1603 | font-size: 1em; 1604 | padding: 1em 0.75em; 1605 | -webkit-box-shadow: 0px 0px 5px 1px rgba( 87, 87, 87, 0.75); 1606 | -moz-box-shadow: 0px 0px 5px 1px rgba( 87, 87, 87, 0.75); 1607 | box-shadow: 0px 0px 5px 1px rgba( 87, 87, 87, 0.75); 1608 | } 1609 | .tippy-box a { 1610 | color: var(--hl-colour); 1611 | } 1612 | 1613 | 1614 | /*-------------------------------------------------------------- 1615 | # Utilities 1616 | --------------------------------------------------------------*/ 1617 | 1618 | /* Accessibility 1619 | --------------------------------------------- */ 1620 | 1621 | /* Text meant only for screen readers. */ 1622 | .screen-reader-text { 1623 | border: 0; 1624 | clip: rect(1px, 1px, 1px, 1px); 1625 | clip-path: inset(50%); 1626 | height: 1px; 1627 | margin: -1px; 1628 | overflow: hidden; 1629 | padding: 0; 1630 | position: absolute !important; 1631 | width: 1px; 1632 | word-wrap: normal !important; 1633 | } 1634 | 1635 | .screen-reader-text:focus { 1636 | background-color: #f1f1f1; 1637 | border-radius: 3px; 1638 | box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6); 1639 | clip: auto !important; 1640 | clip-path: none; 1641 | color: #21759b; 1642 | display: block; 1643 | font-size: 0.875rem; 1644 | font-weight: 700; 1645 | height: auto; 1646 | left: 5px; 1647 | line-height: normal; 1648 | padding: 15px 23px 14px; 1649 | text-decoration: none; 1650 | top: 5px; 1651 | width: auto; 1652 | z-index: 100000; 1653 | } 1654 | 1655 | /* Do not show the outline on the skip link target. */ 1656 | #primary[tabindex="-1"]:focus { 1657 | outline: 0; 1658 | } 1659 | 1660 | /* Alignments 1661 | --------------------------------------------- */ 1662 | .alignleft { 1663 | 1664 | /*rtl:ignore*/ 1665 | float: left; 1666 | 1667 | /*rtl:ignore*/ 1668 | margin-right: 1.5em; 1669 | margin-bottom: 1.5em; 1670 | } 1671 | 1672 | .alignright { 1673 | 1674 | /*rtl:ignore*/ 1675 | float: right; 1676 | 1677 | /*rtl:ignore*/ 1678 | margin-left: 1.5em; 1679 | margin-bottom: 1.5em; 1680 | } 1681 | 1682 | .aligncenter { 1683 | clear: both; 1684 | display: block; 1685 | margin-left: auto; 1686 | margin-right: auto; 1687 | margin-bottom: 1.5em; 1688 | } 1689 | -------------------------------------------------------------------------------- /taxonomy-issue.php: -------------------------------------------------------------------------------- 1 | 25 | 26 |
27 | 28 |
> 29 | 30 |
31 |

32 | 35 |

36 |
37 | 38 |
39 | 40 | 43 | 44 |

45 | 48 |

49 | 50 | 53 | 54 |
55 | 59 | 60 |
61 | 62 | 65 | 66 | 71 |
72 | 73 | 76 |
77 | 78 | 83 |
84 | 85 |
86 |
87 | 88 | 9 |
10 | 11 | ? 12 | Grid 13 | intensity 14 | view: 15 | 16 | 17 | 18 | 19 |
20 | 21 | 11 | 12 |
13 | 16 | 17 |
18 | ' . wp_kses( 23 | /* translators: 1: link to WP admin new post page. */ 24 | __( 'Ready to publish your first post? Get started here.', 'branch' ), 25 | array( 26 | 'a' => array( 27 | 'href' => array(), 28 | ), 29 | ) 30 | ) . '

', 31 | esc_url( admin_url( 'post-new.php' ) ) 32 | ); 33 | 34 | elseif ( is_search() ) : 35 | ?> 36 | 37 |

38 | 43 | 44 |

45 | 50 |
51 |
52 | -------------------------------------------------------------------------------- /template-parts/content-page.php: -------------------------------------------------------------------------------- 1 | 11 | 12 |
> 13 |
14 | ', '' ); ?> 15 |
16 | 17 | 18 | 19 |
20 | '', 37 | ) 38 | ); 39 | ?> 40 |
41 | 42 | 43 |
44 | %s', 'branch' ), 50 | array( 51 | 'span' => array( 52 | 'class' => array(), 53 | ), 54 | ) 55 | ), 56 | wp_kses_post( get_the_title() ) 57 | ), 58 | '', 59 | '' 60 | ); 61 | ?> 62 |
63 | 64 |
65 | -------------------------------------------------------------------------------- /template-parts/content-post.php: -------------------------------------------------------------------------------- 1 | 11 | 12 |
> 13 |
14 | ', '' ); 17 | else : 18 | the_title( '

', '

' ); 19 | endif; 20 | 21 | if ( 'post' === get_post_type() ) : 22 | ?> 23 | 36 | 37 |
38 | 39 | 40 | 41 |
42 | "%s"', 'branch' ), 48 | array( 49 | 'span' => array( 50 | 'class' => array(), 51 | ), 52 | ) 53 | ), 54 | wp_kses_post( get_the_title() ) 55 | ) 56 | ); 57 | 58 | wp_link_pages( 59 | array( 60 | 'before' => '', 62 | ) 63 | ); 64 | ?> 65 |
66 | 67 |
68 | 69 |
70 |
71 | -------------------------------------------------------------------------------- /template-parts/content-search.php: -------------------------------------------------------------------------------- 1 | 11 | 12 | 36 | -------------------------------------------------------------------------------- /template-parts/content.php: -------------------------------------------------------------------------------- 1 | 11 | 12 |
> 13 |
14 | ', '' ); 17 | else : 18 | the_title( '

', '

' ); 19 | endif; 20 | 21 | if ( 'post' === get_post_type() ) : 22 | ?> 23 | 29 | 30 |
31 | 32 | 33 | 34 |
35 | "%s"', 'branch' ), 41 | array( 42 | 'span' => array( 43 | 'class' => array(), 44 | ), 45 | ) 46 | ), 47 | wp_kses_post( get_the_title() ) 48 | ) 49 | ); 50 | 51 | wp_link_pages( 52 | array( 53 | 'before' => '', 55 | ) 56 | ); 57 | ?> 58 |
59 | 60 |
61 | 62 |
63 |
64 | --------------------------------------------------------------------------------