Commit Graph

2213 Commits

Author SHA1 Message Date
dependabot[bot] e833e7b922
Bump mockery/mockery from 1.4.3 to 1.5.0
Bumps [mockery/mockery](https://github.com/mockery/mockery) from 1.4.3 to 1.5.0.
- [Release notes](https://github.com/mockery/mockery/releases)
- [Changelog](https://github.com/mockery/mockery/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mockery/mockery/compare/1.4.3...1.5.0)

---
updated-dependencies:
- dependency-name: mockery/mockery
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-16 13:46:35 +00:00
dependabot[bot] 538942cd61
Bump guzzlehttp/guzzle from 7.3.0 to 7.4.1
Bumps [guzzlehttp/guzzle](https://github.com/guzzle/guzzle) from 7.3.0 to 7.4.1.
- [Release notes](https://github.com/guzzle/guzzle/releases)
- [Changelog](https://github.com/guzzle/guzzle/blob/master/CHANGELOG.md)
- [Commits](https://github.com/guzzle/guzzle/compare/7.3.0...7.4.1)

---
updated-dependencies:
- dependency-name: guzzlehttp/guzzle
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-16 13:46:30 +00:00
Julian Prieber f4e0e4defb
Update dependabot.yml 2022-03-16 14:46:09 +01:00
Julian Prieber b6b705e452
Create dependabot.yml 2022-03-16 14:43:54 +01:00
Julian Prieber b77da3b670
Merge pull request #6 from JulianPrieber/dependabot/npm_and_yarn/postcss-8.2.13
Bump postcss from 8.2.8 to 8.2.13
2022-03-16 14:35:03 +01:00
dependabot[bot] 6703793883
Bump postcss from 8.2.8 to 8.2.13
Bumps [postcss](https://github.com/postcss/postcss) from 8.2.8 to 8.2.13.
- [Release notes](https://github.com/postcss/postcss/releases)
- [Changelog](https://github.com/postcss/postcss/blob/main/CHANGELOG.md)
- [Commits](https://github.com/postcss/postcss/compare/8.2.8...8.2.13)

---
updated-dependencies:
- dependency-name: postcss
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-16 13:32:51 +00:00
Julian Prieber b8f59598a9
Merge pull request #5 from JulianPrieber/dependabot/npm_and_yarn/url-parse-1.5.10
Bump url-parse from 1.5.1 to 1.5.10
2022-03-16 14:23:59 +01:00
dependabot[bot] 350abb5626
Bump url-parse from 1.5.1 to 1.5.10
Bumps [url-parse](https://github.com/unshiftio/url-parse) from 1.5.1 to 1.5.10.
- [Release notes](https://github.com/unshiftio/url-parse/releases)
- [Commits](https://github.com/unshiftio/url-parse/compare/1.5.1...1.5.10)

---
updated-dependencies:
- dependency-name: url-parse
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-16 13:18:02 +00:00
Julian Prieber fef2e09aa9 Added built in Config Editor
LittleLink Custom now includes an .env config editor. This editor can be accessed via the Admin Panel under Admin>Config.
This editor allows admins to edit, backup, download and upload the .env configuration file. All in all, the new feature, allows users to more easily edit the configuration file, contributing to my goal of making LittleLink Custom easier to use.

Read more about this topic on the Blog https://blog.littlelink-custom.com/built-in-config-editor
2022-03-16 14:16:03 +01:00
Julian Prieber 9bdf937e4b
Update README.md 2022-03-16 13:06:01 +01:00
Julian Prieber 0aaa86224e Built in SMTP server
LittleLink Custom now includes an open and free to use SMTP server. Mails from this service may only be used for password recovery and registration purposes involving users personal LittleLink Custom or LittleLink Admin pages.
Users of this service must abide by our Terms and Conditions found at https://llc-mail.tru.io/.

Motivations for this are explained on my blog post about this topic, which you can read here: https://blog.littlelink-custom.com/littlelink-custom-mail-server/
2022-03-16 13:03:43 +01:00
Julian Prieber d8482e3182
Update README.md
Added a new Blog to document this project and better communicate updates and discuss them with others.
2022-03-15 10:10:31 +01:00
Julian Prieber 62eaa99870
Update version.json 2022-03-03 12:33:00 +01:00
JulianPrieber 907a3116bb Fixed dark mode not applying on first visit
This 'bug' was caused due to the way the dark mode was applied. The dark mode detection detects the preferred theme style from the client and then saves the preferred type with a cookie, all with JavaScript. Then a simple PHP if-else statement loads either the dark or light mode CSS theme, depending on the cookie.

The problem here was that the cookie would only be detected if the page was refreshed, so once the cookie was set, the dark mode was applied every time without a problem. But the first time a user visited the site and the preferred theme was set to dark mode, the page would still display the white version until the page was refreshed.

Now, I could have changed how the page applies the dark mode, however I decided against that and went with this commit instead.

Now I'm not really experienced with JavaScript at all, so this definitely could have been solved in a more elegant way, but this is what I did:

I added a bit to the JavaScript that sets and reads the cookie. When the page finished loading, a simple if statement is run that requires the following conditions: 
The URL contains a '#' and the color scheme equals 'dark' and the cookie isn't set yet. 
After these conditions are met, '#dark' is added to the URL and the page will be refreshed.

This refresh is only performed without the cookie, thus only refreshing the page on the first visit if the dark mode would be applied.

The '#dark' is only added to the URL to fail the first requirement of the if statement, preventing the page from being reloaded in an infinite loop. Otherwise, the  '#dark' part of the URL fulfills no purpose and only the '#' part is required, so it doesn't even matter what comes after the hash. I just chose this for clarification.

If the dark mode cookie is blocked by the user, the page will be set to light mode and refreshed every time they visit but the '#dark' will still be added to the URL, preventing the infinite refresh-loop.
2022-03-03 10:49:10 +01:00
Julian Prieber b8831c9969
Update README.md 2022-03-02 09:30:55 +01:00
Julian Prieber f176e93307
Update README.md 2022-02-28 00:00:11 +01:00
Julian Prieber 78b00d4cea
Update README.md 2022-02-27 23:59:48 +01:00
Julian Prieber 2877afb8bd
Update README.md 2022-02-27 23:56:02 +01:00
Julian Prieber b75720ad53
Update version.json 2022-02-27 23:46:24 +01:00
Julian Prieber a755de769a
Added full Demo Page
This is a full-fledged demo of the website, complete with login and register functionality.
Feel free to register your account and try out all the features of LittleLink Custom.

Please take into account that performance on this page might not represent optimal performance achievable with LittleLink Custom due to compromises regarding our web hosting budget.

LittleLink Custom administrators reserve the right to remove any content or account registered on this page without prior warning for any reason whatsoever.
2022-02-27 23:44:25 +01:00
Julian Prieber 81e5c5a377
Security update
Update security by preventing access to hidden and .sqlite files via the .htaccess file.
2022-02-27 23:12:22 +01:00
Julian Prieber 3db8d5b8fd
Update README.md 2022-02-27 22:03:32 +01:00
Julian Prieber d683bc03fe
Update version.json 2022-02-27 21:13:57 +01:00
Julian Prieber 9cc1f416b0
Update version.json 2022-02-27 20:46:59 +01:00
Julian Prieber 9a3348ffd2
Fixed register/login... dark mode
Removed check for browser type, now applies dark mode regardless of browser type if dark mode cookie is detected
2022-02-27 19:43:58 +01:00
JulianPrieber ec88a74889 Fixed bug/simplified setup
Fixed bug where users littlelink pages (domain.com/@username) would display a 404 error. This was caused due to the .env config file not containing an App URL. This issue could be solved by simply adding a URL to the config, this is now not necessary anymore, making the setup process easier and less confusing. 

I changed every instance of "{{ config('app.url') }}" to  "{{ url(' ') }}". This effectively automatically uses the correct URL for LittleLink links, even if LittleLink Custom is set up in a subdirectory.

In my testing, I couldn't find any problems this might have caused, so this appears to do the job just as well as setting the URL in the config. If I find any issues with this, I will revert this change.
2022-02-27 19:33:19 +01:00
Julian Prieber 3cf687a37f
Updated version file 2022-02-23 23:57:20 +01:00
Julian Prieber bbc0e8e86e
Fixed bug ErrorException
Fixed bug where a timeout in the update server response would throw an Error Exception
2022-02-23 20:53:50 +01:00
JulianPrieber 4e78b1a58f Added option to disable registration
Added option to disable registration.
2022-02-23 20:19:15 +01:00
Julian Prieber cd47ebb792
Update README.md 2022-02-23 15:51:27 +01:00
JulianPrieber cc407a9efa
Create README.md 2022-02-23 15:37:34 +01:00
JulianPrieber c0d0c1a6a4
Delete README.md 2022-02-23 15:26:20 +01:00
JulianPrieber 3dda1cd022
Added version.json
This file contains the current LittleLink Custom version.
2022-02-23 13:40:49 +01:00
JulianPrieber e6faf86386
Added automatic update detection
This displays an update notice if a new version of LittleLink Custom has been released.


This one is definitely a messy one. Everything I added is commented, but I'm going to try explaining it here one more time. 

General outcome:
 • This feature checks the local version against the newest version stored on a separate server.

Error prevention: 
 • I used 'file_get_contents' to get the version number from a JSON file. If  'file_get_contents' cant find the file, PHP will throw an Error Exception.
 • To prevent this, I put the update section in an if-statement that only applies if the following conditions are met.

Check if files exist:
 • To test whether the file on the server exists (remember, if the server can't be reached, you will get an Error Exception) I used a function that checks if the URL to the file on the server successfully returns a '200 OK' response (see https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/200).
 • If this condition is met, it sets the variable '$ServerExists' to true, if not to false.

 • Now, the previous mentioned if-statement simply checks if the local file exists and the '$ServerExists' variable equals 'true' to proceed.

Get version number:
 • If all previous conditions are met, two variables get defined via 'file_get_contents' '$Vgit' and '$Vlocal'.
 • Both the file on the server and the local file simply contain the version number.
 • The variable '$Vgit' is the newest version number retrieved from the server.
 • The variable '$Vlocal' is the local  version number.

Display update notice:
 • To finally display the  version number (added with HTML) one last check via an if-statement is performed. This simply checks if the current user is an admin AND if the version retrieved from the server is higher than the local one.
 • If both conditions are met, the notice is displayed.



In addition, I should mention that I put the existing 'Watch Page' link as well as the update notice in a div with the class 'row' to display both links next to another instead of them being stacked.
2022-02-23 13:38:15 +01:00
JulianPrieber b14f26080d Added cashapp icon 2022-02-22 17:23:41 +01:00
JulianPrieber 61ab146fa2 Added new buttons
Added the following LittleLink buttons:
  -  Bandcamp
  -  Patreon
  -  Signal
  -  Venmo
  -  Cash App
  -  Gitlab
  -  Mastodon
  -  PayPal
  -  WhatsApp
  -  Xing
2022-02-22 17:01:07 +01:00
JulianPrieber 2968da4a80
Added fadein animation to text and avatar
Added 'fadein' class to avatar image, littlelink_name and littlelink_description text. This class adds the fade-in animation from 'animate.css' found in /littlelink/css/.
2022-02-22 12:48:43 +01:00
JulianPrieber 4f49204b57
Added fadein animation to text
Added 'fadein' class to app.name and home_message text. This class adds the fade-in animation from 'animate.css' found in /littlelink/css/.
2022-02-22 12:43:18 +01:00
JulianPrieber 574128a922 Fixed bug in SQLite database
A second empty line in the SQLite database caused an error when running 'php artisan migrate'.

Command:
 $ php artisan migrate

Error:
   "Illuminate/Database/QueryException"

  SQLSTATE[HY000]: General error: 26 file is not a database (SQL: select * from sqlite_master where type = 'table' and name = migrations)

  at /path/to/vendor/laravel/framework/src/Illuminate/Database/Connection.php:712
    708▕         // If an exception occurs when attempting to run a query, we'll format the error
    709▕         // message to include the bindings with SQL, which will make this exception a
    710▕         // lot more helpful to the developer instead of just the database's errors.
    711▕         catch (Exception $e) {
  ➜ 712▕             throw new QueryException(
    713▕                 $query, $this->prepareBindings($bindings), $e
    714▕             );
    715▕         }
    716▕     }

  1   /path/to/vendor/laravel/framework/src/Illuminate/Database/Connection.php:368
      PDOException::("SQLSTATE[HY000]: General error: 26 file is not a database")

  2   /path/to/vendor/laravel/framework/src/Illuminate/Database/Connection.php:368
      PDO::prepare("select * from sqlite_master where type = 'table' and name = ?")
2022-02-22 12:33:48 +01:00
JulianPrieber 6bccfc86a2
Updated license (GPL-3.0 License)
Adjusted  license to fit this project. I segmented the licenses in 3 different parts.

The first segment titled "GPL-3.0 License" relates to this project alone.
JulianPrieber/littlelink-custom is licensed under the GNU General Public License v3.0.

Permissions of this strong copyleft license are conditioned on making available complete source code of licensed works and modifications, which include larger works using a licensed work, under the same license. Copyright and license notices must be preserved. Contributors provide an express grant of patent rights.
  You may:
   -  Commercially  use
   -  Modify
   -  Distribute
   -  Patent
   -  Privately use
this project.
   ###   I DO NOT PROVIDE ANY LIABILITY OR WARRANTY REGARDING THIS PROJECT!   ###   

The second segment titled "Forked from" lists every repository this project is based on/forked from.

The third segment titled "Third-Party licenses" includes all third-party licenses of  third-party code used in this project, including credit and links to the used repository.
2022-02-22 12:01:23 +01:00
JulianPrieber c1604ff9d5 Updated Name and description
Updated the name and description on the website.

Updated: App name, admin message in home (seeder), footer, and footer studio-sidebar.
2022-02-22 10:31:23 +01:00
JulianPrieber c1110d4ced
Fixed dark mode for login/register...
This fixed the issue of dark mode not displaying on the register, login, forgot password and a few other pages.

This one took me a while to fix, and I still don't really know what is going on here.
The aforementioned pages already implemented a dark mode, but it didn't seem to work for me. After some testing, I discovered that the dark mode preset doesn't load on chromium based browsers. 

I have absolutely no idea why that is, if someone could help me with this that would be amazing. I might make an issue out of this later on.

As I still wanted to fix this, I finally achieved my goal by doing the caveman approach:

I first added the usual dark mode detection. The same used on the home and little link pages (see previous commits if you're interested).
Then I wrote and if statement that loads the newly added app-dark.css (see previous commit) that changes text and background color on the pages in question, if the browser type is chromium and dark mode is selected in the browser settings.

"@if(strpos($_SERVER['HTTP_USER_AGENT'], 'Chrome' !== false) and $color_scheme == 'dark')"

This doesn't look optimal, and I would rather just have the same dark mode as on Firefox, but this is the best I can currently do with my available time.
2022-02-21 23:34:07 +01:00
JulianPrieber c24863f7cc
Added dark mode for app.css
Added dark mode for app.css that will be used together with said file.

The CSS file only changes background and text color.
2022-02-21 23:18:38 +01:00
JulianPrieber 51c16a2d00
Fixed bug
Fixed social preview image displaying on littlelink page
2022-02-21 20:33:55 +01:00
JulianPrieber 50f838f555
Removed rounded-circle class
Removed 'rounded-circle' class, as this cuts off corners of some custom logos.
2022-02-21 20:22:21 +01:00
JulianPrieber 93eb23ded3
Added SQLite database
Added empty SQLite database for future use as main database for Laravel. As mentioned in previous commits, I'm switching to SQLite due to the easier setup process for the inexperienced user.
2022-02-21 20:11:25 +01:00
JulianPrieber 4af729687e
Fixed SQLite compatibility
Removed 'DB::statement("ALTER TABLE `buttons` AUTO_INCREMENT=0;");' due to incompatibility with SQLite.
2022-02-21 19:58:55 +01:00
JulianPrieber 4753ceaa63
Added default config => switch to SQLite
Added default '.env' config file. I'm keeping the '.env.example' in the repository, but an easier setup process a default configuration will from now on be included in the repository.

I'm switching from MySQL to SQLite for the same reason mentioned above. By adding the MySQL database setting from '.env.example' to the '.env' config, MySQL can still be used as the database.
2022-02-21 19:56:34 +01:00
JulianPrieber edc1204c8b
Enabled dark mode for studio pages
Enabled dark mode for all studio pages

See last commit (e6729f5485)
2022-02-20 22:56:09 +01:00
JulianPrieber e6729f5485
Added dark mode files for studio
Added dark mode CSS files for all studio pages.

Now, this one's a bit janky. The studio CSS files 'bootstrap.min' and 'style-dashboard' already had settings for dark mode in them. 

The problem is that the PHP files for the studio sites:
app.blade.php, footer.blade.php, guest.blade.php, sidebar.blade.php and a few others specify the light classes in the PHP directly. 

As I didn't want to create separate PHP pages for dark and light mode, I simply replaced the light mode values in the CSS files with the dark mode ones. This means in the files the classes are still labeled as light mode but are in fact for the dark mode.

Selection for the dark mode will be handled the same as on the other pages, with JavaScript and a cookie (see next commit).
2022-02-20 22:43:11 +01:00