From 58e3a7503cefa8089217c914f4407482c9374c8d Mon Sep 17 00:00:00 2001 From: igor Date: Mon, 26 Oct 2026 18:44:34 +0100 Subject: [PATCH] presunute zdrojove kody do ./src/ --- .gitignore | 1 + AGENTS.md | 14 +++++++------- README.md | 11 ++++++++++- markdown.css => src/markdown.css | 0 md2html.php => src/md2html.php | 4 ++-- 5 files changed, 20 insertions(+), 10 deletions(-) rename markdown.css => src/markdown.css (100%) rename md2html.php => src/md2html.php (75%) diff --git a/.gitignore b/.gitignore index 89dae84..787a369 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ "/vendor/" +/vendor diff --git a/AGENTS.md b/AGENTS.md index 9df0129..672bd2c 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -2,17 +2,17 @@ ## Purpose This project is a small Markdown-to-HTML utility used behind NGINX. -When a `.md` file is requested, `md2html.php` loads the Markdown, converts it with Parsedown, and renders HTML styled by `markdown.css`. +When a `.md` file is requested, `src/md2html.php` loads the Markdown, converts it with Parsedown, and renders HTML styled by `src/markdown.css`. ## Key Files -- `md2html.php`: entrypoint for conversion and HTML output. -- `markdown.css`: visual styling for rendered Markdown (`.markdown-body`). +- `src/md2html.php`: entrypoint for conversion and HTML output. +- `src/markdown.css`: visual styling for rendered Markdown (`.markdown-body`). - `composer.json`: PHP dependency config (`erusev/parsedown`). ## Environment Assumptions - Project root: `D:\www\md2html` - Markdown files are resolved from `D:\www\...` -- CSS is currently linked as `//localhost/md2html/markdown.css` +- CSS is currently linked as `//localhost/md2html/src/markdown.css` ## Change Priorities 1. Keep output readable on desktop and mobile. @@ -20,15 +20,15 @@ When a `.md` file is requested, `md2html.php` loads the Markdown, converts it wi 3. Avoid introducing JS unless explicitly required. 4. Keep the utility simple and fast. -## Styling Rules (`markdown.css`) +## Styling Rules (`src/markdown.css`) - Style only inside `.markdown-body` unless there is a strong reason to change global page behavior. - Must cover: headings, links, lists, blockquotes, inline code, code blocks, tables, images, hr. - Keep strong contrast and accessible font sizes. - Ensure long code lines and wide tables remain usable on small screens (`overflow-x`). - Prefer CSS variables for colors and spacing to simplify future theme changes. -## PHP Rules (`md2html.php`) -- Keep dependency loading via `vendor/autoload.php`. +## PHP Rules (`src/md2html.php`) +- Keep dependency loading via the project root's `vendor/autoload.php`, resolved relative to the entrypoint directory. - Keep response minimal: ``, UTF-8 meta, stylesheet link, wrapped content. - Do not remove `.md` extension guard. - Any path-handling changes must remain compatible with Windows paths. diff --git a/README.md b/README.md index a091e5c..abec734 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,12 @@ # MD2HTML -Koverzia Markdown do HTML, pouzitelne aj pre priame zobrazovanie Markdown suborov pomocou webservera. \ No newline at end of file +Koverzia Markdown do HTML, pouzitelne aj pre priame zobrazovanie Markdown suborov pomocou webservera. + +Zdrojove subory su v adresari `src/`: + +- `src/md2html.php`: vstupny bod konverzie Markdown do HTML. +- `src/markdown.css`: styly vystupneho HTML. + +Zavislosti sa instaluju cez `composer install` v koreni projektu do `vendor/`. +Konfiguracia NGINX musi smerovat Markdown poziadavky na `src/md2html.php`. +CSS sa nacitava z `//localhost/md2html/src/markdown.css`. diff --git a/markdown.css b/src/markdown.css similarity index 100% rename from markdown.css rename to src/markdown.css diff --git a/md2html.php b/src/md2html.php similarity index 75% rename from md2html.php rename to src/md2html.php index 5098c7f..614abf4 100644 --- a/md2html.php +++ b/src/md2html.php @@ -1,5 +1,5 @@ '; echo ''; -echo ''; +echo ''; echo '
'; echo $parser->text($md); echo '
';