Initial Commit

This commit is contained in:
Netkas 2021-11-07 12:58:26 -05:00
commit da2680359e
12 changed files with 240 additions and 0 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
build/

1
.ppm_package Normal file
View File

@ -0,0 +1 @@
src

15
Makefile Normal file
View File

@ -0,0 +1,15 @@
clean:
rm -rf build
build:
mkdir build
ppm --no-intro --compile="src" --directory="build"
update:
ppm --generate-package="src"
install:
ppm --no-intro --no-prompt --fix-conflict --install="build/net.intellivoid.example_web_application.ppm"
install_fast:
ppm --no-intro --no-prompt --fix-conflict --skip-dependencies --install="build/net.intellivoid.example_web_application.ppm"

3
frontend/.htaccess Normal file
View File

@ -0,0 +1,3 @@
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule . index.php [L]

6
frontend/index.php Normal file
View File

@ -0,0 +1,6 @@
<?php
require('ppm');
import('net.intellivoid.dynamical_web');
\DynamicalWeb\DynamicalWeb::exec('net.intellivoid.example_web_application==latest');

View File

@ -0,0 +1,31 @@
.icon-list {
padding-left: 0;
list-style: none;
}
.icon-list li {
display: flex;
align-items: flex-start;
margin-bottom: .25rem;
}
.icon-list li::before {
display: block;
flex-shrink: 0;
width: 1.5em;
height: 1.5em;
margin-right: .5rem;
content: "";
background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23212529' viewBox='0 0 16 16'%3E%3Cpath d='M8 0a8 8 0 1 1 0 16A8 8 0 0 1 8 0zM4.5 7.5a.5.5 0 0 0 0 1h5.793l-2.147 2.146a.5.5 0 0 0 .708.708l3-3a.5.5 0 0 0 0-.708l-3-3a.5.5 0 1 0-.708.708L10.293 7.5H4.5z'/%3E%3C/svg%3E") no-repeat center center / 100% auto;
}
.bd-placeholder-img {
font-size: 1.125rem;
text-anchor: middle;
-webkit-user-select: none;
-moz-user-select: none;
user-select: none;
}
@media (min-width: 768px) {
.bd-placeholder-img-lg {
font-size: 3.5rem;
}
}

38
src/configuration.json Normal file
View File

@ -0,0 +1,38 @@
{
"name": "DynamicalWeb Application",
"version": "1.0.0.0",
"author": "Zi Xing Narrakas",
"organization": "Intellivoid Technologies",
"configuration": {
"root_path": "/",
"localization": {
"enabled": true,
"primary_localization": "en",
"auto_detect_preference": true,
"localizations": {
"en": "localization/en.json",
"zh": "localization/zh.json",
"zh-cn": "localization/zh.json"
}
},
"sessions": {
"enabled": true,
"configuration_name": "Example Web Application"
},
"cache_operations": true,
"favicon": null,
"localization_enabled": true,
"debugging_mode": true,
"framework_signature": true,
"application_signature": true,
"security_headers": true,
"headers": {}
},
"web_assets": [
{"type": "local", "name": "assets", "source": "assets", "path": "assets"},
{"type": "ppm", "name": "bootstrap", "source": "com.getbootstrap.bootstrap==latest", "path": "bootstrap"}
],
"router": [
{"method": ["GET"], "path": "", "page": "index", "params": []},
]
}

28
src/localization/en.json Normal file
View File

@ -0,0 +1,28 @@
{
"language": {
"name": "english",
"iso_639-1": "en"
},
"pages": {
"index": {
"HEADER": "All is good!"
}
},
"sections": {
"header": {
"PAGE_TITLE": "DynamicalWeb - Web Application"
}
},
"markdown": {
"lorem": {
"DOCUMENT_TITLE": "Lorem Ipsum",
"DOCUMENT_CONTENTS_1": "There is no one who loves pain itself, who seeks after it and wants to have it, simply because it is pain...",
"DOCUMENT_CONTENTS_2": "Donec eleifend odio vitae sagittis commodo. Cras vitae metus sapien. Quisque euismod felis at velit tincidunt, **a imperdiet est porttitor. Vivamus ultricies risus ac neque fermentum**, id commodo sapien rutrum. Orci varius natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Vivamus vel viverra ligula, ac malesuada urna. Quisque id est non augue luctus finibus nec in diam. "
}
},
"custom": {
"javascript_console": {
"CONSOLE_MESSAGE": "Hello World!"
}
}
}

49
src/package.json Normal file
View File

@ -0,0 +1,49 @@
{
"package": {
"package_name": "net.intellivoid.example_web_application",
"name": "Example DynamicalWeb Web Application",
"version": "1.0.0.0",
"author": "Zi Xing Narrakas",
"organization": "Intellivoid Technologies",
"description": "A example web application written under the DynamicalWeb framework",
"url": "https://github.com/intellivoid/DynamicalWeb-ExampleWebApp",
"dependencies": [
{
"package": "net.intellivoid.dynamical_web",
"version": "latest",
"source": "default@github/intellivoid/DynamicalWeb",
"required": true
},
{
"package": "com.getbootstrap.bootstrap",
"version": "latest",
"source": "default@github/intellivoid/DynamicalWeb-Bootstrap",
"required": true
}
],
"configuration": {
"autoload_method": "generated_spl",
"main": null,
"post_installation": [],
"pre_installation": []
}
},
"components": [],
"files": [
"assets/images/me-weeb-shit-nya-3-39415496.png",
"assets/javascript/another_test.js.dyn",
"configuration.json",
"localization/en.json",
"localization/zh.json",
"package.json",
"pages/debug/contents.dyn",
"pages/index/contents.dyn",
"pages/index/css/test.css.dyn",
"pages/index/javascript/console.js.dyn",
"pages/index/markdown/lorem.md.dyn",
"pages/index/scripts/time.dyn",
"pages/index/sections/copyright.dyn",
"pages/index/sections/header.dyn",
"pages/storage/contents.dyn"
]
}

