Commit Graph

77 Commits

Author SHA1 Message Date
Julian Prieber 98bc1d0172 Changed update server
Changed the update server URL to the version.json hosted on GitHub.
2022-03-19 17:16:33 +01:00
Julian Prieber fa4f4f1441 Added email verification
Added email verification after user registration. After a user registered, an email is sent to the email used to sign up. The mail contains a verification link which is required to complete the registration process.

This feature can be turned off in the Admin Panel under: Admin>Config by changing the setting "Register_auth" from "verified" to "auth".

Read more about this on the Blog here: https://blog.littlelink-custom.com/optional-email-verification/
2022-03-19 16:48:21 +01:00
Julian Prieber 310a37c446 Fixed CSS class 2022-03-18 15:30:44 +01:00
Julian Prieber bcc5050c35 Added Custom Website button
Added new Custom Website button which visually looks similar to the previously added Website button with an except of the icon of the new button being the favicon of the chose link. The text on the button is set with the button title, just like the Custom button.

The favicon request is performed via the Google API. The icon displays correctly in most cases, with some exceptions. I might add a function later on that displays a generic icon if no icon was found.
2022-03-18 14:59:45 +01:00
Julian Prieber 35b487d48a
Fixed SQLSTATE Exception 2022-03-18 13:34:41 +01:00
Julian Prieber 7fb6068d49 Made link title optional
Made link title (previously required) optional when adding personal LittleLink links on the User/Admin Panel.
If the 'Title' field is left empty, the button name is now used instead of rejecting the addition.
2022-03-18 12:04:13 +01:00
Julian Prieber fe7fc9f714 Updated Domain 2022-03-17 21:28:26 +01:00
Julian Prieber 09bd0aed96 Added new buttons
Added new 'Buy me a Coffee' and 'generic Website' buttons
2022-03-17 21:19:30 +01:00
Julian Prieber 1d2df13b0f Added footer to Admin Panel
I re-enabled the footer disabled by Latuminggi's LittleLink Admin fork. This footer adds a Home button which brings you to the landing page, in addition to Terms, Privacy and Contact buttons.

I also edited the policy pages for the buttons named above to include the new logo as well as the dark mode detection.
2022-03-17 17:33:37 +01: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 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
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 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 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
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 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 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 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 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 b0fe2395d4 Chnaged rounded logo on landing page
Removed the rounded-avatar class of the custom logo on the landing page.
2022-02-20 18:24:27 +01:00
JulianPrieber ac741d42e6
custom logo hotfix
Just a quick fix, the logo wasn't displaying correctly I probably should do this with a separate CSS file for all images, but I just did this quick and dirty with a style attribute
2022-02-20 18:15:54 +01:00
JulianPrieber aa759a8d3b
custom logo hotfix
Just a quick fix, the logo wasn't displaying correctly I probably should do this with a separate CSS file for all images, but I just did this quick and dirty with a style attribute
2022-02-20 18:14:33 +01:00
JulianPrieber 70e01db070
Fixed login/register logo
Fixed the if-else statement responsible for loading the correct login/register image. The SVG wouldn't work, so I just used the new avatar@2x.png, so I guess that one is staying for now. 

If it works it works, I could load the vector image by changing the logo to the SVG in:
confirm-password.blade.php, forgot-password.blade.php, login.blade.php, register.blade.php, reset-password.blade.php and verify-email.blade.php.

