diff --git a/Consts.php b/Consts.php
index c17bc35..0f31a98 100644
--- a/Consts.php
+++ b/Consts.php
@@ -5,4 +5,4 @@
/**
* # Docs
*/
- const VERSION_LATEST = "/public/docs/v3.1.4/";
\ No newline at end of file
+ const VERSION_LATEST = "/public/docs/v3.1.5/";
\ No newline at end of file
diff --git a/public/docs/v3.1.5/Reference/Env.php b/public/docs/v3.1.5/Reference/Env.php
new file mode 100644
index 0000000..e0d2f08
--- /dev/null
+++ b/public/docs/v3.1.5/Reference/Env.php
@@ -0,0 +1,55 @@
+= VV::include("public/docs/v3.1.5/Reference/layout") ?>
+
+
+ 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.
+
+
+
+
+ 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.
+
+
+ bool
+ display_php_source
+ Enabling this can lead to sensitive information being leaked from your back-end.
+ When set to true
appending ".php" to the end of any page pathname will return the PHP source for that page in text/plain
.
+ For example, https://example.com/page.php will let the visitor inspect the PHP code for that page.
+ Commenting-out this variable or setting it to null will default this setting to false
.
+
+
\ No newline at end of file
diff --git a/public/docs/v3.1.5/Reference/JavaScript/EVENTS.php b/public/docs/v3.1.5/Reference/JavaScript/EVENTS.php
new file mode 100644
index 0000000..949b3a6
--- /dev/null
+++ b/public/docs/v3.1.5/Reference/JavaScript/EVENTS.php
@@ -0,0 +1,30 @@
+= VV::include("public/docs/v3.1.5/Reference/layout") ?>
+
+
+ Navigation.EVENTS
+ A set of CustomEvent
instances dispatched when various Vegvisir navigations are performed.
+
+
+ = VV::include("snippets/HTMLCodeDemoElement/HTMLCodeDemoElement?id=docs/v3.1.5/JS/events/description") ?>
+
+
+
+ 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.
+
+
+ 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.
+
+
+
+
+ No examples available.
+
+
\ No newline at end of file
diff --git a/public/docs/v3.1.5/Reference/JavaScript/MODE.php b/public/docs/v3.1.5/Reference/JavaScript/MODE.php
new file mode 100644
index 0000000..07d2d52
--- /dev/null
+++ b/public/docs/v3.1.5/Reference/JavaScript/MODE.php
@@ -0,0 +1,29 @@
+= VV::include("public/docs/v3.1.5/Reference/layout") ?>
+
+
+
+ = VV::include("snippets/HTMLCodeDemoElement/HTMLCodeDemoElement?id=docs/v3.1.5/JS/mode/description") ?>
+
+
+
+ REPLACE
+ 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()
+
+
+
+
+ No examples available.
+
+
\ No newline at end of file
diff --git a/public/docs/v3.1.5/Reference/JavaScript/POSITION.php b/public/docs/v3.1.5/Reference/JavaScript/POSITION.php
new file mode 100644
index 0000000..d0ebb8c
--- /dev/null
+++ b/public/docs/v3.1.5/Reference/JavaScript/POSITION.php
@@ -0,0 +1,39 @@
+= VV::include("public/docs/v3.1.5/Reference/layout") ?>
+
+
+
+ = VV::include("snippets/HTMLCodeDemoElement/HTMLCodeDemoElement?id=docs/v3.1.5/JS/position/description") ?>
+
+
+
+
+
+
+
+
+
+ No examples available.
+
+
\ No newline at end of file
diff --git a/public/docs/v3.1.5/Reference/JavaScript/TARGET.php b/public/docs/v3.1.5/Reference/JavaScript/TARGET.php
new file mode 100644
index 0000000..d95cc0f
--- /dev/null
+++ b/public/docs/v3.1.5/Reference/JavaScript/TARGET.php
@@ -0,0 +1,41 @@
+= VV::include("public/docs/v3.1.5/Reference/layout") ?>
+
+
+ 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()
.
+
+
+ = VV::include("snippets/HTMLCodeDemoElement/HTMLCodeDemoElement?id=docs/v3.1.5/JS/target/description") ?>
+
+
+
+ TOP
+ 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".
+
+
+ SELF
+ 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
.
+
+
+ BLANK
+ 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
.
+
+
+
+
+ No examples available.
+
+
\ No newline at end of file
diff --git a/public/docs/v3.1.5/Reference/JavaScript/abort.php b/public/docs/v3.1.5/Reference/JavaScript/abort.php
new file mode 100644
index 0000000..510ae4a
--- /dev/null
+++ b/public/docs/v3.1.5/Reference/JavaScript/abort.php
@@ -0,0 +1,29 @@
+= VV::include("public/docs/v3.1.5/Reference/layout") ?>
+
+
+ .abort
+ Abort a Vegvisir navigation in action.
+ This is an instance property of vegvisir.Navigation
.
+
+
+ = VV::include("snippets/HTMLCodeDemoElement/HTMLCodeDemoElement?id=docs/v3.1.5/JS/abort/description") ?>
+
+
+
+
+
+
+ Abort a navigation in progress
+ In this example we will perform a simple programmatic Vegvsir navigation and abort it immediately.
+
+
+ = VV::include("snippets/HTMLCodeDemoElement/HTMLCodeDemoElement?id=docs/v3.1.5/JS/abort/example_abort") ?>
+
+
\ No newline at end of file
diff --git a/public/docs/v3.1.5/Reference/JavaScript/bindElements.php b/public/docs/v3.1.5/Reference/JavaScript/bindElements.php
new file mode 100644
index 0000000..6149bbe
--- /dev/null
+++ b/public/docs/v3.1.5/Reference/JavaScript/bindElements.php
@@ -0,0 +1,22 @@
+= VV::include("public/docs/v3.1.5/Reference/layout") ?>
+
+
+ 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.
+
+
+ = VV::include("snippets/HTMLCodeDemoElement/HTMLCodeDemoElement?id=docs/v3.1.5/JS/bindElements/description") ?>
+
+
+
+
+ Binding an anchor tag added programmatically
+
+
+ = VV::include("snippets/HTMLCodeDemoElement/HTMLCodeDemoElement?id=docs/v3.1.5/JS/bindElements/example_bind") ?>
+
+
\ No newline at end of file
diff --git a/public/docs/v3.1.5/Reference/JavaScript/constructor.php b/public/docs/v3.1.5/Reference/JavaScript/constructor.php
new file mode 100644
index 0000000..f0dafb8
--- /dev/null
+++ b/public/docs/v3.1.5/Reference/JavaScript/constructor.php
@@ -0,0 +1,24 @@
+= VV::include("public/docs/v3.1.5/Reference/layout") ?>
+
+
+ Navigation.constructor
+ Initialize a new Vegvisir soft-navigation programmatically.
+
+
+ = VV::include("snippets/HTMLCodeDemoElement/HTMLCodeDemoElement?id=docs/v3.1.5/JS/constructor/description") ?>
+
+
+
+ Navigation
+ Returns an instance of Navigation
which can then be excuted by chaining .navigate()
.
+
+
+
+
+ No examples available.
+
+
\ No newline at end of file
diff --git a/public/docs/v3.1.5/Reference/JavaScript/index.php b/public/docs/v3.1.5/Reference/JavaScript/index.php
new file mode 100644
index 0000000..d235e98
--- /dev/null
+++ b/public/docs/v3.1.5/Reference/JavaScript/index.php
@@ -0,0 +1,10 @@
+= VV::include("public/docs/v3.1.5/Reference/layout") ?>
+
+
+
+ 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.
+
+
+
\ No newline at end of file
diff --git a/public/docs/v3.1.5/Reference/JavaScript/navigate.php b/public/docs/v3.1.5/Reference/JavaScript/navigate.php
new file mode 100644
index 0000000..7c6d4c7
--- /dev/null
+++ b/public/docs/v3.1.5/Reference/JavaScript/navigate.php
@@ -0,0 +1,55 @@
+= VV::include("public/docs/v3.1.5/Reference/layout") ?>
+
+
+
+ = VV::include("snippets/HTMLCodeDemoElement/HTMLCodeDemoElement?id=docs/v3.1.5/JS/navigate/description") ?>
+
+
+
+ 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).
+
+
+ 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
.
+
+
+
+ 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
+
+
+
+
+ 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.
+
+
+ = VV::include("snippets/HTMLCodeDemoElement/HTMLCodeDemoElement?id=docs/v3.1.5/JS/navigate/example_shell_navigate") ?>
+
+
+ Navigating an element
+ Simple programmatic navigation of an element.
+
+
+ = VV::include("snippets/HTMLCodeDemoElement/HTMLCodeDemoElement?id=docs/v3.1.5/JS/navigate/example_element_navigate") ?>
+
+
\ No newline at end of file
diff --git a/public/docs/v3.1.5/Reference/JavaScript/options.php b/public/docs/v3.1.5/Reference/JavaScript/options.php
new file mode 100644
index 0000000..df945a1
--- /dev/null
+++ b/public/docs/v3.1.5/Reference/JavaScript/options.php
@@ -0,0 +1,55 @@
+= VV::include("public/docs/v3.1.5/Reference/layout") ?>
+
+
+ Navigation.options
+ An object containing parameters that can be changed to alter the behavior of a Vegvisir Navigation
.
+
+
+ = VV::include("snippets/HTMLCodeDemoElement/HTMLCodeDemoElement?id=docs/v3.1.5/JS/options/description") ?>
+
+
+
+ bool
+ pushHistory
+ Flag which when set to:
+
+ -
+
true
+ Will cause navigations performed on an instance of Navigation
to push to the History stack and update the browser pathname.
+
+ -
+
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.
+
+
+ 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.
+
+
+
+ bool
+ carryRequestOptions
+ Flag which when set to:
+
+ -
+
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.
+
+ -
+
false
+ Navigations performed on an instance of Navigation
will be sent as GET
requests (without a request body).
+
+
+
+
+
+
+ No examples available.
+
+
\ No newline at end of file
diff --git a/public/docs/v3.1.5/Reference/PHP/VV/css.php b/public/docs/v3.1.5/Reference/PHP/VV/css.php
new file mode 100644
index 0000000..22ab9c2
--- /dev/null
+++ b/public/docs/v3.1.5/Reference/PHP/VV/css.php
@@ -0,0 +1,52 @@
+= VV::include("public/docs/v3.1.5/Reference/layout") ?>
+
+
+ VV::css()
+ Include a CSS file into a page which will be automatically minified and inlined.
+
+
+ = VV::include("snippets/HTMLCodeDemoElement/HTMLCodeDemoElement?id=docs/v3.1.5/PHP/VV/css/description") ?>
+
+
+
+ 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:
+
+ -
+
true
+ Will make $pathname
look for a CSS file relative to root_path
.
+
+ -
+
false
+ Will make $pathname
look for a CSS file relative to the root of the whole filesystem.
+
+
+
+
+
+ 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.
+
+
+
+
+ Importing a stylesheet
+ In this example we're importing a stylesheet from /public/assets/css/style.css
relative from root_path
.
+
+
+ = VV::include("snippets/HTMLCodeDemoElement/HTMLCodeDemoElement?id=docs/v3.1.5/PHP/VV/css/example_import") ?>
+
+
\ No newline at end of file
diff --git a/public/docs/v3.1.5/Reference/PHP/VV/embed.php b/public/docs/v3.1.5/Reference/PHP/VV/embed.php
new file mode 100644
index 0000000..119f124
--- /dev/null
+++ b/public/docs/v3.1.5/Reference/PHP/VV/embed.php
@@ -0,0 +1,52 @@
+= VV::include("public/docs/v3.1.5/Reference/layout") ?>
+
+
+ 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.
+
+
+ = VV::include("snippets/HTMLCodeDemoElement/HTMLCodeDemoElement?id=docs/v3.1.5/PHP/VV/embed/description") ?>
+
+
+
+ string
+ $pathname
+ Path to an asset to inline.
+
+
+ bool
+ $relative
+ Flag which when set to:
+
+ -
+
true
+ Will make $pathname
look for a file relative to root_path
.
+
+ -
+
false
+ Will make $pathname
look for a file relative to the root of the whole filesystem.
+
+
+
+
+
+ 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.
+
+
+
+
+ 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.
+
+
+ = VV::include("snippets/HTMLCodeDemoElement/HTMLCodeDemoElement?id=docs/v3.1.5/PHP/VV/embed/example_import") ?>
+
+
\ No newline at end of file
diff --git a/public/docs/v3.1.5/Reference/PHP/VV/include.php b/public/docs/v3.1.5/Reference/PHP/VV/include.php
new file mode 100644
index 0000000..ee14bfb
--- /dev/null
+++ b/public/docs/v3.1.5/Reference/PHP/VV/include.php
@@ -0,0 +1,51 @@
+= VV::include("public/docs/v3.1.5/Reference/layout") ?>
+
+
+ VV::include()
+ Inject the compiled output of another Vegvisir page (or other PHP script).
+
+
+ = VV::include("snippets/HTMLCodeDemoElement/HTMLCodeDemoElement?id=docs/v3.1.5/PHP/VV/include/description") ?>
+
+
+
+ string
+ $pathname
+ Path to another Vegvisir page or other PHP file.
+
+
+ bool
+ $relative
+ Flag which when set to:
+
+ -
+
true
+ Will make $pathname
look for a source file relative to root_path
.
+
+ -
+
false
+ Will make $pathname
look for a source file relative to the root of the whole filesystem.
+
+
+
+
+
+ string
+ Returns a minified version of the included source file as a string. If a file can not be found at $pathname
, an empty string is returned.
+
+
+
+
+ Importing a code snippet into a page
+ In this example we will be including a PHP file that contains reusable code (a banner) from /snippets/banner.php
into a Vegvisir page /public/index.php
.
+
+
+ = VV::include("snippets/HTMLCodeDemoElement/HTMLCodeDemoElement?id=docs/v3.1.5/PHP/VV/include/example_import") ?>
+
+
\ No newline at end of file
diff --git a/public/docs/v3.1.5/Reference/PHP/VV/index.php b/public/docs/v3.1.5/Reference/PHP/VV/index.php
new file mode 100644
index 0000000..8a3d5a6
--- /dev/null
+++ b/public/docs/v3.1.5/Reference/PHP/VV/index.php
@@ -0,0 +1,6 @@
+= VV::include("public/docs/v3.1.5/Reference/layout") ?>
+
+
+ = VV::include("snippets/HTMLCodeDemoElement/HTMLCodeDemoElement?id=docs/v3.1.5/PHP/VV/description") ?>
+
+
\ No newline at end of file
diff --git a/public/docs/v3.1.5/Reference/PHP/VV/init.php b/public/docs/v3.1.5/Reference/PHP/VV/init.php
new file mode 100644
index 0000000..5417adb
--- /dev/null
+++ b/public/docs/v3.1.5/Reference/PHP/VV/init.php
@@ -0,0 +1,35 @@
+= VV::include("public/docs/v3.1.5/Reference/layout") ?>
+
+
+ VV::init()
+ Initialize the Vegvisir front-end.
+ Place this as close to the bottom of your body
tag in your shell_page
as possible.
+
+
+ = VV::include("snippets/HTMLCodeDemoElement/HTMLCodeDemoElement?id=docs/v3.1.5/PHP/VV/init/description") ?>
+
+
+
+ This method takes no parameters.
+
+
+
+ string
+ Returns a script tag with the compiled and minified JavaScript required to run the Vegvisir front-end.
+
+
+
+
+ Initializing a Vegvisir website
+ In this example we will initialize a single-page website with the two required files to run a bare-bones Vegvisir website: /public/index.php
and /public/shell.php
.
+
+
+ = VV::include("snippets/HTMLCodeDemoElement/HTMLCodeDemoElement?id=docs/v3.1.5/PHP/VV/init/example_init") ?>
+
+
\ No newline at end of file
diff --git a/public/docs/v3.1.5/Reference/PHP/VV/js.php b/public/docs/v3.1.5/Reference/PHP/VV/js.php
new file mode 100644
index 0000000..ba4e092
--- /dev/null
+++ b/public/docs/v3.1.5/Reference/PHP/VV/js.php
@@ -0,0 +1,52 @@
+= VV::include("public/docs/v3.1.5/Reference/layout") ?>
+
+
+ VV::js()
+ Include a JavaScript source file into a page which will be automatically minified and inlined.
+
+
+ = VV::include("snippets/HTMLCodeDemoElement/HTMLCodeDemoElement?id=docs/v3.1.5/PHP/VV/js/description") ?>
+
+
+
+ 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:
+
+ -
+
true
+ Will make $pathname
look for a JavaScript source file relative to root_path
.
+
+ -
+
false
+ Will make $pathname
look for a JavaScript source file relative to the root of the whole filesystem.
+
+
+
+
+
+ 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.
+
+
+
+
+ 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
.
+
+
+ = VV::include("snippets/HTMLCodeDemoElement/HTMLCodeDemoElement?id=docs/v3.1.5/PHP/VV/js/example_import") ?>
+
+
\ No newline at end of file
diff --git a/public/docs/v3.1.5/Reference/PHP/VV/root.php b/public/docs/v3.1.5/Reference/PHP/VV/root.php
new file mode 100644
index 0000000..3ec3f43
--- /dev/null
+++ b/public/docs/v3.1.5/Reference/PHP/VV/root.php
@@ -0,0 +1,36 @@
+= VV::include("public/docs/v3.1.5/Reference/layout") ?>
+
+
+ VV::root()
+ Return an absolute path to any resource relative to root_path
.
+
+
+ = VV::include("snippets/HTMLCodeDemoElement/HTMLCodeDemoElement?id=docs/v3.1.5/PHP/VV/root/description") ?>
+
+
+
+ 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.
+
+
+
+ string
+ Returns a string with an absolute pathname from a relative pathname passed to $pathname
.
+
+
+
+
+ Check if an SVG file exists before embedding
+
+
+ = VV::include("snippets/HTMLCodeDemoElement/HTMLCodeDemoElement?id=docs/v3.1.5/PHP/VV/root/example_import") ?>
+
+
\ No newline at end of file
diff --git a/public/docs/v3.1.5/Reference/PHP/index.php b/public/docs/v3.1.5/Reference/PHP/index.php
new file mode 100644
index 0000000..5991928
--- /dev/null
+++ b/public/docs/v3.1.5/Reference/PHP/index.php
@@ -0,0 +1,10 @@
+= VV::include("public/docs/v3.1.5/Reference/layout") ?>
+
+
+
+ PHP Reference
+ Vegvisir exposes a single global static class VV
that can be used in any script/page loaded with Vegvisir.
+ This class contains various methods for importing, inlining assets, and returning pathnames.
+
+
+
\ No newline at end of file
diff --git a/public/docs/v3.1.5/Reference/aside.php b/public/docs/v3.1.5/Reference/aside.php
new file mode 100644
index 0000000..66d4b5c
--- /dev/null
+++ b/public/docs/v3.1.5/Reference/aside.php
@@ -0,0 +1,89 @@
+
+
\ No newline at end of file
diff --git a/public/docs/v3.1.5/Reference/index.php b/public/docs/v3.1.5/Reference/index.php
new file mode 100644
index 0000000..20024be
--- /dev/null
+++ b/public/docs/v3.1.5/Reference/index.php
@@ -0,0 +1,15 @@
+= VV::include("public/docs/v3.1.5/Reference/layout") ?>
+
+
+
\ No newline at end of file
diff --git a/public/docs/v3.1.5/Reference/layout.php b/public/docs/v3.1.5/Reference/layout.php
new file mode 100644
index 0000000..dfc1510
--- /dev/null
+++ b/public/docs/v3.1.5/Reference/layout.php
@@ -0,0 +1,4 @@
+
+= VV::include("public/docs/header") ?>
+= VV::include("public/docs/v3.1.5/Reference/aside") ?>
+
\ No newline at end of file
diff --git a/public/docs/v3.1.5/Reference/vv-attributes.php b/public/docs/v3.1.5/Reference/vv-attributes.php
new file mode 100644
index 0000000..043fbf3
--- /dev/null
+++ b/public/docs/v3.1.5/Reference/vv-attributes.php
@@ -0,0 +1,42 @@
+= VV::include("public/docs/v3.1.5/Reference/layout") ?>
+
+
+ Navigation attributes
+ Vegvisir has a few attributes that can be added to elements that can be used to bind navigations and change navigation behavior without JavaScript.
+
+
+ string
+ vv
+ This attribute can be added to any clickable HTML element to bind it like an anchor tag.
+ The value of this attribute should be a string with a pathname to the page that should be loaded.
+ An element with this attribute will be treated just like an anchor tag, which means (by default) the vv-shell
will be navigated.
+ Note: If added to an anchor tag, the anchor href
will be prefered - and the vv
will be ignored.
+
+
+ string
+ vv-position
+ A Navigation.POSITION
string that determines where the contents of vv
(or href
on an anchor tag) should be injected relative to the element with this attribute.
+
+
+ string
+ vv-mode
+ A Navigation.MODE
string that determines how the contents of vv
(or href
on an anchor tag) should be injected relative to the element with this attribute.
+
+
+
+ Wrapper attributes
+ Vegvisir sets a few attributes on elements that wrap soft-navigated content. These attributes are created automatically when it's the first time an element is used as a wrapper.
+
+
+ string
+ vv-page
+ This attribute's value will be updated with the pathname of the page that was soft-navigated to.
+ The attribute is set when a navigation is initiated.
+
+
+ bool
+ vv-loading
+ The value of this attribute will be a string-boolean with a value of "true" or "false".
+ this attribute will be "true" when a navigation is initiated, and set to "false" when the contents of the target page has been fully loaded (DOM ready).
+
+
\ No newline at end of file
diff --git a/public/docs/v3.1.5/aside.php b/public/docs/v3.1.5/aside.php
new file mode 100644
index 0000000..0048851
--- /dev/null
+++ b/public/docs/v3.1.5/aside.php
@@ -0,0 +1,33 @@
+
+
\ No newline at end of file
diff --git a/public/docs/v3.1.5/get-started.php b/public/docs/v3.1.5/get-started.php
new file mode 100644
index 0000000..4728661
--- /dev/null
+++ b/public/docs/v3.1.5/get-started.php
@@ -0,0 +1,43 @@
+= VV::include("public/docs/v3.1.5/layout") ?>
+
+
+ Get Started with Vegvisir
+ In this guide we will install Vegvisir from a template repository. I will be using a Debian Linux environment for this demonstration.
+
+
+ Prerequisites
+
+ - PHP 8.3+
+ - Composer
+ - A web server
+
+
+
+
+ 2. Run the install script
+ The template repository has an install.sh
file in its root directory which will install and set up our Vegvisir configuration for us.
+ = VV::include("snippets/HTMLCodeDemoElement/HTMLCodeDemoElement?id=docs/v3.1.5/get-started/run_install_script") ?>
+
+
+ 3. Configure your webserver
+ In this demo we will be using NGINX as our web server, and PHP-FPM (packaged by Ondřej Surý) as our FastCGI processor.
+ As long as you point all traffic to /vegvisir/public/index.php
with PHP pass you should be fine with other web server programs too.
+ = VV::include("snippets/HTMLCodeDemoElement/HTMLCodeDemoElement?id=docs/v3.1.5/get-started/nginx") ?>
+
+
+
\ No newline at end of file
diff --git a/public/docs/v3.1.5/index.php b/public/docs/v3.1.5/index.php
new file mode 100644
index 0000000..d13e598
--- /dev/null
+++ b/public/docs/v3.1.5/index.php
@@ -0,0 +1,19 @@
+= VV::include("public/docs/v3.1.5/layout") ?>
+
+
+ Introduction
+ Vegvisir is a work in progress, based on a framework I developed for a company a few years ago, which in turn was based on a content injector I built for another company. You can read more about the history of this framework on my personal website.
+ Adding a Vegvisir version number after "/docs" in the pathname /docs/vX.X.X/example-docs-page
lets you read the docs for a specific release.
+ = VV::include("snippets/HTMLCodeDemoElement/HTMLCodeDemoElement?id=docs/v3.1.5/introduction_version") ?>
+
+
+ Work in progress
+ This website (and the framework itself) is a work in progress. I apologize for the rushed, incomplete, confusing documentation on this site. I will make an effort to update these pages as best as I can.
+
+
+ The basics
+ The simple answer to what Vegvisir does is that it will automatically find and bind navigation handlers for all HTMLAnchorElement
s on a website. If the anchor href
points to a page on the same origin; a PHP file (containing HTML and native PHP templating) from the website's public_path
will be automatically soft-navigated to.
+ Another thing that Vegvisir lets you do with those soft-navigated pages is to inject and minify assets such as CSS stylesheets, JavaScript source files, and other assets that output text.
+ And the last thing that Vegvisir will offer for you is embeding snippets of PHP code (or another page) into a page.
+
+
\ No newline at end of file
diff --git a/public/docs/v3.1.5/installation.php b/public/docs/v3.1.5/installation.php
new file mode 100644
index 0000000..ddca810
--- /dev/null
+++ b/public/docs/v3.1.5/installation.php
@@ -0,0 +1,86 @@
+= VV::include("snippets/docs/v1.3.1/shell"); ?>
+
+
+
+ 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.
+ = Snippet::put("docs/installation/0", Snippet::PLAINTEXT) ?>
+ 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.
+ = Snippet::put("docs/installation/1", Snippet::PLAINTEXT) ?>
+
+
+
+
+ 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.
+ = Snippet::put("docs/installation/2", Snippet::PLAINTEXT) ?>
+
+
+
+
+ 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!
+ = Snippet::put("docs/installation/3", Snippet::PLAINTEXT) ?>
+
+
+
+
+ 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
+ = Snippet::put("docs/installation/4", Snippet::PLAINTEXT) ?>
+
+
+
+
+ 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
.
+ = Snippet::put("docs/installation/5", Snippet::PLAINTEXT) ?>
+
+
+
+
+ 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/docs/v3.1.5/layout.php b/public/docs/v3.1.5/layout.php
new file mode 100644
index 0000000..8ad743c
--- /dev/null
+++ b/public/docs/v3.1.5/layout.php
@@ -0,0 +1,4 @@
+
+= VV::include("public/docs/header") ?>
+= VV::include("public/docs/v3.1.5/aside") ?>
+
\ No newline at end of file
diff --git a/snippets/HTMLCodeDemoElement/docs/v3.1.5/JS/abort/description/syntax.js.php b/snippets/HTMLCodeDemoElement/docs/v3.1.5/JS/abort/description/syntax.js.php
new file mode 100644
index 0000000..1908234
--- /dev/null
+++ b/snippets/HTMLCodeDemoElement/docs/v3.1.5/JS/abort/description/syntax.js.php
@@ -0,0 +1 @@
+
new Navigation().abort -> AbortController
\ No newline at end of file
diff --git a/snippets/HTMLCodeDemoElement/docs/v3.1.5/JS/abort/example_abort/example.js.php b/snippets/HTMLCodeDemoElement/docs/v3.1.5/JS/abort/example_abort/example.js.php
new file mode 100644
index 0000000..efed215
--- /dev/null
+++ b/snippets/HTMLCodeDemoElement/docs/v3.1.5/JS/abort/example_abort/example.js.php
@@ -0,0 +1 @@
+const nav = new vegvisir.Navigation("some/page");
// Abort initialized navigation
nav.abort.abort();
// Navigate to URL if not aborted
if (!nav.abort.aborted) {
nav.navigate();
}
\ No newline at end of file
diff --git a/snippets/HTMLCodeDemoElement/docs/v3.1.5/JS/bindElements/description/syntax.js.php b/snippets/HTMLCodeDemoElement/docs/v3.1.5/JS/bindElements/description/syntax.js.php
new file mode 100644
index 0000000..e654ddf
--- /dev/null
+++ b/snippets/HTMLCodeDemoElement/docs/v3.1.5/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.5/JS/bindElements/example_bind/example.js.php b/snippets/HTMLCodeDemoElement/docs/v3.1.5/JS/bindElements/example_bind/example.js.php
new file mode 100644
index 0000000..e95abcf
--- /dev/null
+++ b/snippets/HTMLCodeDemoElement/docs/v3.1.5/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.5/JS/constructor/description/syntax.js.php b/snippets/HTMLCodeDemoElement/docs/v3.1.5/JS/constructor/description/syntax.js.php
new file mode 100644
index 0000000..4dfe519
--- /dev/null
+++ b/snippets/HTMLCodeDemoElement/docs/v3.1.5/JS/constructor/description/syntax.js.php
@@ -0,0 +1 @@
+new Navigation(
href: URL|String|null,
) -> this
\ No newline at end of file
diff --git a/snippets/HTMLCodeDemoElement/docs/v3.1.5/JS/events/description/syntax.js.php b/snippets/HTMLCodeDemoElement/docs/v3.1.5/JS/events/description/syntax.js.php
new file mode 100644
index 0000000..43ff107
--- /dev/null
+++ b/snippets/HTMLCodeDemoElement/docs/v3.1.5/JS/events/description/syntax.js.php
@@ -0,0 +1 @@
+{
STARTED = "navstarted",
FINISHED = "navfinished"
}
\ No newline at end of file
diff --git a/snippets/HTMLCodeDemoElement/docs/v3.1.5/JS/mode/description/syntax.js.php b/snippets/HTMLCodeDemoElement/docs/v3.1.5/JS/mode/description/syntax.js.php
new file mode 100644
index 0000000..69135b7
--- /dev/null
+++ b/snippets/HTMLCodeDemoElement/docs/v3.1.5/JS/mode/description/syntax.js.php
@@ -0,0 +1 @@
+{
REPLACE = "replace",
INSERT = "insert"
}
\ No newline at end of file
diff --git a/snippets/HTMLCodeDemoElement/docs/v3.1.5/JS/navigate/description/syntax.js.php b/snippets/HTMLCodeDemoElement/docs/v3.1.5/JS/navigate/description/syntax.js.php
new file mode 100644
index 0000000..a24a1ad
--- /dev/null
+++ b/snippets/HTMLCodeDemoElement/docs/v3.1.5/JS/navigate/description/syntax.js.php
@@ -0,0 +1 @@
+.navigate(
) -> Promise<void>
\ No newline at end of file
diff --git a/snippets/HTMLCodeDemoElement/docs/v3.1.5/JS/navigate/example_element_navigate/example.js.php b/snippets/HTMLCodeDemoElement/docs/v3.1.5/JS/navigate/example_element_navigate/example.js.php
new file mode 100644
index 0000000..b35a8fe
--- /dev/null
+++ b/snippets/HTMLCodeDemoElement/docs/v3.1.5/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.5/JS/navigate/example_shell_navigate/example.js.php b/snippets/HTMLCodeDemoElement/docs/v3.1.5/JS/navigate/example_shell_navigate/example.js.php
new file mode 100644
index 0000000..597eee9
--- /dev/null
+++ b/snippets/HTMLCodeDemoElement/docs/v3.1.5/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.5/JS/options/description/syntax.js.php b/snippets/HTMLCodeDemoElement/docs/v3.1.5/JS/options/description/syntax.js.php
new file mode 100644
index 0000000..fcb28a8
--- /dev/null
+++ b/snippets/HTMLCodeDemoElement/docs/v3.1.5/JS/options/description/syntax.js.php
@@ -0,0 +1 @@
+{
bool pushHistory: true,
bool carryRequestOptions: false
}
\ No newline at end of file
diff --git a/snippets/HTMLCodeDemoElement/docs/v3.1.5/JS/position/description/syntax.js.php b/snippets/HTMLCodeDemoElement/docs/v3.1.5/JS/position/description/syntax.js.php
new file mode 100644
index 0000000..1e298fe
--- /dev/null
+++ b/snippets/HTMLCodeDemoElement/docs/v3.1.5/JS/position/description/syntax.js.php
@@ -0,0 +1 @@
+{
AFTEREND = "afterend",
BEFOREEND = "beforeend",
AFTERBEGIN = "afterbegin",
BEFOREBEING = "beforebegin"
}
\ No newline at end of file
diff --git a/snippets/HTMLCodeDemoElement/docs/v3.1.5/JS/target/description/syntax.js.php b/snippets/HTMLCodeDemoElement/docs/v3.1.5/JS/target/description/syntax.js.php
new file mode 100644
index 0000000..c6c81cf
--- /dev/null
+++ b/snippets/HTMLCodeDemoElement/docs/v3.1.5/JS/target/description/syntax.js.php
@@ -0,0 +1 @@
+{
TOP = "_top",
SELF = "_self",
BLANK = "_blank",
PARENT = "_parent"
}
\ No newline at end of file
diff --git a/snippets/HTMLCodeDemoElement/docs/v3.1.5/PHP/VV/css/description/syntax.php.php b/snippets/HTMLCodeDemoElement/docs/v3.1.5/PHP/VV/css/description/syntax.php.php
new file mode 100644
index 0000000..6dca964
--- /dev/null
+++ b/snippets/HTMLCodeDemoElement/docs/v3.1.5/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.5/PHP/VV/css/example_import/index.php.php b/snippets/HTMLCodeDemoElement/docs/v3.1.5/PHP/VV/css/example_import/index.php.php
new file mode 100644
index 0000000..e28e12d
--- /dev/null
+++ b/snippets/HTMLCodeDemoElement/docs/v3.1.5/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.5/PHP/VV/embed/description/syntax.php.php b/snippets/HTMLCodeDemoElement/docs/v3.1.5/PHP/VV/embed/description/syntax.php.php
new file mode 100644
index 0000000..1cf5a11
--- /dev/null
+++ b/snippets/HTMLCodeDemoElement/docs/v3.1.5/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.5/PHP/VV/embed/example_import/compiled.html.php b/snippets/HTMLCodeDemoElement/docs/v3.1.5/PHP/VV/embed/example_import/compiled.html.php
new file mode 100644
index 0000000..1e6760a
--- /dev/null
+++ b/snippets/HTMLCodeDemoElement/docs/v3.1.5/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.5/PHP/VV/embed/example_import/icon.svg.php b/snippets/HTMLCodeDemoElement/docs/v3.1.5/PHP/VV/embed/example_import/icon.svg.php
new file mode 100644
index 0000000..8d64b06
--- /dev/null
+++ b/snippets/HTMLCodeDemoElement/docs/v3.1.5/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.5/PHP/VV/embed/example_import/index.php.php b/snippets/HTMLCodeDemoElement/docs/v3.1.5/PHP/VV/embed/example_import/index.php.php
new file mode 100644
index 0000000..952657c
--- /dev/null
+++ b/snippets/HTMLCodeDemoElement/docs/v3.1.5/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.5/PHP/VV/include/description/syntax.php.php b/snippets/HTMLCodeDemoElement/docs/v3.1.5/PHP/VV/include/description/syntax.php.php
new file mode 100644
index 0000000..cd4bb9b
--- /dev/null
+++ b/snippets/HTMLCodeDemoElement/docs/v3.1.5/PHP/VV/include/description/syntax.php.php
@@ -0,0 +1 @@
+<?php
VV::include(
string $pathname,
bool $relative = true
): string
\ No newline at end of file
diff --git a/snippets/HTMLCodeDemoElement/docs/v3.1.5/PHP/VV/include/example_import/banner.php.php b/snippets/HTMLCodeDemoElement/docs/v3.1.5/PHP/VV/include/example_import/banner.php.php
new file mode 100644
index 0000000..c66c006
--- /dev/null
+++ b/snippets/HTMLCodeDemoElement/docs/v3.1.5/PHP/VV/include/example_import/banner.php.php
@@ -0,0 +1 @@
+<section class="banner">
<h1>This snippet can be imported into any page with VV::include()</h1>
<p>We can also use native PHP templating to perform SSR.</p>
<p>Did we get a foo? <?= array_key_exists("foo", $_GET) ? "yes we did" : "no we didn't" ?>.</p>
</section>
\ No newline at end of file
diff --git a/snippets/HTMLCodeDemoElement/docs/v3.1.5/PHP/VV/include/example_import/compiled.html.php b/snippets/HTMLCodeDemoElement/docs/v3.1.5/PHP/VV/include/example_import/compiled.html.php
new file mode 100644
index 0000000..5faf7a0
--- /dev/null
+++ b/snippets/HTMLCodeDemoElement/docs/v3.1.5/PHP/VV/include/example_import/compiled.html.php
@@ -0,0 +1 @@
+<main>
<section class="banner">
<h1>This snippet can be imported into any page with VV::include()</h1>
<p>We can also use native PHP templating to perform SSR.</p>
<p>Did we get a foo? yes we did.</p>
</section>
<section>
<h1>Hey psst!</h1>
<p>You can pass search parameters to included pages and they will be accessible in their own scope under the $_GET superglobal</p>
</section>
</main>
\ No newline at end of file
diff --git a/snippets/HTMLCodeDemoElement/docs/v3.1.5/PHP/VV/include/example_import/index.php.php b/snippets/HTMLCodeDemoElement/docs/v3.1.5/PHP/VV/include/example_import/index.php.php
new file mode 100644
index 0000000..dfd9fa4
--- /dev/null
+++ b/snippets/HTMLCodeDemoElement/docs/v3.1.5/PHP/VV/include/example_import/index.php.php
@@ -0,0 +1 @@
+<main>
<?= VV::include("snippets/banner?foo=bar") ?>
<section>
<h1>Hey psst!</h1>
<p>You can pass search parameters to included pages and they will be accessible in their own scope under the $_GET superglobal</p>
</section>
</main>
\ No newline at end of file
diff --git a/snippets/HTMLCodeDemoElement/docs/v3.1.5/PHP/VV/init/description/syntax.php.php b/snippets/HTMLCodeDemoElement/docs/v3.1.5/PHP/VV/init/description/syntax.php.php
new file mode 100644
index 0000000..9f78810
--- /dev/null
+++ b/snippets/HTMLCodeDemoElement/docs/v3.1.5/PHP/VV/init/description/syntax.php.php
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/snippets/HTMLCodeDemoElement/docs/v3.1.5/PHP/VV/init/example_init/compiled.html.php b/snippets/HTMLCodeDemoElement/docs/v3.1.5/PHP/VV/init/example_init/compiled.html.php
new file mode 100644
index 0000000..26113a5
--- /dev/null
+++ b/snippets/HTMLCodeDemoElement/docs/v3.1.5/PHP/VV/init/example_init/compiled.html.php
@@ -0,0 +1 @@
+<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<vv-shell>
<section>
<h1>Hey!</h1>
<p>This index.php file present at the root of the "/public" directory will be loaded as this website's main landing page.</p>
</section>
</vv-shell>
<script>...</script>
</body>
</html>
\ No newline at end of file
diff --git a/snippets/HTMLCodeDemoElement/docs/v3.1.5/PHP/VV/init/example_init/index.php.php b/snippets/HTMLCodeDemoElement/docs/v3.1.5/PHP/VV/init/example_init/index.php.php
new file mode 100644
index 0000000..f99e45d
--- /dev/null
+++ b/snippets/HTMLCodeDemoElement/docs/v3.1.5/PHP/VV/init/example_init/index.php.php
@@ -0,0 +1 @@
+<section>
<h1>Hey!</h1>
<p>This index.php file present at the root of the "/public" directory will be loaded as this website's main landing page.</p>
</section>
\ No newline at end of file
diff --git a/snippets/HTMLCodeDemoElement/docs/v3.1.5/PHP/VV/init/example_init/shell.php.php b/snippets/HTMLCodeDemoElement/docs/v3.1.5/PHP/VV/init/example_init/shell.php.php
new file mode 100644
index 0000000..369b3eb
--- /dev/null
+++ b/snippets/HTMLCodeDemoElement/docs/v3.1.5/PHP/VV/init/example_init/shell.php.php
@@ -0,0 +1 @@
+
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<?php // The landingpage "/public/index.php" will be loaded INTO this vv-shell element ?>
<vv-shell></vv-shell>
<?= VV::init() ?>
</body>
</html>
\ No newline at end of file
diff --git a/snippets/HTMLCodeDemoElement/docs/v3.1.5/PHP/VV/js/description/syntax.php.php b/snippets/HTMLCodeDemoElement/docs/v3.1.5/PHP/VV/js/description/syntax.php.php
new file mode 100644
index 0000000..50dba88
--- /dev/null
+++ b/snippets/HTMLCodeDemoElement/docs/v3.1.5/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.5/PHP/VV/js/example_import/index.php.php b/snippets/HTMLCodeDemoElement/docs/v3.1.5/PHP/VV/js/example_import/index.php.php
new file mode 100644
index 0000000..43859b8
--- /dev/null
+++ b/snippets/HTMLCodeDemoElement/docs/v3.1.5/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/HTMLCodeDemoElement/docs/v3.1.5/PHP/VV/root/description/syntax.php.php b/snippets/HTMLCodeDemoElement/docs/v3.1.5/PHP/VV/root/description/syntax.php.php
new file mode 100644
index 0000000..2d764b6
--- /dev/null
+++ b/snippets/HTMLCodeDemoElement/docs/v3.1.5/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.5/PHP/VV/root/example_import/index.php.php b/snippets/HTMLCodeDemoElement/docs/v3.1.5/PHP/VV/root/example_import/index.php.php
new file mode 100644
index 0000000..d6e80e1
--- /dev/null
+++ b/snippets/HTMLCodeDemoElement/docs/v3.1.5/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.5/get-started/nginx/nginx.conf.php b/snippets/HTMLCodeDemoElement/docs/v3.1.5/get-started/nginx/nginx.conf.php
new file mode 100644
index 0000000..69536ba
--- /dev/null
+++ b/snippets/HTMLCodeDemoElement/docs/v3.1.5/get-started/nginx/nginx.conf.php
@@ -0,0 +1 @@
+server {
listen 80;
server_name _;
# Replace <path_to_repo> with your directory path
root <path_to_repo>/vegvisir/public;
location ~ /* {
try_files /index.php = 503;
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/run/php/php8.3-fpm.sock;
}
}
\ No newline at end of file
diff --git a/snippets/HTMLCodeDemoElement/docs/v3.1.5/get-started/run_install_script/shell.sh.php b/snippets/HTMLCodeDemoElement/docs/v3.1.5/get-started/run_install_script/shell.sh.php
new file mode 100644
index 0000000..c33657d
--- /dev/null
+++ b/snippets/HTMLCodeDemoElement/docs/v3.1.5/get-started/run_install_script/shell.sh.php
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/snippets/HTMLCodeDemoElement/docs/v3.1.5/introduction_version/example.txt.php b/snippets/HTMLCodeDemoElement/docs/v3.1.5/introduction_version/example.txt.php
new file mode 100644
index 0000000..c83b516
--- /dev/null
+++ b/snippets/HTMLCodeDemoElement/docs/v3.1.5/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.5 for example)
/docs/v3.1.5/Reference/PHP/VV/css
\ No newline at end of file