Skip to content

Commit

Permalink
Update PHP Library doc
Browse files Browse the repository at this point in the history
  • Loading branch information
PrestaEdit committed Sep 12, 2024
1 parent c27d48e commit c459fe1
Show file tree
Hide file tree
Showing 6 changed files with 49 additions and 147 deletions.
2 changes: 2 additions & 0 deletions cecil.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ sidebar: # docs groups in /pages/docs/
icon : test
- title : PHP Library
icon : code
sections:
- title : Console
footer: Copyright © %author%
github:
repo: https://github.com/PrestaFlow/docs.prestaflow.io
Expand Down
14 changes: 8 additions & 6 deletions extensions/Cecil/Renderer/Extension/MyExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,19 @@ public function formatTypography($content)
'/<h5/',
'/<h6/',
'/<p /',
'/<ul>/',
'/PrestaFlow/',
'#<aside class="note note-tip">([a-zA-Z0-9_\-.,;!=\r\n": <\/>]*)</aside>#'
];
$replacements = [
'<h1 class="text-3xl font-bold dark:text-white p-4"',
'<h2 class="text-2xl font-bold dark:text-white p-4 underline underline-offset-4 decoration-2 decoration-sky-500"',
'<h3 class="text-xl font-bold dark:text-white p-6"',
'<h4 class="text-lg font-bold dark:text-white p-8"',
'<h5 class="text-base font-bold dark:text-white p-10"',
'<h6 class="text-base font-bold dark:text-white p-12"',
'<h1 class="text-3xl font-bold dark:text-white pl-4"',
'<h2 class="text-2xl font-bold dark:text-white pl-4 underline underline-offset-4 decoration-2 decoration-sky-500"',
'<h3 class="text-xl font-bold dark:text-white pl-6"',
'<h4 class="text-lg font-bold dark:text-white pl-8"',
'<h5 class="text-base font-bold dark:text-white pl-10"',
'<h6 class="text-base font-bold dark:text-white pl-12"',
'<p class="text-justify text-base text-gray-800 dark:text-gray-200 p-2"',
'<ul class="marker:text-teal-600 list-disc ps-5 space-y-2 text-sm text-gray-600 dark:text-neutral-400">',
'<span class="bg-clip-text bg-gradient-to-tl from-blue-400 to-teal-600 font-semibold text-transparent">PrestaFlow</span>',
'<div class="my-4 w-full bg-white border border-gray-200 rounded-xl shadow-lg dark:bg-gray-800 dark:border-gray-700" role="alert">
<div class="flex p-4">
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"tailwindcss": "^3.4"
},
"scripts": {
"dev" : "php cecil.phar serve",
"dev": "php cecil.phar serve",
"build": "curl -sSOL https://cecil.app/build.sh && bash ./build.sh",
"tailwind": "npx tailwindcss -i ./themes/prestaflow/assets/_app.css -o ./themes/prestaflow/assets/app.css"
},
Expand Down
File renamed without changes.
38 changes: 38 additions & 0 deletions pages/docs/PHP Library/2-Console.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
:::warning
Document in **progress**.
:::

## Setup

Inside the composer.json :

```
"scripts": {
"tests": "./vendor/prestaflow/php-library/bin/prestaflow run ./Tests"
},
```

:::info
There, the *./Tests* folder will contain the suites to be tested.
:::

## Run

```bash
composer run tests
```

### Options
#### Stats
#### Output

Available formats :
- Full (full) :
- Compact (compact) :
- JSON (json) :

:::tip
The default value is **full**.
:::

## Output
140 changes: 0 additions & 140 deletions pages/docs/PHP Library/2-Page 2.md

This file was deleted.

0 comments on commit c459fe1

Please sign in to comment.