This commit is contained in:
Florian Bouillon 2019-02-11 20:34:41 +01:00
parent df674a7ec5
commit 0399e5043b

View File

@ -1,5 +1,25 @@
# Admin Panel # Admin Panel
## Table of Content
- [Admin Panel](#admin-panel)
- [Table of Content](#table-of-content)
- [Description](#description)
- [Changelog](#changelog)
- [Themes](#themes)
- [Templates](#templates)
- [styles & scripts](#styles--scripts)
- [Options](#options)
- [Modules](#modules)
- [Files/Folders architecture](#filesfolders-architecture)
- [Configs files](#configs-files)
- [page.json (in `pages` folder)](#pagejson-in-pages-folder)
- [scripts.json & styles.json](#scriptsjson--stylesjson)
- [admin.json](#adminjson)
- [vars.json](#varsjson)
- [moduleName.json & themeName.json](#modulenamejson--themenamejson)
- [templates.json](#templatesjson)
## Description ## Description
WIP WIP
@ -19,6 +39,7 @@ first a template named "page" is a must, your template can be static or not (sta
```php ```php
website->addTemplate("Template Name", "templateURI/from/root/page.php", "functionName", true); website->addTemplate("Template Name", "templateURI/from/root/page.php", "functionName", true);
``` ```
- `"Template Name"` is the shown name - `"Template Name"` is the shown name
- `"templateURI"` is the file URI - `"templateURI"` is the file URI
- `"functionName"` is the function used - `"functionName"` is the function used
@ -56,6 +77,7 @@ updating an option will update the static files
```php ```php
$optionMenu = website->addOptionsMenu("Menu Name"); $optionMenu = website->addOptionsMenu("Menu Name");
``` ```
here we create a new option menu that will be located in the admin sidebar `theme -> Options` within the tabs here we create a new option menu that will be located in the admin sidebar `theme -> Options` within the tabs
- `"Menu Name"` is the shown name - `"Menu Name"` is the shown name
@ -112,9 +134,9 @@ To keep the document strict it's advised to use the php `DOMDocument` Object
- themeName/ - themeName/
- settings.json - settings.json
- vars.json - vars.json
- admin.list (used to see what to launch on the admin side) - admin.json (used to see what to launch on the admin side)
- options.list (options for modules & themes to be used site-wide) - options.json (options for modules & themes to be used site-wide)
- templates.list (store the template used on the website with a link to there .php file) - templates.json (store the template used on the website with a link to there .php file)
- themes/ (when a new theme is loaded regenerate scripts.js & styles.css, an option will allow the use of direct files) - themes/ (when a new theme is loaded regenerate scripts.js & styles.css, an option will allow the use of direct files)
- default/ (a default theme will be here) - default/ (a default theme will be here)
- theme.php - theme.php
@ -138,6 +160,7 @@ To keep the document strict it's advised to use the php `DOMDocument` Object
## Configs files ## Configs files
### page.json (in `pages` folder) ### page.json (in `pages` folder)
```json ```json
{ {
"title": "pageTitle", "title": "pageTitle",
@ -149,6 +172,7 @@ To keep the document strict it's advised to use the php `DOMDocument` Object
``` ```
### scripts.json & styles.json ### scripts.json & styles.json
```json ```json
{ {
[ [
@ -156,7 +180,9 @@ To keep the document strict it's advised to use the php `DOMDocument` Object
] ]
} }
``` ```
### admin.list
### admin.json
```json ```json
{ {
"themeUsed": "themeName", "themeUsed": "themeName",
@ -168,6 +194,7 @@ To keep the document strict it's advised to use the php `DOMDocument` Object
``` ```
### vars.json ### vars.json
```json ```json
{ {
"variable1": "value1", "variable1": "value1",
@ -180,8 +207,11 @@ To keep the document strict it's advised to use the php `DOMDocument` Object
} }
} }
``` ```
### moduleName.json & themeName.json ### moduleName.json & themeName.json
*values for the options are located in the `vars.json` files*
values for the options are located in the `vars.json` files
```json ```json
{ {
[ [
@ -221,11 +251,14 @@ To keep the document strict it's advised to use the php `DOMDocument` Object
} }
``` ```
### templates.list ### templates.json
liste des tempplates crée par le theme
*voir si il y auras tout les themes ou seulement le theme actif* *voir si il y auras tout les themes ou seulement le theme actif*
if static is true then static webpage will be generated if static is true then static webpage will be generated
```json ```json
{ {
"templateName": { "templateName": {