This works good enough, so imma leave it how it is now.
2022-02-20 16:57:47 +01:00
JulianPrieber c8696ca5d5 Fixed elseif
Fixed new elseif statements by changing:
"if
if"
to
"if
elseif"
2022-02-20 15:42:45 +01:00
JulianPrieber 95769b43bd Merge branch 'main' of https://github.com/JulianPrieber/littlelink-custom 2022-02-20 15:24:30 +01:00
JulianPrieber c22ca8f27b Revert "Revert "Merge branch 'main' of https://github.com/JulianPrieber/littlelink-custom""
This reverts commit f5ffdc18b1.
2022-02-20 15:24:27 +01:00
JulianPrieber 324db451e9
Fixed menu icon
Fixed issue of the menu hamburger icon not displaying
2022-02-20 15:20:57 +01:00
JulianPrieber 0d55159b07
fixed logo.svg 2022-02-20 14:45:34 +01:00
JulianPrieber 96604bb7c9
fixed logo.svg 2022-02-20 14:19:38 +01:00
JulianPrieber f5ffdc18b1 Revert "Merge branch 'main' of https://github.com/JulianPrieber/littlelink-custom"
This reverts commit 30ec6bea98, reversing
changes made to 69fc08668c.
2022-02-20 14:10:40 +01:00
JulianPrieber 30ec6bea98 Merge branch 'main' of https://github.com/JulianPrieber/littlelink-custom 2022-02-20 14:09:11 +01:00
JulianPrieber 69fc08668c fixed logo.svg 2022-02-20 14:09:08 +01:00
JulianPrieber 696d2f0d82
Fixed spelling
Changed button to buttons
2022-02-20 13:56:19 +01:00
JulianPrieber 8243d7c977 fixed logo.svg 2022-02-20 13:20:21 +01:00
JulianPrieber 96cfd5b4c1 Changed logo
As part of the new logo (https://github.com/JulianPrieber/littlelink-custom/milestone/1) I'm now using the new 'logo.svg' vector logo.

For this, I added an if-else statement in most cases, which first check for a custom logo uploaded by the admin or the avatar of an individual user. If the image doesn't exist, the default logo (logo.svg) is used.
2022-02-20 13:12:25 +01:00
JulianPrieber 5db777053e
Added dark mode detection
Added automatic dark mode detection to littlelink.blade.php via a cookie with js.cookie.min.js (see previous commit).

Detecting the dark mode setting is done with JavaScript. The script detects the preferred dark mode setting in the client's browser and saves it with a cookie. If the script detects a change in this setting, it corrects the cookie. 

Loading the appropriate skeleton.css is done via PHP with an if-else statement. If the cookie (saved by the previous script) color scheme equals 'dark' it will load skeleton-dark.css (found in /littlelink/css). 

If dark mode is not detected OR nothing is detected/cookie is getting blocked, the statement defaults to skeleton-light.css (also found in /littlelink/css).

You could change what the if-else statement defaults to (i.e. which color scheme is loaded if the cookie fails to detect) by switching 'skeleton-dark.css' and 'skeleton-light.css' around (see comment in if statement).

Everything added is commented and marked with begin/end.


Credit to 'user1575941' on Stack Overflow who's commented code REALLY helped getting behind all this.
2022-02-18 10:10:13 +01:00
JulianPrieber a5c81158cf
Added dark mode detection
Added automatic dark mode detection to home.blade.php via a cookie with js.cookie.min.js (see previous commit).

Detecting the dark mode setting is done with JavaScript. The script detects the preferred dark mode setting in the client's browser and saves it with a cookie. If the script detects a change in this setting, it corrects the cookie. 

Loading the appropriate skeleton.css is done via PHP with an if-else statement. If the cookie (saved by the previous script) color scheme equals 'dark' it will load skeleton-dark.css (found in /littlelink/css). 

If dark mode is not detected OR nothing is detected/cookie is getting blocked, the statement defaults to skeleton-light.css (also found in /littlelink/css).

You could change what the if-else statement defaults to (i.e. which color scheme is loaded if the cookie fails to detect) by switching 'skeleton-dark.css' and 'skeleton-light.css' around (see comment in if statement).

Everything added is commented and marked with begin/end.


Credit to 'user1575941' on Stack Overflow who's commented code REALLY helped getting behind all this.
2022-02-18 10:08:24 +01:00
JulianPrieber b67651df04 Revert "Added dark mode detection"
This reverts commit cc71e0d6ca.
2022-02-18 10:06:14 +01:00
JulianPrieber cc71e0d6ca
Added dark mode detection
Added automatic dark mode detection to home.blade.php via a cookie with js.cookie.min.js (see previous commit).

Detecting the dark mode setting is done with JavaScript. The script detects the preferred dark mode setting in the client's browser and saves it with a cookie. If the script detects a change in this setting, it corrects the cookie. 

Loading the appropriate skeleton.css is done via PHP with an if-else statement. If the cookie (saved by the previous script) color scheme equals 'dark' it will load skeleton-dark.css (found in /littlelink/css). 

If dark mode is not detected OR nothing is detected/cookie is getting blocked, the statement defaults to skeleton-light.css (also found in /littlelink/css).

You could change what the if-else statement defaults to (i.e. which color scheme is loaded if the cookie fails to detect) by switching 'skeleton-dark.css' 'skeleton-light.css around' (see comment in if statement).

Everything added is commented and marked with begin/end.


Credit to 'user1575941' on Stack Overflow who's commented code REALLY helped getting behind all this.
2022-02-18 10:02:43 +01:00
JulianPrieber 11d05a558b
Added button entrance animation
Live demo: https://julianprieber.github.io/littlelink-admin-demo/button-entrance.html

Added an entrance animation for buttons on home.blade.php. This animation was made by the Animate.css project (https://github.com/animate-css/animate.css).

Each button entrance animation lasts 100ms. Every button after the first adds 100ms to the value of the previous button i.e. button 1 loads after 100ms, button 2 loads after 200ms,  button 3 after 300ms and so on...

Timings for the buttons can be changed in /littlelink/css/animate.css

I put every button in a separate <div> Tag, so the animation wouldn't in interfere with the existing hover animation.
2022-02-17 22:15:51 +01:00
JulianPrieber 44f57ce954
Added button entrance animation
Live demo: https://julianprieber.github.io/littlelink-admin-demo/button-entrance.html

Added an entrance animation for buttons on littlelink.blade.php. This animation was made by the Animate.css project (https://github.com/animate-css/animate.css).

Each button entrance animation lasts 100ms. Every button after the first adds 100ms to the value of the previous button i.e. button 1 loads after 100ms, button 2 loads after 200ms,  button 3 after 300ms and so on...

Timings for the buttons can be changed in /littlelink/css/animate.css

I put every button in a separate <div> Tag, so the animation wouldn't in interfere with the existing hover animation.

Likewise, I removed all <br> Tags.
2022-02-17 22:09:58 +01:00
JulianPrieber 514e779025
Change public path
This is one of multiple public path edits. For simplified usability, I am integrating the public Laravel directory into the root directory. 

For this, I am changing every instance of 'public_path' to 'base_path' and will use this format in future changes as well.
2022-02-14 12:56:50 +01:00
JulianPrieber c097c0ae09
Change public path
This is one of multiple public path edits. For simplified usability, I am integrating the public Laravel directory into the root directory. 

For this, I am changing every instance of 'public_path' to 'base_path' and will use this format in future changes as well.
2022-02-14 12:56:03 +01:00
JulianPrieber 14c324734f
Change public path
This is one of multiple public path edits. For simplified usability, I am integrating the public Laravel directory into the root directory. 

For this, I am changing every instance of 'public_path' to 'base_path' and will use this format in future changes as well.
2022-02-14 12:54:51 +01:00
JulianPrieber 1c7f71e56f
Change public path
This is one of multiple public path edits. For simplified usability, I am integrating the public Laravel directory into the root directory. 

For this, I am changing every instance of 'public_path' to 'base_path' and will use this format in future changes as well.
2022-02-14 12:53:07 +01:00