diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..8d16b98 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +vegvisir \ No newline at end of file diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..3b5234f --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "vegvisir"] + path = vegvisir + url = https://codeberg.org/vegvisir/vegvisir diff --git a/Consts.php b/Consts.php new file mode 100644 index 0000000..c17bc35 --- /dev/null +++ b/Consts.php @@ -0,0 +1,8 @@ + + \ No newline at end of file diff --git a/public/docs/Reference/JavaScript/EVENTS.php b/public/docs/Reference/JavaScript/EVENTS.php index 4fa902a..e1c0307 100644 --- a/public/docs/Reference/JavaScript/EVENTS.php +++ b/public/docs/Reference/JavaScript/EVENTS.php @@ -1,7 +1,7 @@ \ No newline at end of file diff --git a/public/docs/Reference/JavaScript/MODE.php b/public/docs/Reference/JavaScript/MODE.php index 748cf9f..04555f0 100644 --- a/public/docs/Reference/JavaScript/MODE.php +++ b/public/docs/Reference/JavaScript/MODE.php @@ -1,7 +1,7 @@ \ No newline at end of file diff --git a/public/docs/Reference/JavaScript/POSITION.php b/public/docs/Reference/JavaScript/POSITION.php index b362cb5..0d848fb 100644 --- a/public/docs/Reference/JavaScript/POSITION.php +++ b/public/docs/Reference/JavaScript/POSITION.php @@ -1,7 +1,7 @@ \ No newline at end of file diff --git a/public/docs/Reference/JavaScript/TARGET.php b/public/docs/Reference/JavaScript/TARGET.php index 537292f..fd540dd 100644 --- a/public/docs/Reference/JavaScript/TARGET.php +++ b/public/docs/Reference/JavaScript/TARGET.php @@ -1,7 +1,7 @@ \ No newline at end of file diff --git a/public/docs/Reference/JavaScript/abort.php b/public/docs/Reference/JavaScript/abort.php index 093d7a7..f738742 100644 --- a/public/docs/Reference/JavaScript/abort.php +++ b/public/docs/Reference/JavaScript/abort.php @@ -1,7 +1,7 @@ \ No newline at end of file diff --git a/public/docs/Reference/JavaScript/bindElements.php b/public/docs/Reference/JavaScript/bindElements.php index e29a8b9..d6086eb 100644 --- a/public/docs/Reference/JavaScript/bindElements.php +++ b/public/docs/Reference/JavaScript/bindElements.php @@ -1,7 +1,7 @@ \ No newline at end of file diff --git a/public/docs/Reference/JavaScript/constructor.php b/public/docs/Reference/JavaScript/constructor.php index 74efbc3..59ec121 100644 --- a/public/docs/Reference/JavaScript/constructor.php +++ b/public/docs/Reference/JavaScript/constructor.php @@ -1,7 +1,7 @@ \ No newline at end of file diff --git a/public/docs/Reference/JavaScript/index.php b/public/docs/Reference/JavaScript/index.php index ff3af43..1616f12 100644 --- a/public/docs/Reference/JavaScript/index.php +++ b/public/docs/Reference/JavaScript/index.php @@ -1,7 +1,7 @@ \ No newline at end of file diff --git a/public/docs/Reference/JavaScript/navigate.php b/public/docs/Reference/JavaScript/navigate.php index e268164..5babb3c 100644 --- a/public/docs/Reference/JavaScript/navigate.php +++ b/public/docs/Reference/JavaScript/navigate.php @@ -1,7 +1,7 @@ \ No newline at end of file diff --git a/public/docs/Reference/JavaScript/options.php b/public/docs/Reference/JavaScript/options.php index 264fd19..2d52d11 100644 --- a/public/docs/Reference/JavaScript/options.php +++ b/public/docs/Reference/JavaScript/options.php @@ -1,7 +1,7 @@ \ No newline at end of file diff --git a/public/docs/Reference/PHP/VV/css.php b/public/docs/Reference/PHP/VV/css.php index 1097aa5..6477c1f 100644 --- a/public/docs/Reference/PHP/VV/css.php +++ b/public/docs/Reference/PHP/VV/css.php @@ -1,7 +1,7 @@ \ No newline at end of file diff --git a/public/docs/Reference/PHP/VV/embed.php b/public/docs/Reference/PHP/VV/embed.php index b2c7529..edcb972 100644 --- a/public/docs/Reference/PHP/VV/embed.php +++ b/public/docs/Reference/PHP/VV/embed.php @@ -1,7 +1,7 @@ \ No newline at end of file diff --git a/public/docs/Reference/PHP/VV/include.php b/public/docs/Reference/PHP/VV/include.php index ebf1042..fe75bd2 100644 --- a/public/docs/Reference/PHP/VV/include.php +++ b/public/docs/Reference/PHP/VV/include.php @@ -1,7 +1,7 @@ \ No newline at end of file diff --git a/public/docs/Reference/PHP/VV/init.php b/public/docs/Reference/PHP/VV/init.php index 3e77b6c..585be82 100644 --- a/public/docs/Reference/PHP/VV/init.php +++ b/public/docs/Reference/PHP/VV/init.php @@ -1,7 +1,7 @@ \ No newline at end of file diff --git a/public/docs/Reference/PHP/VV/js.php b/public/docs/Reference/PHP/VV/js.php index bae77c1..e57b2d0 100644 --- a/public/docs/Reference/PHP/VV/js.php +++ b/public/docs/Reference/PHP/VV/js.php @@ -1,7 +1,7 @@ \ No newline at end of file diff --git a/public/docs/Reference/PHP/index.php b/public/docs/Reference/PHP/index.php index c27eb56..7f66808 100644 --- a/public/docs/Reference/PHP/index.php +++ b/public/docs/Reference/PHP/index.php @@ -1,7 +1,7 @@ \ No newline at end of file diff --git a/public/docs/Reference/index.php b/public/docs/Reference/index.php index 341bb6d..dfe256f 100644 --- a/public/docs/Reference/index.php +++ b/public/docs/Reference/index.php @@ -1,7 +1,7 @@ \ No newline at end of file diff --git a/public/docs/Reference/vv-attributes.php b/public/docs/Reference/vv-attributes.php new file mode 100644 index 0000000..6b1f471 --- /dev/null +++ b/public/docs/Reference/vv-attributes.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 index a25b338..edef4d7 100644 --- a/public/docs/get-started.php +++ b/public/docs/get-started.php @@ -1,7 +1,7 @@ \ No newline at end of file diff --git a/public/docs/index.php b/public/docs/index.php index 1dc4b35..5d70133 100644 --- a/public/docs/index.php +++ b/public/docs/index.php @@ -1,7 +1,7 @@ \ No newline at end of file diff --git a/public/docs/installation.php b/public/docs/installation.php index f6a6587..0cff68f 100644 --- a/public/docs/installation.php +++ b/public/docs/installation.php @@ -1,7 +1,7 @@ \ No newline at end of file diff --git a/public/docs/v3.1.4/API/JS/Navigation/EVENTS.php b/public/docs/v3.1.4/API/JS/Navigation/EVENTS.php deleted file mode 100644 index 6265670..0000000 --- a/public/docs/v3.1.4/API/JS/Navigation/EVENTS.php +++ /dev/null @@ -1,75 +0,0 @@ - - -
- -

