From 506ecefe8d09cd68a825c8d6f0206cb4f45067db Mon Sep 17 00:00:00 2001 From: gwleuverink Date: Thu, 15 Aug 2024 16:12:52 +0200 Subject: [PATCH] update readme --- README.md | 50 ++++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 42 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 7fc7d81..dbb3e33 100644 --- a/README.md +++ b/README.md @@ -11,21 +11,47 @@ Magically turn HTML & Blade comments into visual hints on your frontend composer require leuverink/dotoo ``` -## Features +## Usage -- Supports both HTML & Blade comments -- TODO mark for single & multiline comments -- Wrap elements inside a block level todo mark -- Customize open & close keywords +Magic TODO's work just like any other TODO comment in a Blade file. By default you opt in to rendering the component by prepending a pipe `|` symbol to your comment. + +```html + + +``` -inline-comment inline-comment-result -
+Blade comments are also supported and work the same: + +```blade +{{-- |TODO: This button is not yet implemented --}} +``` + +You may also wrap markup inside of a TODO in order to emphasize a block. + +```html + + + +``` -inline-comment inline-comment-result +### Modifying the TODO keywords + +By default magic todo's are opt in. Meaning you'll have to append a pipe `|` token. You are free to modify this behaviour any way you like by changing the config. + +Publish the package config and edit the `dotoo.open` & `dotoo.close` keywords how you like. + +If you change `dotoo.open` to `TODO`, Every TODO comment in your template will be highlighted. + +### Usage without comments + Alternatively, you may also directly use the highlight component in your markup. This way you get full control over attributes and slots. Check it out: ```blade @@ -36,6 +62,14 @@ Alternatively, you may also directly use the highlight component in your markup. Foo bar + + + +
+ Do anything you like in here +
+
+
``` ## Configuration