Merge branch 'develop' into stable

This commit is contained in:
Jay Trees 2022-01-26 13:40:14 +01:00
commit 88ff3606c2
32 changed files with 34 additions and 21 deletions

2
.gitignore vendored
View file

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

View file

@ -1,6 +1,11 @@
# wishthis
A simple wishlist plattform ([demo](https://wishthis.online)).
wishthis is a simple, intuitive and modern platform to create, manage and view
your wishes for any kind of occasion ([demo](https://wishthis.online)).
![View wishlist](/src/assets/img/wishlist-view.png "View wishlist")
Join the [Discord](https://discord.gg/WJaKrQd9)!
## Warning
wishthis is a work in progress and may break at any time. Do not rely on it and make sure you have backups of your data.
@ -10,11 +15,6 @@ Use at your own risk.
## Requirements
* PHP 8
## Screenshots
![Home](/includes/assets/img/home.png "Home")
![Create a wishlist](/includes/assets/img/wishlist-create.png "Create a wishlist")
![Add a product](/includes/assets/img/wishlist-product-add.png "Add a product")
## Installation
1. Download the latest [release](https://github.com/grandeljay/wishthis/releases) and upload all files to your server
1. Follow the instructions of the installer

View file

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

Binary file not shown.

View file

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

View file

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

View file

@ -20,12 +20,22 @@ $page->navigation();
<div class="ui segment">
<h2 class="ui header">Welcome to wishthis</h2>
<p>
wishthis is a simple, intuitive and modern plattform to create,
wishthis is a simple, intuitive and modern platform to create,
manage and view your wishes for any kind of occasion.
</p>
<p>
Go ahead and get started now and <a href="/?page=wishlist-create">create a wishlist</a>!
</p>
<h2 class="ui header">Use case</h2>
<p>
Your birthday is coming up and you just created a wishlist with
all the cool stuff you want. Your friends and family want to
make sure you get something you are happy with so you send them
your wishlist link and if anybody decides to get an item for
you, they simply commit to buying it and the item disappears for
everybody else.
</p>
</div>
</div>
</main>

View file

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

View file

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