├── .gitattributes
├── .github
└── workflows
│ ├── package.yml
│ └── ui-examples.yml
├── .gitignore
├── CONTRIBUTING-UIExamples.md
├── CONTRIBUTING.md
├── ItemTemplates
├── ContentApp
│ ├── .template.config
│ │ └── template.json
│ └── App_Plugins
│ │ └── UmbracoPackage.1
│ │ └── ContentApp
│ │ ├── Lang
│ │ └── en.xml
│ │ ├── contentapp.controller.js
│ │ ├── contentapp.html
│ │ └── package.manifest
├── Dashboard
│ ├── App_Plugins
│ │ └── UmbracoPackage.1
│ │ │ └── dashboard
│ │ │ ├── Lang
│ │ │ └── en.xml
│ │ │ ├── dashboard.controller.js
│ │ │ └── dashboard.service.js
│ └── Controllers
│ │ ├── DashboardComponent.cs
│ │ └── DashboardController.cs
├── PropertyEditor
│ ├── .template.config
│ │ └── template.json
│ └── App_Plugins
│ │ └── UmbracoPackage.1
│ │ ├── MarkdownPropertyEditor
│ │ ├── editor.controller.js
│ │ ├── editor.html
│ │ ├── lib
│ │ │ ├── Markdown.Converter.js
│ │ │ ├── Markdown.Editor.Icons.fw.png
│ │ │ ├── Markdown.Editor.Icons.png
│ │ │ ├── Markdown.Editor.js
│ │ │ ├── Markdown.Editor.less
│ │ │ └── Markdown.Sanitizer.js
│ │ └── package.manifest
│ │ └── PropertyEditor
│ │ ├── editor.controller.js
│ │ ├── editor.html
│ │ └── package.manifest
├── TreeController
│ ├── .template.config
│ │ └── template.json
│ └── Trees
│ │ └── _treeTitle_TreeController.cs
├── UIExamples
│ ├── .template.config
│ │ └── template.json
│ └── App_Plugins
│ │ └── uiexamples
│ │ ├── buttons
│ │ ├── buttons.controller.js
│ │ ├── buttons.html
│ │ ├── lang
│ │ │ └── en.xml
│ │ └── package.manifest
│ │ ├── icons
│ │ ├── iconoverlay.controller.js
│ │ ├── iconoverlay.html
│ │ ├── icons.controller.js
│ │ ├── icons.html
│ │ ├── lang
│ │ │ └── en.xml
│ │ └── package.manifest
│ │ ├── info.html
│ │ ├── lang
│ │ └── en.xml
│ │ ├── layout
│ │ ├── lang
│ │ │ └── en.xml
│ │ ├── layout.controller.js
│ │ ├── layout.html
│ │ └── package.manifest
│ │ ├── package.manifest
│ │ ├── tabs
│ │ ├── lang
│ │ │ └── en.xml
│ │ ├── package.manifest
│ │ ├── tabs.controller.js
│ │ └── tabs.html
│ │ ├── uiexamples.css
│ │ ├── uiexamples.resource.js
│ │ ├── uiexamples.section.controller.js
│ │ ├── uiexamples.section.html
│ │ └── umbbox
│ │ ├── lang
│ │ └── en.xml
│ │ ├── package.manifest
│ │ ├── umbbox.controller.js
│ │ └── umbbox.html
├── dashboard
│ ├── .template.config
│ │ └── template.json
│ └── App_Plugins
│ │ └── UmbracoPackage.1
│ │ └── dashboard
│ │ ├── dashboard.html
│ │ └── package.manifest
└── github-build
│ ├── .github
│ └── workflows
│ │ ├── build.yml
│ │ └── readme.md
│ └── .template.config
│ └── template.json
├── LICENSE
├── ProjectTemplates
├── UmbracoPackage.1
│ ├── .gitattributes
│ ├── .github
│ │ └── workflows
│ │ │ ├── build.yml
│ │ │ └── readme.md
│ ├── .gitignore
│ ├── .template.config
│ │ ├── package_team.png
│ │ ├── template.json
│ │ └── vs-2017.3.host.json
│ ├── .website
│ │ ├── Global.asax
│ │ ├── Media
│ │ │ └── Web.config
│ │ ├── Properties
│ │ │ └── AssemblyInfo.cs
│ │ ├── UmbracoPackage.1.Site.csproj
│ │ ├── Views
│ │ │ ├── Partials
│ │ │ │ └── Grid
│ │ │ │ │ ├── Bootstrap3-Fluid.cshtml
│ │ │ │ │ ├── Bootstrap3.cshtml
│ │ │ │ │ └── Editors
│ │ │ │ │ ├── Base.cshtml
│ │ │ │ │ ├── Embed.cshtml
│ │ │ │ │ ├── Macro.cshtml
│ │ │ │ │ ├── Media.cshtml
│ │ │ │ │ ├── Rte.cshtml
│ │ │ │ │ └── Textstring.cshtml
│ │ │ └── Web.config
│ │ ├── Web.Debug.config
│ │ ├── Web.Release.config
│ │ ├── Web.config
│ │ ├── config
│ │ │ ├── BackOfficeTours
│ │ │ │ └── getting-started.json
│ │ │ ├── ClientDependency.config
│ │ │ ├── HealthChecks.config
│ │ │ ├── Lang
│ │ │ │ ├── cs-CZ.user.xml
│ │ │ │ ├── da-DK.user.xml
│ │ │ │ ├── de-DE.user.xml
│ │ │ │ ├── en-GB.user.xml
│ │ │ │ ├── en-US.user.xml
│ │ │ │ ├── es-ES.user.xml
│ │ │ │ ├── fr-FR.user.xml
│ │ │ │ ├── he-IL.user.xml
│ │ │ │ ├── it-IT.user.xml
│ │ │ │ ├── ja-JP.user.xml
│ │ │ │ ├── ko-KR.user.xml
│ │ │ │ ├── nb-NO.user.xml
│ │ │ │ ├── nl-NL.user.xml
│ │ │ │ ├── pl-PL.user.xml
│ │ │ │ ├── pt-BR.user.xml
│ │ │ │ ├── ru-RU.user.xml
│ │ │ │ ├── sv-SE.user.xml
│ │ │ │ └── zh-CN.user.xml
│ │ │ ├── grid.editors.config.js
│ │ │ ├── imageprocessor
│ │ │ │ ├── cache.config
│ │ │ │ ├── processing.config
│ │ │ │ └── security.config
│ │ │ ├── logviewer.searches.config.js
│ │ │ ├── serilog.config
│ │ │ ├── serilog.user.config
│ │ │ ├── splashes
│ │ │ │ └── noNodes.aspx
│ │ │ ├── tinyMceConfig.config
│ │ │ └── umbracoSettings.config
│ │ └── packages.config
│ ├── LICENSE
│ ├── UmbracoPackage.1.sln
│ ├── gulpfile.js
│ ├── package.json
│ ├── package.xml
│ ├── paths.json
│ ├── readme.md
│ └── src
│ │ ├── UmbracoPackage.1.sln
│ │ └── UmbracoPackage.1
│ │ ├── App_Plugins
│ │ └── UmbracoPackage.1
│ │ │ ├── ContentApp
│ │ │ ├── Lang
│ │ │ │ └── en.xml
│ │ │ ├── contentapp.controller.js
│ │ │ ├── contentapp.html
│ │ │ └── package.manifest
│ │ │ ├── Dashboard
│ │ │ ├── Lang
│ │ │ │ └── en.xml
│ │ │ ├── dashboard.controller.js
│ │ │ ├── dashboard.html
│ │ │ ├── dashboard.service.js
│ │ │ └── package.manifest
│ │ │ ├── PropertyEditor
│ │ │ ├── editor.controller.js
│ │ │ ├── editor.html
│ │ │ └── package.manifest
│ │ │ └── package.manifest
│ │ ├── Controllers
│ │ ├── DashboardComponent.cs
│ │ └── DashboardController.cs
│ │ └── UmbracoPackage.1.csproj
└── UmbracoSite.1
│ ├── .gitattributes
│ ├── .gitignore
│ ├── .template.config
│ ├── package_team.png
│ ├── template.json
│ └── vs-2017.3.host.json
│ ├── gulpfile.js
│ ├── package-lock.json
│ ├── package.json
│ ├── paths.json
│ └── src
│ ├── UmbracoSite.1.Library
│ ├── App_Plugins
│ │ └── -.-
│ └── UmbracoSite.1.Library.csproj
│ ├── UmbracoSite.1.Site
│ ├── Global.asax
│ ├── Media
│ │ └── Web.config
│ ├── Properties
│ │ └── AssemblyInfo.cs
│ ├── UmbracoSite.1.Site.csproj
│ ├── Views
│ │ ├── Partials
│ │ │ └── Grid
│ │ │ │ ├── Bootstrap3-Fluid.cshtml
│ │ │ │ ├── Bootstrap3.cshtml
│ │ │ │ └── Editors
│ │ │ │ ├── Base.cshtml
│ │ │ │ ├── Embed.cshtml
│ │ │ │ ├── Macro.cshtml
│ │ │ │ ├── Media.cshtml
│ │ │ │ ├── Rte.cshtml
│ │ │ │ └── Textstring.cshtml
│ │ └── Web.config
│ ├── Web.Debug.config
│ ├── Web.Release.config
│ ├── Web.config
│ ├── config
│ │ ├── BackOfficeTours
│ │ │ └── getting-started.json
│ │ ├── ClientDependency.config
│ │ ├── HealthChecks.config
│ │ ├── Lang
│ │ │ ├── cs-CZ.user.xml
│ │ │ ├── da-DK.user.xml
│ │ │ ├── de-DE.user.xml
│ │ │ ├── en-GB.user.xml
│ │ │ ├── en-US.user.xml
│ │ │ ├── es-ES.user.xml
│ │ │ ├── fr-FR.user.xml
│ │ │ ├── he-IL.user.xml
│ │ │ ├── it-IT.user.xml
│ │ │ ├── ja-JP.user.xml
│ │ │ ├── ko-KR.user.xml
│ │ │ ├── nb-NO.user.xml
│ │ │ ├── nl-NL.user.xml
│ │ │ ├── pl-PL.user.xml
│ │ │ ├── pt-BR.user.xml
│ │ │ ├── ru-RU.user.xml
│ │ │ ├── sv-SE.user.xml
│ │ │ └── zh-CN.user.xml
│ │ ├── grid.editors.config.js
│ │ ├── imageprocessor
│ │ │ ├── cache.config
│ │ │ ├── processing.config
│ │ │ └── security.config
│ │ ├── logviewer.searches.config.js
│ │ ├── serilog.config
│ │ ├── serilog.user.config
│ │ ├── splashes
│ │ │ └── noNodes.aspx
│ │ ├── tinyMceConfig.config
│ │ └── umbracoSettings.config
│ └── packages.config
│ └── UmbracoSite.1.sln
├── docs
└── index.md
├── gulpfile.js
├── list.txt
├── package-lock.json
├── package.json
├── package.xml
├── readme.md
└── umbraco-templates.csproj
/.gitattributes:
--------------------------------------------------------------------------------
1 | # Auto detect text files and perform LF normalization
2 | * text=auto
3 |
4 | # Custom for Visual Studio
5 | *.cs diff=csharp
6 |
7 | # Standard to msysgit
8 | *.doc diff=astextplain
9 | *.DOC diff=astextplain
10 | *.docx diff=astextplain
11 | *.DOCX diff=astextplain
12 | *.dot diff=astextplain
13 | *.DOT diff=astextplain
14 | *.pdf diff=astextplain
15 | *.PDF diff=astextplain
16 | *.rtf diff=astextplain
17 | *.RTF diff=astextplain
18 |
--------------------------------------------------------------------------------
/.github/workflows/package.yml:
--------------------------------------------------------------------------------
1 | # Packages up the dotnet new commands so you can install them.
2 | #
3 | name: Package
4 |
5 | env:
6 | OUTPUT: ./Output
7 | PACKAGE_NAME: Umbraco.Tools.Packages.Templates
8 |
9 | # happens when a commit is tagged release/[version]
10 | on:
11 | push:
12 | tags:
13 | - "release/*"
14 |
15 | # A workflow run is made up of one or more jobs that can run sequentially or in parallel
16 | jobs:
17 | # This workflow contains a single job called "build"
18 | build-package:
19 | # The type of runner that the job will run on
20 | runs-on: windows-latest
21 |
22 | # Steps represent a sequence of tasks that will be executed as part of the job
23 | steps:
24 | - name: Get Version
25 | id: get_version
26 | run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\/release\//}
27 | shell: bash
28 |
29 | - name: checkout
30 | uses: actions/checkout@v2
31 |
32 | - name: Setup .net core
33 | uses: actions/setup-dotnet@v1.4.0
34 |
35 | - name: package
36 | run: dotnet pack -o ${{ env.OUTPUT }} /p:version=${{ steps.get_version.outputs.VERSION }} /p:PackageId=${{ env.PACKAGE_NAME }}
37 |
38 | - name: Create a release
39 | id: create_release
40 | uses: actions/create-release@v1
41 | env:
42 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
43 | with:
44 | tag_name: ${{ github.ref }}
45 | release_name: Release v${{ steps.get_version.outputs.VERSION }}
46 | body: |
47 | New Release ${{ steps.get_version.outputs.VERSION }}
48 | draft: false
49 | prerelease: true
50 |
51 | - name: Upload Release Asset
52 | id: upload_release_asset
53 | uses: actions/upload-release-asset@v1
54 | env:
55 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
56 | with:
57 | upload_url: ${{ steps.create_release.outputs.upload_url }}
58 | asset_path: ${{ env.OUTPUT }}/${{ env.PACKAGE_NAME }}.${{ steps.get_version.outputs.VERSION }}.nupkg
59 | asset_name: ${{ env.PACKAGE_NAME }}.${{ steps.get_version.outputs.VERSION }}.nupkg
60 | asset_content_type: application/zip
61 |
62 | - name: Push package to NuGet
63 | run: dotnet nuget push **/*.nupkg
64 | --api-key ${{ secrets.NUGET_DEPLOY_KEY }}
65 | --source https://api.nuget.org/v3/index.json
--------------------------------------------------------------------------------
/.github/workflows/ui-examples.yml:
--------------------------------------------------------------------------------
1 | # Builds a library, and packages it up.
2 | #
3 | # Works on a release/version tag
4 | # e.g release/1.0.2 will build v1.0.2
5 | #
6 |
7 | name: Pack UI Examples
8 |
9 | env:
10 | OUTPUT: ./Output
11 |
12 | on:
13 | push:
14 | tags:
15 | - "uiexamples/*"
16 |
17 | jobs:
18 | build:
19 | runs-on: windows-latest
20 |
21 | steps:
22 | - name: Get Version
23 | id: get_version
24 | run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\/uiexamples\//}
25 | shell: bash
26 |
27 | - name: checkout
28 | uses: actions/checkout@v2
29 |
30 | - name: Setup NuGet.exe for use with actions
31 | uses: NuGet/setup-nuget@v1
32 | with:
33 | nuget-version: ${{ matrix.nuget }}
34 |
35 | - name: Setup .net core
36 | uses: actions/setup-dotnet@v1.4.0
37 |
38 | - name: Setup UmbPack
39 | run: dotnet tool install Umbraco.Tools.Packages --global
40 |
41 | # path to your package.xml file should go here.
42 | - name: Create Umbraco package file
43 | run: UmbPack pack ./package.xml -o ${{ env.OUTPUT }} -v ${{ steps.get_version.outputs.VERSION }}
44 |
45 | # # For the push step to work you will need to create an api key on Our, and save it as a secret on Github with the name "UMBRACO_DEPLOY_KEY"
46 | # - name: Push package to Our
47 | # run: umbpack push ${{ env.OUTPUT }}/UmbracoPackage.1_${{ steps.get_version.outputs.VERSION }}.zip -k ${{ secrets.UMBRACO_DEPLOY_KEY }}
48 |
49 | - name: upload-artifacts
50 | uses: actions/upload-artifact@v2
51 | with:
52 | name: Build-Results-${{ steps.get_version.outputs.VERSION }}
53 | path: ${{ env.OUTPUT }}/**/*
--------------------------------------------------------------------------------
/CONTRIBUTING-UIExamples.md:
--------------------------------------------------------------------------------
1 | # Contributing Guidelines
2 |
3 | The UI examples package is both an item template within this repo and an Umbraco package. This document outlines some guidelines for contributing to the item template which can be built into an Umbraco package by a Github Action.
4 |
5 | If you have an idea for a new section, please [raise an issue](./issues) so we can discuss it with you first.
6 |
7 | ## Project overview
8 |
9 | For general knowledge on working with item and project templates see the [Contributing document](CONTRIBUTING.md).
10 |
11 | The item template and source files for the package can be found as an [item template within this repo](https://github.com/umbraco/Package.Templates/tree/master/ItemTemplates/UIExamples/App_Plugins/uiexamples).
12 |
13 | It contains a package manifest that registers a new section with a dashboard within that section, and folders for each content app tab in the dashboard.
14 |
15 | ### Adding a new content app tab
16 |
17 | To add a new content app tab you need to first add a new folder in the [root folder](https://github.com/umbraco/Package.Templates/tree/master/ItemTemplates/UIExamples/App_Plugins/uiexamples) named after your section, then add a view that you can reference in the [uiexamples.section.controller.js file](https://github.com/umbraco/Package.Templates/blob/master/ItemTemplates/UIExamples/App_Plugins/uiexamples/uiexamples.section.controller.js)
18 |
19 | If you need to write some text you should add a `lang` folder with a language file, you can see the other folder for examples. It contains key value pairs that can be referenced in the html.
20 |
21 | All the current folders follow a similar structure, so if in doubt have a look in them.
--------------------------------------------------------------------------------
/ItemTemplates/ContentApp/.template.config/template.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "http://json.schemastore.org/template",
3 | "author": "UmbracoPackageTeam",
4 | "classifications": [
5 | "Web",
6 | "Umbraco",
7 | "v8"
8 | ],
9 | "tags": {
10 | "language": "C#",
11 | "type": "item"
12 | },
13 |
14 | "identity": "Umbraco.Templates.Items.ContentApp",
15 | "groupIdentity": "Umbraco.Templates.Items.ContentApp",
16 |
17 | "name": "Umbraco Content App",
18 | "shortName": "umbraco-v8-contentapp",
19 | "description": "Files to add a content app to an Umbraco v8 project",
20 |
21 | "sourceName": "UmbracoPackage.1"
22 | }
--------------------------------------------------------------------------------
/ItemTemplates/ContentApp/App_Plugins/UmbracoPackage.1/ContentApp/Lang/en.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | UmbracoPackage.1 super content app
5 | My super awesome content app
6 |
7 |
--------------------------------------------------------------------------------
/ItemTemplates/ContentApp/App_Plugins/UmbracoPackage.1/ContentApp/contentapp.controller.js:
--------------------------------------------------------------------------------
1 | /**
2 | * @ngdoc
3 | *
4 | * @name: contentAppController
5 | * @description: code for a content app in the umbraco back office
6 | *
7 | */
8 | (function () {
9 | 'use strict';
10 |
11 | function contentAppController() {
12 |
13 | var vm = this;
14 | vm.loading = true;
15 | vm.message = "";
16 |
17 | function init() {
18 | getInfo();
19 | }
20 |
21 | function getInfo() {
22 | vm.message = "Content App init() has run";
23 | vm.loading = false;
24 | }
25 |
26 | // call init, when controller is loaded
27 | init();
28 | }
29 |
30 | angular.module('umbraco')
31 | .controller('umbracopackage__1ContentAppController', contentAppController);
32 | })();
--------------------------------------------------------------------------------
/ItemTemplates/ContentApp/App_Plugins/UmbracoPackage.1/ContentApp/contentapp.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
9 |
10 |
11 | {{vm.message}}
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/ItemTemplates/ContentApp/App_Plugins/UmbracoPackage.1/ContentApp/package.manifest:
--------------------------------------------------------------------------------
1 | {
2 | "javascript": [
3 | "~/App_Plugins/UmbracoPackage.1/ContentApp/contentapp.controller.js"
4 | ],
5 | "contentApps": [
6 | {
7 | "name": "My App", // required - the name that appears under the icon
8 | "alias": "umbracopackage._1-contentapp", // required - unique alias for your app
9 | "weight": 0, // optional, default is 0, use values between -99 and +99 to appear between the existing Content (-100) and Info (100) apps
10 | "icon": "icon-cupcake", // required - the icon to use
11 | "view": "~/App_Plugins/UmbracoPackage.1/ContentApp/contentapp.html" // required - the location of the view file
12 | }
13 | ]
14 | }
--------------------------------------------------------------------------------
/ItemTemplates/Dashboard/App_Plugins/UmbracoPackage.1/dashboard/Lang/en.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | UmbracoPackage.1 super dashboard
5 | My super awesome dashboard
6 |
7 |
8 | UmbracoPackage.1
9 |
10 |
11 |
--------------------------------------------------------------------------------
/ItemTemplates/Dashboard/App_Plugins/UmbracoPackage.1/dashboard/dashboard.controller.js:
--------------------------------------------------------------------------------
1 | /**
2 | * @ngdoc
3 | *
4 | * @name: dashboardController
5 | * @description: code for a dashboard in the umbraco back office
6 | *
7 | */
8 | (function () {
9 | 'use strict';
10 |
11 | function dashboardController($scope,
12 | notificationsService,
13 | umbracopackage__1DashboardService) {
14 |
15 | var vm = this;
16 | vm.loading = true;
17 | vm.info = {};
18 |
19 | function init() {
20 | getServerInfo();
21 | }
22 |
23 | // ask the server what version it is and what time it things it is.
24 | function getServerInfo() {
25 | umbracopackage__1DashboardService.getServerInfo()
26 | .then(function (result) {
27 | vm.info = result.data;
28 | vm.loading = false;
29 | }, function (error) {
30 | console.warn(error);
31 | notificationsService.error('Error', 'Unable to get the server info');
32 | });
33 | }
34 |
35 | // call init, when controller is loaded
36 | init();
37 | }
38 |
39 | angular.module('umbraco')
40 | .controller('umbracopackage__1DashboardController', dashboardController);
41 | })();
42 |
--------------------------------------------------------------------------------
/ItemTemplates/Dashboard/App_Plugins/UmbracoPackage.1/dashboard/dashboard.service.js:
--------------------------------------------------------------------------------
1 | /**
2 | * @ngdoc
3 | *
4 | * @name: dashboardService
5 | * @description: provides an interface between the javascript dashboard and our
6 | * backoffice api.
7 | */
8 | (function () {
9 | 'use strict';
10 |
11 | function dashboardService($http) {
12 |
13 | var serviceRoot = Umbraco.Sys.ServerVariables.umbracopackage__1.dashboardController;
14 |
15 | return {
16 | getServerInfo: getServerInfo
17 | }
18 |
19 | /////
20 |
21 | function getServerInfo() {
22 | return $http.get(serviceRoot + "GetServerInfo");
23 | }
24 | };
25 |
26 | angular.module('umbraco')
27 | .factory('umbracopackage__1DashboardService', dashboardService);
28 | })();
--------------------------------------------------------------------------------
/ItemTemplates/Dashboard/Controllers/DashboardComponent.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 | using System.Web;
7 | using System.Web.Mvc;
8 | using System.Web.Routing;
9 |
10 | using Umbraco.Core.Composing;
11 | using Umbraco.Web;
12 | using Umbraco.Web.JavaScript;
13 |
14 | namespace UmbracoPackage._1.Controllers
15 | {
16 | [RuntimeLevel(MinLevel = Umbraco.Core.RuntimeLevel.Run)]
17 | public class DashboardComposer : ComponentComposer
18 | { }
19 |
20 | public class DashboardComponent : IComponent
21 | {
22 | public void Initialize()
23 | {
24 | ServerVariablesParser.Parsing += ServerVariablesParser_Parsing;
25 | }
26 |
27 | private void ServerVariablesParser_Parsing(object sender, Dictionary e)
28 | {
29 | if (HttpContext.Current == null) throw new InvalidOperationException("HttpContext is null");
30 | var urlHelper = new UrlHelper(new RequestContext(new HttpContextWrapper(HttpContext.Current), new RouteData()));
31 |
32 | e["umbracopackage__1"] = new Dictionary()
33 | {
34 | { "dashboardController", urlHelper.GetUmbracoApiServiceBaseUrl(controller => controller.GetApi()) }
35 | };
36 | }
37 |
38 | public void Terminate()
39 | {
40 |
41 | }
42 | }
43 | }
44 |
--------------------------------------------------------------------------------
/ItemTemplates/Dashboard/Controllers/DashboardController.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Reflection;
5 | using System.Text;
6 | using System.Threading.Tasks;
7 | using System.Web.Mvc;
8 |
9 | using ClientDependency.Core;
10 | using Newtonsoft.Json;
11 | using Newtonsoft.Json.Serialization;
12 | using NPoco.Expressions;
13 |
14 | using Umbraco.Core.Configuration;
15 | using Umbraco.Web.Mvc;
16 | using Umbraco.Web.WebApi;
17 |
18 | namespace UmbracoPackage._1.Controllers
19 | {
20 | public class DashboardApiController : UmbracoAuthorizedApiController
21 | {
22 | ///
23 | /// GetApi - Called in our ServerVariablesParser.Parsing event handler
24 | /// this gets the URL of this API, so we don't have to hardwire it anywhere
25 | ///
26 | [HttpGet]
27 | public bool GetApi() => true;
28 |
29 |
30 | ///
31 | /// Simple call return the time,
32 | ///
33 | ///
34 | [HttpGet]
35 | public Object GetServerInfo()
36 | {
37 | return new
38 | {
39 | status = GlobalSettings.ConfigurationStatus,
40 | time = DateTime.Now
41 | };
42 | }
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/ItemTemplates/PropertyEditor/.template.config/template.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "http://json.schemastore.org/template",
3 | "author": "UmbracoPackageTeam",
4 | "classifications": [
5 | "Web",
6 | "Umbraco",
7 | "v8"
8 | ],
9 | "tags": {
10 | "language": "JavaScript",
11 | "type": "item"
12 | },
13 |
14 | "identity": "Umbraco.Templates.Items.PropertyEditor",
15 | "groupIdentity": "Umbraco.Templates.Items.PropertyEditor",
16 |
17 | "name": "Umbraco Property Editor Item",
18 | "shortName": "umbraco-v8-property-editor",
19 | "description": "Umbraco property editor files",
20 |
21 | "sourceName": "UmbracoPackage.1",
22 |
23 | "sources": [
24 | {
25 | "modifiers": [
26 | {
27 | "condition": "(propertyEditor == \"boilerplate\")",
28 | "include": [
29 | "**/[Pp]roperty[Ee]ditor/**/*",
30 | "**/[Pp]roperty[Ee]ditor*.cs"
31 | ],
32 | "exclude": [
33 | "**/[Mm]arkdown[Pp]roperty[Ee]ditor/**/*",
34 | "**/[Mm]arkdown[Pp]roperty[Ee]ditor*.cs"
35 | ]
36 | },
37 | {
38 | "condition": "(propertyEditor == \"markdown-sample\")",
39 | "include": [
40 | "**/[Mm]arkdown[Pp]roperty[Ee]ditor/**/*",
41 | "**/[Mm]arkdown[Pp]roperty[Ee]ditor*.cs"
42 | ],
43 | "exclude": [
44 | "**/[Pp]roperty[Ee]ditor/**/*",
45 | "**/[Pp]roperty[Ee]ditor*.cs"
46 | ]
47 | }
48 | ]
49 | }
50 | ],
51 | "symbols": {
52 | "propertyEditor": {
53 | "type": "parameter",
54 | "datatype": "choice",
55 | "choices": [
56 | {
57 | "choice": "boilerplate",
58 | "description": "Just the plain boilerplate code"
59 | },
60 | {
61 | "choice": "markdown-sample",
62 | "description": "A real markdown editor"
63 | }
64 | ],
65 | "defaultValue": "boilerplate",
66 | "description": "Include template code for a property editor"
67 | }
68 | }
69 | }
--------------------------------------------------------------------------------
/ItemTemplates/PropertyEditor/App_Plugins/UmbracoPackage.1/MarkdownPropertyEditor/editor.controller.js:
--------------------------------------------------------------------------------
1 | /**
2 | * @ngdoc
3 | *
4 | * @name: editorController
5 | * @description: code for a property editor in the umbraco back office
6 | *
7 | */
8 | (function () {
9 | 'use strict';
10 |
11 | function editorController($scope, assetsService, $timeout, editorService) {
12 |
13 | var vm = this;
14 |
15 | function init() {
16 | if($scope.model.value === null || $scope.model.value === ""){
17 | $scope.model.value = $scope.model.config.defaultValue;
18 | }
19 |
20 | assetsService
21 | .load([
22 | "~/App_Plugins/UmbracoPackage.1/MarkDownPropertyEditor/lib/markdown.converter.js",
23 | "~/App_Plugins/UmbracoPackage.1/MarkDownPropertyEditor/lib/markdown.sanitizer.js",
24 | "~/App_Plugins/UmbracoPackage.1/MarkDownPropertyEditor/lib/markdown.editor.js"
25 | ])
26 | .then(function () {
27 | // this function will execute when all dependencies have loaded
28 | $timeout(function(){
29 |
30 | var converter2 = new Markdown.Converter();
31 | var editor2 = new Markdown.Editor(converter2, "-" + $scope.model.alias);
32 | editor2.run();
33 |
34 | // subscribe to the image dialog clicks
35 | editor2.hooks.set("insertImageDialog", function (callback) {
36 | // here we can intercept our own dialog handling
37 | var mediaPicker = {
38 | disableFolderSelect: true,
39 | submit: function (model) {
40 | var selectedImagePath = model.selection[0].image;
41 | callback(selectedImagePath);
42 | editorService.close();
43 | },
44 | close: function () {
45 | editorService.close();
46 | }
47 | };
48 | editorService.mediaPicker(mediaPicker);
49 |
50 | return true; // tell the editor that we'll take care of getting the image url
51 | });
52 | });
53 | });
54 |
55 | // load the separate css for the editor to avoid it blocking our JavaScript loading
56 | assetsService.loadCss("~/App_Plugins/UmbracoPackage.1/MarkDownPropertyEditor/lib/markdown.editor.less");
57 | }
58 |
59 | // call init, when controller is loaded
60 | init();
61 | }
62 |
63 | angular.module('umbraco')
64 | .controller('umbracopackage__1MarkdownEditorController', editorController);
65 | })();
--------------------------------------------------------------------------------
/ItemTemplates/PropertyEditor/App_Plugins/UmbracoPackage.1/MarkdownPropertyEditor/editor.html:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/ItemTemplates/PropertyEditor/App_Plugins/UmbracoPackage.1/MarkdownPropertyEditor/lib/Markdown.Editor.Icons.fw.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/umbraco/Package.Templates/782625ea765051c640b806cad8f2c7a34b30daaa/ItemTemplates/PropertyEditor/App_Plugins/UmbracoPackage.1/MarkdownPropertyEditor/lib/Markdown.Editor.Icons.fw.png
--------------------------------------------------------------------------------
/ItemTemplates/PropertyEditor/App_Plugins/UmbracoPackage.1/MarkdownPropertyEditor/lib/Markdown.Editor.Icons.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/umbraco/Package.Templates/782625ea765051c640b806cad8f2c7a34b30daaa/ItemTemplates/PropertyEditor/App_Plugins/UmbracoPackage.1/MarkdownPropertyEditor/lib/Markdown.Editor.Icons.png
--------------------------------------------------------------------------------
/ItemTemplates/PropertyEditor/App_Plugins/UmbracoPackage.1/MarkdownPropertyEditor/lib/Markdown.Editor.less:
--------------------------------------------------------------------------------
1 |
2 | .wmd-panel {
3 | width: 100%;
4 | }
5 |
6 | .wmd-input {
7 | height: 300px;
8 | width: 100%;
9 | box-sizing: border-box;
10 | -webkit-box-sizing:border-box;
11 | -moz-box-sizing: border-box;
12 | -ms-box-sizing: border-box;
13 | }
14 |
15 | .wmd-preview {
16 | .well;
17 | width: 100%;
18 | box-sizing: border-box;
19 | -webkit-box-sizing:border-box;
20 | -moz-box-sizing: border-box;
21 | -ms-box-sizing: border-box;
22 | }
23 |
24 | .wmd-panel .btn-toolbar {
25 | margin-bottom: 0;
26 | padding: 0;
27 | width: 100%;
28 | }
29 |
30 | .icon-link,
31 | .icon-blockquote,
32 | .icon-code,
33 | .icon-bullet-list,
34 | .icon-list,
35 | .icon-header,
36 | .icon-hr-line,
37 | .icon-undo {
38 | background-image: url(Markdown.Editor.Icons.png);
39 | }
40 | .icon-link { background-position: 0 0; }
41 | .icon-blockquote { background-position: -24px 0; }
42 | .icon-code { background-position: -48px 0; }
43 | .icon-bullet-list { background-position: -72px 0; }
44 | .icon-list { background-position: -96px 0; }
45 | .icon-header { background-position: -120px 0; }
46 | .icon-hr-line { background-position: -144px 0; }
47 | .icon-undo { background-position: -168px 0; }
48 |
49 |
50 |
51 |
52 |
53 | .wmd-prompt-background
54 | {
55 | background-color: Black;
56 | }
57 |
58 | .wmd-prompt-dialog
59 | {
60 | border: 1px solid #999999;
61 | background-color: #F5F5F5;
62 | }
63 |
64 | .wmd-prompt-dialog > div {
65 | font-size: 0.8em;
66 | font-family: arial, helvetica, sans-serif;
67 | }
68 |
69 |
70 | .wmd-prompt-dialog > form > input[type="text"] {
71 | border: 1px solid #999999;
72 | color: black;
73 | }
74 |
75 | .wmd-prompt-dialog > form > input[type="button"]{
76 | border: 1px solid #888888;
77 | font-family: trebuchet MS, helvetica, sans-serif;
78 | font-size: 0.8em;
79 | font-weight: bold;
80 | }
81 |
--------------------------------------------------------------------------------
/ItemTemplates/PropertyEditor/App_Plugins/UmbracoPackage.1/MarkdownPropertyEditor/lib/Markdown.Sanitizer.js:
--------------------------------------------------------------------------------
1 | (function () {
2 | var output, Converter;
3 | if (typeof exports === "object" && typeof require === "function") { // we're in a CommonJS (e.g. Node.js) module
4 | output = exports;
5 | Converter = require("./Markdown.Converter").Converter;
6 | } else {
7 | output = window.Markdown;
8 | Converter = output.Converter;
9 | }
10 |
11 | output.getSanitizingConverter = function () {
12 | var converter = new Converter();
13 | converter.hooks.chain("postConversion", sanitizeHtml);
14 | converter.hooks.chain("postConversion", balanceTags);
15 | return converter;
16 | }
17 |
18 | function sanitizeHtml(html) {
19 | return html.replace(/<[^>]*>?/gi, sanitizeTag);
20 | }
21 |
22 | // (tags that can be opened/closed) | (tags that stand alone)
23 | var basic_tag_whitelist = /^(<\/?(b|blockquote|code|del|dd|dl|dt|em|h1|h2|h3|i|kbd|li|ol|p|s|sup|sub|strong|strike|ul)>|<(br|hr)\s?\/?>)$/i;
24 | // |
25 | var a_white = /^(]+")?\s?>|<\/a>)$/i;
26 |
27 | // ]*")?(\stitle="[^"<>]*")?\s?\/?>)$/i;
29 |
30 | // | for twitter bootstrap
31 | var pre_white = /^(|<\/pre>)$/i;
32 |
33 | function sanitizeTag(tag) {
34 | if (tag.match(basic_tag_whitelist) || tag.match(a_white) || tag.match(img_white) || tag.match(pre_white))
35 | return tag;
36 | else
37 | return "";
38 | }
39 |
40 | ///
41 | /// attempt to balance HTML tags in the html string
42 | /// by removing any unmatched opening or closing tags
43 | /// IMPORTANT: we *assume* HTML has *already* been
44 | /// sanitized and is safe/sane before balancing!
45 | ///
46 | /// adapted from CODESNIPPET: A8591DBA-D1D3-11DE-947C-BA5556D89593
47 | ///
48 | function balanceTags(html) {
49 |
50 | if (html == "")
51 | return "";
52 |
53 | var re = /<\/?\w+[^>]*(\s|$|>)/g;
54 | // convert everything to lower case; this makes
55 | // our case insensitive comparisons easier
56 | var tags = html.toLowerCase().match(re);
57 |
58 | // no HTML tags present? nothing to do; exit now
59 | var tagcount = (tags || []).length;
60 | if (tagcount == 0)
61 | return html;
62 |
63 | var tagname, tag;
64 | var ignoredtags = "
";
65 | var match;
66 | var tagpaired = [];
67 | var tagremove = [];
68 | var needsRemoval = false;
69 |
70 | // loop through matched tags in forward order
71 | for (var ctag = 0; ctag < tagcount; ctag++) {
72 | tagname = tags[ctag].replace(/<\/?(\w+).*/, "$1");
73 | // skip any already paired tags
74 | // and skip tags in our ignore list; assume they're self-closed
75 | if (tagpaired[ctag] || ignoredtags.search("<" + tagname + ">") > -1)
76 | continue;
77 |
78 | tag = tags[ctag];
79 | match = -1;
80 |
81 | if (!/^<\//.test(tag)) {
82 | // this is an opening tag
83 | // search forwards (next tags), look for closing tags
84 | for (var ntag = ctag + 1; ntag < tagcount; ntag++) {
85 | if (!tagpaired[ntag] && tags[ntag] == "" + tagname + ">") {
86 | match = ntag;
87 | break;
88 | }
89 | }
90 | }
91 |
92 | if (match == -1)
93 | needsRemoval = tagremove[ctag] = true; // mark for removal
94 | else
95 | tagpaired[match] = true; // mark paired
96 | }
97 |
98 | if (!needsRemoval)
99 | return html;
100 |
101 | // delete all orphaned tags from the string
102 |
103 | var ctag = 0;
104 | html = html.replace(re, function (match) {
105 | var res = tagremove[ctag] ? "" : match;
106 | ctag++;
107 | return res;
108 | });
109 | return html;
110 | }
111 | })();
112 |
--------------------------------------------------------------------------------
/ItemTemplates/PropertyEditor/App_Plugins/UmbracoPackage.1/MarkdownPropertyEditor/package.manifest:
--------------------------------------------------------------------------------
1 | {
2 | "javascript": [
3 | "~/App_Plugins/UmbracoPackage.1/MarkdownPropertyEditor/editor.controller.js"
4 | ],
5 | "propertyEditors": [
6 | {
7 | /*this must be a unique alias*/
8 | "alias": "umbracopackage._1-editor",
9 | /*the name*/
10 | "name": "My markdown editor",
11 | /*the icon*/
12 | "icon": "icon-code",
13 | /*grouping for "Select editor" dialog*/
14 | "group": "Rich Content",
15 | /*the HTML file we will load for the editor*/
16 | "editor": {
17 | "view": "~/App_Plugins/UmbracoPackage.1/MarkdownPropertyEditor/editor.html"
18 | },
19 | "prevalues": {
20 | "fields": [
21 | {
22 | "label": "Preview",
23 | "description": "Display a live preview",
24 | "key": "preview",
25 | "view": "boolean"
26 | },
27 | {
28 | "label": "Default value",
29 | "description": "If value is blank, the editor will show this",
30 | "key": "defaultValue",
31 | "view": "textarea"
32 | }
33 | ]
34 | }
35 | ]
36 | }
37 | }
--------------------------------------------------------------------------------
/ItemTemplates/PropertyEditor/App_Plugins/UmbracoPackage.1/PropertyEditor/editor.controller.js:
--------------------------------------------------------------------------------
1 | /**
2 | * @ngdoc
3 | *
4 | * @name: editorController
5 | * @description: code for a property editor in the umbraco back office
6 | *
7 | */
8 | (function () {
9 | 'use strict';
10 |
11 | function editorController() {
12 |
13 | var vm = this;
14 |
15 | function init() {
16 | }
17 |
18 | // call init, when controller is loaded
19 | init();
20 | }
21 |
22 | angular.module('umbraco')
23 | .controller('umbracopackage__1EditorController', editorController);
24 | })();
--------------------------------------------------------------------------------
/ItemTemplates/PropertyEditor/App_Plugins/UmbracoPackage.1/PropertyEditor/editor.html:
--------------------------------------------------------------------------------
1 |
2 |
Add your markup here
3 |
--------------------------------------------------------------------------------
/ItemTemplates/PropertyEditor/App_Plugins/UmbracoPackage.1/PropertyEditor/package.manifest:
--------------------------------------------------------------------------------
1 | {
2 | "javascript": [
3 | "~/App_Plugins/UmbracoPackage.1/PropertyEditor/editor.controller.js"
4 | ],
5 | "propertyEditors": [
6 | {
7 | /*this must be a unique alias*/
8 | "alias": "umbracopackage._1-editor",
9 | /*the name*/
10 | "name": "My editor",
11 | /*the icon*/
12 | "icon": "icon-code",
13 | /*grouping for "Select editor" dialog*/
14 | "group": "Rich Content",
15 | /*the HTML file we will load for the editor*/
16 | "editor": {
17 | "view": "~/App_Plugins/UmbracoPackage.1/PropertyEditor/editor.html"
18 | }
19 | }
20 | ]
21 | }
--------------------------------------------------------------------------------
/ItemTemplates/TreeController/.template.config/template.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "http://json.schemastore.org/template",
3 | "author": "UmbracoPackageTeam",
4 | "classifications": [
5 | "Web",
6 | "Umbraco",
7 | "v8"
8 | ],
9 | "tags": {
10 | "language": "C#",
11 | "type": "item"
12 | },
13 |
14 | "identity": "Umbraco.Templates.Items.TreeController",
15 | "groupIdentity": "Umbraco.Templates.Items.Trees",
16 |
17 | "name": "Umbraco TreeController Item",
18 | "shortName": "umbraco-v8-tree",
19 | "description": "Umbraco tree controller files",
20 |
21 | "sourceName": "UmbracoPackage.1",
22 |
23 | "symbols": {
24 | "treeTitle": {
25 | "type": "parameter",
26 | "datatype": "string",
27 | "description": "The tree name",
28 | "isRequired": true,
29 | "replaces": "#treeTitle#",
30 | "fileRename": "_treeTitle_"
31 | },
32 | "treeAlias": {
33 | "type": "parameter",
34 | "datatype": "string",
35 | "description": "The tree alias",
36 | "isRequired": true,
37 | "replaces": "#treeAlias#"
38 | },
39 | "sectionAlias": {
40 | "type": "parameter",
41 | "datatype": "string",
42 | "description": "The section alias",
43 | "isRequired": true,
44 | "replaces": "#sectionAlias#"
45 | },
46 | "searchable": {
47 | "type": "parameter",
48 | "datatype": "bool",
49 | "defaultValue": "false",
50 | "description": "Should the tree support searching"
51 | }
52 | }
53 | }
--------------------------------------------------------------------------------
/ItemTemplates/TreeController/Trees/_treeTitle_TreeController.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Net.Http.Formatting;
4 | using System.Web.Http.ModelBinding;
5 | using Umbraco.Web.Models.ContentEditing;
6 | using Umbraco.Web.Models.Trees;
7 | using Umbraco.Web.Trees;
8 | using Umbraco.Web.WebApi.Filters;
9 |
10 | namespace UmbracoPackage._1.Trees
11 | {
12 | [Tree("#sectionAlias#", "#treeAlias#", TreeTitle = "#treeTitle#")]
13 | #if (searchable)
14 | public class #treeTitle#TreeController : TreeController, ISearchableTree
15 | #else
16 | public class #treeTitle#TreeController : TreeController
17 | #endif
18 | {
19 | protected override MenuItemCollection GetMenuForNode(string id, [ModelBinder(typeof(HttpQueryStringModelBinder))] FormDataCollection queryStrings)
20 | {
21 | throw new NotImplementedException();
22 | }
23 |
24 | protected override TreeNodeCollection GetTreeNodes(string id, [ModelBinder(typeof(HttpQueryStringModelBinder))] FormDataCollection queryStrings)
25 | {
26 | throw new NotImplementedException();
27 | }
28 |
29 | #if (searchable)
30 | public IEnumerable Search(string query, int pageSize, long pageIndex, out long totalFound, string searchFrom = null)
31 | {
32 | throw new NotImplementedException();
33 | }
34 | #endif
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/ItemTemplates/UIExamples/.template.config/template.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "http://json.schemastore.org/template",
3 | "author": "UmbracoPackageTeam",
4 | "classifications": [
5 | "Web",
6 | "Umbraco",
7 | "v8"
8 | ],
9 | "tags": {
10 | "language": "C#",
11 | "type": "item"
12 | },
13 |
14 | "identity": "Umbraco.Templates.Items.UIExamples",
15 | "groupIdentity": "Umbraco.Templates.Items.UIExamples",
16 |
17 | "name": "Umbraco UI Examples App",
18 | "shortName": "umbraco-v8-UIExamples",
19 | "description": "Files to add UI Examples Sections to a project",
20 |
21 | "sourceName": "UmbracoPackage.1"
22 | }
--------------------------------------------------------------------------------
/ItemTemplates/UIExamples/App_Plugins/uiexamples/buttons/buttons.controller.js:
--------------------------------------------------------------------------------
1 |
2 | (function () {
3 | 'use strict';
4 |
5 | function buttons($scope,
6 | localizationService,
7 | overlayService,
8 | exampleResource) {
9 |
10 | var vm = this;
11 | vm.doStuff = doStuff;
12 | vm.linkAway = exampleResource.linkAway;
13 |
14 | vm.buttonGroup = {
15 | defaultButton: {
16 | labelKey: "buttons_groupedDefaultLabel",
17 | hotKey: "ctrl+d",
18 | hotKeyWhenHidden: true,
19 | buttonStyle: 'success',
20 | handler: function () {
21 | // do magic here
22 | alert("you clicked Grouped Button");
23 | }
24 | },
25 | subButtons: [
26 | {
27 | labelKey: "buttons_groupedSubButtonALabel",
28 | hotKey: "ctrl+a",
29 | hotKeyWhenHidden: true,
30 | handler: function () {
31 | // do magic here
32 | alert("you clicked Sub Button A");
33 | }
34 | },
35 | {
36 | labelKey: "buttons_groupedSubButtonBLabel",
37 | hotKey: "ctrl+b",
38 | hotKeyWhenHidden: true,
39 | buttonStyle: 'success',
40 | handler: function () {
41 | // do magic here
42 | alert("you clicked Sub Button B");
43 | }
44 | }
45 | ]
46 | };
47 |
48 | function doStuff () {
49 | openOverlay();
50 | };
51 |
52 | function openOverlay() {
53 |
54 | localizationService.localizeMany(["buttons_overlayTitle", "buttons_overlayMessage"])
55 | .then(function (values) {
56 |
57 | var overlay = {
58 | title: values[0],
59 | content: values[1],
60 | disableBackdropClick: true,
61 | disableEscKey: true,
62 | submit: function () {
63 | overlayService.close();
64 | }
65 | };
66 |
67 | overlayService.confirmDelete(overlay);
68 | });
69 | }
70 | };
71 |
72 | angular.module('umbraco')
73 | .controller('buttonsSectionController', buttons);
74 | })();
--------------------------------------------------------------------------------
/ItemTemplates/UIExamples/App_Plugins/uiexamples/buttons/lang/en.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | umb-button
7 | Use this directive to render a button
8 | This is an example of using a button. The type of button depends on the 'button-style', you can see the options in the example above and see them rendered below:
10 | ]]>
11 |
12 |
13 | umb-grouped-button
14 | Render a grouped button
15 |
16 | This is an example of a button group, you can see a few examples rendered below:
18 | ]]>
19 | Grouped Button
20 | Sub Button A
21 | Sub Button B
22 |
23 |
24 | This is an overlay
25 | If you want to see how this was done go to ~/App_Plugins/uiexamples/buttons and have a look!
26 |
27 |
28 |
--------------------------------------------------------------------------------
/ItemTemplates/UIExamples/App_Plugins/uiexamples/buttons/package.manifest:
--------------------------------------------------------------------------------
1 | {
2 | "javascript": [ "~/app_plugins/uiexamples/buttons/buttons.controller.js" ]
3 | }
4 |
--------------------------------------------------------------------------------
/ItemTemplates/UIExamples/App_Plugins/uiexamples/icons/iconoverlay.controller.js:
--------------------------------------------------------------------------------
1 | (function () {
2 | 'use strict';
3 |
4 | function overlayController() {
5 |
6 | var vm = this;
7 |
8 | vm.colors = [
9 | { name: "Black", value: "color-black", default: true },
10 | { name: "Blue Grey", value: "color-blue-grey" },
11 | { name: "Grey", value: "color-grey" },
12 | { name: "Brown", value: "color-brown" },
13 | { name: "Blue", value: "color-blue" },
14 | { name: "Light Blue", value: "color-light-blue" },
15 | { name: "Indigo", value: "color-indigo" },
16 | { name: "Purple", value: "color-purple" },
17 | { name: "Deep Purple", value: "color-deep-purple" },
18 | { name: "Cyan", value: "color-cyan" },
19 | { name: "Green", value: "color-green" },
20 | { name: "Light Green", value: "color-light-green" },
21 | { name: "Lime", value: "color-lime" },
22 | { name: "Yellow", value: "color-yellow" },
23 | { name: "Amber", value: "color-amber" },
24 | { name: "Orange", value: "color-orange" },
25 | { name: "Deep Orange", value: "color-deep-orange" },
26 | { name: "Red", value: "color-red" },
27 | { name: "Pink", value: "color-pink" }
28 | ];
29 |
30 | }
31 |
32 | angular.module('umbraco')
33 | .controller('exampleSectionIconsOverlayController', overlayController);
34 | })();
--------------------------------------------------------------------------------
/ItemTemplates/UIExamples/App_Plugins/uiexamples/icons/iconoverlay.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
9 |
10 |
11 |
<umb-icon icon="{{model.icon.name}}" class="{{vm.activeColor.value}}"></umb-icon>
12 |
13 |
14 |
--------------------------------------------------------------------------------
/ItemTemplates/UIExamples/App_Plugins/uiexamples/icons/icons.controller.js:
--------------------------------------------------------------------------------
1 | (function () {
2 | 'use strict';
3 |
4 | function exampleSectionIconsController(exampleResource, iconHelper, overlayService) {
5 |
6 | var vm = this;
7 | vm.loading = true;
8 | vm.linkAway = exampleResource.linkAway;
9 |
10 | vm.openIconOverlay = openIconOverlay;
11 |
12 | function init() {
13 |
14 | if (iconHelper.getAllIcons !== undefined) {
15 |
16 | iconHelper.getAllIcons().then(function (icons) {
17 | vm.icons = icons;
18 | vm.loading = false;
19 | });
20 | }
21 | else {
22 | iconHelper.getIcons().then(function (icons) {
23 | vm.icons = icons.map(function (icon) {
24 | return {
25 | name: icon, svgString: null
26 | };
27 | });
28 | vm.loading = false;
29 | });
30 | }
31 | }
32 |
33 | /////////
34 |
35 | function openIconOverlay(icon) {
36 |
37 | var options = {
38 | view: Umbraco.Sys.ServerVariables.umbracoSettings.appPluginsPath + '/uiexamples/icons/iconOverlay.html',
39 | title: icon.name,
40 | content: icon.name,
41 | icon: icon,
42 | hideSubmitButton: true,
43 | close: function () {
44 | overlayService.close();
45 | }
46 | }
47 | overlayService.open(options);
48 | }
49 |
50 | init();
51 | }
52 |
53 | angular.module('umbraco')
54 | .controller('exampleSectionIconsController', exampleSectionIconsController);
55 | })();
--------------------------------------------------------------------------------
/ItemTemplates/UIExamples/App_Plugins/uiexamples/icons/icons.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
6 |
11 |
12 |
13 |
14 |
15 | <umb-icon
16 | icon="icon-{name}">
17 | class="small | medium | large">
18 | </umb-icon>
19 |
20 |
21 |
22 | small
14px
23 | medium
24px
24 | large
32px
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
36 |
37 |
38 |
39 |
40 |
42 |
43 |
{{icon.name}}
44 |
45 |
46 |
47 |
48 |
49 |
--------------------------------------------------------------------------------
/ItemTemplates/UIExamples/App_Plugins/uiexamples/icons/lang/en.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | umb-icon
7 | Use this directive to render a svg icon
8 | The 'icon' parameter determines which icon to show. All names are prefixed with icon-, for example 'icon-alert' and 'icon-checkbox'. See below for a list of all icons and their names.
10 | ]]>
11 | The 'class' parameter can be used to render the icon with a fixed size:
13 | ]]>
14 | Without a size class specified the icon will inherit the font-size of their parent container.
16 | ]]>
17 |
18 |
19 | Available Icons
20 | The core Umbraco backoffice svg icons. Click on an icon to generate the code snippet to copy.
21 |
22 |
23 |
--------------------------------------------------------------------------------
/ItemTemplates/UIExamples/App_Plugins/uiexamples/icons/package.manifest:
--------------------------------------------------------------------------------
1 | {
2 | "javascript": [
3 | "~/App_Plugins/uiexamples/icons/icons.controller.js",
4 | "~/App_Plugins/uiexamples/icons/iconoverlay.controller.js"
5 | ]
6 | }
--------------------------------------------------------------------------------
/ItemTemplates/UIExamples/App_Plugins/uiexamples/info.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Welcome to 'UI Examples', a collection of backoffice elements designed to help Umbraco developers extend the backoffice.
5 | Click the tabs top right to browse through what's currently available.
6 | Each tab has links to the official Umbraco API documentation, look for the icons.
7 | You can copy the source from the code snippets, or look at the files in your own '/App_Plugins/UIExamples' folder to see for yourself how these pages are built.
8 | As always... suggestions, feedback and contributions are welcome! The package is maintained by the Umbraco Package Team, please report issues or make contributions via the GitHub repository .
9 |
10 |
11 |
--------------------------------------------------------------------------------
/ItemTemplates/UIExamples/App_Plugins/uiexamples/lang/en.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | UI-Examples
5 |
6 |
--------------------------------------------------------------------------------
/ItemTemplates/UIExamples/App_Plugins/uiexamples/layout/lang/en.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | Loading indicator
7 | Display a loading indicator while things setup
8 | The umbraco load indicator allows you to show the three progress 'bubbles' while your page initializes or you do work that will take some time.
10 | Click the button below for an example, or try it yourself using this sample code:
11 | ]]>
12 | Start loading
13 | Stop loading
14 |
15 |
16 | Layout
17 | Classes to aid page layout
18 | Umbraco contains many helper methods for controlling how a flexbox and its child items are rendered.
20 | For a complete rundown of flexbox behaviour see a guide to flexbox .
21 | ]]>
22 | Jusfiy content within a flex layout - good for spacing your content across the page.
23 | Align items within the flex layout, good for aligning text and image boxes of different sizes.
24 | Align content within a flex layout, good for controlling how boxes flow across the page.
25 |
26 |
27 | Margins
28 | Classes to help with the margins between items
29 | View Umbraco's spacing styles
31 | ]]>
32 |
33 |
34 |
--------------------------------------------------------------------------------
/ItemTemplates/UIExamples/App_Plugins/uiexamples/layout/layout.controller.js:
--------------------------------------------------------------------------------
1 | (function () {
2 | 'use strict';
3 |
4 | function layoutController($scope, exampleResource) {
5 | var vm = this;
6 | vm.loading = false;
7 |
8 | vm.toggleLoading = toggleLoading;
9 |
10 | function toggleLoading() {
11 | vm.loading = !vm.loading;
12 | }
13 |
14 | vm.linkAway = exampleResource.linkAway;
15 | }
16 |
17 | angular.module('umbraco')
18 | .controller('exampleLayoutController', layoutController);
19 | })();
--------------------------------------------------------------------------------
/ItemTemplates/UIExamples/App_Plugins/uiexamples/layout/package.manifest:
--------------------------------------------------------------------------------
1 | {
2 | "javascript": [ "~/app_plugins/uiexamples/layout/layout.controller.js" ]
3 | }
4 |
--------------------------------------------------------------------------------
/ItemTemplates/UIExamples/App_Plugins/uiexamples/package.manifest:
--------------------------------------------------------------------------------
1 | {
2 | "javascript": [
3 | "~/app_plugins/uiexamples/uiexamples.section.controller.js",
4 | "~/app_plugins/uiexamples/uiexamples.resource.js"
5 | ],
6 | "css": [ "~/app_plugins/uiexamples/uiexamples.css" ],
7 | "sections": [
8 | {
9 | "alias": "uiExamples",
10 | "name": "UI Examples",
11 | }
12 | ],
13 | "dashboards": [
14 | {
15 | "alias": "uiexample",
16 | "sections": [ "uiExamples" ],
17 | "view": "~/app_plugins/uiexamples/uiexamples.section.html"
18 | }
19 | ]
20 | }
--------------------------------------------------------------------------------
/ItemTemplates/UIExamples/App_Plugins/uiexamples/tabs/lang/en.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Tabs
5 | This shows how you can use tabs
6 |
7 |
8 |
--------------------------------------------------------------------------------
/ItemTemplates/UIExamples/App_Plugins/uiexamples/tabs/package.manifest:
--------------------------------------------------------------------------------
1 | {
2 | "javascript": [
3 | "~/app_plugins/uiexamples/tabs/tabs.controller.js"
4 | ]
5 | }
6 |
--------------------------------------------------------------------------------
/ItemTemplates/UIExamples/App_Plugins/uiexamples/tabs/tabs.controller.js:
--------------------------------------------------------------------------------
1 | (function () {
2 | 'use strict';
3 |
4 | function tabsController($scope, $timeout, eventsService, exampleResource) {
5 |
6 | var vm = this;
7 |
8 | vm.loading = true;
9 | vm.tabs = [];
10 | vm.changeTab = changeTab;
11 |
12 | vm.linkAway = exampleResource.linkAway;
13 |
14 | function changeTab(selectedTab) {
15 | vm.tabs.forEach(function (tab) {
16 | tab.active = false;
17 | });
18 | selectedTab.active = true;
19 | };
20 |
21 | eventsService.on("app.tabChange", function (event, args) {
22 | $timeout(function () {
23 | if (args.alias === 'tabs') {
24 | vm.tabs = [
25 | {
26 | "alias": "tabOne",
27 | "label": "HTML",
28 | "active": true
29 | },
30 | {
31 | "alias": "tabTwo",
32 | "label": "JavaScript"
33 | }
34 | ];
35 | vm.loading = false;
36 | }
37 | });
38 | });
39 | };
40 |
41 | angular.module('umbraco').controller('tabsController', tabsController);
42 | })();
--------------------------------------------------------------------------------
/ItemTemplates/UIExamples/App_Plugins/uiexamples/tabs/tabs.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
10 |
11 |
16 |
17 |
18 |
19 |
20 |
22 |
23 |
26 |
27 |
28 |
29 | <div ng-controller="tabsController as vm">
30 | <umb-box>
31 | <umb-tabs-nav tabs="vm.tabs" on-tab-change="vm.changeTab(tab)">
32 | </umb-tabs-nav>
33 | <umb-tab-content ng-repeat="tab in vm.tabs" ng-show="tab.active" tab="tab">
34 | <div ng-if="tab.alias === 'tabOne'"></div>
35 | <div ng-if="tab.alias === 'tabTwo'"></div>
36 | </umb-tab-content>
37 | </umb-box>
38 | </div>
39 |
40 |
41 |
42 |
43 | (function () {
44 | 'use strict';
45 |
46 | function tabsController($scope, eventsService) {
47 |
48 | var vm = this;
49 |
50 | vm.changeTab = changeTab;
51 |
52 | vm.tabs = [
53 | {
54 | "alias": "tabOne",
55 | "label": "Tab 1",
56 | "active": true
57 | },
58 | {
59 | "alias": "tabTwo",
60 | "label": "Tab 2"
61 | }
62 | ];
63 |
64 | function changeTab(selectedTab) {
65 | vm.tabs.forEach(function (tab) {
66 | tab.active = false;
67 | });
68 | selectedTab.active = true;
69 | };
70 |
71 | eventsService.on("app.tabChange", function (event, args) {
72 | console.log("event", event);
73 | console.log("args", args);
74 | });
75 | };
76 |
77 | angular.module('umbraco')
78 | .controller('tabsController', tabsController);
79 | })();
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
--------------------------------------------------------------------------------
/ItemTemplates/UIExamples/App_Plugins/uiexamples/uiexamples.css:
--------------------------------------------------------------------------------
1 | a.uiexamples-link {
2 | text-decoration: underline;
3 | }
4 | a.uiexamples-link:hover {
5 | text-decoration: none;
6 | }
7 |
8 | /* simple style addtion so we can outline the boxes in flexbox examples*/
9 | .uiexamples-outline {
10 | border: 1px solid red;
11 | margin: 1em 0;
12 | }
13 |
14 | .uiexamples-outline > div {
15 | margin: 0.5em 0;
16 | padding: 1em;
17 | border: 1px solid blue;
18 | background-color: #eee;
19 | }
20 |
21 | .uiexamples-outline-no-margin {
22 | border: 1px solid red;
23 | margin: 0 10px;
24 | flex-grow: 2;
25 | }
26 |
27 | .uiexamples-outline-no-margin > div {
28 | border: 1px solid blue;
29 | }
30 |
31 | .uiexamples-umbbox-outline {
32 | border: 1px solid red;
33 | }
34 |
35 | .uiexamples-umbbox-outline > .header {
36 | border: 1px solid blue;
37 | margin: 5px;
38 | }
39 |
40 | .uiexamples-umbbox-outline > .content {
41 | border: 1px solid green;
42 | margin: 5px;
43 | }
44 |
--------------------------------------------------------------------------------
/ItemTemplates/UIExamples/App_Plugins/uiexamples/uiexamples.resource.js:
--------------------------------------------------------------------------------
1 | function exampleResource($q) {
2 |
3 | return {
4 | linkAway: function(url) {
5 | window.open(url);
6 | }
7 | };
8 |
9 | }
10 |
11 | angular.module('umbraco.resources').factory('exampleResource', exampleResource);
12 |
--------------------------------------------------------------------------------
/ItemTemplates/UIExamples/App_Plugins/uiexamples/uiexamples.section.controller.js:
--------------------------------------------------------------------------------
1 |
2 | (function () {
3 | 'use strict';
4 |
5 | function exampleSection($scope) {
6 |
7 | var vm = this;
8 |
9 | vm.page = {
10 | title: 'UI Examples',
11 | navigation: [
12 | {
13 | 'name': 'Info',
14 | 'alias': 'default',
15 | 'icon': 'icon-sprout',
16 | 'view': Umbraco.Sys.ServerVariables.umbracoSettings.appPluginsPath + '/uiexamples/info.html',
17 | 'active': true
18 | },
19 | {
20 | 'name': 'Umbbox',
21 | 'alias': 'umbbox',
22 | 'icon': 'icon-box',
23 | 'view': Umbraco.Sys.ServerVariables.umbracoSettings.appPluginsPath + '/uiexamples/umbbox/umbbox.html'
24 | },
25 | {
26 | 'name': 'Layout',
27 | 'alias': 'layout',
28 | 'icon': 'icon-layout',
29 | 'view': Umbraco.Sys.ServerVariables.umbracoSettings.appPluginsPath + '/uiexamples/layout/layout.html'
30 | },
31 | {
32 | 'name': 'Buttons',
33 | 'alias': 'buttons',
34 | 'icon': 'icon-checkbox-empty',
35 | 'view': Umbraco.Sys.ServerVariables.umbracoSettings.appPluginsPath + '/uiexamples/buttons/buttons.html',
36 | },
37 | {
38 | 'name': 'Tabs',
39 | 'alias': 'tabs',
40 | 'icon': 'icon-tab',
41 | 'view': Umbraco.Sys.ServerVariables.umbracoSettings.appPluginsPath + '/uiexamples/tabs/tabs.html',
42 | },
43 | {
44 | 'name': 'Icons',
45 | 'alias': 'icons',
46 | 'icon': 'icon-picture',
47 | 'view': Umbraco.Sys.ServerVariables.umbracoSettings.appPluginsPath + '/uiexamples/icons/icons.html',
48 | },
49 | ]
50 | }
51 |
52 | };
53 |
54 | angular.module('umbraco')
55 | .controller('exampleSectionController', exampleSection);
56 | })();
57 |
--------------------------------------------------------------------------------
/ItemTemplates/UIExamples/App_Plugins/uiexamples/uiexamples.section.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/ItemTemplates/UIExamples/App_Plugins/uiexamples/umbbox/lang/en.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | The umb-box element
7 | The umb-box element (outlined in red) is used as a wrapper for boxes in Umbraco. It contains a header (outlined in blue) and content element (outlined in green) that are described below in more detail.
9 | ]]>
10 |
11 |
12 | The umb-box-header element
13 | The umb-box-header element is the top part of a box, above the horizontal line. It can contain a title and description or their language keys.
15 | Adding a button
16 | Anything inside the umb-box-header element will be right aligned, just like the "API Documentation" button at the top of this current box. See the example below:
17 | ]]>
18 | The vm.linkAway method is a method in the angular controller, not a standard Umbraco thing. It calls window.open(url) on the passed in url.
19 |
20 |
21 | The umb-box-content element
22 | The umb-box-content element is anything within the box and under the header. It is a simple wrapper for whatever you wish to put inside, and comes with no special config options.
23 |
24 |
25 |
--------------------------------------------------------------------------------
/ItemTemplates/UIExamples/App_Plugins/uiexamples/umbbox/package.manifest:
--------------------------------------------------------------------------------
1 | {
2 | "javascript": [ "~/app_plugins/uiexamples/umbbox/umbbox.controller.js" ]
3 | }
4 |
--------------------------------------------------------------------------------
/ItemTemplates/UIExamples/App_Plugins/uiexamples/umbbox/umbbox.controller.js:
--------------------------------------------------------------------------------
1 |
2 | (function () {
3 | 'use strict';
4 |
5 | function umbbox($scope, exampleResource) {
6 | var vm = this;
7 | vm.linkAway = exampleResource.linkAway;
8 | };
9 |
10 | angular.module('umbraco')
11 | .controller('umbboxController', umbbox);
12 | })();
--------------------------------------------------------------------------------
/ItemTemplates/UIExamples/App_Plugins/uiexamples/umbbox/umbbox.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
12 |
13 |
14 |
15 | <umb-box>
16 | <umb-box-header title="this is a title"></umb-box-header>
17 | <umb-box-content>
18 | // Content here
19 | </umb-box-content>
20 | </umb-box>
21 |
22 |
23 |
24 |
25 |
26 |
27 |
62 |
63 |
64 |
65 |
70 |
71 |
72 |
73 |
74 |
75 | <umb-box-content>
76 | </umb-box-content>
77 |
78 |
79 |
80 |
81 |
82 |
83 |
--------------------------------------------------------------------------------
/ItemTemplates/dashboard/.template.config/template.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "http://json.schemastore.org/template",
3 | "author": "UmbracoPackageTeam",
4 | "classifications": [
5 | "Web",
6 | "Umbraco",
7 | "v8"
8 | ],
9 | "tags": {
10 | "language": "C#",
11 | "type": "item"
12 | },
13 |
14 | "identity": "Umbraco.Templates.Items.Dashboard",
15 | "groupIdentity": "Umbraco.Templates.Items.Dashboard",
16 |
17 | "name": "Umbraco Dashboard Item",
18 | "shortName": "umbraco-v8-dashboard",
19 | "description": "Umbraco dashboard files",
20 |
21 | "sourceName": "UmbracoPackage.1"
22 | }
--------------------------------------------------------------------------------
/ItemTemplates/dashboard/App_Plugins/UmbracoPackage.1/dashboard/dashboard.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
9 |
10 |
11 | Umbraco Version: {{vm.info.status}}
12 | Server Time : {{vm.info.time | date:'medium'}}
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/ItemTemplates/dashboard/App_Plugins/UmbracoPackage.1/dashboard/package.manifest:
--------------------------------------------------------------------------------
1 | {
2 | "javascript": [
3 | "~/App_Plugins/UmbracoPackage.1/dashboard/dashboard.service.js",
4 | "~/App_Plugins/UmbracoPackage.1/dashboard/dashboard.controller.js"
5 | ],
6 | "dashboards": [
7 | {
8 | "alias": "umbracopackage._1-dashboard",
9 | "sections": [
10 | "content"
11 | ],
12 | "view": "~/App_Plugins/UmbracoPackage.1/dashboard/dashboard.html"
13 | }
14 | ]
15 | }
--------------------------------------------------------------------------------
/ItemTemplates/github-build/.github/workflows/build.yml:
--------------------------------------------------------------------------------
1 | # Builds a library, and packages it up.
2 | #
3 | # Works on a release/version tag
4 | # e.g release/1.0.2 will build v1.0.2
5 | #
6 |
7 | name: Build and Package
8 |
9 | env:
10 | OUTPUT: ./Output
11 | LIBRARY_FOLDER: ./src/UmbracoPackage.1
12 | CONFIG: release
13 |
14 | on:
15 | push:
16 | tags:
17 | - "release/*"
18 |
19 | jobs:
20 | build:
21 | runs-on: windows-latest
22 |
23 | steps:
24 | - name: Get Version
25 | id: get_version
26 | run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\/release\//}
27 | shell: bash
28 |
29 | - name: checkout
30 | uses: actions/checkout@v2
31 |
32 | - name: Setup NuGet.exe for use with actions
33 | uses: NuGet/setup-nuget@v1.0.2
34 |
35 | - name: Setup .net core
36 | uses: actions/setup-dotnet@v1.4.0
37 |
38 | - name: Setup UmbPack
39 | run: dotnet tool install Umbraco.Tools.Packages --global
40 |
41 | - name: Setup MSBuild
42 | uses: microsoft/setup-msbuild@v1
43 |
44 | - name: Restore Packages
45 | run: dotnet restore ./src
46 |
47 | - name: Build Project
48 | run: msbuild ./src -p:Configuration=${{ env.CONFIG }}
49 |
50 | - name: Create NuGet package file
51 | run: dotnet pack ${{ env.LIBRARY_FOLDER }} -c ${{ env.CONFIG }} --no-build --include-symbols -o ${{ env.OUTPUT }} /p:version=${{ steps.get_version.outputs.VERSION }}
52 |
53 | # # For the push step to work you will need to create an api key on NuGet, and save it as a secret on Github with the name "NUGET_DEPLOY_KEY"
54 | # - name: Push package to NuGet
55 | # run: dotnet nuget push ${{ env.OUTPUT }}/*.nupkg -k ${{ secrets.NUGET_DEPLOY_KEY } -s https://api.nuget.org/v3/index.json
56 |
57 | # path to your package.xml file should go here.
58 | - name: Create Umbraco package file
59 | run: UmbPack pack ./package.xml -o ${{ env.OUTPUT }} -v ${{ steps.get_version.outputs.VERSION }}
60 |
61 | # # For the push step to work you will need to create an api key on Our, and save it as a secret on Github with the name "UMBRACO_DEPLOY_KEY"
62 | # - name: Push package to Our
63 | # run: umbpack push ${{ env.OUTPUT }}/UmbracoPackage.1_${{ steps.get_version.outputs.VERSION }}.zip -k ${{ secrets.UMBRACO_DEPLOY_KEY }}
64 |
65 | - name: upload-artifacts
66 | uses: actions/upload-artifact@v2
67 | with:
68 | name: Build-Results-${{ steps.get_version.outputs.VERSION }}
69 | path: ${{ env.OUTPUT }}/**/*
--------------------------------------------------------------------------------
/ItemTemplates/github-build/.github/workflows/readme.md:
--------------------------------------------------------------------------------
1 | # Github Workflow Actions
2 |
3 | This project contains some basic github actions that will allow
4 | you to automate the build and deployment of your projects.
5 |
6 | ## build.yml
7 | This script will build and package your project, based on a
8 | `release` tag.
9 |
10 | if you tag a commit with `release/(version)` (where version is the version you want e.g `release/1.0.0` ) then the build will produce a NuGet and umbraco package of that version.
--------------------------------------------------------------------------------
/ItemTemplates/github-build/.template.config/template.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "http://json.schemastore.org/template",
3 | "author": "UmbracoPackageTeam",
4 | "classifications": [
5 | "Web",
6 | "Umbraco",
7 | "v8"
8 | ],
9 | "tags": {
10 | "language": "C#",
11 | "type": "item"
12 | },
13 |
14 | "identity": "Umbraco.Templates.Items.Github.Build",
15 | "groupIdentity": "Umbraco.Templates.Items.Github.Build",
16 |
17 | "name": "Umbraco Github build script",
18 | "shortName": "umbraco-v8-github-build",
19 | "description": "Umbraco build.yml file for github actions",
20 |
21 | "sourceName": "UmbracoPackage.1",
22 |
23 | "symbols": {
24 | "packageFile" : {
25 | "type": "parameter",
26 | "defaultValue": "./package.xml",
27 | "replaces": "./package.xml",
28 | "description": "Path to your package.xml file"
29 | }
30 | },
31 |
32 | "primaryOutputs": [
33 | {"path": "/.github/workflows/build.yml"}
34 | ]
35 | }
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2020 Umbraco Package Team
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/ProjectTemplates/UmbracoPackage.1/.gitattributes:
--------------------------------------------------------------------------------
1 | # Auto detect text files and perform LF normalization
2 | * text=auto
3 |
4 | # Custom for Visual Studio
5 | *.cs diff=csharp
6 |
7 | # Standard to msysgit
8 | *.doc diff=astextplain
9 | *.DOC diff=astextplain
10 | *.docx diff=astextplain
11 | *.DOCX diff=astextplain
12 | *.dot diff=astextplain
13 | *.DOT diff=astextplain
14 | *.pdf diff=astextplain
15 | *.PDF diff=astextplain
16 | *.rtf diff=astextplain
17 | *.RTF diff=astextplain
18 |
--------------------------------------------------------------------------------
/ProjectTemplates/UmbracoPackage.1/.github/workflows/build.yml:
--------------------------------------------------------------------------------
1 | # Builds a library, and packages it up.
2 | #
3 | # Works on a release/version tag
4 | # e.g release/1.0.2 will build v1.0.2
5 | #
6 |
7 | name: Build and Package
8 |
9 | env:
10 | OUTPUT: ./Output
11 | LIBRARY_FOLDER: ./src/UmbracoPackage.1
12 | CONFIG: release
13 |
14 | on:
15 | push:
16 | tags:
17 | - "release/*"
18 |
19 | jobs:
20 | build:
21 | runs-on: windows-latest
22 |
23 | steps:
24 | - name: Get Version
25 | id: get_version
26 | run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\/release\//}
27 | shell: bash
28 |
29 | - name: checkout
30 | uses: actions/checkout@v2
31 |
32 | - name: Setup NuGet.exe for use with actions
33 | uses: NuGet/setup-nuget@v1.0.2
34 |
35 | - name: Setup .net core
36 | uses: actions/setup-dotnet@v1.4.0
37 |
38 | - name: Setup UmbPack
39 | run: dotnet tool install Umbraco.Tools.Packages --global
40 |
41 | - name: Setup MSBuild
42 | uses: microsoft/setup-msbuild@v1
43 |
44 | - name: Restore Packages
45 | run: dotnet restore ./src
46 |
47 | - name: Build Project
48 | run: msbuild ./src -p:Configuration=${{ env.CONFIG }}
49 |
50 | - name: Create NuGet package file
51 | run: dotnet pack ${{ env.LIBRARY_FOLDER }} -c ${{ env.CONFIG }} --no-build --include-symbols -o ${{ env.OUTPUT }} /p:version=${{ steps.get_version.outputs.VERSION }}
52 |
53 | # # For the push step to work you will need to create an api key on NuGet, and save it as a secret on Github with the name "NUGET_DEPLOY_KEY"
54 | # - name: Push package to NuGet
55 | # run: dotnet nuget push ${{ env.OUTPUT }}/*.nupkg -k ${{ secrets.NUGET_DEPLOY_KEY } -s https://api.nuget.org/v3/index.json
56 |
57 | # path to your package.xml file should go here.
58 | - name: Create Umbraco package file
59 | run: UmbPack pack ./package.xml -o ${{ env.OUTPUT }} -v ${{ steps.get_version.outputs.VERSION }}
60 |
61 | # # For the push step to work you will need to create an api key on Our, and save it as a secret on Github with the name "UMBRACO_DEPLOY_KEY"
62 | # - name: Push package to Our
63 | # run: umbpack push ${{ env.OUTPUT }}/UmbracoPackage.1_${{ steps.get_version.outputs.VERSION }}.zip -k ${{ secrets.UMBRACO_DEPLOY_KEY }}
64 |
65 | - name: upload-artifacts
66 | uses: actions/upload-artifact@v2
67 | with:
68 | name: Build-Results-${{ steps.get_version.outputs.VERSION }}
69 | path: ${{ env.OUTPUT }}/**/*
--------------------------------------------------------------------------------
/ProjectTemplates/UmbracoPackage.1/.github/workflows/readme.md:
--------------------------------------------------------------------------------
1 | # Github Workflow Actions
2 |
3 | This project contains some basic github actions that will allow
4 | you to automate the build and deployment of your projects.
5 |
6 | ## build.yml
7 | This script will build and package your project, based on a
8 | `release` tag.
9 |
10 | if you tag a commit with `release/(version)` (where version is the version you want e.g `release/1.0.0` ) then the build will produce a NuGet and umbraco package of that version.
--------------------------------------------------------------------------------
/ProjectTemplates/UmbracoPackage.1/.template.config/package_team.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/umbraco/Package.Templates/782625ea765051c640b806cad8f2c7a34b30daaa/ProjectTemplates/UmbracoPackage.1/.template.config/package_team.png
--------------------------------------------------------------------------------
/ProjectTemplates/UmbracoPackage.1/.template.config/vs-2017.3.host.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "http://json.schemastore.org/vs-2017.3.host",
3 | "icon": "package_team.png"
4 | }
--------------------------------------------------------------------------------
/ProjectTemplates/UmbracoPackage.1/.website/Global.asax:
--------------------------------------------------------------------------------
1 | <%@ Application Inherits="Umbraco.Web.UmbracoApplication" Language="C#" %>
2 |
--------------------------------------------------------------------------------
/ProjectTemplates/UmbracoPackage.1/.website/Media/Web.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/ProjectTemplates/UmbracoPackage.1/.website/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle("UmbracoPackage._1.Site")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("UmbracoPackage._1.Site")]
13 | [assembly: AssemblyCopyright("Copyright © 2020")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Setting ComVisible to false makes the types in this assembly not visible
18 | // to COM components. If you need to access a type in this assembly from
19 | // COM, set the ComVisible attribute to true on that type.
20 | [assembly: ComVisible(false)]
21 |
22 | // The following GUID is for the ID of the typelib if this project is exposed to COM
23 | [assembly: Guid("004f67c2-9a9e-49c3-8925-a55099e47d41")]
24 |
25 | // Version information for an assembly consists of the following four values:
26 | //
27 | // Major Version
28 | // Minor Version
29 | // Build Number
30 | // Revision
31 | //
32 | // You can specify all the values or you can default the Revision and Build Numbers
33 | // by using the '*' as shown below:
34 | [assembly: AssemblyVersion("1.0.0.0")]
35 | [assembly: AssemblyFileVersion("1.0.0.0")]
36 |
--------------------------------------------------------------------------------
/ProjectTemplates/UmbracoPackage.1/.website/Views/Partials/Grid/Bootstrap3-Fluid.cshtml:
--------------------------------------------------------------------------------
1 | @inherits UmbracoViewPage
2 | @using Umbraco.Web.Templates
3 | @using Newtonsoft.Json.Linq
4 |
5 | @*
6 | Razor helpers located at the bottom of this file
7 | *@
8 |
9 | @if (Model != null && Model.sections != null)
10 | {
11 | var oneColumn = ((System.Collections.ICollection)Model.sections).Count == 1;
12 |
13 |
14 | @if (oneColumn)
15 | {
16 | foreach (var section in Model.sections) {
17 |
18 | @foreach (var row in section.rows) {
19 | @renderRow(row);
20 | }
21 |
22 | }
23 | }else {
24 |
25 | @foreach (var s in Model.sections) {
26 |
27 |
28 | @foreach (var row in s.rows) {
29 | @renderRow(row);
30 | }
31 |
32 |
33 | }
34 |
35 | }
36 |
37 | }
38 |
39 | @helper renderRow(dynamic row){
40 |
41 |
42 | @foreach ( var area in row.areas ) {
43 |
44 |
45 | @foreach (var control in area.controls) {
46 | if (control !=null && control.editor != null && control.editor.view != null ) {
47 | @Html.Partial("grid/editors/base", (object)control)
48 | }
49 | }
50 |
51 |
}
52 |
53 |
54 | }
55 |
56 | @functions {
57 | public static MvcHtmlString RenderElementAttributes(dynamic contentItem)
58 | {
59 | var attrs = new List();
60 | JObject cfg = contentItem.config;
61 |
62 | if(cfg != null)
63 | foreach (JProperty property in cfg.Properties())
64 | {
65 | var propertyValue = HttpUtility.HtmlAttributeEncode(property.Value.ToString());
66 | attrs.Add(property.Name + "=\"" + propertyValue + "\"");
67 | }
68 |
69 | JObject style = contentItem.styles;
70 |
71 | if (style != null) {
72 | var cssVals = new List();
73 | foreach (JProperty property in style.Properties())
74 | {
75 | var propertyValue = property.Value.ToString();
76 | if (string.IsNullOrWhiteSpace(propertyValue) == false)
77 | {
78 | cssVals.Add(property.Name + ":" + propertyValue + ";");
79 | }
80 | }
81 |
82 | if (cssVals.Any())
83 | attrs.Add("style='" + HttpUtility.HtmlAttributeEncode(string.Join(" ", cssVals)) + "'");
84 | }
85 |
86 | return new MvcHtmlString(string.Join(" ", attrs));
87 | }
88 | }
--------------------------------------------------------------------------------
/ProjectTemplates/UmbracoPackage.1/.website/Views/Partials/Grid/Bootstrap3.cshtml:
--------------------------------------------------------------------------------
1 | @inherits UmbracoViewPage
2 | @using Umbraco.Web.Templates
3 | @using Newtonsoft.Json.Linq
4 |
5 | @if (Model != null && Model.sections != null)
6 | {
7 | var oneColumn = ((System.Collections.ICollection)Model.sections).Count == 1;
8 |
9 |
10 | @if (oneColumn)
11 | {
12 | foreach (var section in Model.sections) {
13 |
14 | @foreach (var row in section.rows) {
15 | @renderRow(row, true);
16 | }
17 |
18 | }
19 | }else {
20 |
21 |
22 | @foreach (var s in Model.sections) {
23 |
24 |
25 | @foreach (var row in s.rows) {
26 | @renderRow(row, false);
27 | }
28 |
29 |
30 | }
31 |
32 |
33 | }
34 |
35 | }
36 |
37 | @helper renderRow(dynamic row, bool singleColumn){
38 |
39 | @Html.If(singleColumn, "
")
40 |
41 | @foreach ( var area in row.areas ) {
42 |
43 |
44 | @foreach (var control in area.controls) {
45 | if (control !=null && control.editor != null && control.editor.view != null ) {
46 | @Html.Partial("grid/editors/base", (object)control)
47 | }
48 | }
49 |
50 |
}
51 |
52 | @Html.If(singleColumn, "
")
53 |
54 | }
55 |
56 | @functions {
57 | public static MvcHtmlString RenderElementAttributes(dynamic contentItem)
58 | {
59 | var attrs = new List();
60 | JObject cfg = contentItem.config;
61 |
62 | if(cfg != null)
63 | foreach (JProperty property in cfg.Properties())
64 | {
65 | var propertyValue = HttpUtility.HtmlAttributeEncode(property.Value.ToString());
66 | attrs.Add(property.Name + "=\"" + propertyValue + "\"");
67 | }
68 |
69 | JObject style = contentItem.styles;
70 |
71 | if (style != null) {
72 | var cssVals = new List();
73 | foreach (JProperty property in style.Properties())
74 | {
75 | var propertyValue = property.Value.ToString();
76 | if (string.IsNullOrWhiteSpace(propertyValue) == false)
77 | {
78 | cssVals.Add(property.Name + ":" + propertyValue + ";");
79 | }
80 | }
81 |
82 | if (cssVals.Any())
83 | attrs.Add("style=\"" + HttpUtility.HtmlAttributeEncode(string.Join(" ", cssVals)) + "\"");
84 | }
85 |
86 | return new MvcHtmlString(string.Join(" ", attrs));
87 | }
88 | }
89 |
--------------------------------------------------------------------------------
/ProjectTemplates/UmbracoPackage.1/.website/Views/Partials/Grid/Editors/Base.cshtml:
--------------------------------------------------------------------------------
1 | @model dynamic
2 | @using Umbraco.Web.Templates
3 |
4 | @functions {
5 | public static string EditorView(dynamic contentItem)
6 | {
7 | string view = contentItem.editor.render != null ? contentItem.editor.render.ToString() : contentItem.editor.view.ToString();
8 | view = view.ToLower().Replace(".html", ".cshtml");
9 |
10 | if (!view.Contains("/")) {
11 | view = "grid/editors/" + view;
12 | }
13 |
14 | return view;
15 | }
16 | }
17 | @try
18 | {
19 | string editor = EditorView(Model);
20 | @Html.Partial(editor, (object)Model)
21 | }
22 | catch (Exception ex) {
23 | @ex.ToString()
24 | }
--------------------------------------------------------------------------------
/ProjectTemplates/UmbracoPackage.1/.website/Views/Partials/Grid/Editors/Embed.cshtml:
--------------------------------------------------------------------------------
1 | @model dynamic
2 | @using Umbraco.Web.Templates
3 | @{
4 | string embedValue = Convert.ToString(Model.value);
5 | embedValue = embedValue.DetectIsJson() ? Model.value.preview : Model.value;
6 | }
7 |
8 |
9 | @Html.Raw(embedValue)
10 |
11 |
--------------------------------------------------------------------------------
/ProjectTemplates/UmbracoPackage.1/.website/Views/Partials/Grid/Editors/Macro.cshtml:
--------------------------------------------------------------------------------
1 | @inherits UmbracoViewPage
2 | @using Umbraco.Web.Templates
3 |
4 |
5 | @if (Model.value != null)
6 | {
7 | string macroAlias = Model.value.macroAlias.ToString();
8 | ViewDataDictionary parameters = new ViewDataDictionary();
9 | foreach (dynamic mpd in Model.value.macroParamsDictionary)
10 | {
11 | parameters.Add(mpd.Name, mpd.Value);
12 | }
13 |
14 |
15 | @Umbraco.RenderMacro(macroAlias, parameters)
16 |
17 | }
18 |
--------------------------------------------------------------------------------
/ProjectTemplates/UmbracoPackage.1/.website/Views/Partials/Grid/Editors/Media.cshtml:
--------------------------------------------------------------------------------
1 | @model dynamic
2 | @using Umbraco.Web.Templates
3 |
4 | @if (Model.value != null)
5 | {
6 | var url = Model.value.image;
7 | if(Model.editor.config != null && Model.editor.config.size != null){
8 | url += "?width=" + Model.editor.config.size.width;
9 | url += "&height=" + Model.editor.config.size.height;
10 |
11 | if(Model.value.focalPoint != null){
12 | url += "¢er=" + Model.value.focalPoint.top +"," + Model.value.focalPoint.left;
13 | url += "&mode=crop";
14 | }
15 | }
16 |
17 | var altText = Model.value.altText ?? Model.value.caption ?? string.Empty;
18 |
19 |
20 |
21 | if (Model.value.caption != null)
22 | {
23 | @Model.value.caption
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/ProjectTemplates/UmbracoPackage.1/.website/Views/Partials/Grid/Editors/Rte.cshtml:
--------------------------------------------------------------------------------
1 | @model dynamic
2 | @using Umbraco.Web.Composing
3 | @using Umbraco.Web.Templates
4 | @{
5 | var value = TemplateUtilities.ParseInternalLinks(Model.value.ToString(), Current.UmbracoContext.UrlProvider);
6 | value = TemplateUtilities.ResolveUrlsFromTextString(value);
7 | value = TemplateUtilities.ResolveMediaFromTextString(value);
8 | }
9 | @Html.Raw(value)
10 |
--------------------------------------------------------------------------------
/ProjectTemplates/UmbracoPackage.1/.website/Views/Partials/Grid/Editors/Textstring.cshtml:
--------------------------------------------------------------------------------
1 | @model dynamic
2 | @using Umbraco.Web.Composing
3 | @using Umbraco.Web.Templates
4 |
5 | @if (Model.editor.config.markup != null)
6 | {
7 | string markup = Model.editor.config.markup.ToString();
8 | markup = markup.Replace("#value#", Html.ReplaceLineBreaksForHtml(HttpUtility.HtmlEncode((string)Model.value.ToString())).ToString());
9 |
10 | if (Model.editor.config.style != null)
11 | {
12 | markup = markup.Replace("#style#", Model.editor.config.style.ToString());
13 | }
14 |
15 |
16 | @Html.Raw(markup)
17 |
18 | }
19 | else
20 | {
21 |
22 | @Model.value
23 |
24 | }
25 |
--------------------------------------------------------------------------------
/ProjectTemplates/UmbracoPackage.1/.website/Views/Web.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
64 |
65 |
66 |
67 |
68 |
69 |
--------------------------------------------------------------------------------
/ProjectTemplates/UmbracoPackage.1/.website/Web.Debug.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
17 |
18 |
29 |
30 |
--------------------------------------------------------------------------------
/ProjectTemplates/UmbracoPackage.1/.website/Web.Release.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
17 |
18 |
19 |
30 |
31 |
--------------------------------------------------------------------------------
/ProjectTemplates/UmbracoPackage.1/.website/config/ClientDependency.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
13 |
14 |
15 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
45 |
46 |
47 |
56 |
57 |
58 |
59 |
60 |
63 |
64 |
65 |
66 |
67 |
--------------------------------------------------------------------------------
/ProjectTemplates/UmbracoPackage.1/.website/config/HealthChecks.config:
--------------------------------------------------------------------------------
1 |
2 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/ProjectTemplates/UmbracoPackage.1/.website/config/Lang/cs-CZ.user.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/ProjectTemplates/UmbracoPackage.1/.website/config/Lang/da-DK.user.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/ProjectTemplates/UmbracoPackage.1/.website/config/Lang/de-DE.user.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/ProjectTemplates/UmbracoPackage.1/.website/config/Lang/en-GB.user.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/ProjectTemplates/UmbracoPackage.1/.website/config/Lang/en-US.user.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/ProjectTemplates/UmbracoPackage.1/.website/config/Lang/es-ES.user.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/ProjectTemplates/UmbracoPackage.1/.website/config/Lang/fr-FR.user.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/ProjectTemplates/UmbracoPackage.1/.website/config/Lang/he-IL.user.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/ProjectTemplates/UmbracoPackage.1/.website/config/Lang/it-IT.user.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/ProjectTemplates/UmbracoPackage.1/.website/config/Lang/ja-JP.user.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/ProjectTemplates/UmbracoPackage.1/.website/config/Lang/ko-KR.user.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/ProjectTemplates/UmbracoPackage.1/.website/config/Lang/nb-NO.user.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/ProjectTemplates/UmbracoPackage.1/.website/config/Lang/nl-NL.user.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/ProjectTemplates/UmbracoPackage.1/.website/config/Lang/pl-PL.user.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/ProjectTemplates/UmbracoPackage.1/.website/config/Lang/pt-BR.user.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/ProjectTemplates/UmbracoPackage.1/.website/config/Lang/ru-RU.user.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/ProjectTemplates/UmbracoPackage.1/.website/config/Lang/sv-SE.user.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/ProjectTemplates/UmbracoPackage.1/.website/config/Lang/zh-CN.user.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/ProjectTemplates/UmbracoPackage.1/.website/config/grid.editors.config.js:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "name": "Rich text editor",
4 | "alias": "rte",
5 | "view": "rte",
6 | "icon": "icon-article"
7 | },
8 | {
9 | "name": "Image",
10 | "nameTemplate": "{{ value && value.udi ? (value.udi | ncNodeName) : '' }}",
11 | "alias": "media",
12 | "view": "media",
13 | "icon": "icon-picture"
14 | },
15 | {
16 | "name": "Macro",
17 | "nameTemplate": "{{ value && value.macroAlias ? value.macroAlias : '' }}",
18 | "alias": "macro",
19 | "view": "macro",
20 | "icon": "icon-settings-alt"
21 | },
22 | {
23 | "name": "Embed",
24 | "alias": "embed",
25 | "view": "embed",
26 | "icon": "icon-movie-alt"
27 | },
28 | {
29 | "name": "Headline",
30 | "nameTemplate": "{{ value }}",
31 | "alias": "headline",
32 | "view": "textstring",
33 | "icon": "icon-coin",
34 | "config": {
35 | "style": "font-size: 36px; line-height: 45px; font-weight: bold",
36 | "markup": "#value# "
37 | }
38 | },
39 | {
40 | "name": "Quote",
41 | "nameTemplate": "{{ value ? value.substring(0,32) + (value.length > 32 ? '...' : '') : '' }}",
42 | "alias": "quote",
43 | "view": "textstring",
44 | "icon": "icon-quote",
45 | "config": {
46 | "style": "border-left: 3px solid #ccc; padding: 10px; color: #ccc; font-family: serif; font-style: italic; font-size: 18px",
47 | "markup": "#value# "
48 | }
49 | }
50 | ]
51 |
--------------------------------------------------------------------------------
/ProjectTemplates/UmbracoPackage.1/.website/config/imageprocessor/cache.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/ProjectTemplates/UmbracoPackage.1/.website/config/imageprocessor/processing.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
--------------------------------------------------------------------------------
/ProjectTemplates/UmbracoPackage.1/.website/config/imageprocessor/security.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/ProjectTemplates/UmbracoPackage.1/.website/config/logviewer.searches.config.js:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "name": "Find all logs where the Level is NOT Verbose and NOT Debug",
4 | "query": "Not(@Level='Verbose') and Not(@Level='Debug')"
5 | },
6 | {
7 | "name": "Find all logs that has an exception property (Warning, Error & Fatal with Exceptions)",
8 | "query": "Has(@Exception)"
9 | },
10 | {
11 | "name": "Find all logs that have the property 'Duration'",
12 | "query": "Has(Duration)"
13 | },
14 | {
15 | "name": "Find all logs that have the property 'Duration' and the duration is greater than 1000ms",
16 | "query": "Has(Duration) and Duration > 1000"
17 | },
18 | {
19 | "name": "Find all logs that are from the namespace 'Umbraco.Core'",
20 | "query": "StartsWith(SourceContext, 'Umbraco.Core')"
21 | },
22 | {
23 | "name": "Find all logs that use a specific log message template",
24 | "query": "@MessageTemplate = '[Timing {TimingId}] {EndMessage} ({TimingDuration}ms)'"
25 | },
26 | {
27 | "name": "Find logs where one of the items in the SortedComponentTypes property array is equal to",
28 | "query": "SortedComponentTypes[?] = 'Umbraco.Web.Search.ExamineComponent'"
29 | },
30 | {
31 | "name": "Find logs where one of the items in the SortedComponentTypes property array contains",
32 | "query": "Contains(SortedComponentTypes[?], 'DatabaseServer')"
33 | },
34 | {
35 | "name": "Find all logs that the message has localhost in it with SQL like",
36 | "query": "@Message like '%localhost%'"
37 | },
38 | {
39 | "name": "Find all logs that the message that starts with 'end' in it with SQL like",
40 | "query": "@Message like 'end%'"
41 | }
42 | ]
43 |
--------------------------------------------------------------------------------
/ProjectTemplates/UmbracoPackage.1/.website/config/serilog.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
--------------------------------------------------------------------------------
/ProjectTemplates/UmbracoPackage.1/.website/config/serilog.user.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
15 |
16 |
17 |
20 |
21 |
22 |
28 |
29 |
30 |
31 |
32 |
33 |
37 |
38 |
39 |
40 |
--------------------------------------------------------------------------------
/ProjectTemplates/UmbracoPackage.1/.website/config/splashes/noNodes.aspx:
--------------------------------------------------------------------------------
1 | <%@ Page Language="C#" AutoEventWireup="True" Inherits="Umbraco.Web.UI.Config.Splashes.NoNodes" CodeBehind="NoNodes.aspx.cs" %>
2 | <%@ Import Namespace="Umbraco.Core.Configuration" %>
3 | <%@ Import Namespace="Umbraco.Core.IO" %>
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
Welcome to your Umbraco installation
30 |
You're seeing this wonderful page because your website doesn't contain any published content yet.
31 |
32 |
35 |
36 |
37 |
38 |
39 |
Easy start with Umbraco.tv
40 |
We have created a bunch of 'how-to' videos, to get you easily started with Umbraco. Learn how to build projects in just a couple of minutes. Easiest CMS in the world.
41 |
42 |
Umbraco.tv →
43 |
44 |
45 |
46 |
Be a part of the community
47 |
The Umbraco community is the best of its kind, be sure to visit, and if you have any questions, we're sure that you can get your answers from the community.
48 |
49 |
our.Umbraco →
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
--------------------------------------------------------------------------------
/ProjectTemplates/UmbracoPackage.1/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2020 Umbraco Package Team
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/ProjectTemplates/UmbracoPackage.1/UmbracoPackage.1.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio Version 16
4 | VisualStudioVersion = 16.0.30128.74
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UmbracoPackage.1.Site", ".website\UmbracoPackage.1.Site.csproj", "{004F67C2-9A9E-49C3-8925-A55099E47D41}"
7 | EndProject
8 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "UmbracoPackage.1", "src\UmbracoPackage.1\UmbracoPackage.1.csproj", "{F002C1EA-C083-4C69-878C-C1875385E534}"
9 | EndProject
10 | Global
11 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
12 | Debug|Any CPU = Debug|Any CPU
13 | Release|Any CPU = Release|Any CPU
14 | EndGlobalSection
15 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
16 | {004F67C2-9A9E-49C3-8925-A55099E47D41}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
17 | {004F67C2-9A9E-49C3-8925-A55099E47D41}.Debug|Any CPU.Build.0 = Debug|Any CPU
18 | {004F67C2-9A9E-49C3-8925-A55099E47D41}.Release|Any CPU.ActiveCfg = Release|Any CPU
19 | {004F67C2-9A9E-49C3-8925-A55099E47D41}.Release|Any CPU.Build.0 = Release|Any CPU
20 | {F002C1EA-C083-4C69-878C-C1875385E534}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
21 | {F002C1EA-C083-4C69-878C-C1875385E534}.Debug|Any CPU.Build.0 = Debug|Any CPU
22 | {F002C1EA-C083-4C69-878C-C1875385E534}.Release|Any CPU.ActiveCfg = Release|Any CPU
23 | {F002C1EA-C083-4C69-878C-C1875385E534}.Release|Any CPU.Build.0 = Release|Any CPU
24 | EndGlobalSection
25 | GlobalSection(SolutionProperties) = preSolution
26 | HideSolutionNode = FALSE
27 | EndGlobalSection
28 | GlobalSection(ExtensibilityGlobals) = postSolution
29 | SolutionGuid = {0A4335E4-0198-4777-9409-64E22F1F8F2C}
30 | EndGlobalSection
31 | EndGlobal
32 |
--------------------------------------------------------------------------------
/ProjectTemplates/UmbracoPackage.1/gulpfile.js:
--------------------------------------------------------------------------------
1 | ///
2 | //
3 | const { watch, src, dest } = require('gulp');
4 | var config = require('./paths.json');
5 |
6 | /*
7 | * app_plugin and build script.
8 | */
9 |
10 | const appPluginPath = '/App_Plugins/' + config.pluginFolder;
11 |
12 | const appPlugin = {
13 | source : config.library + appPluginPath + '/**/*',
14 | src : config.library + appPluginPath + '/',
15 | dest : config.site + appPluginPath
16 | }
17 |
18 |
19 | /*
20 | * Copys files from app_plugins folder in a library
21 | * project into a test site.
22 | *
23 | * Your paths.config should look like:
24 | *
25 | * {
26 | * "library": "myPackage.LibraryName",
27 | * "pluginFolder": "MyPackageFolder",
28 | * "site" : "../Sandbox.Site"
29 | * }
30 | *
31 | * This will run in the background, so you don't need
32 | * to rebuild your project when working on script files.
33 | */
34 |
35 | function copy(path, baseFolder, target) {
36 |
37 | console.log('copy: \x1b[36m%s\x1b[0m %s', path, target);
38 |
39 | return src(path, { base: baseFolder })
40 | .pipe(dest(target));
41 | }
42 |
43 |
44 | function watchAppPlugins() {
45 |
46 | console.log()
47 | console.log('Watching : ' + appPlugin.source);
48 | console.log('Target : ' + appPlugin.dest);
49 |
50 | watch(appPlugin.source, { ignoreInitial: false })
51 | .on('change', function (path, stats) {
52 | copy(path, appPlugin.src, appPlugin.dest)
53 | })
54 | .on('add', function (path, stats) {
55 | copy(path, appPlugin.src, appPlugin.dest)
56 | });
57 | }
58 |
59 | exports.default = function () {
60 | watchAppPlugins();
61 | };
--------------------------------------------------------------------------------
/ProjectTemplates/UmbracoPackage.1/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "pkgtemplate",
3 | "version": "1.0.0",
4 | "description": "gulp script to manage file copies",
5 | "main": "index.js",
6 | "scripts": {
7 | "test": "echo \"Error: no test specified\" && exit 1"
8 | },
9 | "author": "Umbraco Collaborators",
10 | "license": "ISC",
11 | "private": true,
12 | "devDependencies": {
13 | "gulp": "^4.0.2"
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/ProjectTemplates/UmbracoPackage.1/package.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | UmbracoPackage.1
6 | 1.0.0
7 |
8 | MIT
9 | https://our.umbraco.com
10 |
11 | 8
12 | 0
13 | 0
14 |
15 |
16 |
17 | UmbracoPackageTeam
18 | https://our.umbraco.com
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
--------------------------------------------------------------------------------
/ProjectTemplates/UmbracoPackage.1/paths.json:
--------------------------------------------------------------------------------
1 | {
2 | "library": "src/UmbracoPackage.1",
3 | "pluginFolder": "UmbracoPackage.1",
4 | "site": ".website"
5 | }
6 |
--------------------------------------------------------------------------------
/ProjectTemplates/UmbracoPackage.1/readme.md:
--------------------------------------------------------------------------------
1 | # UmbracoPackage.1
2 | Another awesome umbraco package.
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/ProjectTemplates/UmbracoPackage.1/src/UmbracoPackage.1.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio Version 16
4 | VisualStudioVersion = 16.0.30128.74
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "UmbracoPackage.1", "UmbracoPackage.1\UmbracoPackage.1.csproj", "{6D0A96C6-152F-4268-8B09-EC5978833B37}"
7 | EndProject
8 | Global
9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
10 | Debug|Any CPU = Debug|Any CPU
11 | Release|Any CPU = Release|Any CPU
12 | EndGlobalSection
13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
14 | {6D0A96C6-152F-4268-8B09-EC5978833B37}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15 | {6D0A96C6-152F-4268-8B09-EC5978833B37}.Debug|Any CPU.Build.0 = Debug|Any CPU
16 | {6D0A96C6-152F-4268-8B09-EC5978833B37}.Release|Any CPU.ActiveCfg = Release|Any CPU
17 | {6D0A96C6-152F-4268-8B09-EC5978833B37}.Release|Any CPU.Build.0 = Release|Any CPU
18 | EndGlobalSection
19 | GlobalSection(SolutionProperties) = preSolution
20 | HideSolutionNode = FALSE
21 | EndGlobalSection
22 | GlobalSection(ExtensibilityGlobals) = postSolution
23 | SolutionGuid = {D0A3D888-4280-4B78-9E1E-91C0280FF009}
24 | EndGlobalSection
25 | EndGlobal
26 |
--------------------------------------------------------------------------------
/ProjectTemplates/UmbracoPackage.1/src/UmbracoPackage.1/App_Plugins/UmbracoPackage.1/ContentApp/Lang/en.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | UmbracoPackage.1 super content app
5 | My super awesome content app
6 |
7 |
--------------------------------------------------------------------------------
/ProjectTemplates/UmbracoPackage.1/src/UmbracoPackage.1/App_Plugins/UmbracoPackage.1/ContentApp/contentapp.controller.js:
--------------------------------------------------------------------------------
1 | /**
2 | * @ngdoc
3 | *
4 | * @name: contentAppController
5 | * @description: code for a content app in the umbraco back office
6 | *
7 | */
8 | (function () {
9 | 'use strict';
10 |
11 | function contentAppController() {
12 |
13 | var vm = this;
14 | vm.loading = true;
15 | vm.message = "";
16 |
17 | function init() {
18 | getInfo();
19 | }
20 |
21 | function getInfo() {
22 | vm.message = "Content App init() has run";
23 | vm.loading = false;
24 | }
25 |
26 | // call init, when controller is loaded
27 | init();
28 | }
29 |
30 | angular.module('umbraco')
31 | .controller('umbracopackage__1ContentAppController', contentAppController);
32 | })();
--------------------------------------------------------------------------------
/ProjectTemplates/UmbracoPackage.1/src/UmbracoPackage.1/App_Plugins/UmbracoPackage.1/ContentApp/contentapp.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
9 |
10 |
11 | {{vm.message}}
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/ProjectTemplates/UmbracoPackage.1/src/UmbracoPackage.1/App_Plugins/UmbracoPackage.1/ContentApp/package.manifest:
--------------------------------------------------------------------------------
1 | {
2 | "javascript": [
3 | "~/App_Plugins/UmbracoPackage.1/ContentApp/contentapp.controller.js"
4 | ],
5 | "contentApps": [
6 | {
7 | "name": "My App", // required - the name that appears under the icon
8 | "alias": "umbracopackage._1-contentapp", // required - unique alias for your app
9 | "weight": 0, // optional, default is 0, use values between -99 and +99 to appear between the existing Content (-100) and Info (100) apps
10 | "icon": "icon-cupcake", // required - the icon to use
11 | "view": "~/App_Plugins/UmbracoPackage.1/ContentApp/contentapp.html" // required - the location of the view file
12 | }
13 | ]
14 | }
--------------------------------------------------------------------------------
/ProjectTemplates/UmbracoPackage.1/src/UmbracoPackage.1/App_Plugins/UmbracoPackage.1/Dashboard/Lang/en.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | UmbracoPackage.1 super dashboard
5 | My super awesome dashboard
6 |
7 |
8 | UmbracoPackage.1
9 |
10 |
11 |
--------------------------------------------------------------------------------
/ProjectTemplates/UmbracoPackage.1/src/UmbracoPackage.1/App_Plugins/UmbracoPackage.1/Dashboard/dashboard.controller.js:
--------------------------------------------------------------------------------
1 | /**
2 | * @ngdoc
3 | *
4 | * @name: dashboardController
5 | * @description: code for a dashboard in the umbraco back office
6 | *
7 | */
8 | (function () {
9 | 'use strict';
10 |
11 | function dashboardController($scope,
12 | notificationsService,
13 | umbracopackage__1DashboardService) {
14 |
15 | var vm = this;
16 | vm.loading = true;
17 | vm.info = {};
18 |
19 | function init() {
20 | getServerInfo();
21 | }
22 |
23 | // ask the server what version it is and what time it things it is.
24 | function getServerInfo() {
25 | umbracopackage__1DashboardService.getServerInfo()
26 | .then(function (result) {
27 | vm.info = result.data;
28 | vm.loading = false;
29 | }, function (error) {
30 | console.warn(error);
31 | notificationsService.error('Error', 'Unable to get the server info');
32 | });
33 | }
34 |
35 | // call init, when controller is loaded
36 | init();
37 | }
38 |
39 | angular.module('umbraco')
40 | .controller('umbracopackage__1DashboardController', dashboardController);
41 | })();
42 |
--------------------------------------------------------------------------------
/ProjectTemplates/UmbracoPackage.1/src/UmbracoPackage.1/App_Plugins/UmbracoPackage.1/Dashboard/dashboard.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
9 |
10 |
11 | Umbraco Version: {{vm.info.status}}
12 | Server Time : {{vm.info.time | date:'medium'}}
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/ProjectTemplates/UmbracoPackage.1/src/UmbracoPackage.1/App_Plugins/UmbracoPackage.1/Dashboard/dashboard.service.js:
--------------------------------------------------------------------------------
1 | /**
2 | * @ngdoc
3 | *
4 | * @name: dashboardService
5 | * @description: provides an interface between the javascript dashboard and our
6 | * backoffice api.
7 | */
8 | (function () {
9 | 'use strict';
10 |
11 | function dashboardService($http) {
12 |
13 | var serviceRoot = Umbraco.Sys.ServerVariables.umbracopackage__1.dashboardController;
14 |
15 | return {
16 | getServerInfo: getServerInfo
17 | }
18 |
19 | /////
20 |
21 | function getServerInfo() {
22 | return $http.get(serviceRoot + "GetServerInfo");
23 | }
24 | };
25 |
26 | angular.module('umbraco')
27 | .factory('umbracopackage__1DashboardService', dashboardService);
28 | })();
--------------------------------------------------------------------------------
/ProjectTemplates/UmbracoPackage.1/src/UmbracoPackage.1/App_Plugins/UmbracoPackage.1/Dashboard/package.manifest:
--------------------------------------------------------------------------------
1 | {
2 | "javascript": [
3 | "~/App_Plugins/UmbracoPackage.1/dashboard/dashboard.service.js",
4 | "~/App_Plugins/UmbracoPackage.1/dashboard/dashboard.controller.js"
5 | ],
6 | "dashboards": [
7 | {
8 | "alias": "umbracopackage._1-dashboard",
9 | "sections": [
10 | "content"
11 | ],
12 | "view": "~/App_Plugins/UmbracoPackage.1/dashboard/dashboard.html"
13 | }
14 | ]
15 | }
--------------------------------------------------------------------------------
/ProjectTemplates/UmbracoPackage.1/src/UmbracoPackage.1/App_Plugins/UmbracoPackage.1/PropertyEditor/editor.controller.js:
--------------------------------------------------------------------------------
1 | /**
2 | * @ngdoc
3 | *
4 | * @name: editorController
5 | * @description: code for a property editor in the umbraco back office
6 | *
7 | */
8 | (function () {
9 | 'use strict';
10 |
11 | function editorController() {
12 |
13 | var vm = this;
14 |
15 | function init() {
16 | }
17 |
18 | // call init, when controller is loaded
19 | init();
20 | }
21 |
22 | angular.module('umbraco')
23 | .controller('umbracopackage__1EditorController', editorController);
24 | })();
--------------------------------------------------------------------------------
/ProjectTemplates/UmbracoPackage.1/src/UmbracoPackage.1/App_Plugins/UmbracoPackage.1/PropertyEditor/editor.html:
--------------------------------------------------------------------------------
1 |
2 |
Add your markup here
3 |
--------------------------------------------------------------------------------
/ProjectTemplates/UmbracoPackage.1/src/UmbracoPackage.1/App_Plugins/UmbracoPackage.1/PropertyEditor/package.manifest:
--------------------------------------------------------------------------------
1 | {
2 | "javascript": [
3 | "~/App_Plugins/UmbracoPackage.1/PropertyEditor/editor.controller.js"
4 | ],
5 | "propertyEditors": [
6 | {
7 | /*this must be a unique alias*/
8 | "alias": "umbracopackage._1-editor",
9 | /*the name*/
10 | "name": "My editor",
11 | /*the icon*/
12 | "icon": "icon-code",
13 | /*grouping for "Select editor" dialog*/
14 | "group": "Rich Content",
15 | /*the HTML file we will load for the editor*/
16 | "editor": {
17 | "view": "~/App_Plugins/UmbracoPackage.1/PropertyEditor/editor.html"
18 | }
19 | }
20 | ]
21 | }
--------------------------------------------------------------------------------
/ProjectTemplates/UmbracoPackage.1/src/UmbracoPackage.1/App_Plugins/UmbracoPackage.1/package.manifest:
--------------------------------------------------------------------------------
1 | {
2 | "javascript": [],
3 | "css": []
4 | }
5 |
--------------------------------------------------------------------------------
/ProjectTemplates/UmbracoPackage.1/src/UmbracoPackage.1/Controllers/DashboardComponent.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 | using System.Web;
7 | using System.Web.Mvc;
8 | using System.Web.Routing;
9 |
10 | using Umbraco.Core.Composing;
11 | using Umbraco.Web;
12 | using Umbraco.Web.JavaScript;
13 |
14 | namespace UmbracoPackage._1.Controllers
15 | {
16 | [RuntimeLevel(MinLevel = Umbraco.Core.RuntimeLevel.Run)]
17 | public class DashboardComposer : ComponentComposer
18 | { }
19 |
20 | public class DashboardComponent : IComponent
21 | {
22 | public void Initialize()
23 | {
24 | ServerVariablesParser.Parsing += ServerVariablesParser_Parsing;
25 | }
26 |
27 | private void ServerVariablesParser_Parsing(object sender, Dictionary e)
28 | {
29 | if (HttpContext.Current == null) throw new InvalidOperationException("HttpContext is null");
30 | var urlHelper = new UrlHelper(new RequestContext(new HttpContextWrapper(HttpContext.Current), new RouteData()));
31 |
32 | e["umbracopackage__1"] = new Dictionary()
33 | {
34 | { "dashboardController", urlHelper.GetUmbracoApiServiceBaseUrl(controller => controller.GetApi()) }
35 | };
36 | }
37 |
38 | public void Terminate()
39 | {
40 |
41 | }
42 | }
43 | }
44 |
--------------------------------------------------------------------------------
/ProjectTemplates/UmbracoPackage.1/src/UmbracoPackage.1/Controllers/DashboardController.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Reflection;
5 | using System.Text;
6 | using System.Threading.Tasks;
7 | using System.Web.Mvc;
8 |
9 | using ClientDependency.Core;
10 | using Newtonsoft.Json;
11 | using Newtonsoft.Json.Serialization;
12 | using NPoco.Expressions;
13 |
14 | using Umbraco.Core.Configuration;
15 | using Umbraco.Web.Mvc;
16 | using Umbraco.Web.WebApi;
17 |
18 | namespace UmbracoPackage._1.Controllers
19 | {
20 | public class DashboardApiController : UmbracoAuthorizedApiController
21 | {
22 | ///
23 | /// GetApi - Called in our ServerVariablesParser.Parsing event handler
24 | /// this gets the URL of this API, so we don't have to hardwire it anywhere
25 | ///
26 | [HttpGet]
27 | public bool GetApi() => true;
28 |
29 |
30 | ///
31 | /// Simple call return the time,
32 | ///
33 | ///
34 | [HttpGet]
35 | public Object GetServerInfo()
36 | {
37 | return new
38 | {
39 | status = GlobalSettings.ConfigurationStatus,
40 | time = DateTime.Now
41 | };
42 | }
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/ProjectTemplates/UmbracoPackage.1/src/UmbracoPackage.1/UmbracoPackage.1.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | net472
5 | UmbracoPackage._1
6 |
7 | true
8 | content
9 |
10 |
11 |
12 | bin\output\
13 | false
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/ProjectTemplates/UmbracoSite.1/.gitattributes:
--------------------------------------------------------------------------------
1 | # Auto detect text files and perform LF normalization
2 | * text=auto
3 |
4 | # Custom for Visual Studio
5 | *.cs diff=csharp
6 |
7 | # Standard to msysgit
8 | *.doc diff=astextplain
9 | *.DOC diff=astextplain
10 | *.docx diff=astextplain
11 | *.DOCX diff=astextplain
12 | *.dot diff=astextplain
13 | *.DOT diff=astextplain
14 | *.pdf diff=astextplain
15 | *.PDF diff=astextplain
16 | *.rtf diff=astextplain
17 | *.RTF diff=astextplain
18 |
--------------------------------------------------------------------------------
/ProjectTemplates/UmbracoSite.1/.template.config/package_team.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/umbraco/Package.Templates/782625ea765051c640b806cad8f2c7a34b30daaa/ProjectTemplates/UmbracoSite.1/.template.config/package_team.png
--------------------------------------------------------------------------------
/ProjectTemplates/UmbracoSite.1/.template.config/template.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "https://json.schemastore.org/template",
3 | "author": "Umbraco Community",
4 | "classifications": [
5 | "Web",
6 | "Umbraco",
7 | "v8"
8 | ],
9 | "tags": {
10 | "language": "C#",
11 | "type": "project"
12 | },
13 |
14 | "identity": "Umbraco.Template.Site",
15 |
16 | "name": "Umbraco Site Empty",
17 | "shortName": "umbraco-v8-site",
18 | "description": "An empty Umbraco site for testing an Umbraco package.",
19 |
20 | "sourceName": "UmbracoSite.1",
21 | "defaultName": "UmbracoSite1",
22 |
23 | "sources": [
24 | {
25 | "exclude": [
26 | "**/[Bb]in/**",
27 | "**/[Oo]bj/**",
28 | ".template.config/**/*",
29 | "**/*.filelist",
30 | "**/*.user",
31 | "**/*.lock.json",
32 | "**/umbraco/**",
33 | "**/node_modules/**"
34 | ]
35 | }
36 | ],
37 |
38 | "preferNameDirectory": true,
39 |
40 | "symbols": {
41 | "siteguid" : {
42 | "type": "generated",
43 | "generator": "guid",
44 | "replaces": "B56F26F4-09D7-48AF-947D-66DEEE1A024B",
45 | "parameters": {
46 | "format": "D"
47 | }
48 | },
49 | "sitePort" : {
50 | "type" : "generated",
51 | "generator": "random",
52 | "replaces": "44321",
53 | "parameters": {
54 | "low": 44300,
55 | "high" :44399
56 | }
57 | },
58 | "Restore" :{
59 | "type": "parameter",
60 | "datatype":"bool",
61 | "defaultValue": "false",
62 | "description": "Restore NuGet and NPM Modules"
63 | }
64 | },
65 |
66 |
67 | "postActions": [
68 | {
69 | "condition": "(Restore)",
70 | "actionId": "210D431B-A78B-4D2F-B762-4ED3E3EA9025",
71 | "description": "Restore Nuget Packages Required by this project.",
72 | "manualInstructions": [
73 | { "text": "Run 'dotnet restore'" }
74 | ],
75 | "continueOnError": true
76 | },
77 | {
78 | "condition": "(Restore)",
79 | "description": "Run npm install",
80 | "manualInstructions": [{"text": "Run 'npm install'"}],
81 | "actionId" :"3A7C4B45-1F5D-4A30-959A-51B88E82B5D2",
82 | "args": {
83 | "executable": "cmd.exe",
84 | "args": "/c npm install"
85 | }
86 | }
87 | ]
88 | }
89 |
--------------------------------------------------------------------------------
/ProjectTemplates/UmbracoSite.1/.template.config/vs-2017.3.host.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "http://json.schemastore.org/vs-2017.3.host",
3 | "icon": "package_team.png"
4 | }
--------------------------------------------------------------------------------
/ProjectTemplates/UmbracoSite.1/gulpfile.js:
--------------------------------------------------------------------------------
1 | ///
2 | //
3 | const { watch, src, dest } = require('gulp');
4 | var config = require('./paths.json');
5 |
6 | /*
7 | * app_plugin and build script.
8 | */
9 |
10 | const appPluginPath = '/App_Plugins';
11 |
12 | const appPlugin = {
13 | source : config.library + appPluginPath + '/**/*',
14 | src : config.library + appPluginPath + '/',
15 | dest : config.site + appPluginPath
16 | }
17 |
18 |
19 | /*
20 | * Copys files from app_plugins folder in a library
21 | * project into a test site.
22 | *
23 | * Your paths.config should look like:
24 | *
25 | * {
26 | * "library": "myPackage.LibraryName",
27 | * "site" : "../Sandbox.Site"
28 | * }
29 | *
30 | * This will run in the background, so you don't need
31 | * to rebuild your project when working on script files.
32 | */
33 |
34 | function copy(path, baseFolder, target) {
35 |
36 | console.log('copy: \x1b[36m%s\x1b[0m %s', path, target);
37 |
38 | return src(path, { base: baseFolder })
39 | .pipe(dest(target));
40 | }
41 |
42 |
43 | function watchAppPlugins() {
44 |
45 | console.log()
46 | console.log('Watching : ' + appPlugin.source);
47 | console.log('Target : ' + appPlugin.dest);
48 |
49 | watch(appPlugin.source, { ignoreInitial: false })
50 | .on('change', function (path, stats) {
51 | copy(path, appPlugin.src, appPlugin.dest)
52 | })
53 | .on('add', function (path, stats) {
54 | copy(path, appPlugin.src, appPlugin.dest)
55 | });
56 | }
57 |
58 | exports.default = function () {
59 | watchAppPlugins();
60 | };
--------------------------------------------------------------------------------
/ProjectTemplates/UmbracoSite.1/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "pkgtemplate",
3 | "version": "1.0.0",
4 | "description": "gulp script to manage file copies",
5 | "main": "index.js",
6 | "scripts": {
7 | "test": "echo \"Error: no test specified\" && exit 1"
8 | },
9 | "author": "Umbraco Collaborators",
10 | "license": "ISC",
11 | "private": true,
12 | "devDependencies": {
13 | "gulp": "^4.0.2"
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/ProjectTemplates/UmbracoSite.1/paths.json:
--------------------------------------------------------------------------------
1 | {
2 | "library": "src/UmbracoSite.1.Library",
3 | "site": "src/UmbracoSite.1.Site"
4 | }
5 |
--------------------------------------------------------------------------------
/ProjectTemplates/UmbracoSite.1/src/UmbracoSite.1.Library/App_Plugins/-.-:
--------------------------------------------------------------------------------
1 | Placeholder
--------------------------------------------------------------------------------
/ProjectTemplates/UmbracoSite.1/src/UmbracoSite.1.Library/UmbracoSite.1.Library.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | net472
5 | UmbracoSite._1.Library
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/ProjectTemplates/UmbracoSite.1/src/UmbracoSite.1.Site/Global.asax:
--------------------------------------------------------------------------------
1 | <%@ Application Inherits="Umbraco.Web.UmbracoApplication" Language="C#" %>
2 |
--------------------------------------------------------------------------------
/ProjectTemplates/UmbracoSite.1/src/UmbracoSite.1.Site/Media/Web.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/ProjectTemplates/UmbracoSite.1/src/UmbracoSite.1.Site/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle("UmbracoSite._1.Site")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("UmbracoSite._1.Site")]
13 | [assembly: AssemblyCopyright("Copyright © 2020")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Setting ComVisible to false makes the types in this assembly not visible
18 | // to COM components. If you need to access a type in this assembly from
19 | // COM, set the ComVisible attribute to true on that type.
20 | [assembly: ComVisible(false)]
21 |
22 | // The following GUID is for the ID of the typelib if this project is exposed to COM
23 | [assembly: Guid("b56f26f4-09d7-48af-947d-66deee1a024b")]
24 |
25 | // Version information for an assembly consists of the following four values:
26 | //
27 | // Major Version
28 | // Minor Version
29 | // Build Number
30 | // Revision
31 | //
32 | // You can specify all the values or you can default the Revision and Build Numbers
33 | // by using the '*' as shown below:
34 | [assembly: AssemblyVersion("1.0.0.0")]
35 | [assembly: AssemblyFileVersion("1.0.0.0")]
36 |
--------------------------------------------------------------------------------
/ProjectTemplates/UmbracoSite.1/src/UmbracoSite.1.Site/Views/Partials/Grid/Bootstrap3-Fluid.cshtml:
--------------------------------------------------------------------------------
1 | @inherits UmbracoViewPage
2 | @using Umbraco.Web.Templates
3 | @using Newtonsoft.Json.Linq
4 |
5 | @*
6 | Razor helpers located at the bottom of this file
7 | *@
8 |
9 | @if (Model != null && Model.sections != null)
10 | {
11 | var oneColumn = ((System.Collections.ICollection)Model.sections).Count == 1;
12 |
13 |
14 | @if (oneColumn)
15 | {
16 | foreach (var section in Model.sections) {
17 |
18 | @foreach (var row in section.rows) {
19 | @renderRow(row);
20 | }
21 |
22 | }
23 | }else {
24 |
25 | @foreach (var s in Model.sections) {
26 |
27 |
28 | @foreach (var row in s.rows) {
29 | @renderRow(row);
30 | }
31 |
32 |
33 | }
34 |
35 | }
36 |
37 | }
38 |
39 | @helper renderRow(dynamic row){
40 |
41 |
42 | @foreach ( var area in row.areas ) {
43 |
44 |
45 | @foreach (var control in area.controls) {
46 | if (control !=null && control.editor != null && control.editor.view != null ) {
47 | @Html.Partial("grid/editors/base", (object)control)
48 | }
49 | }
50 |
51 |
}
52 |
53 |
54 | }
55 |
56 | @functions {
57 | public static MvcHtmlString RenderElementAttributes(dynamic contentItem)
58 | {
59 | var attrs = new List();
60 | JObject cfg = contentItem.config;
61 |
62 | if(cfg != null)
63 | foreach (JProperty property in cfg.Properties())
64 | {
65 | var propertyValue = HttpUtility.HtmlAttributeEncode(property.Value.ToString());
66 | attrs.Add(property.Name + "=\"" + propertyValue + "\"");
67 | }
68 |
69 | JObject style = contentItem.styles;
70 |
71 | if (style != null) {
72 | var cssVals = new List();
73 | foreach (JProperty property in style.Properties())
74 | {
75 | var propertyValue = property.Value.ToString();
76 | if (string.IsNullOrWhiteSpace(propertyValue) == false)
77 | {
78 | cssVals.Add(property.Name + ":" + propertyValue + ";");
79 | }
80 | }
81 |
82 | if (cssVals.Any())
83 | attrs.Add("style='" + HttpUtility.HtmlAttributeEncode(string.Join(" ", cssVals)) + "'");
84 | }
85 |
86 | return new MvcHtmlString(string.Join(" ", attrs));
87 | }
88 | }
--------------------------------------------------------------------------------
/ProjectTemplates/UmbracoSite.1/src/UmbracoSite.1.Site/Views/Partials/Grid/Bootstrap3.cshtml:
--------------------------------------------------------------------------------
1 | @inherits UmbracoViewPage
2 | @using Umbraco.Web.Templates
3 | @using Newtonsoft.Json.Linq
4 |
5 | @if (Model != null && Model.sections != null)
6 | {
7 | var oneColumn = ((System.Collections.ICollection)Model.sections).Count == 1;
8 |
9 |
10 | @if (oneColumn)
11 | {
12 | foreach (var section in Model.sections) {
13 |
14 | @foreach (var row in section.rows) {
15 | @renderRow(row, true);
16 | }
17 |
18 | }
19 | }else {
20 |
21 |
22 | @foreach (var s in Model.sections) {
23 |
24 |
25 | @foreach (var row in s.rows) {
26 | @renderRow(row, false);
27 | }
28 |
29 |
30 | }
31 |
32 |
33 | }
34 |
35 | }
36 |
37 | @helper renderRow(dynamic row, bool singleColumn){
38 |
39 | @Html.If(singleColumn, "
")
40 |
41 | @foreach ( var area in row.areas ) {
42 |
43 |
44 | @foreach (var control in area.controls) {
45 | if (control !=null && control.editor != null && control.editor.view != null ) {
46 | @Html.Partial("grid/editors/base", (object)control)
47 | }
48 | }
49 |
50 |
}
51 |
52 | @Html.If(singleColumn, "
")
53 |
54 | }
55 |
56 | @functions {
57 | public static MvcHtmlString RenderElementAttributes(dynamic contentItem)
58 | {
59 | var attrs = new List();
60 | JObject cfg = contentItem.config;
61 |
62 | if(cfg != null)
63 | foreach (JProperty property in cfg.Properties())
64 | {
65 | var propertyValue = HttpUtility.HtmlAttributeEncode(property.Value.ToString());
66 | attrs.Add(property.Name + "=\"" + propertyValue + "\"");
67 | }
68 |
69 | JObject style = contentItem.styles;
70 |
71 | if (style != null) {
72 | var cssVals = new List();
73 | foreach (JProperty property in style.Properties())
74 | {
75 | var propertyValue = property.Value.ToString();
76 | if (string.IsNullOrWhiteSpace(propertyValue) == false)
77 | {
78 | cssVals.Add(property.Name + ":" + propertyValue + ";");
79 | }
80 | }
81 |
82 | if (cssVals.Any())
83 | attrs.Add("style=\"" + HttpUtility.HtmlAttributeEncode(string.Join(" ", cssVals)) + "\"");
84 | }
85 |
86 | return new MvcHtmlString(string.Join(" ", attrs));
87 | }
88 | }
89 |
--------------------------------------------------------------------------------
/ProjectTemplates/UmbracoSite.1/src/UmbracoSite.1.Site/Views/Partials/Grid/Editors/Base.cshtml:
--------------------------------------------------------------------------------
1 | @model dynamic
2 | @using Umbraco.Web.Templates
3 |
4 | @functions {
5 | public static string EditorView(dynamic contentItem)
6 | {
7 | string view = contentItem.editor.render != null ? contentItem.editor.render.ToString() : contentItem.editor.view.ToString();
8 | view = view.ToLower().Replace(".html", ".cshtml");
9 |
10 | if (!view.Contains("/")) {
11 | view = "grid/editors/" + view;
12 | }
13 |
14 | return view;
15 | }
16 | }
17 | @try
18 | {
19 | string editor = EditorView(Model);
20 | @Html.Partial(editor, (object)Model)
21 | }
22 | catch (Exception ex) {
23 | @ex.ToString()
24 | }
--------------------------------------------------------------------------------
/ProjectTemplates/UmbracoSite.1/src/UmbracoSite.1.Site/Views/Partials/Grid/Editors/Embed.cshtml:
--------------------------------------------------------------------------------
1 | @model dynamic
2 | @using Umbraco.Web.Templates
3 | @{
4 | string embedValue = Convert.ToString(Model.value);
5 | embedValue = embedValue.DetectIsJson() ? Model.value.preview : Model.value;
6 | }
7 |
8 |
9 | @Html.Raw(embedValue)
10 |
11 |
--------------------------------------------------------------------------------
/ProjectTemplates/UmbracoSite.1/src/UmbracoSite.1.Site/Views/Partials/Grid/Editors/Macro.cshtml:
--------------------------------------------------------------------------------
1 | @inherits UmbracoViewPage
2 | @using Umbraco.Web.Templates
3 |
4 |
5 | @if (Model.value != null)
6 | {
7 | string macroAlias = Model.value.macroAlias.ToString();
8 | ViewDataDictionary parameters = new ViewDataDictionary();
9 | foreach (dynamic mpd in Model.value.macroParamsDictionary)
10 | {
11 | parameters.Add(mpd.Name, mpd.Value);
12 | }
13 |
14 |
15 | @Umbraco.RenderMacro(macroAlias, parameters)
16 |
17 | }
18 |
--------------------------------------------------------------------------------
/ProjectTemplates/UmbracoSite.1/src/UmbracoSite.1.Site/Views/Partials/Grid/Editors/Media.cshtml:
--------------------------------------------------------------------------------
1 | @model dynamic
2 | @using Umbraco.Web.Templates
3 |
4 | @if (Model.value != null)
5 | {
6 | var url = Model.value.image;
7 | if(Model.editor.config != null && Model.editor.config.size != null){
8 | url += "?width=" + Model.editor.config.size.width;
9 | url += "&height=" + Model.editor.config.size.height;
10 |
11 | if(Model.value.focalPoint != null){
12 | url += "¢er=" + Model.value.focalPoint.top +"," + Model.value.focalPoint.left;
13 | url += "&mode=crop";
14 | }
15 | }
16 |
17 | var altText = Model.value.altText ?? Model.value.caption ?? string.Empty;
18 |
19 |
20 |
21 | if (Model.value.caption != null)
22 | {
23 | @Model.value.caption
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/ProjectTemplates/UmbracoSite.1/src/UmbracoSite.1.Site/Views/Partials/Grid/Editors/Rte.cshtml:
--------------------------------------------------------------------------------
1 | @model dynamic
2 | @using Umbraco.Web.Composing
3 | @using Umbraco.Web.Templates
4 | @{
5 | var value = TemplateUtilities.ParseInternalLinks(Model.value.ToString(), Current.UmbracoContext.UrlProvider);
6 | value = TemplateUtilities.ResolveUrlsFromTextString(value);
7 | value = TemplateUtilities.ResolveMediaFromTextString(value);
8 | }
9 | @Html.Raw(value)
10 |
--------------------------------------------------------------------------------
/ProjectTemplates/UmbracoSite.1/src/UmbracoSite.1.Site/Views/Partials/Grid/Editors/Textstring.cshtml:
--------------------------------------------------------------------------------
1 | @model dynamic
2 | @using Umbraco.Web.Composing
3 | @using Umbraco.Web.Templates
4 |
5 | @if (Model.editor.config.markup != null)
6 | {
7 | string markup = Model.editor.config.markup.ToString();
8 | markup = markup.Replace("#value#", Html.ReplaceLineBreaksForHtml(HttpUtility.HtmlEncode((string)Model.value.ToString())).ToString());
9 |
10 | if (Model.editor.config.style != null)
11 | {
12 | markup = markup.Replace("#style#", Model.editor.config.style.ToString());
13 | }
14 |
15 |
16 | @Html.Raw(markup)
17 |
18 | }
19 | else
20 | {
21 |
22 | @Model.value
23 |
24 | }
25 |
--------------------------------------------------------------------------------
/ProjectTemplates/UmbracoSite.1/src/UmbracoSite.1.Site/Views/Web.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
64 |
65 |
66 |
67 |
68 |
69 |
--------------------------------------------------------------------------------
/ProjectTemplates/UmbracoSite.1/src/UmbracoSite.1.Site/Web.Debug.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
17 |
18 |
29 |
30 |
--------------------------------------------------------------------------------
/ProjectTemplates/UmbracoSite.1/src/UmbracoSite.1.Site/Web.Release.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
17 |
18 |
19 |
30 |
31 |
--------------------------------------------------------------------------------
/ProjectTemplates/UmbracoSite.1/src/UmbracoSite.1.Site/config/ClientDependency.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
13 |
14 |
15 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
45 |
46 |
47 |
56 |
57 |
58 |
59 |
60 |
63 |
64 |
65 |
66 |
67 |
--------------------------------------------------------------------------------
/ProjectTemplates/UmbracoSite.1/src/UmbracoSite.1.Site/config/HealthChecks.config:
--------------------------------------------------------------------------------
1 |
2 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/ProjectTemplates/UmbracoSite.1/src/UmbracoSite.1.Site/config/Lang/cs-CZ.user.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/ProjectTemplates/UmbracoSite.1/src/UmbracoSite.1.Site/config/Lang/da-DK.user.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/ProjectTemplates/UmbracoSite.1/src/UmbracoSite.1.Site/config/Lang/de-DE.user.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/ProjectTemplates/UmbracoSite.1/src/UmbracoSite.1.Site/config/Lang/en-GB.user.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/ProjectTemplates/UmbracoSite.1/src/UmbracoSite.1.Site/config/Lang/en-US.user.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/ProjectTemplates/UmbracoSite.1/src/UmbracoSite.1.Site/config/Lang/es-ES.user.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/ProjectTemplates/UmbracoSite.1/src/UmbracoSite.1.Site/config/Lang/fr-FR.user.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/ProjectTemplates/UmbracoSite.1/src/UmbracoSite.1.Site/config/Lang/he-IL.user.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/ProjectTemplates/UmbracoSite.1/src/UmbracoSite.1.Site/config/Lang/it-IT.user.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/ProjectTemplates/UmbracoSite.1/src/UmbracoSite.1.Site/config/Lang/ja-JP.user.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/ProjectTemplates/UmbracoSite.1/src/UmbracoSite.1.Site/config/Lang/ko-KR.user.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/ProjectTemplates/UmbracoSite.1/src/UmbracoSite.1.Site/config/Lang/nb-NO.user.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/ProjectTemplates/UmbracoSite.1/src/UmbracoSite.1.Site/config/Lang/nl-NL.user.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/ProjectTemplates/UmbracoSite.1/src/UmbracoSite.1.Site/config/Lang/pl-PL.user.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/ProjectTemplates/UmbracoSite.1/src/UmbracoSite.1.Site/config/Lang/pt-BR.user.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/ProjectTemplates/UmbracoSite.1/src/UmbracoSite.1.Site/config/Lang/ru-RU.user.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/ProjectTemplates/UmbracoSite.1/src/UmbracoSite.1.Site/config/Lang/sv-SE.user.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/ProjectTemplates/UmbracoSite.1/src/UmbracoSite.1.Site/config/Lang/zh-CN.user.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/ProjectTemplates/UmbracoSite.1/src/UmbracoSite.1.Site/config/grid.editors.config.js:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "name": "Rich text editor",
4 | "alias": "rte",
5 | "view": "rte",
6 | "icon": "icon-article"
7 | },
8 | {
9 | "name": "Image",
10 | "nameTemplate": "{{ value && value.udi ? (value.udi | ncNodeName) : '' }}",
11 | "alias": "media",
12 | "view": "media",
13 | "icon": "icon-picture"
14 | },
15 | {
16 | "name": "Macro",
17 | "nameTemplate": "{{ value && value.macroAlias ? value.macroAlias : '' }}",
18 | "alias": "macro",
19 | "view": "macro",
20 | "icon": "icon-settings-alt"
21 | },
22 | {
23 | "name": "Embed",
24 | "alias": "embed",
25 | "view": "embed",
26 | "icon": "icon-movie-alt"
27 | },
28 | {
29 | "name": "Headline",
30 | "nameTemplate": "{{ value }}",
31 | "alias": "headline",
32 | "view": "textstring",
33 | "icon": "icon-coin",
34 | "config": {
35 | "style": "font-size: 36px; line-height: 45px; font-weight: bold",
36 | "markup": "#value# "
37 | }
38 | },
39 | {
40 | "name": "Quote",
41 | "nameTemplate": "{{ value ? value.substring(0,32) + (value.length > 32 ? '...' : '') : '' }}",
42 | "alias": "quote",
43 | "view": "textstring",
44 | "icon": "icon-quote",
45 | "config": {
46 | "style": "border-left: 3px solid #ccc; padding: 10px; color: #ccc; font-family: serif; font-style: italic; font-size: 18px",
47 | "markup": "#value# "
48 | }
49 | }
50 | ]
51 |
--------------------------------------------------------------------------------
/ProjectTemplates/UmbracoSite.1/src/UmbracoSite.1.Site/config/imageprocessor/cache.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/ProjectTemplates/UmbracoSite.1/src/UmbracoSite.1.Site/config/imageprocessor/processing.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
--------------------------------------------------------------------------------
/ProjectTemplates/UmbracoSite.1/src/UmbracoSite.1.Site/config/imageprocessor/security.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/ProjectTemplates/UmbracoSite.1/src/UmbracoSite.1.Site/config/logviewer.searches.config.js:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "name": "Find all logs where the Level is NOT Verbose and NOT Debug",
4 | "query": "Not(@Level='Verbose') and Not(@Level='Debug')"
5 | },
6 | {
7 | "name": "Find all logs that has an exception property (Warning, Error & Fatal with Exceptions)",
8 | "query": "Has(@Exception)"
9 | },
10 | {
11 | "name": "Find all logs that have the property 'Duration'",
12 | "query": "Has(Duration)"
13 | },
14 | {
15 | "name": "Find all logs that have the property 'Duration' and the duration is greater than 1000ms",
16 | "query": "Has(Duration) and Duration > 1000"
17 | },
18 | {
19 | "name": "Find all logs that are from the namespace 'Umbraco.Core'",
20 | "query": "StartsWith(SourceContext, 'Umbraco.Core')"
21 | },
22 | {
23 | "name": "Find all logs that use a specific log message template",
24 | "query": "@MessageTemplate = '[Timing {TimingId}] {EndMessage} ({TimingDuration}ms)'"
25 | },
26 | {
27 | "name": "Find logs where one of the items in the SortedComponentTypes property array is equal to",
28 | "query": "SortedComponentTypes[?] = 'Umbraco.Web.Search.ExamineComponent'"
29 | },
30 | {
31 | "name": "Find logs where one of the items in the SortedComponentTypes property array contains",
32 | "query": "Contains(SortedComponentTypes[?], 'DatabaseServer')"
33 | },
34 | {
35 | "name": "Find all logs that the message has localhost in it with SQL like",
36 | "query": "@Message like '%localhost%'"
37 | },
38 | {
39 | "name": "Find all logs that the message that starts with 'end' in it with SQL like",
40 | "query": "@Message like 'end%'"
41 | }
42 | ]
43 |
--------------------------------------------------------------------------------
/ProjectTemplates/UmbracoSite.1/src/UmbracoSite.1.Site/config/serilog.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
--------------------------------------------------------------------------------
/ProjectTemplates/UmbracoSite.1/src/UmbracoSite.1.Site/config/serilog.user.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
15 |
16 |
17 |
20 |
21 |
22 |
28 |
29 |
30 |
31 |
32 |
33 |
37 |
38 |
39 |
40 |
--------------------------------------------------------------------------------
/ProjectTemplates/UmbracoSite.1/src/UmbracoSite.1.Site/config/splashes/noNodes.aspx:
--------------------------------------------------------------------------------
1 | <%@ Page Language="C#" AutoEventWireup="True" Inherits="Umbraco.Web.UI.Config.Splashes.NoNodes" CodeBehind="NoNodes.aspx.cs" %>
2 | <%@ Import Namespace="Umbraco.Core.Configuration" %>
3 | <%@ Import Namespace="Umbraco.Core.IO" %>
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
Welcome to your Umbraco installation
30 |
You're seeing this wonderful page because your website doesn't contain any published content yet.
31 |
32 |
35 |
36 |
37 |
38 |
39 |
Easy start with Umbraco.tv
40 |
We have created a bunch of 'how-to' videos, to get you easily started with Umbraco. Learn how to build projects in just a couple of minutes. Easiest CMS in the world.
41 |
42 |
Umbraco.tv →
43 |
44 |
45 |
46 |
Be a part of the community
47 |
The Umbraco community is the best of its kind, be sure to visit, and if you have any questions, we're sure that you can get your answers from the community.
48 |
49 |
our.Umbraco →
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
--------------------------------------------------------------------------------
/ProjectTemplates/UmbracoSite.1/src/UmbracoSite.1.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio Version 16
4 | VisualStudioVersion = 16.0.30114.105
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UmbracoSite.1.Site", "UmbracoSite.1.Site\UmbracoSite.1.Site.csproj", "{B56F26F4-09D7-48AF-947D-66DEEE1A024B}"
7 | EndProject
8 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UmbracoSite.1.Library", "UmbracoSite.1.Library\UmbracoSite.1.Library.csproj", "{0444602D-8192-4BA6-951E-75E7C15D43AC}"
9 | EndProject
10 | Global
11 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
12 | Debug|Any CPU = Debug|Any CPU
13 | Release|Any CPU = Release|Any CPU
14 | EndGlobalSection
15 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
16 | {B56F26F4-09D7-48AF-947D-66DEEE1A024B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
17 | {B56F26F4-09D7-48AF-947D-66DEEE1A024B}.Debug|Any CPU.Build.0 = Debug|Any CPU
18 | {B56F26F4-09D7-48AF-947D-66DEEE1A024B}.Release|Any CPU.ActiveCfg = Release|Any CPU
19 | {B56F26F4-09D7-48AF-947D-66DEEE1A024B}.Release|Any CPU.Build.0 = Release|Any CPU
20 | {0444602D-8192-4BA6-951E-75E7C15D43AC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
21 | {0444602D-8192-4BA6-951E-75E7C15D43AC}.Debug|Any CPU.Build.0 = Debug|Any CPU
22 | {0444602D-8192-4BA6-951E-75E7C15D43AC}.Release|Any CPU.ActiveCfg = Release|Any CPU
23 | {0444602D-8192-4BA6-951E-75E7C15D43AC}.Release|Any CPU.Build.0 = Release|Any CPU
24 | EndGlobalSection
25 | GlobalSection(SolutionProperties) = preSolution
26 | HideSolutionNode = FALSE
27 | EndGlobalSection
28 | GlobalSection(ExtensibilityGlobals) = postSolution
29 | SolutionGuid = {C6AA6F58-D9D3-446B-A538-E641EB3B946C}
30 | EndGlobalSection
31 | EndGlobal
32 |
--------------------------------------------------------------------------------
/docs/index.md:
--------------------------------------------------------------------------------
1 | # Project Templates
2 |
3 | ## Pre-requisite
4 | You must be using Visual Studio 2019 else you are likely to have Roslyn issues.
5 |
6 | ## 1. Create a new Umbraco Package
7 |
8 | A new blank project for building an umbraco package
9 |
10 | ```
11 | dotnet new umbraco-v8-package -n MySuperAwesomePackage
12 | ```
13 |
14 | # Item Templates
15 | Item templates let you add files to existing projects
16 |
17 | ## Add Dashboard Scripts to a current project
18 | Adds the required javascript to a project to have a
19 | dashboard
20 |
21 | ```
22 | dotnet new umbraco-v8-dashboard
23 | ```
24 |
25 | ## Add github actions to a current repository
26 |
27 | Add the build.yml to your current project to build and package your project based on a `release\version` tag.
28 |
29 | ```
30 | dotnet new umbraco-v8-github-build
31 | ```
32 |
--------------------------------------------------------------------------------
/gulpfile.js:
--------------------------------------------------------------------------------
1 | // Copy files from project template into item template
2 | //
3 | // this attempts to match the files based on the folder names inside
4 | // item templates, so for example a folder called Dashboard will
5 | // match any files from the project template in a folder called Dashboard
6 | // e.g '/App_Plugins/Dashboard/package.manifest'
7 | // and any files that start with Dashboard (e.g DashboardController.cs)
8 | //
9 | // this might not be 100% but it will help keeping the item templates in sync
10 | // with the package.
11 | //
12 | // should be ran before you package anything up
13 | //
14 | // you will need to manually update the 'primaryOutputs' values in the item
15 | // template template.json file, as this script doesn't do that.
16 | //
17 |
18 | const { src, dest } = require('gulp');
19 | const fs = require('fs');
20 | const path = require('path');
21 |
22 | var itemTemplateFolder = './ItemTemplates/';
23 | var projectTemplateFolder = './ProjectTemplates/UmbracoPackage.1/src/UmbracoPackage.1/'
24 |
25 | function getFolders(dir) {
26 | return fs.readdirSync(dir)
27 | .filter(function(file) {
28 | return fs.statSync(path.join(dir, file)).isDirectory();
29 | });
30 | }
31 |
32 | function copyItemTemplates(cb)
33 | {
34 | var folders = getFolders(itemTemplateFolder);
35 |
36 | folders.forEach(function(folder) {
37 | console.log(folder);
38 |
39 | var sourcePatterns = [
40 | projectTemplateFolder + '**/' + folder + '/**/*',
41 | projectTemplateFolder + '**/' + folder + '*.*',
42 | ];
43 |
44 | sourcePatterns.forEach(function(pattern) {
45 | console.log(pattern);
46 | src(pattern)
47 | .pipe(dest(itemTemplateFolder + folder));
48 | });
49 | });
50 | }
51 |
52 | exports.default = function(cb) {
53 | copyItemTemplates();
54 | cb();
55 | }
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "package.templates",
3 | "version": "1.0.0",
4 | "description": "Package Templates for Umbraco",
5 | "main": "gulpfile.js",
6 | "directories": {
7 | "doc": "docs"
8 | },
9 | "scripts": {
10 | "test": "echo \"Error: no test specified\" && exit 1"
11 | },
12 | "repository": {
13 | "type": "git",
14 | "url": "git+https://github.com/umbraco/Package.Templates.git"
15 | },
16 | "author": "",
17 | "license": "ISC",
18 | "bugs": {
19 | "url": "https://github.com/umbraco/Package.Templates/issues"
20 | },
21 | "homepage": "https://github.com/umbraco/Package.Templates#readme",
22 | "devDependencies": {
23 | "gulp": "^4.0.2"
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/package.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | UI Examples
6 | 1.0.0
7 |
8 | MIT
9 | https://our.umbraco.com
10 |
11 | 8
12 | 0
13 | 0
14 |
15 |
16 |
17 | UmbracoPackageTeam
18 | https://our.umbraco.com
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
--------------------------------------------------------------------------------
/readme.md:
--------------------------------------------------------------------------------
1 | # Umbraco Package Templates
2 |
3 | This repository contains some templates for starting new Umbraco package projects, and adding things to existing Umbraco projects.
4 |
5 | The templates can be used via the `dotnet new` command.
6 |
7 | ## UI Examples
8 |
9 | One of the templates being developed adds a 'UI Examples' section to your Umbraco website. UI Examples has also been released as a package on [Our](https://our.umbraco.com/packages/developer-tools/ui-examples/), so you can add this to your site by installing that package from there. The source code for UI Examples is [in the Item Template](./ItemTemplates/UIExamples), and has its own [contribution guidelines](./CONTRIBUTING-UIExamples.md).
10 |
11 | ## Pre-requisite
12 | You must be using Visual Studio 2019 to work with these templates.
13 |
14 |
15 | ## Installation
16 | You can install all the templates from a NuGet package:
17 |
18 | ```
19 | dotnet new -i Umbraco.Tools.Packages.Templates
20 | ```
21 |
22 | ### Updating
23 | To check for any updates you can run the `dotnet new --update-check` command.
24 |
25 | The `dotnet new --update-apply` command will update any of the installed template packages you have installed.
26 |
27 | ## Usage
28 | All Umbraco package templates are prefixed `umbraco-`. To see what Umbraco related templates you have installed:
29 |
30 | ```
31 | dotnet new umbraco -l
32 | ```
33 |
34 | You can get a list of [all available templates in the docs](./docs)
35 |
36 | ## Example: To start a new package project
37 |
38 | Supply the name of the project on the command line, this will
39 | setup the namespaces and folders within the project:
40 |
41 | ```
42 | dotnet new umbraco-v8-package -n MySuperNewPackage
43 | ```
44 | ---
45 | ## Contributing
46 |
47 | Contributions are welcome! Please read our [Contribution Guidelines](./CONTRIBUTING.md) for the steps to add new templates.
48 |
49 | ## Developing your own templates
50 |
51 | If you want to develop/extend these templates for your own use you should install them individually from your source folder.
52 | For example:
53 | ```
54 | dotnet new -i c:\source\Package.Templates\ItemTemplates\Dashboard
55 | ```
56 |
--------------------------------------------------------------------------------
/umbraco-templates.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Template
5 | Umbraco.Packages.Templates
6 |
7 | net472
8 |
9 | Umbraco Package Templates
10 | Templates to use when creating Umbraco packages
11 | The Umbraco Community
12 | https://github.com/umbraco/Umbraco.Package.Templates
13 | umbraco
14 | https://github.com/umbraco/Umbraco.Package.Templates
15 | Git
16 |
17 | true
18 | false
19 | content
20 | true
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
--------------------------------------------------------------------------------