(Vegvisir 3)

-

vegvisir.Navigation.EVENTS

-

Various navigation CustomEvents that can be listened for.

-
-
-
- -

Description

- -

All events will also fire on document as a catch-all interface.

-
-
- - -
- -

Values

-
-
-
- -

navstarted

-

This CustomEvent will be fired on the navigation target and document when a navigation is started with .navigate().

-
-
-
- -

navfinished

-

This CustomEvent will be fired on the navigation target and document when a navigation with .navigate() has finished completely.

-

A navigation is considered finished when the page has been fully loaded and all element attributes have been updated.

-
-
- -
- -

CustomEvent.detail property

- -

Accessing the .detail property on a captured Vegvisir event will contain the following object.

-
-
- - -
- -

Values

-
-
-
- -

target

-

The target element that is used/was used for the navigation.

-
-
- - -
- -

Examples

-
-
-
- -

Basic usage

-

This example logs the target element of all navigations on this page.

- -
-
- - - - \ No newline at end of file diff --git a/public/docs/v3.1.4/API/JS/Navigation/MODE.php b/public/docs/v3.1.4/API/JS/Navigation/MODE.php deleted file mode 100644 index f2592b9..0000000 --- a/public/docs/v3.1.4/API/JS/Navigation/MODE.php +++ /dev/null @@ -1,51 +0,0 @@ - - -
- -

(Vegvisir 3)

-

vegvisir.Navigation.MODE

-

Change if content should be replaced or inserted when used in .navigate().

-
-
-
- -

Description

- -
-
- - -
- -

Values

-
-
-
- -

REPLACE

-

Content of the destination URL will replace the content at vegvisir.Navigation.POSITION.

- -
-
-
- -

INSERT

-

Content of the destination URL will append/prepend to the existing content at vegvisir.Navigation.POSITION.

-

Setting the mode to INSERT will make .navigate() behave exactly like HTMLElement.insertAdjacentElement().

- -
-
- - - - \ No newline at end of file diff --git a/public/docs/v3.1.4/API/JS/Navigation/POSITION.php b/public/docs/v3.1.4/API/JS/Navigation/POSITION.php deleted file mode 100644 index 1188f1b..0000000 --- a/public/docs/v3.1.4/API/JS/Navigation/POSITION.php +++ /dev/null @@ -1,65 +0,0 @@ - - -
- -

(Vegvisir 3)

-

vegvisir.Navigation.POSITION

-

Change where content should be placed when .navigate() is used.

-
-
-
- -

Description

- -
-
- - -
- -

Values

-

The effect of Navigation.POSITION depend on the Navigation.MODE used for the current navigation.

-

The default Navigation.POSITION for .navigate() is beforeend and the default mode is replace.

-
-
-
- -

afterend

- -
-
-
- -

beforeend

-

This is the default position for .navigate().

- -
-
-
- -

afterbegin

- -
-
-
- -

beforebegin

- -
-
- - - - \ No newline at end of file diff --git a/public/docs/v3.1.4/API/JS/Navigation/TARGET.php b/public/docs/v3.1.4/API/JS/Navigation/TARGET.php deleted file mode 100644 index 348537d..0000000 --- a/public/docs/v3.1.4/API/JS/Navigation/TARGET.php +++ /dev/null @@ -1,77 +0,0 @@ - - -
- -

(Vegvisir 3)

-

vegvisir.Navigation.TARGET

-

Defines the target element of a navigation triggered from a bound element.

-
-
-
- -

Description

- -

This object follows the same syntax as the target attribute of HTMLAnchorElement.

-

If a string is provided to a target attribute of the bound element that isn't in this enumerable, the string will be treated as a CSS selector.

-
-
- - -
- -

Values

-

These values correspond to the value of a target attribute on a bound element.

-
-
-
- -

_top

-

Target vegvisir.Navigation.rootShellElement. This is the same as performing a normal soft-navigation.

-

This is the default behavior if a target attribute is omitted or equals an empty string.

-
-
-
- -

_self

-

Target the bound element itself with the defaults vegvisir.Navigation.POSITION.BEFOREEND and vegvisir.Navigation.MODE.REPLACE, which will replace the bound element itself with the contents of the destination URL.

-

The default position and mode behavior can be overridden with by setting a vv-position and vv-mode attribute on the bound element respectivly.

-
-
-
- -

_blank

-

Default browser behavior. The destination URL will open in a new tab or window.

-
-
-
- -

_parent

-

Target the closest parent HTMLElement that has a vv-page attribute.

-

vegvisir.Navigation.rootShellElement will become the target if no parent is found.

-
-
-
- -

default

-

The value of the bound element's target attribute will be treated as a CSS selector if the string value does not equal an entry in this enumerable.

-
-
- - -
- -

Examples

-
-
-
- -

Basic usage

-

Here's an example that uses a native anchor tag to do various navigations.

- - -
-
- - - - \ No newline at end of file diff --git a/public/docs/v3.1.4/API/JS/Navigation/abort.php b/public/docs/v3.1.4/API/JS/Navigation/abort.php deleted file mode 100644 index 48517de..0000000 --- a/public/docs/v3.1.4/API/JS/Navigation/abort.php +++ /dev/null @@ -1,33 +0,0 @@ - - -
- -

(Vegvisir 2, Vegvisir 3)

-

Navigation.abort

-

Interrupt a navigation started with .navigate().

-
-
-
- -

Description

- -

Navigation.abort is an instance of AbortController which gets contructed automatically with new vegvisir.Navigation instances.

-
-
- - -
- -

Parameters

-
-
-
- -

.abort()

-

