Rename includes to src

This commit is contained in:
Jay Trees 2022-01-26 13:06:36 +01:00
parent 831a46410b
commit e10a3470cc
34 changed files with 20 additions and 17 deletions

2
.gitignore vendored
View file

@ -13,4 +13,4 @@
/node_modules/sax /node_modules/sax
/.vscode /.vscode
/includes/config/config.php /src/config/config.php

View file

@ -13,9 +13,9 @@ Use at your own risk.
* PHP 8 * PHP 8
## Screenshots ## Screenshots
![Home](/includes/assets/img/home.png "Home") ![Home](/src/assets/img/home.png "Home")
![Create a wishlist](/includes/assets/img/wishlist-create.png "Create a wishlist") ![Create a wishlist](/src/assets/img/wishlist-create.png "Create a wishlist")
![Add a product](/includes/assets/img/wishlist-product-add.png "Add a product") ![Add a product](/src/assets/img/wishlist-product-add.png "Add a product")
## Installation ## Installation
1. Download the latest [release](https://github.com/grandeljay/wishthis/releases) and upload all files to your server 1. Download the latest [release](https://github.com/grandeljay/wishthis/releases) and upload all files to your server

View file

@ -13,13 +13,13 @@ define('VERSION', '0.3.0');
*/ */
require 'vendor/autoload.php'; require 'vendor/autoload.php';
$include = new Grandel\IncludeDirectory(__DIR__ . '/includes/classes'); $include = new Grandel\IncludeDirectory(__DIR__ . '/src/classes');
$include = new Grandel\IncludeDirectory(__DIR__ . '/includes/functions'); $include = new Grandel\IncludeDirectory(__DIR__ . '/src/functions');
/** /**
* Config * Config
*/ */
$configPath = __DIR__ . '/' . 'includes/config/config.php'; $configPath = __DIR__ . '/' . 'src/config/config.php';
if (file_exists($configPath)) { if (file_exists($configPath)) {
require $configPath; require $configPath;
@ -105,7 +105,7 @@ if (!isset($_GET['page']) && isset($_GET['wishlist'])) {
if (!isset($page)) { if (!isset($page)) {
$page = isset($_GET['page']) ? $_GET['page'] : 'home'; $page = isset($_GET['page']) ? $_GET['page'] : 'home';
} }
$pagePath = 'includes/pages/' . $page . '.php'; $pagePath = 'src/pages/' . $page . '.php';
if (file_exists($pagePath)) { if (file_exists($pagePath)) {
require $pagePath; require $pagePath;

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 26 KiB

View file

@ -3,10 +3,10 @@ $(function() {
* Fomantic UI * Fomantic UI
*/ */
$.fn.api.settings.api = { $.fn.api.settings.api = {
'get wishlists' : '/includes/api/wishlists.php', 'get wishlists' : '/src/api/wishlists.php',
'delete wishlist' : '/includes/api/wishlists.php', 'delete wishlist' : '/src/api/wishlists.php',
'update product status': '/includes/api/products.php', 'update product status': '/src/api/products.php',
'delete product' : '/includes/api/products.php', 'delete product' : '/src/api/products.php',
}; };
$('.ui.dropdown.wishlists').dropdown({ $('.ui.dropdown.wishlists').dropdown({

View file

@ -68,12 +68,12 @@ class Page
echo '<link rel="stylesheet" href="' . $stylesheetFomantic . '?m=' . $stylesheetFomanticModified . '" />'; echo '<link rel="stylesheet" href="' . $stylesheetFomantic . '?m=' . $stylesheetFomanticModified . '" />';
/** Default */ /** Default */
$stylesheetDefault = 'includes/assets/css/default.css'; $stylesheetDefault = 'src/assets/css/default.css';
$stylesheetDefaultModified = filemtime($stylesheetDefault); $stylesheetDefaultModified = filemtime($stylesheetDefault);
echo '<link rel="stylesheet" href="' . $stylesheetDefault . '?m=' . $stylesheetDefaultModified . '" />'; echo '<link rel="stylesheet" href="' . $stylesheetDefault . '?m=' . $stylesheetDefaultModified . '" />';
/** Page */ /** Page */
$stylesheetPage = 'includes/assets/css/' . $this->name . '.css'; $stylesheetPage = 'src/assets/css/' . $this->name . '.css';
if (file_exists($stylesheetPage)) { if (file_exists($stylesheetPage)) {
$stylesheetPageModified = filemtime($stylesheetPage); $stylesheetPageModified = filemtime($stylesheetPage);
@ -96,12 +96,12 @@ class Page
echo '<script defer src="' . $scriptFomantic . '?m=' . $scriptFomanticModified . '"></script>'; echo '<script defer src="' . $scriptFomantic . '?m=' . $scriptFomanticModified . '"></script>';
/** Default */ /** Default */
$scriptDefault = 'includes/assets/js/default.js'; $scriptDefault = 'src/assets/js/default.js';
$scriptDefaultModified = filemtime($scriptDefault); $scriptDefaultModified = filemtime($scriptDefault);
echo '<script defer src="' . $scriptDefault . '?m=' . $scriptDefaultModified . '"></script>'; echo '<script defer src="' . $scriptDefault . '?m=' . $scriptDefaultModified . '"></script>';
/** Page */ /** Page */
$scriptPage = 'includes/assets/js/' . $this->name . '.js'; $scriptPage = 'src/assets/js/' . $this->name . '.js';
if (file_exists($scriptPage)) { if (file_exists($scriptPage)) {
$scriptPageModified = filemtime($scriptPage); $scriptPageModified = filemtime($scriptPage);

View file

@ -63,7 +63,7 @@ switch ($step) {
break; break;
case 2: case 2:
$configDirectory = 'includes/config'; $configDirectory = 'src/config';
$configPath = $configDirectory . '/config.php'; $configPath = $configDirectory . '/config.php';
$configSamplePath = $configDirectory . '/config-sample.php'; $configSamplePath = $configDirectory . '/config-sample.php';
$configContents = file_get_contents($configSamplePath); $configContents = file_get_contents($configSamplePath);

View file

@ -8,6 +8,9 @@
"php-docblocker.author": { "php-docblocker.author": {
"name": "Jay Trees", "name": "Jay Trees",
"email": "github.jay@grandel.anonaddy.me" "email": "github.jay@grandel.anonaddy.me"
},
"search.exclude": {
"**/semantic": true
} }
} }
} }