Commit graph

161 commits

Author SHA1 Message Date
dependabot[bot]
79eef0aa46
Bump nyholm/psr7 from 1.6.0 to 1.6.1 (#33)
Bumps [nyholm/psr7](https://github.com/Nyholm/psr7) from 1.6.0 to 1.6.1.
- [Release notes](https://github.com/Nyholm/psr7/releases)
- [Changelog](https://github.com/Nyholm/psr7/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Nyholm/psr7/compare/1.6.0...1.6.1)

---
updated-dependencies:
- dependency-name: nyholm/psr7
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-17 19:59:52 -07:00
dependabot[bot]
0cff3b92df
Bump nyholm/psr7 from 1.5.1 to 1.6.0 (#32)
Bumps [nyholm/psr7](https://github.com/Nyholm/psr7) from 1.5.1 to 1.6.0.
- [Release notes](https://github.com/Nyholm/psr7/releases)
- [Changelog](https://github.com/Nyholm/psr7/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Nyholm/psr7/compare/1.5.1...1.6.0)

---
updated-dependencies:
- dependency-name: nyholm/psr7
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-09 20:00:49 -07:00
Belle Aerni
8e018600a5 Minor, but important improvements 2023-04-01 19:30:12 -07:00
Belle Aerni
0663fbc604 Incorporate TinyZoom.JS 2023-03-30 23:01:08 -07:00
dependabot[bot]
c084208db6
Bump tailwindcss from 3.3.0 to 3.3.1 (#31)
Bumps [tailwindcss](https://github.com/tailwindlabs/tailwindcss) from 3.3.0 to 3.3.1.
- [Release notes](https://github.com/tailwindlabs/tailwindcss/releases)
- [Changelog](https://github.com/tailwindlabs/tailwindcss/blob/v3.3.1/CHANGELOG.md)
- [Commits](https://github.com/tailwindlabs/tailwindcss/compare/v3.3.0...v3.3.1)

---
updated-dependencies:
- dependency-name: tailwindcss
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-30 19:10:58 -07:00
Belle Aerni
1770d5376a Minor tweak 2023-03-30 17:02:12 -07:00
dependabot[bot]
226d100673
Bump tailwindcss from 3.2.7 to 3.3.0 (#30)
Bumps [tailwindcss](https://github.com/tailwindlabs/tailwindcss) from 3.2.7 to 3.3.0.
- [Release notes](https://github.com/tailwindlabs/tailwindcss/releases)
- [Changelog](https://github.com/tailwindlabs/tailwindcss/blob/master/CHANGELOG.md)
- [Commits](https://github.com/tailwindlabs/tailwindcss/compare/v3.2.7...v3.3.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-28 19:15:23 -07:00
Belle Aerni
0e252133e2 Cleanly handle no default attributes being set 2023-03-26 23:40:02 -07:00
Belle Aerni
90f0f96f13 Fix those pesky tests 2023-03-26 23:34:17 -07:00
Belle Aerni
70ff0a106f Per-theme config, default attributes, and bump BS ver 2023-03-26 23:29:17 -07:00
dependabot[bot]
acb00af6f7
Bump league/commonmark from 2.3.9 to 2.4.0 (#29)
Bumps [league/commonmark](https://github.com/thephpleague/commonmark) from 2.3.9 to 2.4.0.
- [Release notes](https://github.com/thephpleague/commonmark/releases)
- [Changelog](https://github.com/thephpleague/commonmark/blob/2.4/CHANGELOG.md)
- [Commits](https://github.com/thephpleague/commonmark/compare/2.3.9...2.4.0)

---
updated-dependencies:
- dependency-name: league/commonmark
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-26 19:29:32 -07:00
Belle Aerni
61fa0fc533 Fix file name 2023-03-21 13:16:53 -07:00
Belle Aerni
23e8b18ba3
Implemented multi-user support (#27)
* Implemented rudimentary multi-user support

* Delete src.zip

* Improve the update user function

And added a new function to the auth module to invalidate a session

* Update AntAuth.php

* Rename the configs, a bit more auth stuff

* Fix test and JS regex

* Turn the admin landing page into a twig template

* plugin/admin/ -> admin/

* Refactored templating for plugins

Plus. I finally converted the remaining options in the admin plugin to twig templates. No extra styling, but it'll be easier now

* Fix PHPStan warnings

* Basic "first time" user setup

* Improved styling

* Started implementing user management

* Completed user management in the admin panel

* Renamed templates, added support for sub-dirs

* Limit and validate allowed chars for usernames

* Finished the basics of the profile plugin

* Styling for the bootstrap theme

* Some more final touches

* Added an example to show author

* Tweak to the readme
2023-03-07 02:09:32 -08:00
Belle Aerni
cba9f71f78 Lazy load images 2023-02-25 04:32:07 -08:00
dependabot[bot]
404c093ccb
Bump tailwindcss from 3.2.6 to 3.2.7 (#25)
Bumps [tailwindcss](https://github.com/tailwindlabs/tailwindcss) from 3.2.6 to 3.2.7.
- [Release notes](https://github.com/tailwindlabs/tailwindcss/releases)
- [Changelog](https://github.com/tailwindlabs/tailwindcss/blob/master/CHANGELOG.md)
- [Commits](https://github.com/tailwindlabs/tailwindcss/compare/v3.2.6...v3.2.7)

---
updated-dependencies:
- dependency-name: tailwindcss
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-16 18:10:17 -08:00
dependabot[bot]
a653154f85
Bump league/commonmark from 2.3.8 to 2.3.9 (#24)
Bumps [league/commonmark](https://github.com/thephpleague/commonmark) from 2.3.8 to 2.3.9.
- [Release notes](https://github.com/thephpleague/commonmark/releases)
- [Changelog](https://github.com/thephpleague/commonmark/blob/2.3/CHANGELOG.md)
- [Commits](https://github.com/thephpleague/commonmark/compare/2.3.8...2.3.9)

---
updated-dependencies:
- dependency-name: league/commonmark
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-15 18:06:48 -08:00
Belle Aerni
d08d136990 Implement a basic session expiration
It's rudimentary, but this should ensure that people will need to re-authenticate after closing their browser session
2023-02-12 19:41:52 -08:00
Belle Aerni
25e1ef9434 Started creating templates for the admin plugin
Also, replaced the old <!--AntCMS-SiteLink--> with a new filter called absUrl, which can be used to convert any link to an absolute URL by adding the base site URL
2023-02-12 17:02:07 -08:00
Belle Aerni
94f251fc3f Remove the version from package.json
AntCMS hasn't even had a release yet, so that version number is meaningless
2023-02-12 15:50:26 -08:00
dependabot[bot]
29ef7ec779
Bump tailwindcss from 3.2.4 to 3.2.6 (#22)
Bumps [tailwindcss](https://github.com/tailwindlabs/tailwindcss) from 3.2.4 to 3.2.6.
- [Release notes](https://github.com/tailwindlabs/tailwindcss/releases)
- [Changelog](https://github.com/tailwindlabs/tailwindcss/blob/master/CHANGELOG.md)
- [Commits](https://github.com/tailwindlabs/tailwindcss/compare/v3.2.4...v3.2.6)

---
updated-dependencies:
- dependency-name: tailwindcss
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-08 17:45:46 -08:00
dependabot[bot]
d262f22c98
Bump twig/twig from 3.5.0 to 3.5.1 (#23)
Bumps [twig/twig](https://github.com/twigphp/Twig) from 3.5.0 to 3.5.1.
- [Release notes](https://github.com/twigphp/Twig/releases)
- [Changelog](https://github.com/twigphp/Twig/blob/3.x/CHANGELOG)
- [Commits](https://github.com/twigphp/Twig/compare/v3.5.0...v3.5.1)

---
updated-dependencies:
- dependency-name: twig/twig
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-08 17:45:04 -08:00
Belle Aerni
3ce0896af5 Created a lighttpd config
Tested and working :)
2023-02-06 18:34:34 -08:00
Belle Aerni
9eb24fee30 First try to render exceptions using twig 2023-01-28 20:54:53 -08:00
Belle Aerni
af375a5499 Code styling /w Rector 2023-01-25 22:08:19 -08:00
Belle Aerni
e1667b6374 Use actual twig variables for the page body
Replaces <!--AntCMS-Body--> with {{ AntCMSBody | raw }}
2023-01-25 21:32:38 -08:00
Belle Aerni
e2ca10d51d Made exception rendering more flexible 2023-01-25 18:45:36 -08:00
Belle Aerni
95ed5059f0 Cleaned up the code a bit 2023-01-24 17:48:40 -08:00
dependabot[bot]
686caf149b
Bump symfony/yaml from 6.0.17 to 6.0.19 (#21)
Bumps [symfony/yaml](https://github.com/symfony/yaml) from 6.0.17 to 6.0.19.
- [Release notes](https://github.com/symfony/yaml/releases)
- [Changelog](https://github.com/symfony/yaml/blob/6.2/CHANGELOG.md)
- [Commits](https://github.com/symfony/yaml/compare/v6.0.17...v6.0.19)

---
updated-dependencies:
- dependency-name: symfony/yaml
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-01-24 17:22:43 -08:00
Belle Aerni
7ea9cb2e5d Some fixes to the admin plugin 2023-01-24 17:22:12 -08:00
Belle Aerni
a3039f10ed Fixed the page editor after recent page list gen changes
This part of the plugin hadn't been setup to handle the new paths that were being generated.
2023-01-20 20:39:09 -08:00
Belle Aerni
ecf94d36da Removed the keyword generator
It didn't really work, added a bunch to the overall file size, and computer-generated keywords just won't compare to human created ones, unless you're to use AI or a particularly advanced algorithm, which I feel is outside the scope of the project.

I've left the class in place, so if needed, it'll be really easy to add it back
2023-01-19 18:01:03 -08:00
Belle Aerni
97e6a8a4e6 Make renderWithTiwg a static function
There's zero need to create a new instance of the class before calling it, so this removes a very small amount of overhead, but more importantly removes the need to create and define a new class of it each time, which makes the code very slightly cleaner
2023-01-19 15:07:15 -08:00
Belle Aerni
ea7f3ac65b Micro-optimization to the createCacheKey function
Testing showed the in_array function made it overall slower than simply calling MD4. Using a define, I was able to get the overhead down to virtually nothing:
PHP 8.2:
Execution time for MD4: 0.064558029174805 seconds
Execution time for XXH128: 0.015785932540894 seconds
Execution time for Check: 0.0119788646698 seconds

PHP 8.1:
Execution time for MD4: 0.034939050674438 seconds
Execution time for XXH128: 0.0058550834655762 seconds
Execution time for Check: 0.0062451362609863 seconds
2023-01-19 01:41:17 -08:00
Belle Aerni
bf3b425c8d MD5 -> MD4 2023-01-18 23:11:18 -08:00
Belle Aerni
612adb5a17 Revert "Use the official twig StringLoaderExtension"
This reverts commit b2036b765f.
2023-01-18 22:05:50 -08:00
Belle Aerni
b2036b765f Use the official twig StringLoaderExtension
Not sure how I missed the fact that this exists, but let's use it instead of an unofficial extension
2023-01-18 22:02:33 -08:00
Belle Aerni
08cfdcf460 Stip 'index' off when generating the page list 2023-01-17 20:18:13 -08:00
Belle Aerni
02e4492ecd Improve the way the pagelist is generated
Now it automatically strips off the .md extension since it's unneeded, and it sorts it so that the 'index' of the site is always the first item in the array, since that dictates the order they appear in the browser
2023-01-17 19:45:59 -08:00
Belle Aerni
f388c99647 Added the ability to toggle page visibility 2023-01-17 19:23:48 -08:00
Belle Aerni
0eca5dd3e1 Admin Plugin: added the ability to delete pages 2023-01-17 18:54:44 -08:00
Belle Aerni
cbb978ccad AntConfig::saveConfig verify primary keys exist
Before saving the new config, verify that the config appears to be complete by checking for the primary keys in the array
2023-01-17 12:38:38 -08:00
Belle Aerni
cdee7c8a04 Update config.php to delete all, including dirs 2023-01-16 18:05:33 -08:00
Belle Aerni
4386451516 Added a test for AntTools::repairURL 2023-01-15 12:42:37 -08:00
Belle Aerni
588811ec7a Created a feature list doc 2023-01-14 22:45:37 -08:00
Belle Aerni
ff9583bfdf
Rector (#19)
* Rector code quality run

* Ran Rector with coding style ruleset

* Ran Rector with the naming setlist
2023-01-14 20:44:27 -08:00
Belle Aerni
81824132fe
Merge pull request #18 from AntCMS-org/tests
Run unit tests on PHP 8.0, 8.1, and 8.2
2023-01-14 15:52:31 -08:00
Belle Aerni
fcd9e31af9 Run unit tests on PHP 8.0, 8.1, and 8.2 2023-01-14 15:50:05 -08:00
Belle Aerni
c90823afbe Default to having keyword generation off 2023-01-14 15:37:57 -08:00
Belle Aerni
5669e8a429
Merge pull request #17 from AntCMS-org/mdextensions
Adding some new markdown extensions
2023-01-14 03:31:19 -08:00
Belle Aerni
8ed69831ee Check for cache before setting up the MD parser 2023-01-14 03:04:56 -08:00