Call Navigation.abort.abort() to interrupt a Vegvisir navigation in progress.

-
-
- - - - \ No newline at end of file diff --git a/public/docs/v3.1.4/API/JS/Navigation/bindElements.php b/public/docs/v3.1.4/API/JS/Navigation/bindElements.php deleted file mode 100644 index 9e2afeb..0000000 --- a/public/docs/v3.1.4/API/JS/Navigation/bindElements.php +++ /dev/null @@ -1,35 +0,0 @@ - - -
- -

(Vegvisir 2, Vegvisir 3)

-

vegvisir.Navigation.bindElements()

-

Trigger automatic binding of unbound tags.

-
-
-
- -

Description

- -

Bind event listeners for HTMLAnchorElement tags and other tags with a vv attribute that haven't already been bound.

-

This method is runned automatically after a finished Vegvisir navigation.

-
-
- - -
- -

Examples

-
-
-
- -

Basic usage

-

In this example we will programatically create and append an anchor tag to the DOM and use this method to bind it.

- -
-
- - - - \ No newline at end of file diff --git a/public/docs/v3.1.4/API/JS/Navigation/constructor.php b/public/docs/v3.1.4/API/JS/Navigation/constructor.php deleted file mode 100644 index 5c65867..0000000 --- a/public/docs/v3.1.4/API/JS/Navigation/constructor.php +++ /dev/null @@ -1,69 +0,0 @@ - - -
- -

(Vegvisir 2, Vegvisir 3)

-

vegvisir.Navigation() constructor

-

The Vegvisir navigation constructor is used to create a new instance of Navigation. This is the first step to creating a custom navigation.

-
-
-
- -

Description

- -
-
- - -
- -

Parameters

-
-
-
- -

url

-

A URL object or string with to a location on the same origin as the initiator.

-
-
-
- -

options

-

An optional object containing vegvisir.Navigation.options overrides.

-
-
- - -
- -

Return values

-
-
-
- -

Navigation instance

-

A Navigation object instance. Use the instance method .navigate() to navigate an, or many element(s) in the DOM.

-
-
- - -
- -

Examples

-
-
-
- -

Basic usage

-

Different ways to initialize vegvisir.Navigation with a location that will open /public/some-page.php relative from project root.

-

With strings:

- - -

With URL objects:

- -
-
- - - - \ No newline at end of file diff --git a/public/docs/v3.1.4/API/JS/Navigation/index.php b/public/docs/v3.1.4/API/JS/Navigation/index.php deleted file mode 100644 index d822b2f..0000000 --- a/public/docs/v3.1.4/API/JS/Navigation/index.php +++ /dev/null @@ -1,13 +0,0 @@ -
- -

vegvisir.Navigation

-

The Vegvisir Navigation class contains APIs for triggering navigations of any element programmatically.

-
-
-
- -

Quickstart

-

A new navigation can be initialized by constructing the vegvisir.Navigation class.

-
-
- \ No newline at end of file diff --git a/public/docs/v3.1.4/API/JS/Navigation/navigate.php b/public/docs/v3.1.4/API/JS/Navigation/navigate.php deleted file mode 100644 index 274d189..0000000 --- a/public/docs/v3.1.4/API/JS/Navigation/navigate.php +++ /dev/null @@ -1,92 +0,0 @@ - - -
- -

(Vegvisir 2, Vegvisir 3)

-

Navigation.navigate()

-

Perform a soft-navigation on an element.

-
-
-
- -

Description

- -
-
- - -
- -

Parameters

-
-
-
- -

target

-

An optional instance of an HTMLElement which will be the target of this navigation.

-

Vegivisr.rootShellElement will be used if no argument is passed to this parameter.

-
- Examples -

Passing nothing to this parameter will target the top shell. This would be equivalent to clicking a link.

- -

Passing an HTMLElement to this parameter would in this example with no other arguments changed, replace the innerHTML of the target element with the response from /some-page.

- -
-
-
-
- -

position

-

This parameter takes an optional Navigation.POSITION string which can be used to change where content from the destination URL should be placed relative to the target element.

-
- Examples -

Passing nothing to this parameter will replace the innerHTML of target.

- -

Passing an position string will in this example place the contents afterEnd from target.

- -
-
-
-
- -

mode

-

This parameter takes an optional Navigation.MODE string which can be used to change how the contents of the destination URL should be placed relative to existing content around the target element.

-
-
- - -
- -

Return values

-
-
-
- -

This method will not return anything, but a navigation in progress can be aborted with Navigation.abort.

-
-
- - -
- -

Examples

-
-
-
- -

Basic usage

-

Programmatically invoke a top navigation - as if a user clicked a link.

- -
-
-
- -

Click to refresh

-

An example how a simple "click to refresh" button can be implemented.

- -
-
- - - - \ No newline at end of file diff --git a/public/docs/v3.1.4/API/JS/Navigation/options.php b/public/docs/v3.1.4/API/JS/Navigation/options.php deleted file mode 100644 index 7562354..0000000 --- a/public/docs/v3.1.4/API/JS/Navigation/options.php +++ /dev/null @@ -1,64 +0,0 @@ - - -
- -

(Vegvisir 2, Vegvisir 3)

-

Navigation.options

-

Override default Vegvisir navigation behavior.

-
-
-
- -

Description

- -

This object should be passed as the second argument when constructing a vegvisir.Navigation instance.

-
-
- - -
- -

Parameters

-
-
-
- -

pushHistory

-

This option has no default value:

-

The default behavior of any Vegvisir top navigation is to push the new URL to the history stack. Ie. History API entry and browser pathname changes.

-

Any navigation that is not a top navigation will not push to the history stack.

-
-

By setting the pushHistory option to:

- -
-
- - -
- -

Examples

-
-
-
- -

Basic usage

-

Here is an example the embeds an SVG file directly on a page.

-

This can come in handy for inlining small vector icons.

- - -

By using VV::css() inside a style, we've enabled this stylesheet for that specific page.

-
-
- - - - \ No newline at end of file diff --git a/public/docs/v3.1.4/API/JS/index.php b/public/docs/v3.1.4/API/JS/index.php deleted file mode 100644 index 11ef6b1..0000000 --- a/public/docs/v3.1.4/API/JS/index.php +++ /dev/null @@ -1,14 +0,0 @@ -
- -

JavaScript Cheat Sheet

-

Vegvisir will automatically bind HTMLAnchorElement tags and perform soft-navigation between pages on the same origin.

-

