content(fix): replace the word 'compile' with 'bundle' and add new examples to features page (#11)

The word "compile" is not really what this thing is doing, so I replaced every "compile" reference to "bundle" instead.

I also added an anchor tag example to the "navigate any element" snippet on the /features page. And I also copied the asset injection example from the /index page into the /features page.

Reviewed-on: https://codeberg.org/vegvisir/website/pulls/11
This commit is contained in:
Victor Westerlund 2025-06-06 09:26:51 +02:00
parent 23480e5b44
commit cc3803d414
10 changed files with 27 additions and 8 deletions

View file

@ -2,7 +2,7 @@
<main>
<section>
<h1>VV::include()</h1>
<p>Inject the compiled output of another Vegvisir page (or other PHP script).</p>
<p>Inject the bundled output of another Vegvisir page (or other PHP script).</p>
</section>
<section>
<?= VV::include("snippets/HTMLCodeDemoElement/HTMLCodeDemoElement?id=docs/v3.1.4/PHP/VV/include/description") ?>

View file

@ -19,7 +19,7 @@
</section>
<section>
<h3><code class="mtk6">string</code></h3>
<p>Returns a script tag with the compiled and minified JavaScript required to run the Vegvisir front-end.</p>
<p>Returns a script tag with the bundled and minified JavaScript required to run the Vegvisir front-end.</p>
</section>
<hr>
<section>

View file

@ -2,7 +2,7 @@
<main>
<section>
<h1>VV::include()</h1>
<p>Inject the compiled output of another Vegvisir page (or other PHP script).</p>
<p>Inject the bundled output of another Vegvisir page (or other PHP script).</p>
</section>
<section>
<?= VV::include("snippets/HTMLCodeDemoElement/HTMLCodeDemoElement?id=docs/v3.1.5/PHP/VV/include/description") ?>

View file

@ -19,7 +19,7 @@
</section>
<section>
<h3><code class="mtk6">string</code></h3>
<p>Returns a script tag with the compiled and minified JavaScript required to run the Vegvisir front-end.</p>
<p>Returns a script tag with the bundled and minified JavaScript required to run the Vegvisir front-end.</p>
</section>
<hr>
<section>

View file

@ -52,4 +52,23 @@
<div>
<?= VV::include("snippets/HTMLCodeDemoElement/HTMLCodeDemoElement?id=features/vv-include") ?>
</div>
</section>
<section id="assets" class="split reverse">
<div class="text">
<h1>Asset injection</h1>
<p>Bundle page-specific CSS and JavaScript with your templating markdown. Vegvisir will import and minify CSS and JavaScript on the fly. The bundled result is returned in a single response.</p>
<div class="buttons">
<a href="/docs"><button class="inline solid">
<p>More info</p>
<?= VV::embed("public/assets/media/icons/chevron.svg") ?>
</button></a>
<a href="/docs/Reference/PHP/VV/css"><button class="inline">
<p>Example reference</p>
<?= VV::embed("public/assets/media/icons/chevron.svg") ?>
</button></a>
</div>
</div>
<div>
<?= VV::include("snippets/HTMLCodeDemoElement/HTMLCodeDemoElement?id=index_assets") ?>
</div>
</section>

View file

@ -34,7 +34,7 @@
<section id="assets" class="split reverse">
<div class="text">
<h1>Asset injection</h1>
<p>Bundle page-specific CSS and JavaScript with your templating markdown. Vegvisir will import and minify CSS and JavaScript on the fly. The compiled result is returned in a single response.</p>
<p>Bundle page-specific CSS and JavaScript with your templating markdown. Vegvisir will import and minify CSS and JavaScript on the fly. The bundled result is returned in a single response.</p>
<div class="buttons">
<a href="/docs"><button class="inline solid">
<p>More info</p>

View file

@ -1 +1 @@
<div><div style="top:0px;height:19px;" class="view-line"><span><span></span></span></div><div style="top:19px;height:19px;" class="view-line"><span><span class="mtk14">&lt;</span><span class="mtk6">vv-shell</span><span class="mtk14">&gt;</span></span></div><div style="top:38px;height:19px;" class="view-line"><span><span class="mtk1">&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="mtk5">&lt;!--&nbsp;The&nbsp;compiled&nbsp;HTML&nbsp;of&nbsp;'some-page'&nbsp;will&nbsp;be&nbsp;serv</span><span class="mtk5">er-side&nbsp;rendered&nbsp;inside&nbsp;the&nbsp;&lt;main&gt;&nbsp;element&nbsp;--&gt;</span></span></div><div style="top:57px;height:19px;" class="view-line"><span><span class="mtk1">&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="mtk14">&lt;</span><span class="mtk6">main</span><span class="mtk14">&gt;</span><span class="mtk6">&lt;?=</span><span class="mtk3">&nbsp;</span><span class="mtk17">VV</span><span class="mtk3">::</span><span class="mtk16">include</span><span class="mtk3">(</span><span class="mtk12">"public/some-page"</span><span class="mtk3">)&nbsp;</span><span class="mtk6">?</span><span class="mtk6">&gt;</span><span class="mtk14">&lt;/</span><span class="mtk6">main</span><span class="mtk14">&gt;</span></span></div><div style="top:76px;height:19px;" class="view-line"><span><span class="mtk14">&lt;/</span><span class="mtk6">vv-shell</span><span class="mtk14">&gt;</span></span></div></div>
<div><div style="top:0px;height:19px;" class="view-line"><span><span></span></span></div><div style="top:19px;height:19px;" class="view-line"><span><span class="mtk14">&lt;</span><span class="mtk6">vv-shell</span><span class="mtk14">&gt;</span></span></div><div style="top:38px;height:19px;" class="view-line"><span><span class="mtk1">&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="mtk5">&lt;!--&nbsp;The&nbsp;bundled&nbsp;HTML&nbsp;of&nbsp;'some-page'&nbsp;will&nbsp;be&nbsp;serv</span><span class="mtk5">er-side&nbsp;rendered&nbsp;inside&nbsp;the&nbsp;&lt;main&gt;&nbsp;element&nbsp;--&gt;</span></span></div><div style="top:57px;height:19px;" class="view-line"><span><span class="mtk1">&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="mtk14">&lt;</span><span class="mtk6">main</span><span class="mtk14">&gt;</span><span class="mtk6">&lt;?=</span><span class="mtk3">&nbsp;</span><span class="mtk17">VV</span><span class="mtk3">::</span><span class="mtk16">include</span><span class="mtk3">(</span><span class="mtk12">"public/some-page"</span><span class="mtk3">)&nbsp;</span><span class="mtk6">?</span><span class="mtk6">&gt;</span><span class="mtk14">&lt;/</span><span class="mtk6">main</span><span class="mtk14">&gt;</span></span></div><div style="top:76px;height:19px;" class="view-line"><span><span class="mtk14">&lt;/</span><span class="mtk6">vv-shell</span><span class="mtk14">&gt;</span></span></div></div>

View file

@ -1 +1 @@
<div><div style="top:0px;height:19px;" class="view-line"><span><span class="mtk14">&lt;</span><span class="mtk6">vv-shell</span><span class="mtk14">&gt;</span></span></div><div style="top:19px;height:19px;" class="view-line"><span><span class="mtk1">&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="mtk14">&lt;</span><span class="mtk6">main</span><span class="mtk14">&gt;</span><span class="mtk5">&lt;!--&nbsp;This&nbsp;comment&nbsp;will&nbsp;be&nbsp;replaced&nbsp;with&nbsp;the&nbsp;conten</span><span class="mtk5">ts&nbsp;of&nbsp;/some-page&nbsp;--&gt;</span><span class="mtk14">&lt;/</span><span class="mtk6">main</span><span class="mtk14">&gt;</span></span></div><div style="top:38px;height:19px;" class="view-line"><span><span></span></span></div><div style="top:57px;height:19px;" class="view-line"><span><span class="mtk1">&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="mtk5">&lt;!--&nbsp;</span></span></div><div style="top:76px;height:19px;" class="view-line"><span><span class="mtk5">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The&nbsp;'vv'&nbsp;attibute&nbsp;specifies&nbsp;a&nbsp;page&nbsp;and&nbsp;'vv-targe</span><span class="mtk5">t'&nbsp;a&nbsp;CSS&nbsp;selector.</span></span></div><div style="top:95px;height:19px;" class="view-line"><span><span class="mtk5">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;If&nbsp;'vv-target'&nbsp;is&nbsp;omitted,&nbsp;the&nbsp;innerHTML&nbsp;of&nbsp;the&nbsp;</span><span class="mtk5">element&nbsp;with&nbsp;'vv'&nbsp;will&nbsp;be&nbsp;navigated.&nbsp;(the&nbsp;button&nbsp;i</span><span class="mtk5">tself)</span></span></div><div style="top:114px;height:19px;" class="view-line"><span><span class="mtk5">&nbsp;&nbsp;&nbsp;&nbsp;--&gt;</span></span></div><div style="top:133px;height:19px;" class="view-line"><span><span class="mtk1">&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="mtk14">&lt;</span><span class="mtk6">button</span><span class="mtk1">&nbsp;</span><span class="mtk10">vv</span><span class="mtk1">=</span><span class="mtk12">"/some-page"</span><span class="mtk1">&nbsp;</span><span class="mtk10">vv-target</span><span class="mtk1">=</span><span class="mtk12">"main"</span><span class="mtk14">&gt;</span><span class="mtk1">Load&nbsp;the&nbsp;contents&nbsp;of&nbsp;/some-page&nbsp;into&nbsp;the&nbsp;</span><span class="mtk14">&lt;</span><span class="mtk6">main</span><span class="mtk14">&gt;</span><span class="mtk1">&nbsp;tag</span><span class="mtk14">&lt;/</span><span class="mtk6">button</span><span class="mtk14">&gt;</span></span></div><div style="top:152px;height:19px;" class="view-line"><span><span class="mtk14">&lt;/</span><span class="mtk6">vv-shell</span><span class="mtk14">&gt;</span></span></div></div>
<div><div style="top:0px;height:19px;" class="view-line"><span><span class="mtk14">&lt;</span><span class="mtk6">vv-shell</span><span class="mtk14">&gt;</span></span></div><div style="top:19px;height:19px;" class="view-line"><span><span class="mtk1">&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="mtk14">&lt;</span><span class="mtk6">main</span><span class="mtk14">&gt;</span><span class="mtk5">&lt;!--&nbsp;This&nbsp;comment&nbsp;will&nbsp;be&nbsp;replaced&nbsp;with&nbsp;the&nbsp;conten</span><span class="mtk5">ts&nbsp;of&nbsp;/some-page&nbsp;--&gt;</span><span class="mtk14">&lt;/</span><span class="mtk6">main</span><span class="mtk14">&gt;</span></span></div><div style="top:38px;height:19px;" class="view-line"><span><span class="mtk1">&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="mtk5">&lt;!--&nbsp;</span></span></div><div style="top:57px;height:19px;" class="view-line"><span><span class="mtk5">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The&nbsp;'vv'&nbsp;attibute&nbsp;specifies&nbsp;a&nbsp;page&nbsp;and&nbsp;'vv</span><span class="mtk5">-target'&nbsp;a&nbsp;CSS&nbsp;selector.</span></span></div><div style="top:76px;height:19px;" class="view-line"><span><span class="mtk5">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;If&nbsp;'vv-target'&nbsp;is&nbsp;omitted,&nbsp;the&nbsp;innerHTML&nbsp;o</span><span class="mtk5">f&nbsp;the&nbsp;element&nbsp;with&nbsp;'vv'&nbsp;will&nbsp;be&nbsp;navigated.&nbsp;(the&nbsp;bu</span><span class="mtk5">tton&nbsp;itself)</span></span></div><div style="top:95px;height:19px;" class="view-line"><span><span class="mtk5">&nbsp;&nbsp;&nbsp;&nbsp;--&gt;</span></span></div><div style="top:114px;height:19px;" class="view-line"><span><span class="mtk1">&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="mtk14">&lt;</span><span class="mtk6">button</span><span class="mtk1">&nbsp;</span><span class="mtk10">vv</span><span class="mtk1">=</span><span class="mtk12">"/some-page"</span><span class="mtk1">&nbsp;</span><span class="mtk10">vv-target</span><span class="mtk1">=</span><span class="mtk12">"main"</span><span class="mtk14">&gt;</span><span class="mtk1">Load&nbsp;the&nbsp;contents&nbsp;of&nbsp;/some-page&nbsp;into&nbsp;the&nbsp;</span><span class="mtk14">&lt;</span><span class="mtk6">main</span><span class="mtk14">&gt;</span><span class="mtk1">&nbsp;tag</span><span class="mtk14">&lt;/</span><span class="mtk6">button</span><span class="mtk14">&gt;</span></span></div><div style="top:133px;height:19px;" class="view-line"><span><span></span></span></div><div style="top:152px;height:19px;" class="view-line"><span><span class="mtk1">&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="mtk5">&lt;!--&nbsp;</span></span></div><div style="top:171px;height:19px;" class="view-line"><span><span class="mtk5">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The&nbsp;target&nbsp;attribute&nbsp;of&nbsp;an&nbsp;anchor&nbsp;tag&nbsp;will</span><span class="mtk5">&nbsp;match&nbsp;a&nbsp;CSS&nbsp;selector&nbsp;</span></span></div><div style="top:190px;height:19px;" class="view-line"><span><span class="mtk5">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;it&nbsp;doesn't&nbsp;match&nbsp;an&nbsp;iframe&nbsp;or&nbsp;a&nbsp;browsin</span><span class="mtk5">g&nbsp;context&nbsp;keyword.</span></span></div><div style="top:209px;height:19px;" class="view-line"><span><span class="mtk5">&nbsp;&nbsp;&nbsp;&nbsp;--&gt;</span></span></div><div style="top:228px;height:19px;" class="view-line"><span><span class="mtk1">&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="mtk14">&lt;</span><span class="mtk6">a</span><span class="mtk1">&nbsp;</span><span class="mtk10">href</span><span class="mtk1">=</span><span class="mtk12">"/some-page"</span><span class="mtk1">&nbsp;</span><span class="mtk10">target</span><span class="mtk1">=</span><span class="mtk12">"main"</span><span class="mtk14">&gt;</span><span class="mtk1">Load&nbsp;the&nbsp;contents&nbsp;of&nbsp;/some-page&nbsp;into&nbsp;the&nbsp;</span><span class="mtk14">&lt;</span><span class="mtk6">main</span><span class="mtk14">&gt;</span><span class="mtk1">&nbsp;tag</span><span class="mtk14">&lt;/</span><span class="mtk6">a</span><span class="mtk14">&gt;</span></span></div><div style="top:247px;height:19px;" class="view-line"><span><span class="mtk14">&lt;/</span><span class="mtk6">vv-shell</span><span class="mtk14">&gt;</span></span></div></div>

View file

@ -1 +1 @@
<div><div style="top:0px;height:19px;" class="view-line"><span><span class="mtk14">&lt;</span><span class="mtk6">style</span><span class="mtk14">&gt;</span><span class="mtk6">&lt;?=</span><span class="mtk3">&nbsp;</span><span class="mtk17">VV</span><span class="mtk3">::</span><span class="mtk16">css</span><span class="mtk3">(</span><span class="mtk12">"demo.css"</span><span class="mtk3">)&nbsp;</span><span class="mtk6">?</span><span class="mtk6">&gt;</span><span class="mtk14">&lt;/</span><span class="mtk6">style</span><span class="mtk14">&gt;</span></span></div><div style="top:19px;height:19px;" class="view-line"><span><span class="mtk14">&lt;</span><span class="mtk6">section</span><span class="mtk14">&gt;</span></span></div><div style="top:38px;height:19px;" class="view-line"><span><span class="mtk1">&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="mtk14">&lt;</span><span class="mtk6">h1</span><span class="mtk14">&gt;</span><span class="mtk1">Hello&nbsp;world</span><span class="mtk14">&lt;/</span><span class="mtk6">h1</span><span class="mtk14">&gt;</span></span></div><div style="top:57px;height:19px;" class="view-line"><span><span class="mtk14">&lt;/</span><span class="mtk6">section</span><span class="mtk14">&gt;</span></span></div><div style="top:76px;height:19px;" class="view-line"><span><span class="mtk14">&lt;</span><span class="mtk6">script</span><span class="mtk14">&gt;</span><span class="mtk6">&lt;?=</span><span class="mtk3">&nbsp;</span><span class="mtk17">VV</span><span class="mtk3">::</span><span class="mtk16">css</span><span class="mtk3">(</span><span class="mtk12">"demo.js"</span><span class="mtk3">)&nbsp;</span><span class="mtk6">?</span><span class="mtk6">&gt;</span><span class="mtk14">&lt;/</span><span class="mtk6">script</span><span class="mtk14">&gt;</span></span></div></div>
<div><div style="top:0px;height:19px;" class="view-line"><span><span class="mtk14">&lt;</span><span class="mtk6">style</span><span class="mtk14">&gt;</span><span class="mtk6">&lt;?=</span><span class="mtk3">&nbsp;</span><span class="mtk17">VV</span><span class="mtk3">::</span><span class="mtk16">css</span><span class="mtk3">(</span><span class="mtk12">"demo.css"</span><span class="mtk3">)&nbsp;</span><span class="mtk6">?</span><span class="mtk6">&gt;</span><span class="mtk14">&lt;/</span><span class="mtk6">style</span><span class="mtk14">&gt;</span></span></div><div style="top:19px;height:19px;" class="view-line"><span><span class="mtk14">&lt;</span><span class="mtk6">section</span><span class="mtk14">&gt;</span></span></div><div style="top:38px;height:19px;" class="view-line"><span><span class="mtk1">&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="mtk14">&lt;</span><span class="mtk6">h1</span><span class="mtk14">&gt;</span><span class="mtk1">Hello&nbsp;world</span><span class="mtk14">&lt;/</span><span class="mtk6">h1</span><span class="mtk14">&gt;</span></span></div><div style="top:57px;height:19px;" class="view-line"><span><span class="mtk14">&lt;/</span><span class="mtk6">section</span><span class="mtk14">&gt;</span></span></div><div style="top:76px;height:19px;" class="view-line"><span><span class="mtk14">&lt;</span><span class="mtk6">script</span><span class="mtk14">&gt;</span><span class="mtk6">&lt;?=</span><span class="mtk3">&nbsp;</span><span class="mtk17">VV</span><span class="mtk3">::</span><span class="mtk16">js</span><span class="mtk3">(</span><span class="mtk12">"demo.js"</span><span class="mtk3">)&nbsp;</span><span class="mtk6">?</span><span class="mtk6">&gt;</span><span class="mtk14">&lt;/</span><span class="mtk6">script</span><span class="mtk14">&gt;</span></span></div></div>