Got a basic calendar editing page going.
This commit is contained in:
@@ -1,33 +0,0 @@
|
||||
[
|
||||
{
|
||||
"start": "2025-06-10T19:00:00",
|
||||
"end": "2025-06-10T21:00:00",
|
||||
"title": "June 2025 Online Catch Up",
|
||||
"description": "Getting started with meshtastic",
|
||||
"location": "Jitsi"
|
||||
},
|
||||
{
|
||||
"start": "2025-06-19T18:30:00",
|
||||
"end": "2025-06-19T21:00:00",
|
||||
"title": "June 2025 In Person Catch Up",
|
||||
"description": "Social get-together. Discussion about large language models and meshtastic experiments. Clumsy attempt at adhering to an agenda and taking minutes.",
|
||||
"location": "Chermside Library",
|
||||
"coordinates": "-27.38621539644283,153.0351689206467"
|
||||
},
|
||||
{
|
||||
"start": "2025-07-08T19:00:00",
|
||||
"end": "2025-07-08T21:00:00",
|
||||
"title": "July 2025 Online Catch Up",
|
||||
"description": "Monthly Online Jitsi Get Together",
|
||||
"location": "Jitsi"
|
||||
},
|
||||
{
|
||||
"start": "2025-07-24T18:30:00",
|
||||
"end": "2025-07-24T21:00:00",
|
||||
"title": "July 2025 In Person Catch Up",
|
||||
"description": "Monthly In Person Get Together",
|
||||
"location": "Chermside Library",
|
||||
"coordinates": "-27.38621539644283,153.0351689206467"
|
||||
}
|
||||
]
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
[
|
||||
{
|
||||
"start": "2025-06-10T19:00:00",
|
||||
"end": "2025-06-10T21:00:00",
|
||||
"title": "June 2025 Online Catch Up",
|
||||
"description": "Getting started with meshtastic",
|
||||
"location": "Jitsi"
|
||||
},
|
||||
{
|
||||
"start": "2025-06-19T18:30:00",
|
||||
"end": "2025-06-19T21:00:00",
|
||||
"title": "June 2025 In Person Catch Up",
|
||||
"location": "Chermside Library"
|
||||
}
|
||||
]
|
||||
|
||||
@@ -1,35 +1,10 @@
|
||||
<!DOCTYPE html>
|
||||
<?php
|
||||
|
||||
require 'lib.php';
|
||||
require 'vendor/autoload.php';
|
||||
use Michelf\Markdown;
|
||||
|
||||
function getEvents() {
|
||||
$content = file_get_contents("events.json");
|
||||
$entries = json_decode($content, $associative = true);
|
||||
for ( $i = 0; $i < count($entries); $i++ ) {
|
||||
$entry = $entries[$i];
|
||||
$dt = new DateTime( $entry["start"] );
|
||||
$ctl = $dt -> format("YmdHi");
|
||||
$entries[$i]["ctl"] = $ctl;
|
||||
$datestamp = $dt -> format("Ymd");
|
||||
$files = array( "agenda" => sprintf("agenda/%d.md", $datestamp)
|
||||
, "minutes" => sprintf("minutes/%d.md", $datestamp)
|
||||
);
|
||||
foreach ( $files as $key => $file ) {
|
||||
if ( file_exists( $file ) ) {
|
||||
$entries[$i][$key] = file_get_contents($file);
|
||||
}
|
||||
}
|
||||
}
|
||||
usort($entries, function ($a, $b) {
|
||||
$dateA = new DateTime($a['start']);
|
||||
$dateB = new DateTime($b['start']);
|
||||
return $dateA < $dateB ? 1 : -1;
|
||||
});
|
||||
return($entries);
|
||||
}
|
||||
|
||||
?>
|
||||
<html lang="en">
|
||||
|
||||
|
||||
0
web/lib.php
Normal file
0
web/lib.php
Normal file
Reference in New Issue
Block a user