The Navigation lets you interact with, and expand Vegvisirs front-end behavior.

-
-
-
- -

Manual pages

- -
-
- \ No newline at end of file diff --git a/public/docs/v3.1.4/API/PHP/VV/css.php b/public/docs/v3.1.4/API/PHP/VV/css.php deleted file mode 100644 index e68ffdb..0000000 --- a/public/docs/v3.1.4/API/PHP/VV/css.php +++ /dev/null @@ -1,82 +0,0 @@ - - -
- -

(Vegvisir 2, Vegvisir 3)

-

VV::css()

-

Import and minify a CSS file.

-

The syntax is identical to VV::js(), and VV::embed().

-
-
-
- -

Description

- -

VV::css() imports and minifies a CSS styleheet file and returns it as a string.

-
-
- - -
- -

Parameters

-
-
-
- -

pathname

-

Path to a CSS stylesheet file to import relative from project root.

-
- Example - -
-
-
-
- -

relative

-

Path provided to pathname will be a relative when this parameter is true (default). Set to false to make path absolute.

-
- Example - -
-
-
- - -
- -

Return values

-
-
-
- -

string

-

A string containing minified CSS. Please note that linebreaks are preserved.

-

Will return an empty string if the path provided to pathname is not a valid CSS stylesheet file, or if it failed to import.

-
- Example - -
-
-
- - -
- -

Examples

-
-
-
- -

Basic usage

-

Let's take the following CSS stylesheet file and put it into a page.

- - -

By using VV::css() inside a style, we've enabled this stylesheet for that specific page.

-
-
- - - - \ No newline at end of file diff --git a/public/docs/v3.1.4/API/PHP/VV/embed.php b/public/docs/v3.1.4/API/PHP/VV/embed.php deleted file mode 100644 index c146d23..0000000 --- a/public/docs/v3.1.4/API/PHP/VV/embed.php +++ /dev/null @@ -1,71 +0,0 @@ - - -
- -

(Vegvisir 2, Vegvisir 3)

-

VV::embed()

-

Import and inline the contents of any file without executing code.

-

The syntax is identical to VV::js(), and VV::css().

-
-
-
- -

Description

- -

VV::embed() returns the contents of any file as a string.

-
-
- - -
- -

Parameters

-
-
-
- -

pathname

-

Path to a file to embed relative from project root.

-
-
-
- -

relative

-

Path provided to pathname will be a relative when this parameter is true (default). Set to false to make path absolute.

-
-
- - -
- -

Return values

-
-
-
- -

string

-

A string containing the raw contents of the file. File encoding is preserved.

-

Will return an empty string if the path provided to pathname is not a valid file, or if it failed to import.

-
-
- - -
- -

Examples

-
-
-
- -

Basic usage

-

Here is an example the embeds an SVG file directly on a page.

-

This can come in handy for inlining small vector icons.

- - -

By using VV::css() inside a style, we've enabled this stylesheet for that specific page.

-
-
- - - - \ No newline at end of file diff --git a/public/docs/v3.1.4/API/PHP/VV/include.php b/public/docs/v3.1.4/API/PHP/VV/include.php deleted file mode 100644 index fb091e1..0000000 --- a/public/docs/v3.1.4/API/PHP/VV/include.php +++ /dev/null @@ -1,77 +0,0 @@ - - -
- -

(Vegvisir 2, Vegvisir 3)

-

VV::include()

-

Inline contents of one page inside another page.

-

The syntax and functionality is similar to VV::embed(), except it executes included code.

-
-
-
- -

Description

- -

VV::include() lets you put the contents of one page into another page.

-
-
- - -
- -

Parameters

-
-
-
- -

pathname

-

Path to a PHP file to import and evaluate relative from project root.

-
- Example - -
-
-
-
- -

relative

-

Path provided to pathname will be a relative when this parameter is true (default). Set to false to make path absolute.

-
- Example - -
-
-
- - -
- -

Return values

-
-
-
- -

This method will return whatever the compiled output of the included PHP file will be.

-
-
- - -
- -

Examples

-
-
-
- -

Basic usage

-

Consider the following page snippet

- -

Let's put this snippet into another page

- -

By importing the snippet with VV::include() we have placed the banner tag and its contents into another page.

-
-
- - - - \ No newline at end of file diff --git a/public/docs/v3.1.4/API/PHP/VV/index.php b/public/docs/v3.1.4/API/PHP/VV/index.php deleted file mode 100644 index 112af80..0000000 --- a/public/docs/v3.1.4/API/PHP/VV/index.php +++ /dev/null @@ -1,15 +0,0 @@ -
- -

VV

-

