├── .github
├── CONTRIBUTING.md
├── ISSUE_TEMPLATE
│ ├── bug.yml
│ ├── config.yml
│ └── feature_request.yml
├── README.md
└── workflows
│ └── release.yml
├── .gitignore
├── LICENSE
├── docs
├── ModifyingDefaultConfiguration.md
└── README_nuget.md
├── images
├── 1.png
├── 2.png
├── 3.png
├── 4.png
├── 5.jpg
└── logo.png
├── src
├── .editorconfig
├── QuickBlocks.TestSite
│ ├── .gitignore
│ ├── CleanUp.ps1
│ ├── Program.cs
│ ├── Properties
│ │ └── launchSettings.json
│ ├── QuickBlocks.TestSite.csproj
│ ├── Startup.cs
│ ├── TextareaDataTypeMapper.cs
│ ├── TextareaMapperComposer.cs
│ ├── Views
│ │ ├── Partials
│ │ │ ├── blockgrid
│ │ │ │ ├── area.cshtml
│ │ │ │ ├── areas.cshtml
│ │ │ │ ├── default.cshtml
│ │ │ │ └── items.cshtml
│ │ │ ├── blocklist
│ │ │ │ └── default.cshtml
│ │ │ └── grid
│ │ │ │ ├── bootstrap3-fluid.cshtml
│ │ │ │ ├── bootstrap3.cshtml
│ │ │ │ └── editors
│ │ │ │ ├── base.cshtml
│ │ │ │ ├── embed.cshtml
│ │ │ │ ├── macro.cshtml
│ │ │ │ ├── media.cshtml
│ │ │ │ ├── rte.cshtml
│ │ │ │ └── textstring.cshtml
│ │ └── _ViewImports.cshtml
│ ├── appsettings.Development.json
│ ├── appsettings.json
│ ├── stylish.html
│ └── wwwroot
│ │ ├── assets
│ │ ├── favicon.ico
│ │ └── img
│ │ │ ├── bg-callout.jpg
│ │ │ ├── bg-masthead.jpg
│ │ │ ├── portfolio-1.jpg
│ │ │ ├── portfolio-2.jpg
│ │ │ ├── portfolio-3.jpg
│ │ │ └── portfolio-4.jpg
│ │ ├── css
│ │ └── styles.css
│ │ ├── favicon.ico
│ │ ├── js
│ │ └── scripts.js
│ │ └── stylish.html
├── QuickBlocks.sln
└── QuickBlocks
│ ├── .editorconfig
│ ├── App_Plugins
│ └── QuickBlocks
│ │ ├── lang
│ │ ├── en-US.xml
│ │ └── en.xml
│ │ ├── package.manifest
│ │ ├── quickBlocks.css
│ │ ├── quickBlocks.html
│ │ └── quickBlocks.js
│ ├── Composing
│ ├── NotificationHandlersComposer.cs
│ └── RegisterServicesComposer.cs
│ ├── Controllers
│ └── QuickBlocksUmbracoApiController.cs
│ ├── DataTypeMappersCollection.cs
│ ├── Models
│ ├── BlockConfigModel.cs
│ ├── BlockItemModel.cs
│ ├── BlockListModel.cs
│ ├── ContentTypeModel.cs
│ ├── DataTypeMappers
│ │ └── DataTypeMappers.cs
│ ├── FolderStructure.cs
│ ├── IDataTypeMapper.cs
│ ├── PartialViewModel.cs
│ ├── PropertyModel.cs
│ ├── QuickBlocksInstruction.cs
│ └── RowModel.cs
│ ├── NotificationHandlers
│ └── ServerVariablesParsingNotificationHandler.cs
│ ├── QuickBlocks.csproj
│ ├── QuickBlocksComposer.cs
│ ├── QuickBlocksDefaultOptions.cs
│ ├── QuickBlocksManifestFilter.cs
│ ├── Services
│ ├── BlockCreationService.cs
│ ├── BlockParsingService.cs
│ ├── IBlockCreationService.cs
│ ├── IBlockParsingService.cs
│ └── Resolvers
│ │ ├── DataTypeNameResolver.cs
│ │ └── IDataTypeNameResolver.cs
│ └── buildTransitive
│ └── Umbraco.Community.QuickBlocks.targets
└── umbraco-marketplace.json
/.github/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | # Contributing Guidelines
2 |
3 | Contributions to this package are most welcome!
4 |
5 | There is a test site in the solution to make working with this repository easier.
6 |
7 | TODO: *instructions on how to log in to test site assuming you have committed a db with some content*
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/bug.yml:
--------------------------------------------------------------------------------
1 | name: "Bug report"
2 | description: "File a bug report to help improve this package."
3 | labels: "bug"
4 | body:
5 | - type: markdown
6 | attributes:
7 | value: |
8 | Thanks for taking the time to report this issue as thoroughly as possible.
9 | - type: input
10 | id: "PackageVersion"
11 | attributes:
12 | label: "Which QuickBlocks version are you using?"
13 | description: "Leave blank if you're not sure: the latest version will be assumed."
14 | validations:
15 | required: false
16 | - type: input
17 | id: "umbracoVersion"
18 | attributes:
19 | label: "Which Umbraco version are you using? For example: 10.4.0 - don't just write v10"
20 | description: "Use the help icon in the Umbraco backoffice to find the version you're using."
21 | validations:
22 | required: true
23 | - type: textarea
24 | id: "summary"
25 | attributes:
26 | label: "Bug summary"
27 | description: "Write a summary of the bug."
28 | description: "Remember that you can format code and logs nicely with the `<>` button"
29 | placeholder: >
30 | Try to pinpoint it as much as possible.
31 |
32 | Try to state the actual problem, and not just what you think the solution might be.
33 | validations:
34 | required: true
35 | - type: textarea
36 | attributes:
37 | label: "Steps to reproduce"
38 | id: "reproduction"
39 | description: "How can we reproduce the problem on a clean AdminOnlyPackage + Umbraco install?"
40 | placeholder: >
41 | Please include any links, screenshots, stack-traces, etc.
42 | validations:
43 | required: true
44 | - type: textarea
45 | attributes:
46 | label: "Expected result / actual result"
47 | id: "result"
48 | description: "What did you expect that would happen on your Umbraco site and what is the actual result of the above steps?"
49 | placeholder: >
50 | Describe the intended/desired outcome after you did the steps mentioned.
51 |
52 | Describe the behaviour of the bug
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/config.yml:
--------------------------------------------------------------------------------
1 | blank_issues_enabled: false
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/feature_request.yml:
--------------------------------------------------------------------------------
1 | name: "Feature request"
2 | description: "Suggest an idea for this package."
3 | labels: "enhancement"
4 | body:
5 | - type: markdown
6 | attributes:
7 | value: |
8 | Thanks for taking the time to suggest this feature request!
9 | - type: textarea
10 | id: "summary"
11 | attributes:
12 | label: "Feature summary"
13 | description: "Write a brief summary of the feature"
14 | validations:
15 | required: true
16 | - type: textarea
17 | id: "details"
18 | attributes:
19 | label: "Additional details"
20 | description: "Provide any additional details or comments about the feature you are suggesting"
21 | validations:
22 | required: false
--------------------------------------------------------------------------------
/.github/README.md:
--------------------------------------------------------------------------------
1 | # QuickBlocks
2 |
3 | [](https://www.nuget.org/packages/Umbraco.Community.QuickBlocks/)
4 | [](https://www.nuget.org/packages/Umbraco.Community.QuickBlocks)
5 | [](LICENSE)
6 |
7 | A package for quickly building block list based Umbraco websites all from data attributes in your HTMl
8 |
9 | ***** Please don't judge my code yet. I've not cleaned it up yet *****
10 |
11 | ## Installation
12 |
13 | At the moment, it is best to use this on a brand new empty umbraco site.
14 | You can create your empty site and install QuickBlocks using these commands.
15 | You should be able to paste it all into the command line.
16 |
17 | ```ps1
18 | # Ensure we have the latest Umbraco templates
19 | dotnet new -i Umbraco.Templates
20 |
21 | # Create solution/project
22 | dotnet new sln --name "MySolution"
23 | dotnet new umbraco --force -n "MyProject" --friendly-name "Administrator" --email "admin@example.com" --password "1234567890" --development-database-type SQLite
24 | dotnet sln add "MyProject"
25 |
26 | #Add QuickBlocks
27 | dotnet add "MyProject" package Umbraco.Community.QuickBlocks --prerelease
28 |
29 | dotnet run --project "MyProject"
30 | #Running
31 | ```
32 |
33 | Watch this video to see how I use it.
34 |
35 |
36 |
37 |
38 |
39 | ## Data Attributes
40 |
41 | Here are some examples
42 |
43 | ### Home Page and Block List Property
44 |
45 | ```html
46 |
72 | My content in here 73 |
74 | ``` 75 | 76 | ### Preview View and CSS 77 | 78 | If you are using the package `Umbraco.Community.BlockPreview` you can add this to the block list to set the preview path and css on all blocks. This can be set on an individual row too. 79 | 80 | ```html 81 |72 | My content in here 73 |
74 | ``` 75 | 76 | ### Preview View and CSS 77 | 78 | If you are using the package `Umbraco.Community.BlockPreview` you can add this to the block list to set the preview path and css on all blocks. This can be set on an individual row too. 79 | 80 | ```html 81 |
28 | Could not render component of type: @(item.Content.ContentType.Alias)
29 |
30 | This likely happened because the partial view @partialViewName could not be found.
31 |
@ex.ToString()11 | } 12 | 13 | @functions{ 14 | 15 | public static string EditorView(dynamic contentItem) 16 | { 17 | string view = contentItem.editor.render != null ? contentItem.editor.render.ToString() : contentItem.editor.view.ToString(); 18 | view = view.Replace(".html", ".cshtml"); 19 | 20 | if (!view.Contains("/")) 21 | { 22 | view = "grid/editors/" + view; 23 | } 24 | 25 | return view; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/QuickBlocks.TestSite/Views/Partials/grid/editors/embed.cshtml: -------------------------------------------------------------------------------- 1 | @inherits Umbraco.Cms.Web.Common.Views.UmbracoViewPage
@Model.value.caption
63 | } 64 | } 65 | -------------------------------------------------------------------------------- /src/QuickBlocks.TestSite/Views/Partials/grid/editors/rte.cshtml: -------------------------------------------------------------------------------- 1 | @using Umbraco.Cms.Core.Templates 2 | @model dynamic 3 | @inject HtmlLocalLinkParser HtmlLocalLinkParser; 4 | @inject HtmlUrlParser HtmlUrlParser; 5 | @inject HtmlImageSourceParser HtmlImageSourceParser; 6 | 7 | @{ 8 | var value = HtmlLocalLinkParser.EnsureInternalLinks(Model?.value.ToString()); 9 | value = HtmlUrlParser.EnsureUrls(value); 10 | value = HtmlImageSourceParser.EnsureImageSources(value); 11 | } 12 | 13 | @Html.Raw(value) 14 | -------------------------------------------------------------------------------- /src/QuickBlocks.TestSite/Views/Partials/grid/editors/textstring.cshtml: -------------------------------------------------------------------------------- 1 | @model dynamic 2 | 3 | @if (Model?.editor.config.markup is not null) 4 | { 5 | string markup = Model.editor.config.markup.ToString(); 6 | markup = markup.Replace("#value#", Html.ReplaceLineBreaks((string)Model.value.ToString()).ToString()); 7 | 8 | if (Model.editor.config.style != null) 9 | { 10 | markup = markup.Replace("#style#", Model.editor.config.style.ToString()); 11 | } 12 | 13 |50 | This theme features a flexible, UX friendly sidebar menu and stock photos from our friends at 51 | Unsplash 52 | ! 53 |
54 |Looks great on any screen size!
72 |48 | This theme features a flexible, UX friendly sidebar menu and stock photos from our friends at 49 | Unsplash 50 | ! 51 |
52 | What We Offer 53 |Looks great on any screen size!
69 |Freshly redesigned for Bootstrap 5.
74 |79 | Millions of users 80 | 81 | Start Bootstrap! 82 |
83 |I mustache you a question...
88 |{{model.report | json}}23 |