|
1 | | -<!doctype html> |
2 | | -<html lang="en" class="h-100"> |
3 | | - |
4 | | -<head> |
5 | | - <meta charset="utf-8"> |
6 | | - <meta name="viewport" content="width=device-width, initial-scale=1"> |
7 | | - <link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" |
8 | | - integrity="sha384-T3c6CoIi6uLrA9TneNEoa7RxnatzjcDSCmG1MXxSR1GAsXEV/Dwwykc2MPK8M2HN" crossorigin="anonymous"> |
9 | | - <title>404</title> |
10 | | -</head> |
11 | | - |
12 | | -<body class="h-100"> |
13 | | - <div class="d-flex align-items-center justify-content-center h-100"> |
14 | | - <div class=""> |
15 | | - <h1>404 Not Found</h1> |
16 | | - <p> Sorry, the page you are looking for could not be found.</p> |
17 | | - </div> |
18 | | - </div> |
19 | | - |
20 | | - <script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" integrity="sha384-C6RzsynM9kWDrMNeT87bh95OGNyZPhcTNXj1NW7RuBCsyN/o0jlpcV8Qyq46cDfL" crossorigin="anonymous" type="a0d4e0431450051d5677e690-text/javascript"></script> |
21 | | - <script type="a0d4e0431450051d5677e690-text/javascript"> |
22 | | - const darkModeMediaQuery = window.matchMedia('(prefers-color-scheme: dark)'); |
23 | | - |
24 | | - if (darkModeMediaQuery.matches) { |
25 | | - document.documentElement.setAttribute('data-bs-theme', 'dark'); |
26 | | - } else { |
27 | | - document.documentElement.setAttribute('data-bs-theme', 'light'); |
28 | | - } |
29 | | - |
30 | | - darkModeMediaQuery.addEventListener('change', (event) => { |
31 | | - if (event.matches) { |
32 | | - document.documentElement.setAttribute('data-bs-theme', 'dark'); |
33 | | - } else { |
34 | | - document.documentElement.setAttribute('data-bs-theme', 'light'); |
35 | | - } |
36 | | - }); |
37 | | - </script> |
38 | | -<script src="/cdn-cgi/scripts/7d0fa10a/cloudflare-static/rocket-loader.min.js" data-cf-settings="a0d4e0431450051d5677e690-|49" defer></script></body> |
39 | | - |
40 | | -</html> |
| 1 | +# jcdcdev.Umbraco.ReadingTime |
| 2 | + |
| 3 | +[](https://github.com/jcdcdev/jcdcdev.Umbraco.ReadingTime/#quick-start) |
| 4 | +[](https://marketplace.umbraco.com/package/jcdcdev.Umbraco.ReadingTime) |
| 5 | +[](https://github.com/jcdcdev/jcdcdev.Umbraco.ReadingTime?tab=MIT-1-ov-file) |
| 6 | +[](https://www.nuget.org/packages/jcdcdev.Umbraco.ReadingTime) |
| 7 | +[](https://jcdc.dev/umbraco-packages/reading-time) |
| 8 | + |
| 9 | + |
| 10 | +Custom Data Type for calculating reading time. With full variant support! |
| 11 | + |
| 12 | +The following editors are currently supported: |
| 13 | + |
| 14 | +- Rich Text |
| 15 | +- Markdown |
| 16 | +- Block Grid |
| 17 | +- Block List |
| 18 | +- Nested Content |
| 19 | +- Textstring |
| 20 | +- Textarea |
| 21 | + |
| 22 | +## Quick Start |
| 23 | + |
| 24 | +1. Install the [NuGet package](https://www.nuget.org/packages/jcdcdev.Umbraco.ReadingTime) in your Umbraco CMS website project. |
| 25 | + ``` |
| 26 | + dotnet add package jcdcdev.Umbraco.ReadingTime |
| 27 | + ``` |
| 28 | +2. Add the Reading Time data type to a document type. You can configure: |
| 29 | + - `Words per minute` (default is 200) |
| 30 | + - `Min Unit` (default is Minute) |
| 31 | + - `Max Unit` (default is Minute) |
| 32 | +3. Save and publish content. |
| 33 | +4. Reading Time will display in the backoffice |
| 34 | + |
| 35 | +### Using the value in your templates |
| 36 | + |
| 37 | +In your template, you can accessing the Reading Time property value like any other property: |
| 38 | + |
| 39 | +```html |
| 40 | + @Model.ReadingTime.DisplayTime() |
| 41 | +``` |
| 42 | + |
| 43 | +## Configuration |
| 44 | + |
| 45 | +You can change the average words per minute in the data type settings. |
| 46 | + |
| 47 | +When creating a new data type, the default will be 200 words per minute. |
| 48 | + |
| 49 | +## Contributing |
| 50 | + |
| 51 | +Contributions to this package are most welcome! Please visit the [Contributing](https://github.com/jcdcdev/jcdcdev.Umbraco.ReadingTime/contribute) page. |
| 52 | + |
| 53 | +## Acknowledgements (Thanks) |
| 54 | + |
| 55 | +- LottePitcher - [opinionated-package-starter](https://github.com/LottePitcher/opinionated-package-starter) |
| 56 | + |
| 57 | + |
| 58 | + |
0 commit comments