Compare commits

..

57 Commits

Author SHA1 Message Date
Shift
0eb1ce5727 Empty commit for Shift 2026-01-29 04:12:41 +00:00
James Collins
3218f55a31 Merge pull request #562 from STEMMechanics/dependabot/npm_and_yarn/tiptap/extension-underline-3.18.0
Bump @tiptap/extension-underline from 3.17.1 to 3.18.0
2026-01-29 14:00:50 +10:00
dependabot[bot]
be1fa8f432 Bump @tiptap/extension-underline from 3.17.1 to 3.18.0
Bumps [@tiptap/extension-underline](https://github.com/ueberdosis/tiptap/tree/HEAD/packages/extension-underline) from 3.17.1 to 3.18.0.
- [Release notes](https://github.com/ueberdosis/tiptap/releases)
- [Changelog](https://github.com/ueberdosis/tiptap/blob/develop/packages/extension-underline/CHANGELOG.md)
- [Commits](https://github.com/ueberdosis/tiptap/commits/v3.18.0/packages/extension-underline)

---
updated-dependencies:
- dependency-name: "@tiptap/extension-underline"
  dependency-version: 3.18.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-01-29 04:00:02 +00:00
James Collins
c0c572397a Merge pull request #561 from STEMMechanics/dependabot/npm_and_yarn/tiptap/extension-link-3.18.0
Bump @tiptap/extension-link from 3.17.1 to 3.18.0
2026-01-29 13:59:10 +10:00
James Collins
049d4849aa Merge pull request #560 from STEMMechanics/dependabot/npm_and_yarn/tiptap/extension-superscript-3.18.0
Bump @tiptap/extension-superscript from 3.17.1 to 3.18.0
2026-01-29 13:58:58 +10:00
James Collins
e89656367f Merge pull request #559 from STEMMechanics/dependabot/composer/phpunit/phpunit-12.5.8
Bump phpunit/phpunit from 10.5.62 to 12.5.8
2026-01-29 13:58:41 +10:00
dependabot[bot]
e910ef7e84 Bump phpunit/phpunit from 10.5.62 to 12.5.8
Bumps [phpunit/phpunit](https://github.com/sebastianbergmann/phpunit) from 10.5.62 to 12.5.8.
- [Release notes](https://github.com/sebastianbergmann/phpunit/releases)
- [Changelog](https://github.com/sebastianbergmann/phpunit/blob/12.5.8/ChangeLog-12.5.md)
- [Commits](https://github.com/sebastianbergmann/phpunit/compare/10.5.62...12.5.8)

---
updated-dependencies:
- dependency-name: phpunit/phpunit
  dependency-version: 12.5.8
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-01-29 03:58:02 +00:00
dependabot[bot]
db0e927056 Bump @tiptap/extension-link from 3.17.1 to 3.18.0
Bumps [@tiptap/extension-link](https://github.com/ueberdosis/tiptap/tree/HEAD/packages/extension-link) from 3.17.1 to 3.18.0.
- [Release notes](https://github.com/ueberdosis/tiptap/releases)
- [Changelog](https://github.com/ueberdosis/tiptap/blob/develop/packages/extension-link/CHANGELOG.md)
- [Commits](https://github.com/ueberdosis/tiptap/commits/v3.18.0/packages/extension-link)

---
updated-dependencies:
- dependency-name: "@tiptap/extension-link"
  dependency-version: 3.18.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-01-29 03:57:20 +00:00
James Collins
cec55028d6 Merge pull request #557 from STEMMechanics/dependabot/composer/livewire/livewire-4.1.0 2026-01-29 13:57:08 +10:00
James Collins
0ae09c40ae Merge pull request #556 from STEMMechanics/dependabot/npm_and_yarn/tiptap/extension-highlight-3.18.0
Bump @tiptap/extension-highlight from 3.17.1 to 3.18.0
2026-01-29 13:56:18 +10:00
James Collins
1cf2ec1ce7 Merge pull request #555 from STEMMechanics/dependabot/composer/laravel/framework-12.49.0
Bump laravel/framework from 12.48.1 to 12.49.0
2026-01-29 13:56:06 +10:00
dependabot[bot]
693df3a05b Bump @tiptap/extension-superscript from 3.17.1 to 3.18.0
Bumps [@tiptap/extension-superscript](https://github.com/ueberdosis/tiptap/tree/HEAD/packages/extension-superscript) from 3.17.1 to 3.18.0.
- [Release notes](https://github.com/ueberdosis/tiptap/releases)
- [Changelog](https://github.com/ueberdosis/tiptap/blob/develop/packages/extension-superscript/CHANGELOG.md)
- [Commits](https://github.com/ueberdosis/tiptap/commits/v3.18.0/packages/extension-superscript)

---
updated-dependencies:
- dependency-name: "@tiptap/extension-superscript"
  dependency-version: 3.18.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-01-29 00:43:35 +00:00
dependabot[bot]
c0d1913660 Bump livewire/livewire from 3.7.6 to 4.1.0
Bumps [livewire/livewire](https://github.com/livewire/livewire) from 3.7.6 to 4.1.0.
- [Release notes](https://github.com/livewire/livewire/releases)
- [Commits](https://github.com/livewire/livewire/compare/v3.7.6...v4.1.0)

---
updated-dependencies:
- dependency-name: livewire/livewire
  dependency-version: 4.1.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-01-29 00:43:20 +00:00
dependabot[bot]
8c387280a6 Bump @tiptap/extension-highlight from 3.17.1 to 3.18.0
Bumps [@tiptap/extension-highlight](https://github.com/ueberdosis/tiptap/tree/HEAD/packages/extension-highlight) from 3.17.1 to 3.18.0.
- [Release notes](https://github.com/ueberdosis/tiptap/releases)
- [Changelog](https://github.com/ueberdosis/tiptap/blob/develop/packages/extension-highlight/CHANGELOG.md)
- [Commits](https://github.com/ueberdosis/tiptap/commits/v3.18.0/packages/extension-highlight)

---
updated-dependencies:
- dependency-name: "@tiptap/extension-highlight"
  dependency-version: 3.18.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-01-29 00:43:11 +00:00
dependabot[bot]
a1ab7b6257 Bump laravel/framework from 12.48.1 to 12.49.0
Bumps [laravel/framework](https://github.com/laravel/framework) from 12.48.1 to 12.49.0.
- [Release notes](https://github.com/laravel/framework/releases)
- [Changelog](https://github.com/laravel/framework/blob/12.x/CHANGELOG.md)
- [Commits](https://github.com/laravel/framework/compare/v12.48.1...v12.49.0)

---
updated-dependencies:
- dependency-name: laravel/framework
  dependency-version: 12.49.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-01-29 00:43:07 +00:00
James Collins
36d4f08aaf Merge pull request #554 from STEMMechanics/dependabot/composer/symfony/process-7.4.5
Bump symfony/process from 7.4.4 to 7.4.5
2026-01-29 07:50:12 +10:00
dependabot[bot]
f7de4f49d3 Bump symfony/process from 7.4.4 to 7.4.5
Bumps [symfony/process](https://github.com/symfony/process) from 7.4.4 to 7.4.5.
- [Release notes](https://github.com/symfony/process/releases)
- [Changelog](https://github.com/symfony/process/blob/8.1/CHANGELOG.md)
- [Commits](https://github.com/symfony/process/compare/v7.4.4...v7.4.5)

---
updated-dependencies:
- dependency-name: symfony/process
  dependency-version: 7.4.5
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-01-28 21:39:53 +00:00
James Collins
06018c405d Merge pull request #553 from STEMMechanics/dependabot/composer/phpunit/phpunit-10.5.62
Bump phpunit/phpunit from 10.5.61 to 10.5.62
2026-01-28 16:24:47 +10:00
dependabot[bot]
03c17200a0 Bump phpunit/phpunit from 10.5.61 to 10.5.62
Bumps [phpunit/phpunit](https://github.com/sebastianbergmann/phpunit) from 10.5.61 to 10.5.62.
- [Release notes](https://github.com/sebastianbergmann/phpunit/releases)
- [Changelog](https://github.com/sebastianbergmann/phpunit/blob/10.5.62/ChangeLog-10.5.md)
- [Commits](https://github.com/sebastianbergmann/phpunit/compare/10.5.61...10.5.62)

---
updated-dependencies:
- dependency-name: phpunit/phpunit
  dependency-version: 10.5.62
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-01-28 04:44:31 +00:00
519c2a0fec update to php 8.4 2026-01-28 14:43:38 +10:00
James Collins
2b8788f716 Merge pull request #552 from STEMMechanics/dependabot/npm_and_yarn/axios-1.13.4
Bump axios from 1.13.3 to 1.13.4
2026-01-28 14:33:55 +10:00
dependabot[bot]
72be071536 Bump axios from 1.13.3 to 1.13.4
Bumps [axios](https://github.com/axios/axios) from 1.13.3 to 1.13.4.
- [Release notes](https://github.com/axios/axios/releases)
- [Changelog](https://github.com/axios/axios/blob/v1.x/CHANGELOG.md)
- [Commits](https://github.com/axios/axios/compare/v1.13.3...v1.13.4)

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

Signed-off-by: dependabot[bot] <support@github.com>
2026-01-28 00:43:12 +00:00
37b923fbda use important on hidden for placeholder 2026-01-27 20:30:01 +10:00
github-actions[bot]
292901a02e Dependency update 2026-01-26 20:19:20 +00:00
github-actions[bot]
12a6629a4b Dependency update 2026-01-19 20:17:13 +00:00
9d9a8ed9f5 exclude vendor in tests 2026-01-15 08:56:12 +10:00
1a03fed3bd added snyk test 2026-01-15 08:54:06 +10:00
43e66b2004 path traversal in chunk unlink fix 2026-01-15 08:33:38 +10:00
8babb4c836 added unlink safeguard 2026-01-15 08:28:41 +10:00
4eb3dfbb64 fix potential path traversal 2026-01-15 08:23:03 +10:00
33d390a612 fix open redirect 2026-01-15 08:01:05 +10:00
cad78c30ae added peer dependency 2026-01-15 07:57:10 +10:00
f8acdae237 fix path traversal risk 2026-01-15 07:56:32 +10:00
github-actions[bot]
63582dc306 Dependency update 2026-01-12 20:17:47 +00:00
github-actions[bot]
c96fb95f27 Dependency update 2026-01-05 20:18:40 +00:00
1160c8b077 holiday message 2026-01-01 09:11:28 +10:00
a4b3405f8a vite update 2026-01-01 09:06:16 +10:00
9d5396ca9a tiptap and vite update 2026-01-01 09:02:08 +10:00
de1483d409 tiptap update 2026-01-01 09:01:15 +10:00
James Collins
a37386565a Merge pull request #530 from STEMMechanics/dependabot/npm_and_yarn/laravel-vite-plugin-2.0.1
Bump laravel-vite-plugin from 1.3.0 to 2.0.1
2026-01-01 08:46:08 +10:00
dependabot[bot]
ff8b6549ce Bump laravel-vite-plugin from 1.3.0 to 2.0.1
Bumps [laravel-vite-plugin](https://github.com/laravel/vite-plugin) from 1.3.0 to 2.0.1.
- [Release notes](https://github.com/laravel/vite-plugin/releases)
- [Changelog](https://github.com/laravel/vite-plugin/blob/2.x/CHANGELOG.md)
- [Upgrade guide](https://github.com/laravel/vite-plugin/blob/2.x/UPGRADE.md)
- [Commits](https://github.com/laravel/vite-plugin/compare/v1.3.0...v2.0.1)

---
updated-dependencies:
- dependency-name: laravel-vite-plugin
  dependency-version: 2.0.1
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-31 22:18:17 +00:00
github-actions[bot]
d550bc60e2 Dependency update 2025-12-31 21:02:22 +00:00
James Collins
307573a3a8 Update workflow to commit changes directly
Replaced the Create PR step with a Commit and push step to directly commit changes to the main branch.
2026-01-01 07:01:35 +10:00
James Collins
d9fc6c95f3 Update PHP version in dependency update workflow 2026-01-01 06:58:23 +10:00
James Collins
a65f0eead6 Add workflow for automated dependency updates 2026-01-01 06:56:13 +10:00
ca025ca2e8 dependency updates 2025-12-23 10:39:55 +10:00
74aef68edc remove posts reference 2025-12-23 10:34:05 +10:00
c0e595f88a dependency updates 2025-11-27 10:15:26 +10:00
aab4bc0d46 dependency updates 2025-11-26 10:10:57 +10:00
f2708e1325 dependency updates 2025-11-19 10:32:18 +10:00
James Collins
2e2b70ab7c Merge pull request #533 from STEMMechanics/dependabot/npm_and_yarn/multi-74f7c1f85a
Bump esbuild and vite
2025-11-19 10:28:45 +10:00
dependabot[bot]
e42d54554a Bump esbuild and vite
Bumps [esbuild](https://github.com/evanw/esbuild) to 0.25.12 and updates ancestor dependency [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite). These dependencies need to be updated together.


Updates `esbuild` from 0.21.5 to 0.25.12
- [Release notes](https://github.com/evanw/esbuild/releases)
- [Changelog](https://github.com/evanw/esbuild/blob/main/CHANGELOG-2024.md)
- [Commits](https://github.com/evanw/esbuild/compare/v0.21.5...v0.25.12)

Updates `vite` from 5.4.21 to 7.2.2
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/main/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v7.2.2/packages/vite)

---
updated-dependencies:
- dependency-name: esbuild
  dependency-version: 0.25.12
  dependency-type: indirect
- dependency-name: vite
  dependency-version: 7.2.2
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-19 00:25:53 +00:00
6cb24f1500 dependency updates 2025-11-19 10:24:23 +10:00
f7cc086f37 added jenkins link 2025-11-19 10:23:05 +10:00
8463da7842 opacity fixes 2025-11-17 09:26:48 +10:00
James Collins
322d547c92 Merge pull request #526 from STEMMechanics/laravel12
laravel 12 upgrade
2025-11-17 09:09:10 +10:00
30104ece71 laravel 12 upgrade 2025-11-17 09:08:07 +10:00
21 changed files with 2663 additions and 2918 deletions

63
.github/workflows/dependency-update.yml vendored Normal file
View File

@@ -0,0 +1,63 @@
name: Dependency Update
on:
schedule:
- cron: "0 20 * * 1" # Mondays 20:00 UTC
workflow_dispatch: {}
permissions:
contents: write
pull-requests: write
jobs:
update:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
- uses: shivammathur/setup-php@v2
with:
php-version: "8.4"
tools: composer:v2
- name: Install current deps
run: |
npm ci
composer install --no-interaction --no-progress
- name: Update deps
run: |
npm update
composer update --no-interaction --no-progress
- name: Detect changes
id: changes
run: |
if git diff --quiet; then
echo "changed=false" >> "$GITHUB_OUTPUT"
else
echo "changed=true" >> "$GITHUB_OUTPUT"
fi
# - name: Create PR
# if: steps.changes.outputs.changed == 'true'
# uses: peter-evans/create-pull-request@v6
# with:
# commit-message: "Dependency update"
# title: "Dependency update"
# body: "Automated dependency update."
# branch: "bot/dependency-update"
# delete-branch: true
- name: Commit and push
if: steps.changes.outputs.changed == 'true'
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git commit -am "Dependency update"
git push origin HEAD:main

4
.shift
View File

@@ -1,4 +0,0 @@
This file was added by Shift #161875 in order to open a
Pull Request since no other commits were made.
You should remove this file.

View File

@@ -111,15 +111,17 @@ class MediaController extends Controller
public function admin_store(Request $request)
{
$file = null;
$cleanupPath = null;
// Check if the endpoint received a file...
if($request->hasFile('file')) {
try {
$file = $this->upload($request);
if($file === true) {
if(is_array($file) && !empty($file['chunk'])) {
return response()->json([
'message' => 'Chunk stored',
'upload_token' => $file['token'] ?? null,
]);
} else if(!$file) {
return response()->json([
@@ -150,8 +152,20 @@ class MediaController extends Controller
}
// else check if it received a file name of a previous upload...
} else if($request->has('file')) {
$tempFileName = sys_get_temp_dir() . '/chunk-' . Auth::id() . '-' . $request->file;
} else if($request->has('upload_token') || $request->has('file')) {
$uploadToken = $request->input('upload_token', $request->input('file'));
$chunkUploads = session()->get('chunk_uploads', []);
if(!is_string($uploadToken) || !isset($chunkUploads[$uploadToken])) {
return response()->json([
'message' => 'Could not find the referenced file on the server.',
'errors' => [
'file' => 'Could not find the referenced file on the server.'
]
], 422);
}
$tempFileName = $chunkUploads[$uploadToken];
if(!file_exists($tempFileName)) {
return response()->json([
'message' => 'Could not find the referenced file on the server.',
@@ -165,7 +179,16 @@ class MediaController extends Controller
if($fileMime === false) {
$fileMime = 'application/octet-stream';
}
$file = new UploadedFile($tempFileName, $request->file, $fileMime, null, true);
$fileName = $request->input('filename', 'upload');
$fileName = Helpers::cleanFileName($fileName);
if ($fileName === '') {
$fileName = 'upload';
}
$file = new UploadedFile($tempFileName, $fileName, $fileMime, null, true);
$cleanupPath = $tempFileName;
unset($chunkUploads[$uploadToken]);
session()->put('chunk_uploads', $chunkUploads);
}
// Check there is an actual file
@@ -242,7 +265,13 @@ class MediaController extends Controller
}
}
unlink($file->getRealPath());
if(is_string($cleanupPath)) {
$realPath = realpath($cleanupPath);
$tempDir = realpath(sys_get_temp_dir());
if($realPath !== false && $tempDir !== false && str_starts_with($realPath, $tempDir . DIRECTORY_SEPARATOR)) {
@unlink($realPath);
}
}
if($request->wantsJson()) {
return response()->json([
@@ -386,6 +415,10 @@ class MediaController extends Controller
$fileName = $request->input('filename', $file->getClientOriginalName());
$fileName = Helpers::cleanFileName($fileName);
if ($fileName === '') {
$extension = strtolower($file->getClientOriginalExtension());
$fileName = 'upload' . ($extension !== '' ? '.' . $extension : '');
}
if(($request->has('filestart') || $request->has('fileappend')) && $request->has('filesize')) {
$fileSize = $request->get('filesize');
@@ -394,7 +427,25 @@ class MediaController extends Controller
throw new FileTooLargeException('The file is larger than the maximum size allowed of ' . Helpers::bytesToString($max_size));
}
$tempFilePath = sys_get_temp_dir() . '/chunk-' . Auth::id() . '-' . $fileName;
$chunkUploads = session()->get('chunk_uploads', []);
$uploadToken = $request->input('upload_token');
if($request->has('filestart')) {
$uploadToken = bin2hex(random_bytes(16));
$tempFilePath = tempnam(sys_get_temp_dir(), 'chunk-' . Auth::id() . '-');
if($tempFilePath === false) {
throw new FileInvalidException('Unable to create a temporary upload file.');
}
$chunkUploads[$uploadToken] = $tempFilePath;
session()->put('chunk_uploads', $chunkUploads);
} else {
if(!is_string($uploadToken) || !isset($chunkUploads[$uploadToken])) {
throw new FileInvalidException('Invalid upload token.');
}
$tempFilePath = $chunkUploads[$uploadToken];
}
$filemode = 'a';
if($request->has('filestart')) {
@@ -415,9 +466,17 @@ class MediaController extends Controller
$fileMime = 'application/octet-stream';
}
if(is_string($uploadToken) && isset($chunkUploads[$uploadToken])) {
unset($chunkUploads[$uploadToken]);
session()->put('chunk_uploads', $chunkUploads);
}
return new UploadedFile($tempFilePath, $fileName, $fileMime, null, true);
} else {
return true;
return [
'chunk' => true,
'token' => $uploadToken,
];
}
}

View File

@@ -34,23 +34,23 @@ class SearchController extends Controller
$workshops = $workshopQuery->orderBy('starts_at', 'desc')
->paginate(6, ['*'], 'workshop');
$postQuery = Post::query()->where('status', 'published');
$postQuery->where(function ($query) use ($search_words) {
foreach ($search_words as $word) {
$query->where(function ($subQuery) use ($word) {
$subQuery->where('title', 'like', '%' . $word . '%')
->orWhere('content', 'like', '%' . $word . '%');
});
}
});
$posts = $postQuery->orderBy('created_at', 'desc')
->paginate(6, ['*'], 'post')
->onEachSide(1);
// $postQuery = Post::query()->where('status', 'published');
// $postQuery->where(function ($query) use ($search_words) {
// foreach ($search_words as $word) {
// $query->where(function ($subQuery) use ($word) {
// $subQuery->where('title', 'like', '%' . $word . '%')
// ->orWhere('content', 'like', '%' . $word . '%');
// });
// }
// });
//
// $posts = $postQuery->orderBy('created_at', 'desc')
// ->paginate(6, ['*'], 'post')
// ->onEachSide(1);
return view('search', [
'workshops' => $workshops,
'posts' => $posts,
// 'posts' => $posts,
'search' => $search,
]);
}

View File

@@ -5,14 +5,14 @@
"keywords": ["laravel", "framework"],
"license": "MIT",
"require": {
"php": "^8.2",
"php": "^8.4",
"ext-imagick": "*",
"chillerlan/php-qrcode": "^5.0",
"gehrisandro/tailwind-merge-laravel": "^1.2",
"intervention/image": "^3.5",
"laravel/framework": "^11.0",
"laravel/framework": "^12.0",
"laravel/tinker": "^2.9",
"livewire/livewire": "^3.4",
"livewire/livewire": "^4.1",
"php-ffmpeg/php-ffmpeg": "^1.2",
"robthree/twofactorauth": "^3.0"
},
@@ -22,8 +22,7 @@
"laravel/pint": "^1.13",
"laravel/sail": "^1.26",
"mockery/mockery": "^1.6",
"nunomaduro/collision": "^8.0",
"phpunit/phpunit": "^10.5",
"phpunit/phpunit": "^12.5",
"spatie/laravel-ignition": "^2.4"
},
"autoload": {
@@ -61,6 +60,9 @@
}
},
"config": {
"platform": {
"php": "8.4.17"
},
"optimize-autoloader": true,
"preferred-install": "dist",
"sort-packages": true,

2179
composer.lock generated

File diff suppressed because it is too large Load Diff

3003
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -3,27 +3,29 @@
"type": "module",
"scripts": {
"dev": "vite",
"build": "vite build"
"build": "vite build",
"snyk:test": "snyk test --all-projects --exclude=vendor"
},
"devDependencies": {
"@tailwindcss/vite": "^4.1.17",
"autoprefixer": "^10.4.19",
"axios": "^1.6.4",
"laravel-vite-plugin": "^1.0",
"axios": "^1.13.4",
"laravel-vite-plugin": "^2.0.1",
"postcss": "^8.4.38",
"tailwindcss": "^3.4.3",
"vite": "^5.0"
"vite": "^7.3.0"
},
"dependencies": {
"@tiptap/core": "^2.3.0",
"@tiptap/extension-highlight": "^2.3.0",
"@tiptap/extension-image": "^2.3.0",
"@tiptap/extension-link": "^2.3.0",
"@tiptap/extension-subscript": "^2.3.0",
"@tiptap/extension-superscript": "^2.3.0",
"@tiptap/extension-text-align": "^2.3.0",
"@tiptap/extension-typography": "^2.3.0",
"@tiptap/extension-underline": "^2.3.0",
"@tiptap/pm": "^2.3.0",
"@tiptap/starter-kit": "^2.3.0"
"@tiptap/core": "^3.10.7",
"@tiptap/extension-highlight": "^3.18.0",
"@tiptap/extension-image": "^3.10.7",
"@tiptap/extension-link": "^3.18.0",
"@tiptap/extension-subscript": "^3.10.7",
"@tiptap/extension-superscript": "^3.18.0",
"@tiptap/extension-text-align": "^3.10.7",
"@tiptap/extension-typography": "^3.10.7",
"@tiptap/extension-underline": "^3.18.0",
"@tiptap/pm": "^3.10.7",
"@tiptap/starter-kit": "^3.10.7",
"tailwindcss": "^4.1.17"
}
}

View File

@@ -1,6 +0,0 @@
export default {
plugins: {
tailwindcss: {},
autoprefixer: {},
},
}

View File

@@ -1,4 +1,26 @@
let SM = {
redirectIfSafe: (target) => {
if (typeof target !== 'string' || target === '') {
window.location.assign('/');
return;
}
let url;
try {
url = new URL(target, window.location.origin);
} catch (error) {
window.location.assign('/');
return;
}
if (url.origin !== window.location.origin) {
window.location.assign('/');
return;
}
window.location.assign(url.href);
},
alert: (title, text, type = 'info') =>{
const data = {
position: 'top-end',
@@ -84,7 +106,7 @@ let SM = {
axios.delete(url)
.then((response) => {
if(response.data.success){
window.location.href = response.data.redirect;
SM.redirectIfSafe(response.data.redirect);
}
})
.catch(() => {
@@ -136,7 +158,7 @@ let SM = {
}
}
const uploadFile = (file, start, title, idx, count) => {
const uploadFile = (file, start, title, idx, count, uploadToken = null) => {
const showPercentDecimals = (file.size > (1024 * 1024 * 40));
const chunkSize = 1024 * 1024 * 2;
const end = Math.min(file.size, start + chunkSize);
@@ -146,6 +168,9 @@ let SM = {
formData.append('file', chunk);
formData.append('filename', file.name);
formData.append('filesize', file.size);
if (uploadToken) {
formData.append('upload_token', uploadToken);
}
if (start === 0) {
formData.append('filestart', 'true');
@@ -183,6 +208,10 @@ let SM = {
}
}).then((response) => {
if (response.status === 200) {
if (response.data && response.data.upload_token) {
uploadToken = response.data.upload_token;
}
if (end >= file.size) {
uploadedFiles.push({ file: file, title: title, data: response.data });
@@ -205,12 +234,13 @@ let SM = {
} else {
start = 0;
idx += 1;
uploadToken = null;
}
} else {
start = end;
}
uploadFile(files[idx], start, titles[idx] || '', idx, files.length);
uploadFile(files[idx], start, titles[idx] || '', idx, files.length, uploadToken);
} else {
showError(response.data.message);
}

View File

@@ -1,6 +1,24 @@
@tailwind base;
@tailwind components;
@tailwind utilities;
@import "tailwindcss";
@source "../**/*.{blade.php,js,php,vue}";
@theme {
/* Color tokens */
--color-primary-color: #0284C7;
--color-primary-color-dark: #0370A1;
--color-primary-color-light: #0EA5E9;
--color-danger-color: #b91c1c;
--color-danger-color-dark: #991b1b;
--color-danger-color-light: #dc2626;
--color-success-color: #16a34a;
--color-success-color-dark: #22c55e;
--color-success-color-light: #4ade80;
/* Box shadows */
--shadow-deep: 0 10px 15px rgba(0, 0, 0, 0.5);
}
html, body {
@apply bg-gray-100;

View File

@@ -1,6 +1,7 @@
import Link from "@tiptap/extension-link";
import {Editor} from "@tiptap/core";
import StarterKit from "@tiptap/starter-kit";
import Underline from "@tiptap/extension-underline";
import Highlight from "@tiptap/extension-highlight";
import TextAlign from "@tiptap/extension-text-align";
import Typography from "@tiptap/extension-typography";
@@ -49,12 +50,16 @@ document.addEventListener('alpine:init', () => {
editor = new Editor({
element: this.$refs.element,
extensions: [
StarterKit,
StarterKit.configure({
link: false,
underline: false,
}),
Highlight,
CustomLink.configure({
rel: 'noopener noreferrer',
openOnClick: 'whenNotEditable',
}),
Underline,
TextAlign.configure({
types: ['heading', 'paragraph', 'small', 'extraSmall'],
}),
@@ -65,6 +70,11 @@ document.addEventListener('alpine:init', () => {
ExtraSmall,
Box
],
editorProps: {
attributes: {
class: 'tiptap content',
},
},
content: content,
onCreate({/* editor */}) {
_this.updatedAt = Date.now()
@@ -141,6 +151,9 @@ document.addEventListener('alpine:init', () => {
unsetAllMarks() {
editor.chain().focus().unsetAllMarks().run()
},
clearNodes() {
editor.chain().focus().clearNodes().run()
},
clearNotes() {
editor.chain().focus().clearNodes().run()
},

View File

@@ -7,6 +7,7 @@
<li><a href="https://discord.gg/yNzk4x7mpD" class="text-sm hover:text-primary-color">Discord</a></li>
<li><a href="https://www.facebook.com/stemmechanics" class="text-sm hover:text-primary-color">Facebook</a></li>
<li><a href="https://www.stemcraft.com.au/" class="text-sm hover:text-primary-color">STEMCraft (Minecraft)</a></li>
<li><a href="https://jenkins.stemmechanics.com.au/" class="text-sm hover:text-primary-color">Jenkins</a></li>
<li><a href="https://youtube.com/@STEMMechanics" class="text-sm hover:text-primary-color">YouTube</a></li>
</ul>
<ul class="sm:w-1/3 flex flex-col gap-0.5 text-center sm:text-left">

View File

@@ -43,7 +43,7 @@
</div>
<div x-show="pageMenuOpen" @click.away="pageMenuOpen=false" x-cloak class="fixed left-0 top-0 h-full w-full z-20" role="menu" aria-labelledby="page-menu-button" tabindex="-1">
<div x-show="pageMenuOpen" @click="pageMenuOpen=false" class="absolute inset-0 bg-black bg-opacity-40 backdrop-blur-sm"
<div x-show="pageMenuOpen" @click="pageMenuOpen=false" class="absolute inset-0 bg-black/40 backdrop-blur-sm"
x-transition:enter="transition ease-out duration-300"
x-transition:enter-start="opacity-0"
x-transition:enter-end="opacity-100"
@@ -90,7 +90,7 @@
@click.away="userMenuOpen=false"
x-cloak
>
<div x-show="userMenuOpen" @click="userMenuOpen=false" class="fixed left-0 w-screen z-20 h-screen bg-black bg-opacity-40 backdrop-blur-sm"
<div x-show="userMenuOpen" @click="userMenuOpen=false" class="fixed left-0 w-screen z-20 h-screen bg-black/40 backdrop-blur-sm"
x-transition:enter="transition ease-out duration-300"
x-transition:enter-start="opacity-0"
x-transition:enter-end="opacity-100"
@@ -99,7 +99,7 @@
x-transition:leave-end="opacity-0"></div>
<div
x-show="userMenuOpen"
class="absolute w-full right-0 sm:right-5 sm:top-12 z-50 sm:mt-2 sm:w-64 origin-top-right sm:rounded-md bg-white py-3 px-2 shadow-lg border-t sm:ring-1 ring-black ring-opacity-25 focus:outline-none">
class="absolute w-full right-0 sm:right-5 sm:top-12 z-50 sm:mt-2 sm:w-64 origin-top-right sm:rounded-md bg-white py-3 px-2 shadow-lg border-t border-gray-200 sm:ring-1 ring-black/25 focus:outline-none">
@if(auth()->guest())
<a href="{{ route('register') }}" class="block px-4 py-2 text-sm text-gray-700 rounded transition hover:bg-sky-600 hover:text-white" role="menuitem" tabindex="-1"><i class="fa-solid fa-pen-to-square w-4 mr-2"></i>Register</a>
<a href="{{ route('login') }}" class="block px-4 py-2 text-sm text-gray-700 rounded transition hover:bg-sky-600 hover:text-white" role="menuitem" tabindex="-1"><i class="fa-solid fa-right-to-bracket w-4 mr-2"></i>Log in</a>
@@ -127,7 +127,7 @@
})
}
})">
<div class="absolute inset-0 backdrop-blur-sm bg-opacity-40 bg-black"></div>
<div class="absolute inset-0 backdrop-blur-sm bg-black/40"></div>
<div class="relative w-full mx-8 max-w-2xl bg-gray-50 p-2 rounded-lg shadow-lg" x-on:click.stop>
<form action="{{ route('search.index') }}" method="GET">
<x-ui.search type="text" name="q" label="Search..." />

View File

@@ -0,0 +1,19 @@
@props(['item' => 'results', 'search', 'message', 'title'])
@php
if(!isset($message)) {
if(!isset($search) || $search == '')
$message = "We couldn't find any $item";
else
$message = "We couldn't find any $item matching \"$search\"";
}
if(!isset($title)) {
$title = "No results found";
}
@endphp
<div class="flex flex-col items-center my-8 w-full">
<i class="text-gray-300 mb-6 text-8xl fa-solid fa-cat"></i>
<p class="text-gray-500 mt-2">No workshops coming up. Were on a short break, mostly by playing with the cat.</p>
</div>

View File

@@ -10,12 +10,12 @@
}
@endphp
<a href="{{ route('workshop.show', $workshop) }}" class="flex flex-col bg-white border rounded-lg overflow-hidden hover:shadow-lg hover:scale-[101%] transition-all relative {{ $attributes->get('class') }}">
<div class="shadow border rounded px-3 py-2 absolute top-2 left-2 flex flex-col justify-center items-center bg-white">
<a href="{{ route('workshop.show', $workshop) }}" class="flex flex-col bg-white border border-gray-200 rounded-lg overflow-hidden hover:shadow-lg hover:scale-[101%] transition-all relative {{ $attributes->get('class') }}">
<div class="shadow border border-gray-200 rounded px-3 py-2 absolute top-2 left-2 flex flex-col justify-center items-center bg-white">
<div class="text-gray-600 font-bold leading-none">{{ $workshop->starts_at->format('j') }}</div>
<div class="text-gray-600 text-xs uppercase">{{ $workshop->starts_at->format('M') }}</div>
</div>
<div class="border border-white border-opacity-50 absolute flex items-center justify-center top-5 -right-9 bg-gray-500 w-36 text-sm text-white font-bold uppercase py-1 rotate-45 h-8 sm-banner-{{ strtolower($statusClass) }}">{{ $statusTitle }}</div>
<div class="border border-white/50 absolute flex items-center justify-center top-5 -right-9 bg-gray-500 w-36 text-sm text-white font-bold uppercase py-1 rotate-45 h-8 sm-banner-{{ strtolower($statusClass) }}">{{ $statusTitle }}</div>
<img src="{{ $workshop->hero?->url }}?md" alt="{{ $workshop->title }}" class="w-full h-64 object-cover object-center">
<div class="flex-grow p-4 flex flex-col">
<h2 class="flex-grow {{ strlen($workshop->title) > 25 ? 'text-lg' : 'text-xl' }} font-bold mb-2">{{ $workshop->title }}</h2>

View File

@@ -36,7 +36,7 @@
imgElement.src = details.thumbnail;
imgElement.classList.remove('hidden');
placeholderElement.classList.add('hidden');
placeholderElement.classList.add('hidden!');
document.getElementById(name).value = value;
});

View File

@@ -12,7 +12,7 @@
<x-container>
<h2 class="text-2xl font-bold mb-6">Upcoming workshops</h2>
@if($workshops->isEmpty())
<x-none-found item="workshops" message="No workshops have been scheduled at this time" title="" />
<x-on-holiday />
@else
<div class="grid md:grid-cols-2 lg:grid-cols-3 gap-8 w-full">
@foreach($workshops as $index => $workshop)

View File

@@ -1,23 +1,23 @@
<x-layout>
<x-mast title="Search" description='Results for "{{ $search }}"' />
<x-container>
<section class="bg-gray-100">
<h2 class="text-2xl font-bold my-6">Posts</h2>
@if($posts->isEmpty())
<x-container class="mt-8">
<x-none-found item="posts" search="{{ request()->get('search') }}" />
</x-container>
@else
<x-container class="mt-4" inner-class="grid md:grid-cols-2 lg:grid-cols-3 gap-8 w-full">
@foreach ($posts as $post)
<x-panel-post :post="$post" />
@endforeach
</x-container>
<x-container>
{{ $posts->appends(request()->except('post'))->links('', ['pageName' => 'post']) }}
</x-container>
@endif
</section>
{{-- <section class="bg-gray-100">--}}
{{-- <h2 class="text-2xl font-bold my-6">Posts</h2>--}}
{{-- @if($posts->isEmpty())--}}
{{-- <x-container class="mt-8">--}}
{{-- <x-none-found item="posts" search="{{ request()->get('search') }}" />--}}
{{-- </x-container>--}}
{{-- @else--}}
{{-- <x-container class="mt-4" inner-class="grid md:grid-cols-2 lg:grid-cols-3 gap-8 w-full">--}}
{{-- @foreach ($posts as $post)--}}
{{-- <x-panel-post :post="$post" />--}}
{{-- @endforeach--}}
{{-- </x-container>--}}
{{-- <x-container>--}}
{{-- {{ $posts->appends(request()->except('post'))->links('', ['pageName' => 'post']) }}--}}
{{-- </x-container>--}}
{{-- @endif--}}
{{-- </section>--}}
<section class="bg-gray-100">
<h2 class="text-2xl font-bold my-6">Workshops</h2>

View File

@@ -1,30 +0,0 @@
/** @type {import('tailwindcss').Config} */
export default {
content: [
"./resources/**/*.blade.php",
"./resources/**/*.js",
'./vendor/**/*.blade.php',
],
theme: {
extend: {
boxShadow: {
'deep': '0 10px 15px rgba(0, 0, 0, 0.5)',
},
colors: {
'primary-color': '#0284C7', // sky-600
'primary-color-dark': '#0370A1', // sky-500
'primary-color-light': '#0EA5E9', // sky-400
'danger-color': '#b91c1c', // red-600
'danger-color-dark': '#991b1b', // red-500
'danger-color-light': '#dc2626', // red-400
'success-color': '#16a34a', // green-600
'success-color-dark': '#22c55e', // green-500
'success-color-light': '#4ade80', // green-400
},
},
},
plugins: [],
}

View File

@@ -1,5 +1,6 @@
import { defineConfig } from 'vite';
import laravel from 'laravel-vite-plugin';
import tailwindcss from '@tailwindcss/vite'
export default defineConfig({
plugins: [
@@ -7,5 +8,6 @@ export default defineConfig({
input: ['resources/css/app.css', 'resources/js/app.js'],
refresh: true,
}),
tailwindcss(),
],
});