The VV (two "V"'s, not a W) contains everything needed to interact with Vegvisir's PHP features.

-

The class can not be instanced since it only contains static methods.

-
-
-
- -

Namespace

-

The VV class is accessible without a namespace from any PHP file within your project.

-

The class intentionally lacks a namespace to reduce the (all be it short) boilerplate code that would be required to import and use it on every page of your project.

-
-
- \ No newline at end of file diff --git a/public/docs/v3.1.4/API/PHP/VV/js.php b/public/docs/v3.1.4/API/PHP/VV/js.php deleted file mode 100644 index e3b5d80..0000000 --- a/public/docs/v3.1.4/API/PHP/VV/js.php +++ /dev/null @@ -1,82 +0,0 @@ - - -
- -

(Vegvisir 2, Vegvisir 3)

-

VV::js()

-

Import and minify a JavaScript file.

-

The syntax is identical to VV::css(), and VV::embed().

-
-
-
- -

Description

- -

VV::js() imports and minifies a JavaScript file and returns it as a string.

-
-
- - -
- -

Parameters

-
-
-
- -

pathname

-

Path to a JavaScript file to import relative from project root.

-
- Example - -
-
-
-
- -

relative

-

Path provided to pathname will be a relative when this parameter is true (default). Set to false to make path absolute.

-
- Example - -
-
-
- - -
- -

Return values

-
-
-
- -

string

-

A string containing minified JavaScript. Please note that linebreaks are preserved.

-

Will return an empty string if the path provided to pathname is not a valid JavaScript file, or if it failed to import.

-
- Example - -
-
-
- - -
- -

Examples

-
-
-
- -

Basic usage

-

Let's take the following JavaScript file and put it into a page.

- - -

By using VV::js() inside a script, we've enabled the code for that specific page.

-
-
- - - - \ No newline at end of file diff --git a/public/docs/v3.1.4/API/PHP/VV/root.php b/public/docs/v3.1.4/API/PHP/VV/root.php deleted file mode 100644 index 760d600..0000000 --- a/public/docs/v3.1.4/API/PHP/VV/root.php +++ /dev/null @@ -1,76 +0,0 @@ - - -
- -

(Vegvisir 3)

-

VV::root()

-

Return an absolute path to a file or folder relative from project root.

-
-
-
- -

Description

- -

Return an absolute path to a file or folder relative from project root. This method does not process the entity at the provided location in any way. It simply returns an absolute path to it, which can be used with other functions.

-
-
- - -
- -

Parameters

-
-
-
- -

pathname

-

Path to a location relative from project root. This parameter is an empty string by default, which will return an absolute path to project root itself.

-
- Example - -
-
-
- - -
- -

Return values

-
-
-
- -

string

-

An absolute path to the relative location provided by pathname.

-
- Example - -
-
-
- - -
- -

Examples

-
-
-
- -

Basic usage

-

VV::root() doesn't do anything on its own other than "convert" a relative path into an absolute one.

-

This can come in really handy when importing other PHP classes within your project. Let's import a PHP class from one location in the project into a public page.

-
-
-
- - -

Let's import and use this class on our page with VV::root().

- - -
-
- - - - \ No newline at end of file diff --git a/public/docs/v3.1.4/API/PHP/VV/shell.php b/public/docs/v3.1.4/API/PHP/VV/shell.php deleted file mode 100644 index 38e8af3..0000000 --- a/public/docs/v3.1.4/API/PHP/VV/shell.php +++ /dev/null @@ -1,74 +0,0 @@ - - -
- -

(Vegvisir 3)

-

VV::shell()

-

Wrap contents of a page within another page.

-

This method is similar to VV::include() except it lets you place persistent content around the included page.

-
-
-
- -

Description

- -

VV::shell() is a powerful method which lets you put the contents of one page into a vv-shell tag on another page.

-

Subsequent navigations to pages using the same shell will preserve the outer shell's state. The shell will not be fetched again.

-
-
- - -
- -

Parameters

-
-
-
- -

pathname

-

Path to a PHP shell page relative from project root which the contents of the initiator page will be wrapped inside.

-
- Example - -
-
-
- - -
- -

Return values

-
-
-
- -

This method is buffered and will flush the buffer contents to stdout when the last shell has been imported.

-
-
- - -
- -

Examples

-
-
-
- -

Basic usage

-

If we want the contents of page /public/some-page.php wrapped inside the contents of /shells/some-shell.php, we can do the following:

- -

Place a VV::shell() snippet at the end of the page you wish to wrap.

-
-
-
- -

Now let's add a vv-shell tag somewhere in our /shells/some-shell.php file.

- -

The contents of /public/some-page.php will replace the inner contents of the vv-shell tag.

-

The shell file acts like any other Vegvisir page, which means you have access to all VV methods.

-
-
- - - - \ No newline at end of file diff --git a/public/docs/v3.1.4/API/PHP/index.php b/public/docs/v3.1.4/API/PHP/index.php deleted file mode 100644 index 84cd640..0000000 --- a/public/docs/v3.1.4/API/PHP/index.php +++ /dev/null @@ -1,26 +0,0 @@ -
- -

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.4/API/index.php b/public/docs/v3.1.4/API/index.php deleted file mode 100644 index 0df0de9..0000000 --- a/public/docs/v3.1.4/API/index.php +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/public/docs/v3.1.4/Reference/Env.php b/public/docs/v3.1.4/Reference/Env.php new file mode 100644 index 0000000..004a13a --- /dev/null +++ b/public/docs/v3.1.4/Reference/Env.php @@ -0,0 +1,47 @@ + +
+
+

Environment variables

+

Vegvisir has a few environment variables that can be modified to change its behavior.

+

Copy .env.example.ini to .env.ini and edit the copied file to get started.

+
+
+
+

Reference

+
+
+

string

+

root_path

+

An absolute path to the folder where your project is located.

+
+
+

string

+

shell_page

+

A path relative from your root_path to a PHP file that contains a vv-shell element, and will be loaded as the shell of your page.

+
+
+

string

+

public_path

+

A path relative from your root_path to a folder containing public PHP pages and other public static assets.

+

The default for this variable is "public/".

+
+
+

string | null

+

error_page_path

+

An optional path relative from your root_path to a PHP file that will be loaded when a page can not be found.

+

Commenting-out this variable or setting it to null will disable error pages. An empty respone body will be returned.

+
+
+

string

+

worker_magic_pathname

+

Vegvisir navigation worker code will be returned when request pathname matches this string

+

This variable can be left as-is for most applications.

+
+
+

string | null

+

rfc_4288_url

+

URL to an RFC 4288 compatible MIME-type file which will be cached (until server reboot) and referenced for serving static assets.

+

The default for this variable is Apache's httpd MIME-reference.

+

Commenting-out this variable or setting it to null will disable custom MIME-lists and default to PHP's mime_content_type parser.

+
+
\ No newline at end of file diff --git a/public/docs/v3.1.4/Reference/JavaScript/EVENTS.php b/public/docs/v3.1.4/Reference/JavaScript/EVENTS.php index e782a04..40f67d2 100644 --- a/public/docs/v3.1.4/Reference/JavaScript/EVENTS.php +++ b/public/docs/v3.1.4/Reference/JavaScript/EVENTS.php @@ -12,13 +12,13 @@

STARTED

-

An event dispatched with the type of "navstarted" on the target element when a navigation has started. This event is also dispatched on document.body.

-

The detail property of this event returns the Navigation instance that initiated the navigation.

+

An event dispatched with the type of "navstarted" on the target element when a navigation has started. This event is also dispatched on document.body.

+

The detail property of this event returns the Navigation instance that initiated the navigation.

FINISHED

-

An event dispatched with the type of "navfinished" on the target element when a navigation has finished loading completely (content has been injected). This event is also dispatched on document.body.

-

The detail property of this event returns the Navigation instance that initiated the navigation.

+

An event dispatched with the type of "navfinished" on the target element when a navigation has finished loading completely (content has been injected). This event is also dispatched on document.body.

+

The detail property of this event returns the Navigation instance that initiated the navigation.


diff --git a/public/docs/v3.1.4/Reference/JavaScript/MODE.php b/public/docs/v3.1.4/Reference/JavaScript/MODE.php index f9e0a39..9962616 100644 --- a/public/docs/v3.1.4/Reference/JavaScript/MODE.php +++ b/public/docs/v3.1.4/Reference/JavaScript/MODE.php @@ -2,7 +2,7 @@

Navigation.MODE

-

A static object of Navigation that alters the injection method of the target element of .navigate()

+

A static object of Navigation that alters the injection method of the target element of .navigate()

@@ -12,12 +12,12 @@

REPLACE

-

The inner DOM of the target element of .navigate() will be replaced with the contents of href from a Navigation instance.

+

The inner DOM of the target element of .navigate() will be replaced with the contents of href from a Navigation instance.

This is the default behavior.

REPLACE

-

The contents of href from a Navigation instance will be inserted(appended) to the end of the existing DOM of the target element of .navigate()

+

The contents of href from a Navigation instance will be inserted(appended) to the end of the existing DOM of the target element of .navigate()


diff --git a/public/docs/v3.1.4/Reference/JavaScript/POSITION.php b/public/docs/v3.1.4/Reference/JavaScript/POSITION.php index a98de76..34ff2ad 100644 --- a/public/docs/v3.1.4/Reference/JavaScript/POSITION.php +++ b/public/docs/v3.1.4/Reference/JavaScript/POSITION.php @@ -2,7 +2,7 @@

Navigation.POSITION

-

A static object of Navigation that adheres to the same concept as position of .insertAdjacentElement()

+

A static object of Navigation that adheres to the same concept as position of .insertAdjacentElement()

@@ -12,22 +12,22 @@

AFTEREND

-

Inserts/replaces the DOM after the target element with the contents of href from a Navigation instance.

+

Inserts/replaces the DOM after the target element with the contents of href from a Navigation instance.

BEFOREEND

This is the default behavior.

-

Inserts/replaces the DOM right before closing the target element with the contents of href from a Navigation instance.

-

Navigation.MODE.REPLACE makes this perform the same operation as AFTERBEGIN.

+

Inserts/replaces the DOM right before closing the target element with the contents of href from a Navigation instance.

+

Navigation.MODE.REPLACE makes this perform the same operation as AFTERBEGIN.

AFTERBEGIN

-

Inserts/replaces the DOM right after opening the target element with the contents of href from a Navigation instance.

-

Navigation.MODE.REPLACE makes this perform the same operation as BEFOREEND.

+

Inserts/replaces the DOM right after opening the target element with the contents of href from a Navigation instance.

+

Navigation.MODE.REPLACE makes this perform the same operation as BEFOREEND.

BEFOREBEGIN

-

Inserts/replaces the DOM before the target element with the contents of href from a Navigation instance.

+

Inserts/replaces the DOM before the target element with the contents of href from a Navigation instance.


diff --git a/public/docs/v3.1.4/Reference/JavaScript/TARGET.php b/public/docs/v3.1.4/Reference/JavaScript/TARGET.php index dd61120..56ce609 100644 --- a/public/docs/v3.1.4/Reference/JavaScript/TARGET.php +++ b/public/docs/v3.1.4/Reference/JavaScript/TARGET.php @@ -2,7 +2,7 @@

Navigation.TARGET

-

A static object of Navigation that alters where the contents of a navigation should be placed relative to the target element element for .navigate().

+

A static object of Navigation that alters where the contents of a navigation should be placed relative to the target element element for .navigate().

@@ -12,24 +12,24 @@

TOP

-

The inner DOM of the target element will be replaced with the contents of href from a Navigation instance.

+

The inner DOM of the target element will be replaced with the contents of href from a Navigation instance.

This is the default behavior when the vv-shell element (top navigation) is navigated.

-

Setting this parameter on a target element that isn't the vv-shell element has the same effect as a normal top navigation. The target is "ignored".

+

Setting this parameter on a target element that isn't the vv-shell element has the same effect as a normal top navigation. The target is "ignored".

SELF

-

The contents of the target element will be navigated.

+

The contents of the target element will be navigated.

This is the default behavior when an element that isn't the vv-shell is navigated.

-

Setting this parameter on a target element that is the vv-shell (top navigation) has the same effect as TOP.

+

Setting this parameter on a target element that is the vv-shell (top navigation) has the same effect as TOP.

BLANK

-

Performs the browser-default behavior for opening links in a new window. The target element is ignored.

+

Performs the browser-default behavior for opening links in a new window. The target element is ignored.

PARENT

-

The closest HTMLElement to the target element with a vv-page property present will be navigated. If no parent element with that attribute is found, the vv-shell element (top navigation) will be navigated.

-

Setting this parameter on a target element that is the vv-shell (top navigation) has the same effect as TOP.

+

The closest HTMLElement to the target element with a vv-page property present will be navigated. If no parent element with that attribute is found, the vv-shell element (top navigation) will be navigated.

+

Setting this parameter on a target element that is the vv-shell (top navigation) has the same effect as TOP.


diff --git a/public/docs/v3.1.4/Reference/JavaScript/bindElements.php b/public/docs/v3.1.4/Reference/JavaScript/bindElements.php index b12d098..1b9d825 100644 --- a/public/docs/v3.1.4/Reference/JavaScript/bindElements.php +++ b/public/docs/v3.1.4/Reference/JavaScript/bindElements.php @@ -1,52 +1,22 @@
-

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.

+

Navigation.bindElements()

+

Static method on the Navigation class.

+

Calling this method will trigger an automatic binding of anchor tags that haven't been bound yet.

+

SSR anchor tags are automatically bound. This method should be called after you've added anchor tags dynamically with JavaScript.

- -
-
-

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.

+

Binding an anchor tag added programmatically

- +
\ No newline at end of file diff --git a/public/docs/v3.1.4/Reference/JavaScript/constructor.php b/public/docs/v3.1.4/Reference/JavaScript/constructor.php index 4aba39b..dba195f 100644 --- a/public/docs/v3.1.4/Reference/JavaScript/constructor.php +++ b/public/docs/v3.1.4/Reference/JavaScript/constructor.php @@ -12,7 +12,7 @@

Navigation

-

Returns an instance of Navigation which can then be excuted by chaining .navigate().

+

Returns an instance of Navigation which can then be excuted by chaining .navigate().


diff --git a/public/docs/v3.1.4/Reference/JavaScript/index.php b/public/docs/v3.1.4/Reference/JavaScript/index.php index 7f786b2..a0d90a3 100644 --- a/public/docs/v3.1.4/Reference/JavaScript/index.php +++ b/public/docs/v3.1.4/Reference/JavaScript/index.php @@ -4,7 +4,7 @@

JavaScript Reference

Vegvisir will automatically find and bind HTMLAnchorElement tags and perform soft-navigation between pages on the same origin.

-

The Navigation lets you interact with, and expand Vegvisirs front-end behavior.

+

The Navigation lets you interact with, and expand Vegvisirs front-end behavior.

\ No newline at end of file diff --git a/public/docs/v3.1.4/Reference/JavaScript/navigate.php b/public/docs/v3.1.4/Reference/JavaScript/navigate.php index b12d098..7c80fe0 100644 --- a/public/docs/v3.1.4/Reference/JavaScript/navigate.php +++ b/public/docs/v3.1.4/Reference/JavaScript/navigate.php @@ -1,52 +1,55 @@
-

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.

+

.navigate()

+

- +

Parameters

-

string

-

$pathname

-

Path to an asset to inline.

+

HTMLElement | String | null

+

target

+

An element passed either by reference or a CSS selector passed as a string (if multiple elements match the selector; the first match will be navigated).

+

If null or no value is passed to this argument, the vv-shell element will be navigated (top navigation).

-

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. -
+

String

+

position

+

A Navigation.POSITION string which will determine where content from the navigated page should be injected relative to target.

+
+
+

String

+

mode

+

A Navigation.MODE string which will determine how content from the navigated page should be injected relative to target.

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.

+

Promise

+

Returns a Promise that will resolve when the navigated page has been injected sucessfully, or rejects if the navigation failed or if the navigation was aborted with Navigation.abort


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.

+

Top navigation

+

Navigate the vv-shell element to another page (top navigation).

+

Remember that anchor tags with href's on the same origin are automatically navigated this way.

- + +
+
+

Navigating an element

+

Simple programmatic navigation of an element.

+
+
+
\ No newline at end of file diff --git a/public/docs/v3.1.4/Reference/JavaScript/options.php b/public/docs/v3.1.4/Reference/JavaScript/options.php index ec8e64c..e03b032 100644 --- a/public/docs/v3.1.4/Reference/JavaScript/options.php +++ b/public/docs/v3.1.4/Reference/JavaScript/options.php @@ -2,7 +2,7 @@

Navigation.options

-

An object containing parameters that can be changed to alter the behavior of a Vegvisir Navigation.

+

An object containing parameters that can be changed to alter the behavior of a Vegvisir Navigation.

@@ -17,17 +17,17 @@
  1. true -

    Will cause navigations performed on an instance of Navigation to push to the History stack and update the browser pathname.

    +

    Will cause navigations performed on an instance of Navigation to push to the History stack and update the browser pathname.

  2. false -

    Will cause a "silent" navigation on an instance of Navigation that won't update the broweser History stack and won't change the browser pathname.

    +

    Will cause a "silent" navigation on an instance of Navigation that won't update the broweser History stack and won't change the browser pathname.

The default setting for this property is:

    -
  • true when the vv-shell (top navigation) is navigated.
  • -
  • false when an element that isn't the vv-shell element is navigated.
  • +
  • true when the vv-shell (top navigation) is navigated.
  • +
  • false when an element that isn't the vv-shell element is navigated.
@@ -37,11 +37,11 @@
  1. true -

    Will cause navigations performed on an instance of Navigation to carry the request method and response body that the initiator page received on load.

    +

    Will cause navigations performed on an instance of Navigation to carry the request method and response body that the initiator page received on load.

  2. false -

    Navigations performed on an instance of Navigation will be sent as GET requests (without a request body).

    +

    Navigations performed on an instance of Navigation will be sent as GET requests (without a request body).

diff --git a/public/docs/v3.1.4/Reference/PHP/VV/css.php b/public/docs/v3.1.4/Reference/PHP/VV/css.php index a7530bf..38b15ee 100644 --- a/public/docs/v3.1.4/Reference/PHP/VV/css.php +++ b/public/docs/v3.1.4/Reference/PHP/VV/css.php @@ -23,7 +23,7 @@
  1. true -

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

    +

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

  2. false @@ -44,7 +44,7 @@

Importing a stylesheet

-

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

+

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

diff --git a/public/docs/v3.1.4/Reference/PHP/VV/embed.php b/public/docs/v3.1.4/Reference/PHP/VV/embed.php index b12d098..dfadb83 100644 --- a/public/docs/v3.1.4/Reference/PHP/VV/embed.php +++ b/public/docs/v3.1.4/Reference/PHP/VV/embed.php @@ -23,7 +23,7 @@
  1. true -

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

    +

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

  2. false diff --git a/public/docs/v3.1.4/Reference/PHP/VV/include.php b/public/docs/v3.1.4/Reference/PHP/VV/include.php index e3906ff..9b28f5a 100644 --- a/public/docs/v3.1.4/Reference/PHP/VV/include.php +++ b/public/docs/v3.1.4/Reference/PHP/VV/include.php @@ -22,7 +22,7 @@
    1. true -

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

      +

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

    2. false diff --git a/public/docs/v3.1.4/Reference/PHP/VV/js.php b/public/docs/v3.1.4/Reference/PHP/VV/js.php index 5a52029..0db34af 100644 --- a/public/docs/v3.1.4/Reference/PHP/VV/js.php +++ b/public/docs/v3.1.4/Reference/PHP/VV/js.php @@ -23,7 +23,7 @@
      1. true -

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

        +

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

      2. false @@ -44,7 +44,7 @@

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.

+

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

diff --git a/public/docs/v3.1.4/Reference/PHP/VV/root.php b/public/docs/v3.1.4/Reference/PHP/VV/root.php new file mode 100644 index 0000000..afc3600 --- /dev/null +++ b/public/docs/v3.1.4/Reference/PHP/VV/root.php @@ -0,0 +1,36 @@ + +
+
+

VV::root()

+

Return an absolute path to any resource relative to root_path.

+
+
+ +
+
+

Parameters

+
+
+

string

+

$pathname

+

Path to any resource relative from root_path.

+

Passing an empty string or nothing to this method will return an absolute path to the root folder itself.

+
+
+

Return value

+
+
+

string

+

Returns a string with an absolute pathname from a relative pathname passed to $pathname.

+
+
+
+

Examples

+
+
+

Check if an SVG file exists before embedding

+
+
+ +
+
\ No newline at end of file diff --git a/public/docs/v3.1.4/Reference/aside.php b/public/docs/v3.1.4/Reference/aside.php index d12775a..b671934 100644 --- a/public/docs/v3.1.4/Reference/aside.php +++ b/public/docs/v3.1.4/Reference/aside.php @@ -1,11 +1,11 @@
\ No newline at end of file diff --git a/public/shell.php b/public/shell.php index c629287..9abf7c4 100644 --- a/public/shell.php +++ b/public/shell.php @@ -103,7 +103,7 @@

vlw

- diff --git a/snippets/HTMLCodeDemoElement/docs/v3.1.4/JS/bindElements/description/syntax.js.php b/snippets/HTMLCodeDemoElement/docs/v3.1.4/JS/bindElements/description/syntax.js.php new file mode 100644 index 0000000..e654ddf --- /dev/null +++ b/snippets/HTMLCodeDemoElement/docs/v3.1.4/JS/bindElements/description/syntax.js.php @@ -0,0 +1 @@ +
Navigation.bindElements() -> void
\ No newline at end of file diff --git a/snippets/HTMLCodeDemoElement/docs/v3.1.4/JS/bindElements/example_bind/example.js.php b/snippets/HTMLCodeDemoElement/docs/v3.1.4/JS/bindElements/example_bind/example.js.php new file mode 100644 index 0000000..e95abcf --- /dev/null +++ b/snippets/HTMLCodeDemoElement/docs/v3.1.4/JS/bindElements/example_bind/example.js.php @@ -0,0 +1 @@ +
const element = document.createElement("a");
element.href = "/example-page";
// Append a new anchor tag to the bottom of vv-shell
vegvisir.Navigation.shellElement.appendChild(element);
// Bind the new element so we're soft-navigating that element
vegvisir.Navigation.bindElements();
\ No newline at end of file diff --git a/snippets/HTMLCodeDemoElement/docs/v3.1.4/JS/constructor/description/syntax.js.php b/snippets/HTMLCodeDemoElement/docs/v3.1.4/JS/constructor/description/syntax.js.php index dea91df..d22c5f5 100644 --- a/snippets/HTMLCodeDemoElement/docs/v3.1.4/JS/constructor/description/syntax.js.php +++ b/snippets/HTMLCodeDemoElement/docs/v3.1.4/JS/constructor/description/syntax.js.php @@ -1 +1 @@ -
new Navigation(
    hrefURL|String|null,
    options?: Navigation.options
-> this
\ No newline at end of file +
new Navigation(
    hrefURL|String|null,
    options?: Navigation.options
-> this
\ No newline at end of file diff --git a/snippets/HTMLCodeDemoElement/docs/v3.1.4/JS/navigate/description/syntax.js.php b/snippets/HTMLCodeDemoElement/docs/v3.1.4/JS/navigate/description/syntax.js.php new file mode 100644 index 0000000..0148f3c --- /dev/null +++ b/snippets/HTMLCodeDemoElement/docs/v3.1.4/JS/navigate/description/syntax.js.php @@ -0,0 +1 @@ +
.navigate(
    targetHTMLElement|String|null = Navigation.shellElement,
-> Promise<void>
\ No newline at end of file diff --git a/snippets/HTMLCodeDemoElement/docs/v3.1.4/JS/navigate/example_element_navigate/example.js.php b/snippets/HTMLCodeDemoElement/docs/v3.1.4/JS/navigate/example_element_navigate/example.js.php new file mode 100644 index 0000000..b35a8fe --- /dev/null +++ b/snippets/HTMLCodeDemoElement/docs/v3.1.4/JS/navigate/example_element_navigate/example.js.php @@ -0,0 +1 @@ +
const nav = new vegvisir.Navigation("/example-page");
// Navigate the passed <article> element to "public/example-page" by element reference
nav.navigate(document.querySelector("article"));
// Navigate the first section inside the article element element to "public/example-page" by CSS selector
nav.navigate("article > section:first-child");
\ No newline at end of file diff --git a/snippets/HTMLCodeDemoElement/docs/v3.1.4/JS/navigate/example_shell_navigate/example.js.php b/snippets/HTMLCodeDemoElement/docs/v3.1.4/JS/navigate/example_shell_navigate/example.js.php new file mode 100644 index 0000000..597eee9 --- /dev/null +++ b/snippets/HTMLCodeDemoElement/docs/v3.1.4/JS/navigate/example_shell_navigate/example.js.php @@ -0,0 +1 @@ +
new vegvisir.Navigation("/example-page").navigate();
\ No newline at end of file diff --git a/snippets/HTMLCodeDemoElement/docs/v3.1.4/PHP/VV/root/description/syntax.php.php b/snippets/HTMLCodeDemoElement/docs/v3.1.4/PHP/VV/root/description/syntax.php.php new file mode 100644 index 0000000..2d764b6 --- /dev/null +++ b/snippets/HTMLCodeDemoElement/docs/v3.1.4/PHP/VV/root/description/syntax.php.php @@ -0,0 +1 @@ +
<?php
    VV::root(
        string $pathname = ""
    ): string
\ No newline at end of file diff --git a/snippets/HTMLCodeDemoElement/docs/v3.1.4/PHP/VV/root/example_import/index.php.php b/snippets/HTMLCodeDemoElement/docs/v3.1.4/PHP/VV/root/example_import/index.php.php new file mode 100644 index 0000000..d6e80e1 --- /dev/null +++ b/snippets/HTMLCodeDemoElement/docs/v3.1.4/PHP/VV/root/example_import/index.php.php @@ -0,0 +1 @@ +
<?php if (is_file(VV::root("public/assets/my-icon.svg"))): ?>
    <?= VV::embed("public/assets/my-icon.svg"?>
<?php endif?>
\ No newline at end of file diff --git a/snippets/HTMLCodeDemoElement/docs/v3.1.4/introduction_version/example.txt.php b/snippets/HTMLCodeDemoElement/docs/v3.1.4/introduction_version/example.txt.php new file mode 100644 index 0000000..63f8931 --- /dev/null +++ b/snippets/HTMLCodeDemoElement/docs/v3.1.4/introduction_version/example.txt.php @@ -0,0 +1 @@ +
# Get the reference for VV::css() for the latest version of Vegvisir
/docs/Reference/PHP/VV/css
# Get the reference for VV::css() for a specific version of Vegvisir (v3.1.4 for example)
/docs/v3.1.4/Reference/PHP/VV/css
\ No newline at end of file diff --git a/src/Consts.php b/src/Consts.php deleted file mode 100644 index 55db001..0000000 --- a/src/Consts.php +++ /dev/null @@ -1,8 +0,0 @@ -