View File

@ -0,0 +1,60 @@
<?php
use DynamicalWeb\DynamicalWeb;
use DynamicalWeb\Html;
?>
<!doctype html>
<html lang="<?PHP Html::print(DYNAMICAL_PRIMARY_LOCALIZATION_ISO_CODE); ?>">
<head>
<?PHP Html::importSection('header'); ?>
<link href="<?PHP Html::print(DynamicalWeb::getAssetRoute('bootstrap', '/dist/css/bootstrap.min.css')); ?>" rel="stylesheet">
<link href="<?PHP Html::print(DynamicalWeb::getAssetRoute('assets', '/css/start-template.css')); ?>" rel="stylesheet">
<title>DynamicalWeb Example Application</title>
</head>
<body>
<div class="col-lg-8 mx-auto p-3 py-md-5">
<header class="d-flex align-items-center pb-3 mb-5 border-bottom">
<a href="/" class="d-flex align-items-center text-dark text-decoration-none">
<svg xmlns="http://www.w3.org/2000/svg" width="40" height="32" class="me-2" viewBox="0 0 118 94" role="img"><title>Bootstrap</title><path fill-rule="evenodd" clip-rule="evenodd" d="M24.509 0c-6.733 0-11.715 5.893-11.492 12.284.214 6.14-.064 14.092-2.066 20.577C8.943 39.365 5.547 43.485 0 44.014v5.972c5.547.529 8.943 4.649 10.951 11.153 2.002 6.485 2.28 14.437 2.066 20.577C12.794 88.106 17.776 94 24.51 94H93.5c6.733 0 11.714-5.893 11.491-12.284-.214-6.14.064-14.092 2.066-20.577 2.009-6.504 5.396-10.624 10.943-11.153v-5.972c-5.547-.529-8.934-4.649-10.943-11.153-2.002-6.484-2.28-14.437-2.066-20.577C105.214 5.894 100.233 0 93.5 0H24.508zM80 57.863C80 66.663 73.436 72 62.543 72H44a2 2 0 01-2-2V24a2 2 0 012-2h18.437c9.083 0 15.044 4.92 15.044 12.474 0 5.302-4.01 10.049-9.119 10.88v.277C75.317 46.394 80 51.21 80 57.863zM60.521 28.34H49.948v14.934h8.905c6.884 0 10.68-2.772 10.68-7.727 0-4.643-3.264-7.207-9.012-7.207zM49.948 49.2v16.458H60.91c7.167 0 10.964-2.876 10.964-8.281 0-5.406-3.903-8.178-11.425-8.178H49.948z" fill="currentColor"></path></svg>
<span class="fs-4">Starter template</span>
</a>
</header>
<main>
<h1>Get started with Bootstrap</h1>
<p class="fs-5 col-md-8">Quickly and easily get started with Bootstrap's compiled, production-ready files with this barebones example featuring some basic HTML and helpful links. Download all our examples to get started.</p>
<div class="mb-5">
<a href="../examples/" class="btn btn-primary btn-lg px-4">Download examples</a>
</div>
<hr class="col-3 col-md-2 mb-5">
<div class="row g-5">
<div class="col-md-6">
<h2>Starter projects</h2>
<p>Ready to beyond the starter template? Check out these open source projects that you can quickly duplicate to a new GitHub repository.</p>
<ul class="icon-list">
<li><a href="https://github.com/twbs/bootstrap-npm-starter" rel="noopener" target="_blank">Bootstrap npm starter</a></li>
<li class="text-muted">Bootstrap Parcel starter (coming soon!)</li>
</ul>
</div>
<div class="col-md-6">
<h2>Guides</h2>
<p>Read more detailed instructions and documentation on using or contributing to Bootstrap.</p>
<ul class="icon-list">
<li><a href="../getting-started/introduction/">Bootstrap quick start guide</a></li>
<li><a href="../getting-started/webpack/">Bootstrap Webpack guide</a></li>
<li><a href="../getting-started/parcel/">Bootstrap Parcel guide</a></li>
<li><a href="../getting-started/contribute/">Contributing to Bootstrap</a></li>
</ul>
</div>
</div>
</main>
<?PHP Html::importSection('footer'); ?>
</div>
<script src="<?PHP Html::print(DynamicalWeb::getAssetRoute('bootstrap', '/js/bootstrap.bundle.min.js')); ?>"></script>
</body>
</html>

3
src/sections/footer.dyn Normal file
View File

@ -0,0 +1,3 @@
<footer class="pt-5 my-5 text-muted border-top">
Created by the Bootstrap team &middot; &copy; 2021
</footer>

5
src/sections/header.dyn Normal file
View File

@ -0,0 +1,5 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="Zi Xing Narrakas">
<meta name="generator" content="DynamicalWeb">