Skip to content
This repository has been archived by the owner on Feb 13, 2022. It is now read-only.

Commit

Permalink
✅ added localhost tests related to #21
Browse files Browse the repository at this point in the history
Signed-off-by: Bruno Meilick <b@bnomei.com>
  • Loading branch information
bnomei committed Mar 1, 2020
1 parent 996fade commit 3255b1d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 43 deletions.
44 changes: 1 addition & 43 deletions tests/content/1_home/home.txt
Expand Up @@ -2,46 +2,4 @@ Title: Home

----

Text:

[
{
"attrs": [],
"content": "The <strong>new</strong> <em>Lazysrcset</em> Editor Block\u2026",
"id": "_gf6ohj713",
"type": "paragraph"
},
{
"attrs": {
"guid": "/pages/home/files/flowers.jpg",
"src": "http://localhost:8888/media/pages/home/3844116980-1569363527/flowers.jpg",
"id": "home/flowers.jpg",
"ratio": 1.4652777777777777,
"caption": "\u2026 extends the core editor <em>Image</em> Editor Block in supporting <strong>ALL</strong> imagetag and lazysrcset plugin options.",
"css": "",
"sizes": "",
"figure": ""
},
"content": "",
"id": "_q6nng0h5j",
"type": "srcset"
},
{
"attrs": [],
"content": "alt, caption, class, height, imgclass, link, linkclass, rel, target, text, title, width",
"id": "_h24kkgd8n",
"type": "blockquote"
},
{
"attrs": [],
"content": "sizes, lazy, prefix, autosizes, quality, figure",
"id": "_mw1bocq4t",
"type": "blockquote"
},
{
"attrs": [],
"content": "",
"id": "_7kvrfxxh0",
"type": "paragraph"
}
]
Textplain: (lazysrcset: flowers.jpg)
3 changes: 3 additions & 0 deletions tests/site/blueprints/pages/default.yml
@@ -1,6 +1,9 @@
title: Default Page
preset: page
fields:
textplain:
label: Textarea
type: textarea
text:
label: Editor
type: editor
3 changes: 3 additions & 0 deletions tests/site/templates/default.php
Expand Up @@ -26,6 +26,9 @@
<script src="https://cdn.jsdelivr.net/npm/lazysizes@5.1.1/lazysizes.min.js" integrity="sha256-6zKmNZVeImc0d1Y55vm4So/0W5mbwWiPS4zJt3F4t2A=" crossorigin="anonymous"></script>
</head>
<body class="<?= option('debug') ? 'debug':'' ?>">
<article>
<?= $page->textplain()->kirbytext() ?>
</article>
<article>
<?= $page->text()->blocks() ?>
</article>
Expand Down

0 comments on commit 3255b1d

Please sign in to comment.