diff --git a/caluta_flag.png b/caluta_flag.png new file mode 100644 index 0000000..da4408b Binary files /dev/null and b/caluta_flag.png differ diff --git a/composer.json b/composer.json index daf0d6a..462633f 100644 --- a/composer.json +++ b/composer.json @@ -1,7 +1,7 @@ { "name": "yusurko/caluta7", "type": "project", - "version": "0.1.3", + "version": "0.2.0", "require": { "league/commonmark": "^2.8", "symfony/yaml": "^7.0", diff --git a/index.php b/index.php index 96e13ea..0f3710f 100644 --- a/index.php +++ b/index.php @@ -7,13 +7,18 @@ $link = $_GET['link'] ?? 'index'; $pl = new PageLoader(); $pl->load($link); +if ($pl->getError() !== false) { + $error = $pl->getError(); + http_response_code($error['status']); +} + ?> - Caluta, Inc. + <?= htmlspecialchars($pl->getTitle()); ?> | Caluta, Inc.
+ getError() === false): ?>

getTitle()); ?>

+ getUpdatedAt() !== false): ?> +

Last update: getUpdatedAt())); ?>

+ + +

getError()['status']}" ?>

+

getError()['message']}" ?>

+
+ getError() === false): ?> getHtml(); ?> +
+ \ No newline at end of file diff --git a/pages/dict.md b/pages/dict.md index 4a44205..0d5c233 100644 --- a/pages/dict.md +++ b/pages/dict.md @@ -2,18 +2,28 @@ Jytky Kalpy: Lemeryj (r9: dictionary for the language of Jytlynd) +* **-ady** / part. / nominalizer (for words of HkM origin) * **-s** / part. / suffix for genitive * **-tza** / part. / suffix for past * **-tzu** / part. / suffix for continuous or te-form * **am** / pp. / by, to (dative) * **amgwan** / v. / to remember (used at past tense) * **atempty** / v. / to attempt +* **barasjky** / a. / Maraśań +* **cjat** / n. / chat, conversation +* **cjendy** / n. / estrogen +* **dœd** / a., n. / dead * **em** / v. / to be * **ersjalky** / a. / Imerchali +* **fysj** / n. / fish +* **fytt** / a., n. / fat, fatty acid +* **galagy** / n. / south +* **galutky** / a. / Calutan * **gryvary** / n. / script, alphabet * **gryvy** / v. / to grief, vandalize * **hynd** / n. / dog * **i** / pp. / in +* **iglisy** / n. / north * **je** / p. / I * **jotky** / a. / Jutish (of Jotlond) * **jytky** / a. / Jutish (of Jytlynd) @@ -28,11 +38,15 @@ Jytky Kalpy: Lemeryj * **nym** / n. / name * **oj** / p. / it * **oksygyn** / n. / oxygen +* **pastynagy** / n. / carrot * **pergwan** / v. / to forget (used at past tense) +* **pyjpa** / n. / paper * **som** / a. / some * **supry** / a. / good, super * **trok** / n. / crime * **tzyjar** / n. / animal (also as insult) * **vatry** / a. / bad, gross, not aight +* **vy** / c. / why * **yky** / v. / to go * **yvyly** / a. / evil, silly +* **zajady** / n. / cut diff --git a/pages/index.md b/pages/index.md index 315e7f3..dfb8372 100644 --- a/pages/index.md +++ b/pages/index.md @@ -1,4 +1,12 @@ +Caluta, Inc. +Caluta, Inc. is an evil corporation selling vegetables, paper and pharmauceuticals to the rest of the Ŋorld. Lorem ipsum dolor sit amet +## Languages + +* [Jytky Kalpy](https://mc.nguh.org/wiki/Jytky_Kalpy) +* *other languages* + + diff --git a/src/PageLoader.php b/src/PageLoader.php index 34464e4..90d57d3 100644 --- a/src/PageLoader.php +++ b/src/PageLoader.php @@ -9,9 +9,10 @@ define('PAGES_PATH', dirname(__DIR__) . '/pages'); class PageLoader { - protected string $name, $title; - protected mixed $error; - protected $updatedAt; + protected string $name; + protected string $title = ''; + protected mixed $error = false; + protected mixed $updatedAt = false; protected string $raw_content; public function __construct() { @@ -129,4 +130,8 @@ class PageLoader { public function isIndex () { return $this->name === 'index'; } + + public function getUpdatedAt () { + return $this->updatedAt; + } } \ No newline at end of file