This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| {# Arguments: | |
| - text: string segmented with `|` -- with optional incorporation of: | |
| - `^text^` to denote visual emphasis | |
| - `:delim` to denote a delimiting character that can be inclusively hidden via CSS | |
| - Markdown syntax for inline scopes | |
| - Inline emphasis must *not* span segment boundaries that are invoked by `|` | |
| - classArr: optional array of class names to be applied to each respective segment | |
| #} | |
| {% macro segText(text, classArr) %} | |
| {% set html = [] %} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <style> | |
| /* map context */ | |
| .hrmap { | |
| margin-block: 1.5rem; | |
| overflow-x: hidden; | |
| --hmarMobile: 6vw; | |
| --hmarWide : 11vw; | |
| } | |
| .hrmap, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| {% set fields = craft.app.fields.allFields() %} | |
| {# Dependencies: | |
| Use of `return`ing variables in macros, courtesy of Marion Newlevant's Twig Perversion: | |
| https://plugins.craftcms.com/twig-perversion | |
| #} | |
| <style> | |
| body {color: #333; font: 1rem/1.25 system-ui, sans-serif; margin: 2rem;} | |
| table {border-collapse: collapse;} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!-- Within the source code view of a WordPress post body --> | |
| <style> | |
| /* CSS for the `lrno` namespace to be provided and inserted here */ | |
| </style> | |
| <!-- Hidden after successful JavaScript outcome --> | |
| <div class="lrno-path">/path/to/assets/here</div> | |
| <!-- Hidden after successful JavaScript outcome --> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!-- Historically, Vimeo URLs of the following form would work as a straightforward `src` attribute value on an iframe --> | |
| <iframe src="https://player.vimeo.com/video/123456789" width="X" height="Y" allowfullscreen></iframe> | |
| <!-- At some point in September 2021 Vimeo changed this, so that URLs require an `h` parameter to work --> | |
| <iframe src="https://player.vimeo.com/video/123456789?h=8yt65b2a98" width="X" height="Y" allowfullscreen></iframe> | |
| <!-- | |
| In the above examples: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| {##### | |
| For a `body` field with type:fieldHandles structure: | |
| collStart: collId*, attr | |
| subheading: text*, customId, hWrap, incToC | |
| text: text* | |
| quote: text*, cite, citeUrl | |
| images images* (needs work) | |
| video: videoUrl*,ratio | |
| collEnd collId* | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| {# | |
| value : date and/or time value validated as not null (mandatory), | |
| format : php date format string (mandatory), | |
| options: { | |
| prefix: string to append to processed format, | |
| suffix: string to append to processed format, | |
| tag : html tagname string, | |
| html : markup, typically to be wrapped in a <time> element, | |
| attr : hash of name:value attribute pairs | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| for f in *; do mv "$f" "$f.tmp"; mv "$f.tmp" "`echo $f | tr "[:upper:]" "[:lower:]"`"; done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| UPDATE table_name | |
| SET field_to_update = CASE id | |
| WHEN n THEN 'Text value' | |
| END | |
| WHERE id IN (n) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| set myValues to {"filename.ext", "filename.ext"} | |
| tell application "Finder" to set fileList to files of target of front Finder window as alias list | |
| set matchedFiles to {} | |
| repeat with aFile in my fileList | |
| repeat with aValue in myValues | |
| tell application "System Events" to if aFile's name contains (contents of aValue) then set end of matchedFiles to (aFile as text) | |
| end repeat | |
| end repeat |
NewerOlder