Skip to content

Instantly share code, notes, and snippets.

View Lego2012's full-sized avatar

Leo Merkel Lego2012

View GitHub Profile
@Lego2012
Lego2012 / wp-query.php
Last active April 25, 2024 09:36
WP_Query #wordpress
<?php
//* Do NOT include the opening php tag shown above. Copy the code shown below.
/**
* WordPress Query Comprehensive Reference
* Compiled by luetkemj - luetkemj.com
*
* CODEX: http://codex.wordpress.org/Class_Reference/WP_Query#Parameters
* Source: https://core.trac.wordpress.org/browser/tags/3.9/src/wp-includes/query.php
*/
// Hier gibt es nur ein Sass- und Eleventy-Script für alles. Die Parameter werden erst im Start und Production Script gesetzt
// Clever!
"scripts": {
    "sass": "sass src/scss/global.scss:dist/css/global.css",
    "eleventy": "npx @11ty/eleventy",
    "start": "concurrently 'npm run eleventy -- --serve --quiet' 'npm run sass -- --watch'",
    "production": "NODE_ENV=production npm run eleventy && npm run sass -- --style=compressed --no-source-map"
}

Siehe auch Drafts

  • Kamera am Boden, langlaufen, vorbeilaufen etc.
  • GoPro 11, die mich filmt nicht im Cockpit, sondern leicht links aussen
  • Kurze Drohnenflüge
  • Historisches erzählen
  • Live-Ton während der Fahrt und danach im Schnitt Off-Kommentare
  • Mikro für den Motorsound hinten montieren (evtl. mit Klettband am Topcase)
  • Osmo Action nach hinten auf dem Topcase montieren, am Rahmen etc.
  • GoPro 12 als Helmkamera

The bricks theme comes without any usable image sizes for your design needs. Feel free to copy this cheat sheet to your Bricks child theme’s functions.php to get usable image sizes in 1:1, 16:9, 3:2, 4:3, 3:4, 2:3 and the original aspect ratio of the image.

Make sure to always choose the resolution that most closely matches the maximum size that the image will be displayed at. All other smaller resolutions with the same aspect ratio will be automatically set in the srcset for smaller devices / resolutions (but it will max out at the one you set).

If you already have images uploaded, you will have to re-generate them using https://de.wordpress.org/plugins/regenerate-thumbnails/ 3

/**
 * Custom Image Sizes
 */
/* Old way */
ul li a,
ol li a {
color: yellow;
}
/* Modern way */
:is(ul, ol) a {
color: black;
}

The Setup

Before you can sync, you need to add a remote that points to the upstream repository. You may have done this when you originally forked.

Tip: Syncing your fork only updates your local copy of the repository; it does not update your repository on GitHub.

$ git remote -v
## List the current remotes
origin  https://github.com/user/repo.git (fetch)
origin https://github.com/user/repo.git (push)
/* The user setting decides about the mode */
html {
   color-scheme: light dark;
}

body {
   font-family: system-ui;
   font-size: 1.125rem;
 line-height: 1.6;
---
---

<footer>
    <small>
        Copyright &copy; <span id="copyright"></span>
        All rights reserved
    </small>

Method to quickly define variables:

---
const foregroundColor = "hsl(20, 50%, 50%)";
const backgroundColor = "hsl(200, 50%, 50%)";
---

<style define:vars={{ foregroundColor, backgroundColor }}>
 p {

If visible, show:

---
const isVisible = false;
---

{
    isVisible &&
 {obj.favorites[1].toUpperCase()}