DrewBrasher.OrchardCore.ContentWarning 1.1.0

dotnet add package DrewBrasher.OrchardCore.ContentWarning --version 1.1.0                
NuGet\Install-Package DrewBrasher.OrchardCore.ContentWarning -Version 1.1.0                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="DrewBrasher.OrchardCore.ContentWarning" Version="1.1.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add DrewBrasher.OrchardCore.ContentWarning --version 1.1.0                
#r "nuget: DrewBrasher.OrchardCore.ContentWarning, 1.1.0"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install DrewBrasher.OrchardCore.ContentWarning as a Cake Addin
#addin nuget:?package=DrewBrasher.OrchardCore.ContentWarning&version=1.1.0

// Install DrewBrasher.OrchardCore.ContentWarning as a Cake Tool
#tool nuget:?package=DrewBrasher.OrchardCore.ContentWarning&version=1.1.0                

Content Warning Module

An Orchard Core CMS Module that allows you to put a content warning around some content so that users can decide if they want to see it or not.

There is a discussion about this module here: https://github.com/OrchardCMS/OrchardCore/discussions/13643

NuGet Package

NuGet Version

Usage

Getting Started

  1. Add a reference to this module in your web application.
  2. Enable the "Content Warning" feature.

Shortcode

[content_warning 'warning-message'] some sensitive content [/content_warning]

or

[cw 'warning-message'] some sensitive content [/cw]

Content Part

  1. Add the Content Warning Part to any Content Types you would like to be able to put a warning around.
  2. Check the "Show Warning" box and enter the warning message that you want the user to initially see instead of the content.

Credits

The JavaScript and CSS are based on the https://www.aaron-gustafson.com/notebook/considering-content-warnings-in-html/ blog post by Aaron Gustafson.

I started this module during two Ochard Core Pair Programming by Lombiq sessions with Zoltán Lehóczky that were live streamed. You can watch them here:

https://www.youtube.com/watch?v=ECEbkLSOqLQ

https://www.youtube.com/watch?v=SmvLpAfyEHI

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.1.0 129 8/21/2024
1.0.1 108 6/4/2024
1.0.0 99 6/3/2024
0.1.0 118 5/25/2024

Added a way to re-hide content after it has been revealed.