diff --git a/elements/HTMLCodeDemoElement.php b/elements/HTMLCodeDemoElement.php index b85a61b..e4eca8e 100644 --- a/elements/HTMLCodeDemoElement.php +++ b/elements/HTMLCodeDemoElement.php @@ -43,23 +43,34 @@ ?> -
- files as $file): ?> - + + +
+
+ + files as $file): ?> +
+ file_path($file)) ?> +
+ + +
+ +
+ - +
+

404

+ - -
- - files as $file): ?> -
- file_path($file)) ?> -
- - -
\ No newline at end of file diff --git a/public/about.php b/public/about.php new file mode 100644 index 0000000..e69de29 diff --git a/public/assets/css/elements/HTMLCodeDemoElement.css b/public/assets/css/elements/HTMLCodeDemoElement.css index 4388e58..8260aaa 100644 --- a/public/assets/css/elements/HTMLCodeDemoElement.css +++ b/public/assets/css/elements/HTMLCodeDemoElement.css @@ -3,8 +3,10 @@ code-demo { --color-base: rgb(var(--primer-color-base)); --height: calc(var(--padding) * 2.5); + display: block; min-width: 700px; border-radius: 12px; + font-family: monospace; background-color: var(--color-base); } @@ -37,6 +39,11 @@ code-demo .header button.inline + button.inline { /* ## Active */ +code-demo .header button { + --primer-color-accent: 255, 255, 255; + --color-accent: rgb(var(--primer-color-accent)); +} + code-demo .header button.active { border-top: solid 4px var(--color-accent); pointer-events: none; @@ -78,32 +85,4 @@ code-demo .body [data-file] { code-demo .body [data-file].active { display: initial; -} - -/* # Syntax highliting */ - -code-demo .mtk1 { color: #cccccc; } -code-demo .mtk2 { color: #1f1f1f; } -code-demo .mtk3 { color: #d4d4d4; } -code-demo .mtk4 { color: #000080; } -code-demo .mtk5 { color: #6a9955; } -code-demo .mtk6 { color: #569cd6; } -code-demo .mtk7 { color: #b5cea8; } -code-demo .mtk8 { color: #646695; } -code-demo .mtk9 { color: #d7ba7d; } -code-demo .mtk10 { color: #9cdcfe; } -code-demo .mtk11 { color: #f44747; } -code-demo .mtk12 { color: #ce9178; } -code-demo .mtk13 { color: #6796e6; } -code-demo .mtk14 { color: #808080; } -code-demo .mtk15 { color: #d16969; } -code-demo .mtk16 { color: #dcdcaa; } -code-demo .mtk17 { color: #4ec9b0; } -code-demo .mtk18 { color: #c586c0; } -code-demo .mtk19 { color: #4fc1ff; } -code-demo .mtk20 { color: #c8c8c8; } -code-demo .mtk21 { color: #cd9731; } -code-demo .mtk22 { color: #b267e6; } -code-demo .mtki { font-style: italic; } -code-demo .mtkb { font-weight: bold; } -code-demo .mtks { text-decoration: line-through; } \ No newline at end of file +} \ No newline at end of file diff --git a/public/assets/css/shell.css b/public/assets/css/shell.css index 646c426..18dc577 100644 --- a/public/assets/css/shell.css +++ b/public/assets/css/shell.css @@ -12,7 +12,7 @@ margin: 0; fill: inherit; box-sizing: border-box; - font-family: "Roboto Mono", sans-serif; + font-family: inherit; color: inherit; font-size: inherit; } @@ -31,6 +31,7 @@ body { overflow-x: hidden; min-height: 100svh; font-size: 15px; + font-family: "Roboto Mono", sans-serif; } body::before { diff --git a/public/assets/css/snippets/docs/aside.css b/public/assets/css/snippets/docs/aside.css new file mode 100644 index 0000000..74c6196 --- /dev/null +++ b/public/assets/css/snippets/docs/aside.css @@ -0,0 +1,40 @@ +aside { + grid-area: aside; + padding: var(--padding); +} + +aside nav { + display: flex; + flex-direction: column; + gap: calc(var(--padding) / 2); +} + +aside .spacer { + width: 100%; + height: 1px; + background-color: rgba(var(--primer-color-accent), .1); + margin: var(--padding) 0; +} + +/* # Nav states */ + +vv-shell[vv-page="/docs"] aside a[href="/docs"] button, +vv-shell[vv-page="/docs/PHP"] aside a[href="/docs/PHP"] button, +vv-shell[vv-page="/docs/PHP/VV"] aside a[href="/docs/PHP/VV"] button, +vv-shell[vv-page="/docs/PHP/VV/css"] aside a[href="/docs/PHP/VV/css"] button, +vv-shell[vv-page="/docs/get-started"] aside a[href="/docs/get-started"] button, +vv-shell[vv-page="/docs/PHP/VV/embed"] aside a[href="/docs/PHP/VV/embed"] button { + font-weight: 900; + background: none; + pointer-events: none; + color: var(--color-accent); +} + +vv-shell[vv-page="/docs"] aside a[href="/docs"] button svg, +vv-shell[vv-page="/docs/PHP"] aside a[href="/docs/PHP"] button svg, +vv-shell[vv-page="/docs/PHP/VV"] aside a[href="/docs/PHP/VV"] button svg, +vv-shell[vv-page="/docs/PHP/VV/css"] aside a[href="/docs/PHP/VV/css"] button svg, +vv-shell[vv-page="/docs/get-started"] aside a[href="/docs/get-started"] button svg, +vv-shell[vv-page="/docs/PHP/VV/embed"] aside a[href="/docs/PHP/VV/embed"] button svg { + display: none; +} \ No newline at end of file diff --git a/public/assets/css/snippets/docs/header.css b/public/assets/css/snippets/docs/header.css index 25eea4b..bcafeb0 100644 --- a/public/assets/css/snippets/docs/header.css +++ b/public/assets/css/snippets/docs/header.css @@ -12,14 +12,17 @@ header { section.header { top: 0; width: 100%; + z-index: 100; display: flex; color: white; position: sticky; overflow: hidden; + grid-area: header; align-items: stretch; height: calc(var(--running-size) - var(--padding)); grid-template-rows: var(--running-size); background-color: var(--color-accent); + box-shadow: 0 2px 0 0 white; } /* ### Nav */ diff --git a/public/assets/css/snippets/docs/shell.css b/public/assets/css/snippets/docs/shell.css new file mode 100644 index 0000000..b8c6688 --- /dev/null +++ b/public/assets/css/snippets/docs/shell.css @@ -0,0 +1,48 @@ +vv-shell { + display: grid; + grid-template-areas: + "header header" + "aside main" + "footer footer" + ; + grid-template-columns: 300px 1fr; + grid-template-rows: calc(var(--running-size) - var(--padding)) 1fr var(--running-size); +} + +/* # Main */ + +main { + --primer-color-accent: 0, 0, 0; + --color-accent: black; + + display: flex; + grid-area: main; + font-family: sans-serif; + flex-direction: column; + padding: var(--padding); + gap: calc(var(--padding) / 2); +} + +main code { + color: white; + padding: 0 5px; + border-radius: 6px; + font-weight: normal; + font-family: monospace; + background-color: #212121; +} + +main h2 { + font-size: 1.5em; +} + +main h3 { + font-size: 1em; + margin-bottom: 5px; +} + +main ol li { + margin: calc(var(--padding) / 2) 0; +} + +/* # Sections */ \ No newline at end of file diff --git a/public/assets/css/snippets/footer.css b/public/assets/css/snippets/footer.css index 9e04e1b..eee6b6e 100644 --- a/public/assets/css/snippets/footer.css +++ b/public/assets/css/snippets/footer.css @@ -4,6 +4,7 @@ footer { color: white; position: sticky; overflow: hidden; + grid-area: footer; align-items: stretch; height: var(--running-size); grid-template-rows: var(--running-size); diff --git a/public/assets/css/syntax.css b/public/assets/css/syntax.css new file mode 100644 index 0000000..90e8d50 --- /dev/null +++ b/public/assets/css/syntax.css @@ -0,0 +1,27 @@ +/* # Syntax highliting */ + +.mtk1 { color: #cccccc; } +.mtk2 { color: #1f1f1f; } +.mtk3 { color: #d4d4d4; } +.mtk4 { color: #000080; } +.mtk5 { color: #6a9955; } +.mtk6 { color: #569cd6; } +.mtk7 { color: #b5cea8; } +.mtk8 { color: #646695; } +.mtk9 { color: #d7ba7d; } +.mtk10 { color: #9cdcfe; } +.mtk11 { color: #f44747; } +.mtk12 { color: #ce9178; } +.mtk13 { color: #6796e6; } +.mtk14 { color: #808080; } +.mtk15 { color: #d16969; } +.mtk16 { color: #dcdcaa; } +.mtk17 { color: #4ec9b0; } +.mtk18 { color: #c586c0; } +.mtk19 { color: #4fc1ff; } +.mtk20 { color: #c8c8c8; } +.mtk21 { color: #cd9731; } +.mtk22 { color: #b267e6; } +.mtki { font-style: italic; } +.mtkb { font-weight: bold; } +.mtks { text-decoration: line-through; } \ No newline at end of file diff --git a/public/demos.php b/public/demos.php new file mode 100644 index 0000000..e69de29 diff --git a/public/docs/PHP/VV/css.php b/public/docs/PHP/VV/css.php new file mode 100644 index 0000000..45f319e --- /dev/null +++ b/public/docs/PHP/VV/css.php @@ -0,0 +1,7 @@ + + \ No newline at end of file diff --git a/public/docs/PHP/VV/embed.php b/public/docs/PHP/VV/embed.php new file mode 100644 index 0000000..52ba963 --- /dev/null +++ b/public/docs/PHP/VV/embed.php @@ -0,0 +1,7 @@ + + \ No newline at end of file diff --git a/public/docs/PHP/VV/error.php b/public/docs/PHP/VV/error.php new file mode 100644 index 0000000..7c80fac --- /dev/null +++ b/public/docs/PHP/VV/error.php @@ -0,0 +1,7 @@ + + \ No newline at end of file diff --git a/public/docs/PHP/VV/include.php b/public/docs/PHP/VV/include.php new file mode 100644 index 0000000..db7b347 --- /dev/null +++ b/public/docs/PHP/VV/include.php @@ -0,0 +1,7 @@ + + \ No newline at end of file diff --git a/public/docs/PHP/VV/init.php b/public/docs/PHP/VV/init.php new file mode 100644 index 0000000..8851b54 --- /dev/null +++ b/public/docs/PHP/VV/init.php @@ -0,0 +1,7 @@ + + \ No newline at end of file diff --git a/public/docs/PHP/VV/js.php b/public/docs/PHP/VV/js.php new file mode 100644 index 0000000..7f75631 --- /dev/null +++ b/public/docs/PHP/VV/js.php @@ -0,0 +1,7 @@ + + \ No newline at end of file diff --git a/public/docs/PHP/index.php b/public/docs/PHP/index.php new file mode 100644 index 0000000..81f5481 --- /dev/null +++ b/public/docs/PHP/index.php @@ -0,0 +1,7 @@ + + \ No newline at end of file diff --git a/public/docs/get-started.php b/public/docs/get-started.php new file mode 100644 index 0000000..a25b338 --- /dev/null +++ b/public/docs/get-started.php @@ -0,0 +1,7 @@ + + \ No newline at end of file diff --git a/public/docs/v3.1.3/PHP/VV/css.php b/public/docs/v3.1.3/PHP/VV/css.php new file mode 100644 index 0000000..f67b2dd --- /dev/null +++ b/public/docs/v3.1.3/PHP/VV/css.php @@ -0,0 +1,53 @@ + +
+ +
+

VV::css()

+

Include a CSS file into a page which will be automatically minified and inlined.

+
+
+ +
+
+

Parameters

+
+
+

string

+

$pathname

+

Path to a CSS stylehseet file.

+

Appending ".css" to the filename is optional. If omitted, the extension is infered.

+
+
+

bool

+

$relative

+

Flag which when set to:

+
    +
  1. + true +

    Will make $pathname look for a CSS file relative to root_path.

    +
  2. +
  3. + false +

    Will make $pathname look for a CSS file relative to the root of the whole filesystem.

    +
  4. +
+
+
+

Return value

+
+
+

string

+

Returns a minified version of the included stylesheet as a string. If a stylesheet can not be found at $pathname, an empty string is returned.

+
+
+
+

Examples

+
+
+

Importing a stylesheet

+

In this example we're importing a stylesheet from /public/assets/css/style.css relative from root_path.

+
+
+ +
+
\ No newline at end of file diff --git a/public/docs/v3.1.3/PHP/VV/embed.php b/public/docs/v3.1.3/PHP/VV/embed.php new file mode 100644 index 0000000..1bd72b5 --- /dev/null +++ b/public/docs/v3.1.3/PHP/VV/embed.php @@ -0,0 +1,53 @@ + +
+ +
+

VV::embed()

+

Inline the contents of any file.

+

This can be very useful for bundling SVGs, plaintext files, HTML, and more for faster page loading.

+
+
+ +
+
+

Parameters

+
+
+

string

+

$pathname

+

Path to an asset to inline.

+
+
+

bool

+

$relative

+

Flag which when set to:

+
    +
  1. + true +

    Will make $pathname look for a file relative to root_path.

    +
  2. +
  3. + false +

    Will make $pathname look for a file relative to the root of the whole filesystem.

    +
  4. +
+
+
+

Return value

+
+
+

string

+

Returns the contents of a file passed to $pathname as a string. If a file can not be found at $pathname, an empty string is returned.

+
+
+
+

Examples

+
+
+

Inlining an SVG icon

+

In this example we will be inlining an SVG icon from /public/assets/icon.svg directly into our page as if it were hardcoded.

+
+
+ +
+
\ No newline at end of file diff --git a/public/docs/v3.1.3/PHP/VV/index.php b/public/docs/v3.1.3/PHP/VV/index.php new file mode 100644 index 0000000..9440df3 --- /dev/null +++ b/public/docs/v3.1.3/PHP/VV/index.php @@ -0,0 +1,7 @@ + +
+ +
+ +
+
\ No newline at end of file diff --git a/public/docs/v3.1.3/PHP/VV/js.php b/public/docs/v3.1.3/PHP/VV/js.php new file mode 100644 index 0000000..3cdae79 --- /dev/null +++ b/public/docs/v3.1.3/PHP/VV/js.php @@ -0,0 +1,53 @@ + +
+ +
+

VV::js()

+

Include a JavaScript source file into a page which will be automatically minified and inlined.

+
+
+ +
+
+

Parameters

+
+
+

string

+

$pathname

+

Path to a JavaScript source file.

+

Appending ".js" to the filename is optional. If omitted, the extension is infered.

+
+
+

bool

+

$relative

+

Flag which when set to:

+
    +
  1. + true +

    Will make $pathname look for a JavaScript source file relative to root_path.

    +
  2. +
  3. + false +

    Will make $pathname look for a JavaScript source file relative to the root of the whole filesystem.

    +
  4. +
+
+
+

Return value

+
+
+

string

+

Returns a minified version of the included JavaScript source file as a string. If a file can not be found at $pathname, an empty string is returned.

+
+
+
+

Examples

+
+
+

Importing a JavaScript source file

+

In this example we're importing a JavaScript source file from /public/assets/js/script.js relative from root_path.

+
+
+ +
+
\ No newline at end of file diff --git a/public/docs/v3.1.3/PHP/index.php b/public/docs/v3.1.3/PHP/index.php new file mode 100644 index 0000000..35b8312 --- /dev/null +++ b/public/docs/v3.1.3/PHP/index.php @@ -0,0 +1,27 @@ + +
+
+ +

PHP Cheat Sheet

+

Vegvisir only has one class you need to worry about. The VV class contains everything needed to interact with Vegvisir functions from project pages.

+
+
+
+ +

Useful thoughts

+

Here are some one-liners to help remember what things do.

+
+
+
+ +

Difference between VV::include() and VV::shell()

+

VV::include() puts content inside another page.

+

VV::shell() puts a page inside other content.

+
+
+
+ +

Manual pages

+
+
+
\ No newline at end of file diff --git a/public/docs/v3.1.3/get-started.php b/public/docs/v3.1.3/get-started.php new file mode 100644 index 0000000..4323828 --- /dev/null +++ b/public/docs/v3.1.3/get-started.php @@ -0,0 +1,18 @@ + +
+ +
+ +

Introduction

+

Vegvisir is a PHP and JavaScript web framework developed by Victor Westerlund as a hobby project.

+

This framework is not intended to replace the true-and-tested like Laravel, it would be interesting of course if it gained some users but my goal is to keep this project small and flexible.

+
+
+
+ +

Scope

+

This documentation only covers the new experimental version of Vegvisir, which is version 3.

+

The older versions of Vegvisir can be found here. They lack proper documentation and function a bit differently than Vegvisir 3 which has been largely rewritten from scratch. The main addition to version 3 are what I call "shells".

+
+
+
\ No newline at end of file diff --git a/public/docs/v3.1.3/index.php b/public/docs/v3.1.3/index.php index a278c91..4323828 100644 --- a/public/docs/v3.1.3/index.php +++ b/public/docs/v3.1.3/index.php @@ -1,4 +1,4 @@ - +
diff --git a/public/docs/v3.1.3/installation.php b/public/docs/v3.1.3/installation.php index db16866..ddca810 100644 --- a/public/docs/v3.1.3/installation.php +++ b/public/docs/v3.1.3/installation.php @@ -1,84 +1,86 @@ - -
- -

Installation

-

In this guide we will be installing Vegvisir on a Debian-based system with NGINX as the web server. The process should be similar for other configurations as well.

-

Please contact me if you need help

-
-
-
- -

Prerequisites

-
    -
  • PHP 8.0 or newer (PHP 8.3 is recommended)
  • -
  • A web server (NGINX is used in this guide)
  • -
-
-
-
- -

Step 1: Clone the repo

-

Let's start by cloning Vegvisir to a folder. The code for Vegvisir will be separate from the code for your project.

- -

I have cloned this into the folder /var/www/vegvisir but you can put it wherever you want.

-
-
-
- -

Step 2: Install dependencies

-

Vegvisir only has one dependency, let's cd into our folder and install it with Composer.

- -
-
-
- -

Step 3: Configure virtual host

-

We will be pointing a virtual host to the /public/index.php file from the Vegvisir root directory.

-

Since your project files will live in a different directory, this can be set-and-forget.

- -
-
-
- -

Step 4: Create project folder

-

We're almost done here. We want to create a separate folder which will hold our project files.

-

Let's create a folder /var/www/my-website as an example - you can put this wherever you want!

- -
-
-
- -

Step 5: Point Vegvisir to project folder

-

Now let's finish up by pointing Vegvisir to the folder we just created.

-

Make a copy of the .env.example.ini file from Vegvisir's root directory and place it in the same spot as .env.ini

- -
-
-
- -

There is only one line we need to change inside the .env.ini file we just created. It should be the top most variable called root_path.

-

Change the value of this variable to an absolute path to your project root folder. In our case it will be /var/www/my-website.

- -
-
-
- -

Done!

-

That's all there is to it. Restart your webserver if you haven't and navigate to your published website.

-

If everything worked correctly, you should see a default landing page with a summary.

-
-
-
-
- -

Static assets

-

Vegvisir will automatically serve anything that isn't a .php file under /public in your project directory as a static asset. You can for example put your robots.txt file under /public/robots.txt and it will be returned as a text/plain document.

-

While this works fine for smaller assets, they still have to be passed through the PHP CGI. This process is a bit slower than serving assets with your web server directly - and might be a lot slower for larger files.

-

To fix this, let's add an optional location block to our NGINX configuration which will handle assets. The process should be similar for other web servers - contact me if you need help.

-
-
-
- -

Let's add the following location block to our NGINX virtual host that we set up in Step X.

-
-
\ No newline at end of file + +
+
+ +

Installation

+

In this guide we will be installing Vegvisir on a Debian-based system with NGINX as the web server. The process should be similar for other configurations as well.

+

Please contact me if you need help

+
+
+
+ +

Prerequisites

+
    +
  • PHP 8.0 or newer (PHP 8.3 is recommended)
  • +
  • A web server (NGINX is used in this guide)
  • +
+
+
+
+ +

Step 1: Clone the repo

+

Let's start by cloning Vegvisir to a folder. The code for Vegvisir will be separate from the code for your project.

+ +

I have cloned this into the folder /var/www/vegvisir but you can put it wherever you want.

+
+
+
+ +

Step 2: Install dependencies

+

Vegvisir only has one dependency, let's cd into our folder and install it with Composer.

+ +
+
+
+ +

Step 3: Configure virtual host

+

We will be pointing a virtual host to the /public/index.php file from the Vegvisir root directory.

+

Since your project files will live in a different directory, this can be set-and-forget.

+ +
+
+
+ +

Step 4: Create project folder

+

We're almost done here. We want to create a separate folder which will hold our project files.

+

Let's create a folder /var/www/my-website as an example - you can put this wherever you want!

+ +
+
+
+ +

Step 5: Point Vegvisir to project folder

+

Now let's finish up by pointing Vegvisir to the folder we just created.

+

Make a copy of the .env.example.ini file from Vegvisir's root directory and place it in the same spot as .env.ini

+ +
+
+
+ +

There is only one line we need to change inside the .env.ini file we just created. It should be the top most variable called root_path.

+

Change the value of this variable to an absolute path to your project root folder. In our case it will be /var/www/my-website.

+ +
+
+
+ +

Done!

+

That's all there is to it. Restart your webserver if you haven't and navigate to your published website.

+

If everything worked correctly, you should see a default landing page with a summary.

+
+
+
+
+ +

Static assets

+

Vegvisir will automatically serve anything that isn't a .php file under /public in your project directory as a static asset. You can for example put your robots.txt file under /public/robots.txt and it will be returned as a text/plain document.

+

While this works fine for smaller assets, they still have to be passed through the PHP CGI. This process is a bit slower than serving assets with your web server directly - and might be a lot slower for larger files.

+

To fix this, let's add an optional location block to our NGINX configuration which will handle assets. The process should be similar for other web servers - contact me if you need help.

+
+
+
+ +

Let's add the following location block to our NGINX virtual host that we set up in Step X.

+
+
+
\ No newline at end of file diff --git a/public/shell.php b/public/shell.php index 355c438..337005a 100644 --- a/public/shell.php +++ b/public/shell.php @@ -45,6 +45,7 @@ + Vegvisir diff --git a/snippets/HTMLCodeDemoElement/docs/v3.1.3/PHP/VV/css/description/syntax.php.php b/snippets/HTMLCodeDemoElement/docs/v3.1.3/PHP/VV/css/description/syntax.php.php new file mode 100644 index 0000000..6dca964 --- /dev/null +++ b/snippets/HTMLCodeDemoElement/docs/v3.1.3/PHP/VV/css/description/syntax.php.php @@ -0,0 +1 @@ +
<?php
    VV::css(
        string $pathname,
        bool $relative = true
    ): string
\ No newline at end of file diff --git a/snippets/HTMLCodeDemoElement/docs/v3.1.3/PHP/VV/css/example_import/index.php.php b/snippets/HTMLCodeDemoElement/docs/v3.1.3/PHP/VV/css/example_import/index.php.php new file mode 100644 index 0000000..e28e12d --- /dev/null +++ b/snippets/HTMLCodeDemoElement/docs/v3.1.3/PHP/VV/css/example_import/index.php.php @@ -0,0 +1 @@ +
<style><?= VV::css("public/assets/css/style.css"?></style>
\ No newline at end of file diff --git a/snippets/HTMLCodeDemoElement/docs/v3.1.3/PHP/VV/embed/description/syntax.php.php b/snippets/HTMLCodeDemoElement/docs/v3.1.3/PHP/VV/embed/description/syntax.php.php new file mode 100644 index 0000000..1cf5a11 --- /dev/null +++ b/snippets/HTMLCodeDemoElement/docs/v3.1.3/PHP/VV/embed/description/syntax.php.php @@ -0,0 +1 @@ +
<?php
    VV::embed(
        string $pathname,
        bool $relative = true
    ): string
\ No newline at end of file diff --git a/snippets/HTMLCodeDemoElement/docs/v3.1.3/PHP/VV/embed/example_import/compiled.html.php b/snippets/HTMLCodeDemoElement/docs/v3.1.3/PHP/VV/embed/example_import/compiled.html.php new file mode 100644 index 0000000..1e6760a --- /dev/null +++ b/snippets/HTMLCodeDemoElement/docs/v3.1.3/PHP/VV/embed/example_import/compiled.html.php @@ -0,0 +1 @@ +
<button>
    <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 36 22"><g><path class="solid" d="M12 22 0 0h24Z"/><path class="stroke" d="M12 17.823 20.63 2H3.37L12 17.823M12 22 0 0h24L12 22Z"/><g opacity=".5"><path class="solid" d="M24 22 12 0h24Z"/><path class="stroke" d="M24 17.823 32.63 2H15.37L24 17.823M24 22 12 0h24L24 22Z"/></g></g></svg>
    <p>Cool button</p>
</button>
\ No newline at end of file diff --git a/snippets/HTMLCodeDemoElement/docs/v3.1.3/PHP/VV/embed/example_import/icon.svg.php b/snippets/HTMLCodeDemoElement/docs/v3.1.3/PHP/VV/embed/example_import/icon.svg.php new file mode 100644 index 0000000..8d64b06 --- /dev/null +++ b/snippets/HTMLCodeDemoElement/docs/v3.1.3/PHP/VV/embed/example_import/icon.svg.php @@ -0,0 +1 @@ +
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 36 22">
    <g>
        <path class="solid" d="M12 22 0 0h24Z"/>
        <path class="stroke" d="M12 17.823 20.63 2H3.37L12 17.823M12 22 0 0h24L12 22Z"/>
        <g opacity=".5">
            <path class="solid" d="M24 22 12 0h24Z"/>
            <path class="stroke" d="M24 17.823 32.63 2H15.37L24 17.823M24 22 12 0h24L24 22Z"/>
        </g>
    </g>
</svg>
\ No newline at end of file diff --git a/snippets/HTMLCodeDemoElement/docs/v3.1.3/PHP/VV/embed/example_import/index.php.php b/snippets/HTMLCodeDemoElement/docs/v3.1.3/PHP/VV/embed/example_import/index.php.php new file mode 100644 index 0000000..952657c --- /dev/null +++ b/snippets/HTMLCodeDemoElement/docs/v3.1.3/PHP/VV/embed/example_import/index.php.php @@ -0,0 +1 @@ +
<button>
    <?= VV::embed("public/assets/icon.svg"?>
    <p>Cool button</p>
</button>
\ No newline at end of file diff --git a/snippets/HTMLCodeDemoElement/docs/v3.1.3/PHP/VV/js/description/syntax.php.php b/snippets/HTMLCodeDemoElement/docs/v3.1.3/PHP/VV/js/description/syntax.php.php new file mode 100644 index 0000000..50dba88 --- /dev/null +++ b/snippets/HTMLCodeDemoElement/docs/v3.1.3/PHP/VV/js/description/syntax.php.php @@ -0,0 +1 @@ +
<?php
    VV::js(
        string $pathname,
        bool $relative = true
    ): string
\ No newline at end of file diff --git a/snippets/HTMLCodeDemoElement/docs/v3.1.3/PHP/VV/js/example_import/index.php.php b/snippets/HTMLCodeDemoElement/docs/v3.1.3/PHP/VV/js/example_import/index.php.php new file mode 100644 index 0000000..43859b8 --- /dev/null +++ b/snippets/HTMLCodeDemoElement/docs/v3.1.3/PHP/VV/js/example_import/index.php.php @@ -0,0 +1 @@ +
<script><?= VV::js("public/assets/js/script.js"?></script>
\ No newline at end of file diff --git a/snippets/docs/shell.php b/snippets/docs/shell.php deleted file mode 100644 index ba694f5..0000000 --- a/snippets/docs/shell.php +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file diff --git a/snippets/docs/v3.1.3/aside.php b/snippets/docs/v3.1.3/aside.php new file mode 100644 index 0000000..eb1596c --- /dev/null +++ b/snippets/docs/v3.1.3/aside.php @@ -0,0 +1,65 @@ + + + \ No newline at end of file diff --git a/snippets/docs/header.php b/snippets/docs/v3.1.3/header.php similarity index 66% rename from snippets/docs/header.php rename to snippets/docs/v3.1.3/header.php index fae6bc6..03e34d4 100644 --- a/snippets/docs/header.php +++ b/snippets/docs/v3.1.3/header.php @@ -8,19 +8,20 @@
diff --git a/snippets/docs/v3.1.3/shell.php b/snippets/docs/v3.1.3/shell.php new file mode 100644 index 0000000..39885dc --- /dev/null +++ b/snippets/docs/v3.1.3/shell.php @@ -0,0 +1,4 @@ + + + + \ No newline at end of file