Skip to content

Commit

Permalink
Merge branch 'tiddlywiki-com'
Browse files Browse the repository at this point in the history
  • Loading branch information
Jermolene committed Dec 9, 2024
2 parents 908be0e + 9786855 commit 3fc9523
Show file tree
Hide file tree
Showing 4 changed files with 60 additions and 4 deletions.
48 changes: 48 additions & 0 deletions editions/tw5.com/tiddlers/TestCases_WikifyWidget_RenderSVGURI.tid
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
created: 20241206225533517
description: Rendering parameterised SVG for use in stylesheets
tags: $:/tags/wiki-test-spec
title: TestCases/WikifyWidget/RenderSVGURI
type: text/vnd.tiddlywiki-multiple

title: Narrative

The core svg icons use a parameter widget, making their use in stylesheets impossible without wikify.
+
title: Output

* https://tiddlywiki.com/
* [[TW5|http://tiddlywiki.com/]]
* [[Mail me|mailto:[email protected]]]
* [[Open file|file:///c:/users/me/index.html]]

<style>{{Stylesheet}}</style>
+
title: Stylesheet

\rules except dash
\procedure link-icon(protocol,img)
<$tiddler tiddler=<<img>> >
<$wikify name="svg" text={{!!text}} mode="inline" output="html">
<$text text=`
[href*="$(protocol)$"]{
--mask:url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg">$(svg)$</svg>');
}
`/>
</$wikify>
</$tiddler>
\end

.tc-tiddlylink-external:after{
width:.7rem;
aspect-ratio:1;
background:currentColor;
display: inline-block;
mask: center / contain no-repeat var(--mask);
margin-inline:.5ch;
content:"";
}

<<link-icon "http:" "$:/core/images/open-window">>
<<link-icon "https:" "$:/core/images/locked-padlock">>
<<link-icon "mailto:" "$:/core/images/mail">>
<<link-icon "file:" "$:/core/images/file">>
4 changes: 4 additions & 0 deletions editions/tw5.com/tiddlers/system/netlify-build-badge-icon.tid
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
title: $:/_tw5.com/netlify-build-badge/netlify-light.svg
type: image/svg+xml

<svg width="114" height="50" viewBox="0 0 114 50" fill="none" xmlns="http://www.w3.org/2000/svg"><g clip-path="url(#a)"><rect width="114" height="50" rx="4" fill="#181A1C"/><path fill="#fff" d="M0 0h114v51H0z"/><g clip-path="url(#b)" fill="#181A1C"><path d="M44.445 40.3v-7.694l.153-.16h1.853l.154.16V40.3l-.154.16h-1.853l-.153-.16ZM44.445 17.854V10.16l.153-.16h1.853l.154.16v7.694l-.154.16h-1.853l-.153-.16ZM38.068 34.89h-.254l-1.275-1.322v-.264l2.388-2.482 1.349.002.18.184v1.4l-2.388 2.483ZM36.54 17.226v-.266l1.274-1.321h.254l2.388 2.48v1.397l-.18.19h-1.349l-2.388-2.48ZM28.154 24.106h10.5l.153.16v1.926l-.153.16h-10.5l-.154-.16v-1.926l.154-.16ZM99.844 24.109l.154.16v1.923l-.154.16H89.19l-.153-.16.77-1.924.154-.16h9.883ZM49 29.24h-1.853l-.153-.16v-4.503c0-.802-.303-1.423-1.234-1.443-.48-.012-1.027 0-1.613.025l-.089.093v5.825l-.153.16h-1.853l-.154-.16v-7.694l.154-.16h4.169c1.62 0 2.933 1.363 2.933 3.045v4.81l-.154.159v.002ZM57.974 25.87l-.154.16h-4.79l-.154.16c0 .32.31 1.283 1.546 1.283.463 0 .926-.16 1.082-.481l.154-.16h1.852l.154.16c-.154.962-.926 2.407-3.245 2.407-2.625 0-3.861-1.924-3.861-4.172 0-2.247 1.236-4.17 3.708-4.17 2.472 0 3.708 1.923 3.708 4.17v.643Zm-2.319-1.604c0-.16-.153-1.284-1.39-1.284-1.235 0-1.389 1.124-1.389 1.284l.154.16h2.472l.153-.16ZM62.298 26.832c0 .322.154.481.464.481h1.39l.153.16v1.604l-.154.16h-1.39c-1.389 0-2.625-.643-2.625-2.407V23.3l-.154-.16H58.9l-.154-.159v-1.604l.154-.16h1.082l.154-.16v-1.442l.154-.16h1.852l.154.16v1.443l.154.16h1.699l.153.159v1.604l-.153.16h-1.7l-.153.16v3.528l.002.002ZM68.015 29.24h-1.853l-.153-.16V18.17l.153-.159h1.853l.154.16v10.906l-.154.16v.002ZM72.186 19.935h-1.852l-.154-.16v-1.604l.154-.16h1.852l.154.16v1.604l-.154.16Zm0 9.304h-1.852l-.154-.16V21.38l.154-.16h1.852l.154.16v7.7l-.154.16ZM79.449 18.17v1.605l-.154.16h-1.39c-.309 0-.463.16-.463.48v.644l.154.16h1.546l.153.159v1.604l-.153.16h-1.546l-.154.16v5.773l-.153.16h-1.853l-.154-.16V23.3l-.153-.16h-1.083l-.153-.159v-1.604l.153-.16h1.083l.153-.16v-.642c0-1.764 1.236-2.407 2.626-2.407h1.39l.153.16-.002.002ZM85.163 29.399c-.619 1.604-1.236 2.566-3.398 2.566h-.773l-.154-.16v-1.604l.154-.16h.773c.773 0 .926-.159 1.082-.64v-.16l-2.472-6.256V21.38l.154-.16h1.39l.153.16 1.853 5.455h.153l1.853-5.455.154-.16h1.39l.153.16v1.605L85.156 29.4l.007-.002Z"/></g><path fill="#181A1C" d="M0 0h15v50H0z"/><path d="M5.518 45.367v-.774H10v.774H5.518Zm0-1.746c0-.44.098-.784.294-1.032.196-.248.474-.372.834-.372.348 0 .622.13.822.39.2.26.3.628.3 1.104l-.336.018c.004-.608.114-1.062.33-1.362.212-.3.524-.45.936-.45.424 0 .748.146.972.438.22.288.33.686.33 1.194v1.242h-.738v-1.152c0-.268-.05-.488-.15-.66a.498.498 0 0 0-.462-.258c-.224 0-.39.088-.498.264-.108.172-.162.39-.162.654v1.146h-.738V43.68c0-.192-.04-.36-.12-.504a.426.426 0 0 0-.396-.216c-.192 0-.33.068-.414.204a.955.955 0 0 0-.126.51v1.116h-.678v-1.17Zm0-2.925v-.774H8.17c.256 0 .472-.04.648-.12a.88.88 0 0 0 .39-.336.926.926 0 0 0 .126-.486.926.926 0 0 0-.126-.486.845.845 0 0 0-.39-.33 1.497 1.497 0 0 0-.648-.126H5.518v-.75h2.664c.604 0 1.068.146 1.392.438.324.288.486.71.486 1.266 0 .56-.162.984-.486 1.272-.324.288-.788.432-1.392.432H5.518Zm0-5.048v-.774H10v.774H5.518Zm0-2.475V32.4H10v.774H5.518Zm3.75-.546v-2.412H10v2.412h-.732Zm-3.69-3.903v-.773H10v.773H5.578Zm-.06 1.41v-3.6h.732v3.6h-.732Zm0-6.98v-.827l3.684-1.056v.318L5.518 20.43v-.888l3.684-1.122v.318L5.518 17.64v-.798L10 18.18v.81l-4.086 1.254v-.438L10 21.097v.756l-4.482 1.302Zm0-7.385v-.774H10v.774H5.518Zm.06-3.283v-.774H10v.774H5.578Zm-.06 1.41v-3.6h.732v3.6h-.732Zm0-4.7v-.773H10v.774H5.518Zm1.572-.545V6.179h.732V8.65H7.09ZM5.518 6.407v-.774H10v.774H5.518Z" fill="#fff"/></g><rect x="1" y="1" width="112" height="48" rx="3" stroke="#181A1C" stroke-width="2"/><defs><clipPath id="a"><rect width="114" height="50" rx="4" fill="#fff"/></clipPath><clipPath id="b"><path fill="#fff" d="M28 10h72v30.46H28z"/></clipPath></defs></svg>
2 changes: 1 addition & 1 deletion editions/tw5.com/tiddlers/system/netlify-build-badge.tid
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ list-after: $:/core/ui/SideBarSegments/site-subtitle
<p>
<div class="tc-scary-warning" style="display: flex;gap: 0.5em;padding: 1em;margin-right: 1em;align-items: center;">
<div style="">
<a href="https://www.netlify.com" rel="noopener noreferrer" target="_blank"><img src="https://www.netlify.com/v3/img/components/netlify-light.svg" alt="Deploys by Netlify" /></a>
<a href="https://www.netlify.com" rel="noopener noreferrer" target="_blank"><$image source="$:/_tw5.com/netlify-build-badge/netlify-light.svg" alt="Deploys by Netlify" /></a>
</div>
<div style="">
This is a preview build of the pull request <a href={{{ [{$:/build}split[|]nth[5]addprefix[https://github.com/TiddlyWiki/TiddlyWiki5/pull/]] }}} rel="noopener noreferrer" target="_blank">#<$text text={{{ [{$:/build}split[|]nth[5]] }}}/></a>
Expand Down
10 changes: 7 additions & 3 deletions editions/tw5.com/tiddlers/widgets/WikifyWidget.tid
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
caption: wikify
created: 20160321144949700
modified: 20241202014354100
modified: 20241206233352509
tags: Widgets
title: WikifyWidget
type: text/vnd.tiddlywiki

! Introduction

The <<.wid wikify>> widget parses and renders a string of text and assigns the result to a specified [[variable|Variables]]. The new value of the variable is available to the content within the wikify widget.
The <<.wid wikify>> widget parses and renders a string of text and assigns the result to a specified [[variable|Variables]]. The new value of the variable is available to the content within the <<.wid wikify>> widget.

! Content and Attributes

The content of the `<$wikify>` widget is the scope for the value assigned to the variable.
The content of the <<.wid wikify>> widget is the scope for the value assigned to the variable.

|!Attribute |!Description |
|name |The name of the variable to assign |
Expand Down Expand Up @@ -44,3 +44,7 @@ The available output types are:
!! Exporting rendered html

<<testcase "TestCases/WikifyWidget/RenderHTML">>

!! Rendering parameterised SVG for use in stylesheets

<<testcase "TestCases/WikifyWidget/RenderSVGURI">>

0 comments on commit 3fc9523

Please sign in to comment.