├── .gitignore ├── LICENSE ├── ModernBusiness.RazorPages.sln ├── NuGet.config ├── README.md ├── azureinfo.txt ├── design └── test.bsdesign └── src ├── ModernBusiness.App ├── App_Data │ └── tenants.json ├── ModernBusiness.App.csproj ├── Program.cs ├── Startup.cs ├── appsettings.development.json ├── appsettings.json ├── web.config └── wwwroot │ ├── .placeholder │ └── is-cache │ ├── 1 │ ├── 3 │ │ └── 5 │ │ │ └── C │ │ │ └── D │ │ │ └── 8 │ │ │ └── 7 │ │ │ └── 1 │ │ │ └── B │ │ │ └── A │ │ │ └── 7 │ │ │ └── A │ │ │ └── 135CD871BA7A.png │ └── E │ │ └── 7 │ │ └── 8 │ │ └── D │ │ └── 8 │ │ └── A │ │ └── B │ │ └── C │ │ └── 8 │ │ └── F │ │ └── 9 │ │ └── 1E78D8ABC8F9.jpg │ ├── 5 │ └── C │ │ ├── 0 │ │ └── A │ │ │ └── 8 │ │ │ └── 0 │ │ │ └── 9 │ │ │ └── B │ │ │ └── 4 │ │ │ └── C │ │ │ └── 5 │ │ │ └── 9 │ │ │ └── 5C0A809B4C59.png │ │ └── D │ │ └── 2 │ │ └── 1 │ │ └── 9 │ │ └── C │ │ └── 8 │ │ └── C │ │ └── 8 │ │ └── 0 │ │ └── 8 │ │ └── 5CD219C8C808.png │ ├── 9 │ └── D │ │ └── 0 │ │ └── 0 │ │ └── 3 │ │ └── A │ │ └── 7 │ │ └── 1 │ │ └── C │ │ └── 1 │ │ └── 5 │ │ └── E │ │ └── 9D003A71C15E.png │ ├── A │ └── 9 │ │ └── 5 │ │ └── F │ │ └── 6 │ │ └── 1 │ │ └── 4 │ │ └── 0 │ │ └── A │ │ └── 6 │ │ └── 5 │ │ └── 4 │ │ └── A95F6140A654.png │ ├── B │ ├── 9 │ │ └── 3 │ │ │ └── A │ │ │ └── F │ │ │ └── 0 │ │ │ └── 8 │ │ │ └── 7 │ │ │ └── E │ │ │ └── 0 │ │ │ └── 2 │ │ │ └── 5 │ │ │ └── B93AF087E025.png │ └── E │ │ └── 4 │ │ └── D │ │ └── 0 │ │ └── 8 │ │ └── D │ │ └── 6 │ │ └── 5 │ │ └── C │ │ └── 6 │ │ └── 3 │ │ └── BE4D08D65C63.png │ ├── C │ └── 2 │ │ └── 5 │ │ └── 3 │ │ └── 5 │ │ └── 9 │ │ └── 8 │ │ └── A │ │ └── 4 │ │ └── 7 │ │ └── 5 │ │ └── 5 │ │ └── C253598A4755.jpg │ └── D │ └── 2 │ └── 3 │ └── C │ └── 2 │ └── 6 │ └── 8 │ └── 7 │ └── 4 │ └── 6 │ └── 4 │ └── 7 │ └── D23C26874647.jpg ├── Modules.Pages ├── ModernBusiness.Pages.About │ ├── App_Data │ │ └── Localization │ │ │ └── pt.po │ ├── Manifest.cs │ ├── ModernBusiness.Pages.About.csproj │ ├── Pages │ │ ├── About.cshtml │ │ ├── _ViewImports.cshtml │ │ └── _ViewStart.cshtml │ └── Startup.cs ├── ModernBusiness.Pages.Blog │ ├── Manifest.cs │ ├── ModernBusiness.Pages.Blog.csproj │ ├── Pages │ │ ├── Blog1.cshtml │ │ ├── Blog1.cshtml.cs │ │ ├── Blog2.cshtml │ │ ├── Blog2.cshtml.cs │ │ ├── Shared │ │ │ ├── BlogPost.cshtml │ │ │ └── _ViewImports.cshtml │ │ ├── _ViewImports.cshtml │ │ └── _ViewStart.cshtml │ └── Startup.cs ├── ModernBusiness.Pages.Contact │ ├── Manifest.cs │ ├── ModernBusiness.Pages.Contact.csproj │ ├── Pages │ │ ├── Contact.cshtml │ │ ├── _ViewImports.cshtml │ │ └── _ViewStart.cshtml │ └── Startup.cs ├── ModernBusiness.Pages.Faq │ ├── Manifest.cs │ ├── ModernBusiness.Pages.Faq.csproj │ ├── Pages │ │ ├── _ViewImports.cshtml │ │ ├── _ViewStart.cshtml │ │ ├── faq.cshtml │ │ └── faq.cshtml.cs │ └── Startup.cs ├── ModernBusiness.Pages.Portfolio │ ├── Manifest.cs │ ├── ModernBusiness.Pages.Portfolio.csproj │ ├── Pages │ │ ├── _ViewImports.cshtml │ │ ├── _ViewStart.cshtml │ │ ├── portfolio1.cshtml │ │ ├── portfolio1.cshtml.cs │ │ ├── portfolio2.cshtml │ │ ├── portfolio2.cshtml.cs │ │ ├── portfolio3.cshtml │ │ ├── portfolio3.cshtml.cs │ │ ├── portfolio4.cshtml │ │ ├── portfolio4.cshtml.cs │ │ ├── project.cshtml │ │ └── project.cshtml.cs │ └── Startup.cs ├── ModernBusiness.Pages.PricePlan │ ├── App_Data │ │ └── Localization │ │ │ ├── en.po │ │ │ ├── nl.po │ │ │ └── pt.po │ ├── Manifest.cs │ ├── ModernBusiness.Pages.PricePlan.csproj │ ├── Pages │ │ ├── Price-Plan.cshtml │ │ ├── Price-Plan.cshtml.cs │ │ ├── _ViewImports.cshtml │ │ └── _ViewStart.cshtml │ └── Startup.cs ├── ModernBusiness.Pages.Service │ ├── Manifest.cs │ ├── ModernBusiness.Pages.Service.csproj │ ├── Pages │ │ ├── Services.cshtml │ │ ├── Services.cshtml.cs │ │ ├── _ViewImports.cshtml │ │ └── _ViewStart.cshtml │ └── Startup.cs ├── ModernBusiness.Pages.Shared │ ├── Manifest.cs │ ├── ModernBusiness.Pages.Shared.csproj │ ├── Pages │ │ └── Shared │ │ │ ├── BlogPostCard1.cshtml │ │ │ ├── BlogPostCard2.cshtml │ │ │ ├── BreadcrumbHeader.cshtml │ │ │ ├── CallToAction.cshtml │ │ │ ├── Categories.cshtml │ │ │ ├── LinkList.cshtml │ │ │ ├── PagerControl.cshtml │ │ │ ├── ProjectCards1.cshtml │ │ │ ├── ProjectCards2.cshtml │ │ │ ├── ProjectCards3.cshtml │ │ │ ├── ProjectCards4.cshtml │ │ │ ├── ServiceCards.cshtml │ │ │ ├── SideWidget.cshtml │ │ │ ├── TeamCards.cshtml │ │ │ └── _ViewImports.cshtml │ ├── Services │ │ └── DataRetriever.cs │ ├── Startup.cs │ └── ViewModels │ │ ├── BreadCrumbViewModel.cs │ │ └── PagerInfo.cs ├── ModernBusiness.Pages.Static │ ├── Manifest.cs │ ├── ModernBusiness.Pages.Static.csproj │ ├── Pages │ │ ├── Full-Width.cshtml │ │ ├── Full-Width.cshtml.cs │ │ ├── _ViewImports.cshtml │ │ ├── _ViewStart.cshtml │ │ ├── sidebar.cshtml │ │ └── sidebar.cshtml.cs │ └── Startup.cs ├── ModernBusiness.Pages.Users │ ├── App_Data │ │ └── Localization │ │ │ ├── nl.po │ │ │ └── pt.po │ ├── Manifest.cs │ ├── Model │ │ └── ResetPasswordSettings.cs │ ├── ModernBusiness.Pages.Users.csproj │ ├── Pages │ │ ├── Login.cshtml │ │ ├── Login.cshtml.cs │ │ ├── Logout.cshtml │ │ ├── Logout.cshtml.cs │ │ ├── NotAuthorized.cshtml │ │ ├── NotAuthorized.cshtml.cs │ │ ├── Register.cshtml │ │ ├── Register.cshtml.cs │ │ ├── Warning.cshtml │ │ ├── _ViewImports.cshtml │ │ └── _ViewStart.cshtml │ ├── Startup.cs │ └── ViewModels │ │ ├── ForgotPasswordViewModel.cs │ │ ├── LoginViewModel.cs │ │ ├── LostPasswordViewModel.cs │ │ ├── RegisterViewModel.cs │ │ └── ResetPasswordViewModel.cs └── ModernBusiness.Pages │ ├── Manifest.cs │ ├── ModernBusiness.Pages.csproj │ ├── Pages │ ├── LogOff.cshtml │ ├── LogOff.cshtml.cs │ ├── Shared │ │ ├── Carousel.cshtml │ │ └── _ViewImports.cshtml │ ├── ThrowError.cshtml │ ├── ThrowError.cshtml.cs │ ├── _ViewImports.cshtml │ ├── _ViewStart.cshtml │ └── index.cshtml │ └── Startup.cs ├── OrchardCore.Parts └── TagPart │ ├── Controllers │ └── HomeController.cs │ ├── Drivers │ └── TagsPartDisplayDriver.cs │ ├── Handlers │ └── TagsPartHandler.cs │ ├── Indexing │ └── TagsPartIndexHandler.cs │ ├── Manifest.cs │ ├── Migrations.cs │ ├── Models │ └── TagsPart.cs │ ├── Settings │ ├── TagsPartSettings.cs │ ├── TagsPartSettingsDisplayDriver.cs │ └── TagsPartSettingsViewModel.cs │ ├── Startup.cs │ ├── Tags.OrchardCore.csproj │ ├── ViewModels │ └── TagsPartViewModel.cs │ ├── Views │ ├── Home │ │ └── Index.cshtml │ ├── TagsPart.Edit.cshtml │ ├── TagsPart.liquid │ ├── TagsPartSettings.Edit.cshtml │ ├── TagsPart_Summary.liquid │ └── _ViewImports.cshtml │ ├── tsconfig.json │ └── wwwroot │ └── Assets │ ├── css │ └── tags.css │ └── tag.js └── Themes.Pages ├── ModernBusiness.Theme ├── Common.props ├── Controllers │ └── HomeController.cs ├── Directory.Build.props ├── LICENSE ├── Manifest.cs ├── ModernBusiness.Theme.csproj ├── NuGet.config ├── README.md ├── Recipes │ ├── ModernBusinessDecoupled.recipe.json │ └── Snippets │ │ ├── Footer.html │ │ ├── Portfolio.html │ │ ├── PortfolioQuery.txt │ │ └── Services.html ├── Views │ ├── Content.cshtml │ ├── LanguageSelection.cshtml │ ├── Layout.cshtml │ ├── Menu.cshtml │ ├── MenuItem.cshtml │ ├── MenuItemLink-LinkMenuItem.cshtml │ ├── Shared │ │ ├── Layout.cshtml │ │ ├── NotFound.cshtml │ │ ├── UserLogin.cshtml │ │ ├── _ViewImports.cshtml │ │ ├── error.cshtml │ │ └── sitemap.cshtml │ └── _ViewImports.cshtml └── wwwroot │ ├── .gitignore │ ├── .travis.yml │ ├── 404.html │ ├── LICENSE │ ├── README.md │ ├── Theme.png │ ├── about.html │ ├── blog-home-1.html │ ├── blog-home-2.html │ ├── blog-post.html │ ├── contact.html │ ├── css │ ├── Styles.css │ └── modern-business.css │ ├── faq.html │ ├── full-width.html │ ├── gulpfile.js │ ├── img │ ├── 1080866-unsplash.jpg │ ├── 1200x300.png │ ├── 133380-unsplash.jpg │ ├── 1ColumnPortfolio.jpg │ ├── 252131-unsplash.jpg │ ├── 275638-unsplash.jpg │ ├── 2ColumnPortfolio.jpg │ ├── 378-unsplash.jpg │ ├── 378338-unsplash.jpg │ ├── 381967-unsplash.jpg │ ├── 3ColumnPortfolio.jpg │ ├── 408744-unsplash.jpg │ ├── 422398-unsplash.jpg │ ├── 4ColumnPortfolio.jpg │ ├── 500x300.png │ ├── 570369-unsplash.jpg │ ├── 572004-unsplash.jpg │ ├── 607576-unsplash.jpg │ ├── 6087de0a-f453-495d-882f-9b3396d400a9.jpg │ ├── 623946-unsplash.jpg │ ├── 632455-unsplash.jpg │ ├── 654527-unsplash.jpg │ ├── 668353-unsplash.jpg │ ├── 678089-unsplash.jpg │ ├── 684713-unsplash.jpg │ ├── 700x300.png │ ├── 700x400.png │ ├── 700x450.png │ ├── 701109-unsplash.jpg │ ├── 707761-unsplash.jpg │ ├── 708664-unsplash.jpg │ ├── 737030-unsplash.jpg │ ├── 750x450.png │ ├── 755045-unsplash.jpg │ ├── 799380-unsplash.jpg │ ├── 911414-unsplash.jpg │ ├── 983657-unsplash.jpg │ ├── b0e9f9c8-eaa3-4f44-a87b-a49edc06837d.jpg │ └── modern.jpg │ ├── index.html │ ├── js │ ├── contact_me.js │ └── jqBootstrapValidation.js │ ├── mail │ └── contact_me.php │ ├── package-lock.json │ ├── package.json │ ├── portfolio-1-col.html │ ├── portfolio-2-col.html │ ├── portfolio-3-col.html │ ├── portfolio-4-col.html │ ├── portfolio-item.html │ ├── pricing.html │ ├── services.html │ ├── sidebar.html │ └── vendor │ ├── bootstrap │ ├── css │ │ ├── bootstrap-grid.css │ │ ├── bootstrap-grid.min.css │ │ ├── bootstrap-reboot.css │ │ ├── bootstrap-reboot.min.css │ │ ├── bootstrap.css │ │ ├── bootstrap.css.map │ │ ├── bootstrap.min.css │ │ └── bootstrap.min.css.map │ └── js │ │ ├── bootstrap.bundle.js │ │ ├── bootstrap.bundle.js.map │ │ ├── bootstrap.bundle.min.js │ │ ├── bootstrap.bundle.min.js.map │ │ ├── bootstrap.js │ │ ├── bootstrap.js.map │ │ ├── bootstrap.min.js │ │ └── bootstrap.min.js.map │ └── jquery │ ├── jquery.js │ ├── jquery.min.js │ ├── jquery.min.map │ ├── jquery.slim.js │ ├── jquery.slim.min.js │ └── jquery.slim.min.map └── ModernBusiness.Theme2 ├── Common.props ├── Directory.Build.props ├── Manifest.cs ├── ModernBusiness.Theme2.csproj ├── Views ├── Content.cshtml ├── LanguageSelection.cshtml ├── Layout.cshtml ├── Menu.cshtml ├── MenuItem.cshtml ├── MenuItemLink-LinkMenuItem.cshtml ├── Shared │ ├── Layout.cshtml │ ├── NotFound.cshtml │ ├── UserLogin.cshtml │ ├── _ViewImports.cshtml │ └── sitemap.cshtml └── _ViewImports.cshtml └── wwwroot ├── Theme.png └── css └── modern-business2.css /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 Marcos Aidos and Sijmen Koffeman 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 | -------------------------------------------------------------------------------- /NuGet.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | [![Build Status](https://dev.azure.com/SijmenKoffeman/ModernBusiness.OC.RazorPages/_apis/build/status/ModernBusinessRazorPages-dev-as%20-%20CI?branchName=master)](https://dev.azure.com/SijmenKoffeman/ModernBusiness.OC.RazorPages/_build/latest?definitionId=5&branchName=master) 2 | 3 | # ModernBusiness.OC.RazorPages 4 | Start Bootstrap's Modern Business Theme for Orchard Core as a decoupled Razor Pages Module 5 | 6 | ## Setup 7 | Need to git clone https://github.com/BlackrockDigital/startbootstrap-modern-business into src/Themes.Pages/ModernBusiness.Theme/wwwroot/ 8 | 9 | 10 | ## Some things to note 11 | - Your modules project (.csproj) files, if using the Razor Pages framework, should be using the Razor sdk, like so: 12 | `` 13 | - To have easy access to the OrchardHelper and related Orchard services, make sure your Razor Pages inherit from OrchardCore.DisplayManagement.RazorPages.Page like so `@inherits OrchardCore.DisplayManagement.RazorPages.Page`. This is done in _ViewImports.cshtml. This counts for razor views like partials as well, except, you inherit from OrchardCore.DisplayManagement.Razor.RazorPage like so `@inherits OrchardCore.DisplayManagement.Razor.RazorPage` 14 | - In most modules, besides referencing `OrchardCore.Module.Targets`, you will want to reference `OrchardCore.DisplayManagement`, `OrchardCore.Media`, `OrchardCore.ContentManagement`, `OrchardCore.Content` and `OrchardCore.ResourceManagement` 15 | - Every Razor Pages module needs a to add an AreaFolderRoute if it wants to be able to respond to requests. For example like: 16 | ``` 17 | services.Configure(options => 18 | { 19 | options.Conventions.AddAreaFolderRoute("ModernBusiness.Pages.Portfolio", "/", ""); 20 | }); 21 | ``` 22 | - The _ViewStart of each module points to "Layout". The Layout will be resolved from the .Theme module, from `Views\Shared`. 23 | - For the `NotFound.cshtml` (for 404 status cases), the Layout will be resolved from `Views`, as this is OC's default Layout location. 24 | 25 | ## Known issues and things to do 26 | - Search is currently not functional 27 | - Tags are saved with a blog post, but no look up or tag cloud is currently implemented 28 | - Tags do not link to posts with that tag yet 29 | 30 | ## What to check out 31 | - Multilingual pages, currently the Pricing Table is fully translated in Dutch, Portuguese and English 32 | - The Full Width Page allows a user to be signed in 33 | - Requesting a non existing page will result in a 404, themed accordingly 34 | - This repo is setup to Continuesly Integrate and Deploy to: 35 | http://modernbusinessrazorpages-dev-as.azurewebsites.net/mb1/ (demo tenant with the theme and modules from this repo) 36 | or behind Azure Front Door: 37 | https://modernbusinessrazorpages.azurefd.net/ 38 | 39 | -------------------------------------------------------------------------------- /azureinfo.txt: -------------------------------------------------------------------------------- 1 | The build pipeline setup for Azure DevOps Project ModernBusiness.OC.RazorPages completed successfully. Builds are now automatically generated and deployed to App Service ModernBusinessRazorPages-dev-as upon code updates. 2 | Details: 3 | Azure Resource Group: https://ms.portal.azure.com/#resource/subscriptions/ba89784e-9687-4b6d-99c2-209fa243c91e/resourceGroups/ModernBusiness.RazorPages-dev-rg/overview 4 | Azure App Service: http://ModernBusinessRazorPages-dev-as.azurewebsites.net 5 | Azure DevOps Project: ModernBusiness.OC.RazorPages (https://dev.azure.com/SijmenKoffeman/ModernBusiness.OC.RazorPages) 6 | Azure DevOps build pipeline: https://dev.azure.com/SijmenKoffeman/9dc973ad-71b3-41d1-8b2c-5d14c92c2063/_build/definition?definitionId=5 7 | Azure DevOps release pipeline: https://dev.azure.com/SijmenKoffeman/9dc973ad-71b3-41d1-8b2c-5d14c92c2063/_release?definitionId=1 -------------------------------------------------------------------------------- /design/test.bsdesign: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/psijkof/ModernBusiness.OC.RazorPages/1eff7a3424467d907fe98dd331cdac7468e8a14b/design/test.bsdesign -------------------------------------------------------------------------------- /src/ModernBusiness.App/App_Data/tenants.json: -------------------------------------------------------------------------------- 1 | { 2 | "Default": { 3 | "State": "Running" 4 | }, 5 | "mb1": { 6 | "RequestUrlPrefix": "mb1", 7 | "State": "Running" 8 | }, 9 | "ModernBusiness2": { 10 | "RequestUrlPrefix": "mb2", 11 | "State": "Running" 12 | } 13 | } -------------------------------------------------------------------------------- /src/ModernBusiness.App/ModernBusiness.App.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | netcoreapp2.2 5 | true 6 | E76357B8-1280-4047-84F6-C9D2EBBF7FB2 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 | -------------------------------------------------------------------------------- /src/ModernBusiness.App/Program.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore; 2 | using Microsoft.AspNetCore.Hosting; 3 | using OrchardCore.Logging; 4 | using OrchardCore.Modules; 5 | 6 | namespace ModernBusiness.App 7 | { 8 | public class Program 9 | { 10 | public static void Main(string[] args) 11 | { 12 | BuildWebHost(args).Run(); 13 | } 14 | 15 | public static IWebHost BuildWebHost(string[] args) => 16 | WebHost.CreateDefaultBuilder(args) 17 | .UseSerilogWeb() 18 | .UseStartup() 19 | .Build(); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /src/ModernBusiness.App/Startup.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Builder; 2 | using Microsoft.AspNetCore.Hosting; 3 | using Microsoft.AspNetCore.Mvc; 4 | using Microsoft.Extensions.DependencyInjection; 5 | using OrchardCore.Logging; 6 | 7 | namespace ModernBusiness.App 8 | { 9 | public class Startup 10 | { 11 | public void ConfigureServices(IServiceCollection services) 12 | { 13 | services.AddOrchardCms(); 14 | } 15 | 16 | public void Configure(IApplicationBuilder app, IHostingEnvironment env) 17 | { 18 | if (env.IsDevelopment()) 19 | { 20 | app.UseDeveloperExceptionPage(); 21 | } 22 | 23 | app.UseStaticFiles(); 24 | app.UseOrchardCore(c => c.UseSerilogTenantNameLoggingMiddleware()); 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/ModernBusiness.App/appsettings.development.json: -------------------------------------------------------------------------------- 1 | { 2 | // Uncomment to configure media storage in Azure Blob Storage. 3 | //"OrchardCore.Media.Azure": 4 | //{ 5 | //"ConnectionString": "", // Set to your Azure Storage account connection string. 6 | //"ContainerName": "somecontainer", 7 | //"BasePath": "some/base/path", // Set to a path to store media in a subdirectory inside your container. 8 | //"PublicHostName": "" // Set to a hostname to serve media from an alternative host such as a CDN. 9 | //} 10 | 11 | "OrchardCore.Media.Azure": { 12 | "ConnectionString": "DefaultEndpointsProtocol=https;AccountName=cmsstaticfiles;AccountKey=cGPN0hfclLJrmudplknuwKGVj26uWHpD9me05g1iNRSm2XBLZdircTRFOi8fnmSpTOB90tK9HKPESqJsJ9nJNw==;EndpointSuffix=core.windows.net", // Set to your Azure Storage account connection string. 13 | "ContainerName": "media", 14 | "BasePath": "images", 15 | "PublicHostName": "modernbusinessrazorpages.azureedge.net" 16 | }, 17 | "Modules": { 18 | "OrchardCore.DataProtection.Azure": { 19 | "ConnectionString": "DefaultEndpointsProtocol=https;AccountName=cmsstaticfiles;AccountKey=cGPN0hfclLJrmudplknuwKGVj26uWHpD9me05g1iNRSm2XBLZdircTRFOi8fnmSpTOB90tK9HKPESqJsJ9nJNw==;EndpointSuffix=core.windows.net", 20 | "ContainerName": "dataprotection" 21 | } 22 | }, 23 | "Serilog": { 24 | "MinimumLevel": { 25 | "Default": "Information", 26 | "Override": { 27 | "Default": "Debug", 28 | "Microsoft": "Error", 29 | "System": "Error" 30 | } 31 | }, 32 | "WriteTo": [ 33 | { 34 | "Name": "Console", 35 | "Args": { 36 | "theme": "Serilog.Sinks.SystemConsole.Themes.AnsiConsoleTheme::Code, Serilog.Sinks.Console", 37 | "outputTemplate": "{Timestamp:HH:mm:ss}|{TenantName}|{RequestId}|{SourceContext}|{Level:u3}|{Message:lj}{NewLine}{Exception}", 38 | "restrictedToMinimumLevel": "Information" 39 | } 40 | }, 41 | { 42 | "Name": "RollingFile", 43 | "Args": { 44 | "pathFormat": "app_data/logs/orchard-log-{Date}.txt", 45 | "outputTemplate": "{Timestamp:yyyy-MM-dd HH:mm:ss.ffff}|{TenantName}|{RequestId}|{SourceContext}|{Level:u3}|{Message:lj}{NewLine}{Exception}", 46 | "restrictedToMinimumLevel": "Warning" 47 | } 48 | } 49 | ] 50 | } 51 | } -------------------------------------------------------------------------------- /src/ModernBusiness.App/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | //DefaultEndpointsProtocol=https;AccountName=cmsstaticfiles;AccountKey=cGPN0hfclLJrmudplknuwKGVj26uWHpD9me05g1iNRSm2XBLZdircTRFOi8fnmSpTOB90tK9HKPESqJsJ9nJNw==;EndpointSuffix=core.windows.net 3 | "ConnectionString": "Data Source=.;Initial Catalog=oc;Integrated Security=True;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False", 4 | "DatabaseProvider": "SqlConnection", 5 | "RecipeName": "ModernBusiness.Theme", 6 | "Secret": "3903341d-273e-4d7a-927c-6e489f446a14" 7 | } -------------------------------------------------------------------------------- /src/ModernBusiness.App/web.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /src/ModernBusiness.App/wwwroot/.placeholder: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/psijkof/ModernBusiness.OC.RazorPages/1eff7a3424467d907fe98dd331cdac7468e8a14b/src/ModernBusiness.App/wwwroot/.placeholder -------------------------------------------------------------------------------- /src/ModernBusiness.App/wwwroot/is-cache/1/3/5/C/D/8/7/1/B/A/7/A/135CD871BA7A.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/psijkof/ModernBusiness.OC.RazorPages/1eff7a3424467d907fe98dd331cdac7468e8a14b/src/ModernBusiness.App/wwwroot/is-cache/1/3/5/C/D/8/7/1/B/A/7/A/135CD871BA7A.png -------------------------------------------------------------------------------- /src/ModernBusiness.App/wwwroot/is-cache/1/E/7/8/D/8/A/B/C/8/F/9/1E78D8ABC8F9.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/psijkof/ModernBusiness.OC.RazorPages/1eff7a3424467d907fe98dd331cdac7468e8a14b/src/ModernBusiness.App/wwwroot/is-cache/1/E/7/8/D/8/A/B/C/8/F/9/1E78D8ABC8F9.jpg -------------------------------------------------------------------------------- /src/ModernBusiness.App/wwwroot/is-cache/5/C/0/A/8/0/9/B/4/C/5/9/5C0A809B4C59.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/psijkof/ModernBusiness.OC.RazorPages/1eff7a3424467d907fe98dd331cdac7468e8a14b/src/ModernBusiness.App/wwwroot/is-cache/5/C/0/A/8/0/9/B/4/C/5/9/5C0A809B4C59.png -------------------------------------------------------------------------------- /src/ModernBusiness.App/wwwroot/is-cache/5/C/D/2/1/9/C/8/C/8/0/8/5CD219C8C808.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/psijkof/ModernBusiness.OC.RazorPages/1eff7a3424467d907fe98dd331cdac7468e8a14b/src/ModernBusiness.App/wwwroot/is-cache/5/C/D/2/1/9/C/8/C/8/0/8/5CD219C8C808.png -------------------------------------------------------------------------------- /src/ModernBusiness.App/wwwroot/is-cache/9/D/0/0/3/A/7/1/C/1/5/E/9D003A71C15E.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/psijkof/ModernBusiness.OC.RazorPages/1eff7a3424467d907fe98dd331cdac7468e8a14b/src/ModernBusiness.App/wwwroot/is-cache/9/D/0/0/3/A/7/1/C/1/5/E/9D003A71C15E.png -------------------------------------------------------------------------------- /src/ModernBusiness.App/wwwroot/is-cache/A/9/5/F/6/1/4/0/A/6/5/4/A95F6140A654.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/psijkof/ModernBusiness.OC.RazorPages/1eff7a3424467d907fe98dd331cdac7468e8a14b/src/ModernBusiness.App/wwwroot/is-cache/A/9/5/F/6/1/4/0/A/6/5/4/A95F6140A654.png -------------------------------------------------------------------------------- /src/ModernBusiness.App/wwwroot/is-cache/B/9/3/A/F/0/8/7/E/0/2/5/B93AF087E025.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/psijkof/ModernBusiness.OC.RazorPages/1eff7a3424467d907fe98dd331cdac7468e8a14b/src/ModernBusiness.App/wwwroot/is-cache/B/9/3/A/F/0/8/7/E/0/2/5/B93AF087E025.png -------------------------------------------------------------------------------- /src/ModernBusiness.App/wwwroot/is-cache/B/E/4/D/0/8/D/6/5/C/6/3/BE4D08D65C63.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/psijkof/ModernBusiness.OC.RazorPages/1eff7a3424467d907fe98dd331cdac7468e8a14b/src/ModernBusiness.App/wwwroot/is-cache/B/E/4/D/0/8/D/6/5/C/6/3/BE4D08D65C63.png -------------------------------------------------------------------------------- /src/ModernBusiness.App/wwwroot/is-cache/C/2/5/3/5/9/8/A/4/7/5/5/C253598A4755.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/psijkof/ModernBusiness.OC.RazorPages/1eff7a3424467d907fe98dd331cdac7468e8a14b/src/ModernBusiness.App/wwwroot/is-cache/C/2/5/3/5/9/8/A/4/7/5/5/C253598A4755.jpg -------------------------------------------------------------------------------- /src/ModernBusiness.App/wwwroot/is-cache/D/2/3/C/2/6/8/7/4/6/4/7/D23C26874647.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/psijkof/ModernBusiness.OC.RazorPages/1eff7a3424467d907fe98dd331cdac7468e8a14b/src/ModernBusiness.App/wwwroot/is-cache/D/2/3/C/2/6/8/7/4/6/4/7/D23C26874647.jpg -------------------------------------------------------------------------------- /src/Modules.Pages/ModernBusiness.Pages.About/App_Data/Localization/pt.po: -------------------------------------------------------------------------------- 1 | msgctxt "ModernBusiness.Pages.About.Pages.About" 2 | msgid "About Modern Business" 3 | msgstr "Sobre negocios modernos" -------------------------------------------------------------------------------- /src/Modules.Pages/ModernBusiness.Pages.About/Manifest.cs: -------------------------------------------------------------------------------- 1 | using OrchardCore.Modules.Manifest; 2 | 3 | [assembly: Module( 4 | Name = "ModernBusiness.Pages.About", 5 | Author = "The Orchard Team", 6 | Website = "http://orchardproject.net", 7 | Version = "0.0.1", 8 | Description = "ModernBusiness.Pages.About", 9 | Category = "Content Management" 10 | )] 11 | -------------------------------------------------------------------------------- /src/Modules.Pages/ModernBusiness.Pages.About/ModernBusiness.Pages.About.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | netstandard2.0 5 | true 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /src/Modules.Pages/ModernBusiness.Pages.About/Pages/About.cshtml: -------------------------------------------------------------------------------- 1 | @page 2 | 3 | @{ 4 | var welcomeText = await Orchard.GetContentItemByAliasAsync("alias:aboutbusiness"); 5 | var team = (await Orchard.GetRecentContentItemsByContentTypeAsync("Team")).SingleOrDefault(); 6 | var teamMembers = await Orchard.GetRecentContentItemsByContentTypeAsync("TeamMember"); 7 | var customers = (await Orchard.GetRecentContentItemsByContentTypeAsync("Customers")).SingleOrDefault(); 8 | var customerList = await Orchard.GetRecentContentItemsByContentTypeAsync("Customer"); 9 | } 10 | 11 | 12 | 13 | 14 | 15 |
16 |
17 | 18 |
19 |
20 |

@T["About Modern Business"]

21 | @Html.Raw(welcomeText.Content.HtmlBodyPart.Html) 22 |
23 |
24 | 25 |

@team.Content.TitlePart.Title

26 | 27 | 28 |

@customers.Content.TitlePart.Title

29 | 30 |
31 | @foreach (var item in customerList) 32 | { 33 |
34 | 35 |
36 | } 37 |
38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /src/Modules.Pages/ModernBusiness.Pages.About/Pages/_ViewImports.cshtml: -------------------------------------------------------------------------------- 1 | @inherits OrchardCore.DisplayManagement.RazorPages.Page 2 | @using OrchardCore.Media; 3 | @using OrchardCore.ContentManagement.Display; 4 | @using OrchardCore.Navigation; 5 | @using OrchardCore.Mvc.Utilities; 6 | @using ModernBusiness.Pages.About 7 | @using ModernBusiness.Pages.Shared.ViewModels; 8 | @using OrchardCore.Queries; 9 | 10 | @addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers 11 | @addTagHelper *, OrchardCore.DisplayManagement 12 | @addTagHelper *, OrchardCore.ResourceManagement 13 | @addTagHelper *, OrchardCore.Contents 14 | @addTagHelper *, OrchardCore.Media 15 | @addTagHelper *, OrchardCore.Queries 16 | -------------------------------------------------------------------------------- /src/Modules.Pages/ModernBusiness.Pages.About/Pages/_ViewStart.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | Layout = "Layout"; 3 | } 4 | -------------------------------------------------------------------------------- /src/Modules.Pages/ModernBusiness.Pages.About/Startup.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Microsoft.AspNetCore.Builder; 3 | using Microsoft.AspNetCore.Mvc.ApplicationModels; 4 | using Microsoft.AspNetCore.Mvc.RazorPages; 5 | using Microsoft.AspNetCore.Routing; 6 | using Microsoft.Extensions.DependencyInjection; 7 | using Microsoft.Extensions.Localization; 8 | using OrchardCore.Modules; 9 | 10 | namespace ModernBusiness.Pages.About 11 | { 12 | public class Startup : StartupBase 13 | { 14 | public override void ConfigureServices(IServiceCollection services) 15 | { 16 | services.Configure(options => 17 | { 18 | options.Conventions.AddAreaFolderRoute("ModernBusiness.Pages.About", "/", ""); 19 | }); 20 | } 21 | } 22 | } -------------------------------------------------------------------------------- /src/Modules.Pages/ModernBusiness.Pages.Blog/Manifest.cs: -------------------------------------------------------------------------------- 1 | using OrchardCore.Modules.Manifest; 2 | 3 | [assembly: Module( 4 | Name = "ModernBusiness.Pages.Blog", 5 | Author = "The Orchard Team", 6 | Website = "http://orchardproject.net", 7 | Version = "0.0.1", 8 | Description = "ModernBusiness.Pages.Blog", 9 | Category = "Content Management" 10 | )] 11 | -------------------------------------------------------------------------------- /src/Modules.Pages/ModernBusiness.Pages.Blog/ModernBusiness.Pages.Blog.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | netstandard2.0 5 | true 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /src/Modules.Pages/ModernBusiness.Pages.Blog/Pages/Blog1.cshtml: -------------------------------------------------------------------------------- 1 | @page "{BlogPostTitle?}" 2 | @model Blog1Model 3 | 4 | @if (Model.BlogPost != null) 5 | { 6 | 7 | 8 | 9 | 10 | 11 | } 12 | else 13 | { 14 | 15 | 16 | 17 |
18 |
19 | 20 | 21 | 22 |
23 |
24 | 25 | 26 |
27 |
Search
28 |
29 |
30 | 31 | 32 | 33 | 34 |
35 |
36 |
37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 |
45 |
46 | } 47 | 48 | 49 | -------------------------------------------------------------------------------- /src/Modules.Pages/ModernBusiness.Pages.Blog/Pages/Blog1.cshtml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using Microsoft.AspNetCore.Mvc; 6 | using Microsoft.AspNetCore.Mvc.RazorPages; 7 | using ModernBusiness.Pages.Shared.Services; 8 | using ModernBusiness.Pages.Shared.ViewModels; 9 | using OrchardCore; 10 | using OrchardCore.ContentManagement; 11 | 12 | namespace ModernBusiness.Pages.Blog.Pages 13 | { 14 | public class Blog1Model : PageModel 15 | { 16 | private readonly IOrchardHelper _orchard; 17 | public PagerInfo PagerInfo; 18 | public ContentItem Blog; 19 | public dynamic BlogPostTitle { get; private set; } 20 | public dynamic BlogPost; 21 | private readonly DataRetriever _dataRetriever; 22 | 23 | public Blog1Model(IOrchardHelper orchard, DataRetriever dataRetriever) 24 | { 25 | _orchard = orchard; 26 | _dataRetriever = dataRetriever; 27 | } 28 | 29 | public async Task OnGetAsync(int? pageIndex, string BlogPostTitle) 30 | { 31 | if (string.IsNullOrEmpty(BlogPostTitle)) 32 | { 33 | Blog = await _dataRetriever.InitializeContainer("Blog"); 34 | PagerInfo = await _dataRetriever.InitializePager(3, "/blog1", "BlogPost"); 35 | PagerInfo.CurrentPage = pageIndex ?? 1; 36 | PagerInfo.CurrentItemsOnPage = await _dataRetriever.GetCurrentPage(); 37 | } 38 | else 39 | { 40 | BlogPost = (await _orchard.QueryContentItemsAsync(q => q.Where(c => c.DisplayText == BlogPostTitle && c.Published))).SingleOrDefault(); 41 | } 42 | } 43 | } 44 | } -------------------------------------------------------------------------------- /src/Modules.Pages/ModernBusiness.Pages.Blog/Pages/Blog2.cshtml: -------------------------------------------------------------------------------- 1 | @page "{BlogPostTitle?}" 2 | 3 | @model Blog2Model 4 | 5 | @if (Model.BlogPost != null) 6 | { 7 | 8 | 9 | 10 | 11 | 12 | } 13 | else 14 | { 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | } 23 | -------------------------------------------------------------------------------- /src/Modules.Pages/ModernBusiness.Pages.Blog/Pages/Blog2.cshtml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using Microsoft.AspNetCore.Mvc; 6 | using Microsoft.AspNetCore.Mvc.RazorPages; 7 | using ModernBusiness.Pages.Shared.Services; 8 | using ModernBusiness.Pages.Shared.ViewModels; 9 | using OrchardCore; 10 | using OrchardCore.ContentManagement; 11 | 12 | namespace ModernBusiness.Pages.Blog.Pages 13 | { 14 | public class Blog2Model : PageModel 15 | { 16 | private readonly IOrchardHelper _orchard; 17 | public PagerInfo PagerInfo; 18 | public ContentItem Blog; 19 | public dynamic BlogPostTitle { get; private set; } 20 | public dynamic BlogPost; 21 | private readonly DataRetriever _dataRetriever; 22 | 23 | public Blog2Model(IOrchardHelper orchard, DataRetriever dataRetriever) 24 | { 25 | _orchard = orchard; 26 | _dataRetriever = dataRetriever; 27 | } 28 | 29 | public async Task OnGetAsync(int? pageIndex, string BlogPostTitle) 30 | { 31 | if (!string.IsNullOrEmpty(BlogPostTitle)) 32 | { 33 | BlogPost = (await _orchard.QueryContentItemsAsync(q => q.Where(c => c.DisplayText == BlogPostTitle && c.Published))).SingleOrDefault(); 34 | } 35 | else 36 | { 37 | Blog = await _dataRetriever.InitializeContainer("Blog"); 38 | PagerInfo = await _dataRetriever.InitializePager(4, "/blog2", "BlogPost", false); 39 | PagerInfo.CurrentPage = pageIndex ?? 1; 40 | PagerInfo.CurrentItemsOnPage = await _dataRetriever.GetCurrentPage(); 41 | } 42 | } 43 | } 44 | } -------------------------------------------------------------------------------- /src/Modules.Pages/ModernBusiness.Pages.Blog/Pages/Shared/BlogPost.cshtml: -------------------------------------------------------------------------------- 1 | @model dynamic 2 | 3 |
4 | 5 | 6 |
7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 |

Posted on @Model.PublishedUtc

15 | 16 |
17 | 18 | 19 |
20 | @Orchard.MarkdownToHtml((string)Model.Content.MarkdownBodyPart.Markdown) 21 |
22 | 23 |
24 |
25 |
26 | 27 | 28 |
29 |
Search
30 |
31 |
32 | 33 | 34 | 35 | 36 |
37 |
38 |
39 | 40 | 41 | 42 | 43 | 44 |
45 |
Side Widget
46 |
47 | You can put anything you want inside of these side widgets. They are easy to use, and feature the new Bootstrap 4 card containers! 48 |
49 |
50 | 51 |
52 |
-------------------------------------------------------------------------------- /src/Modules.Pages/ModernBusiness.Pages.Blog/Pages/Shared/_ViewImports.cshtml: -------------------------------------------------------------------------------- 1 | @inherits OrchardCore.DisplayManagement.Razor.RazorPage 2 | @using OrchardCore.ContentManagement.Display; 3 | @using ModernBusiness.Pages.Blog.Pages; 4 | 5 | @addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers 6 | @addTagHelper *, OrchardCore.Media 7 | @addTagHelper *, OrchardCore.DisplayManagement 8 | @addTagHelper *, OrchardCore.ResourceManagement 9 | @addTagHelper *, OrchardCore.Contents 10 | 11 | -------------------------------------------------------------------------------- /src/Modules.Pages/ModernBusiness.Pages.Blog/Pages/_ViewImports.cshtml: -------------------------------------------------------------------------------- 1 | @inherits OrchardCore.DisplayManagement.RazorPages.Page 2 | @using OrchardCore.ContentManagement.Display; 3 | @using ModernBusiness.Pages.Blog.Pages; 4 | 5 | @addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers 6 | @addTagHelper *, OrchardCore.DisplayManagement 7 | @addTagHelper *, OrchardCore.ResourceManagement 8 | @addTagHelper *, OrchardCore.Contents 9 | 10 | -------------------------------------------------------------------------------- /src/Modules.Pages/ModernBusiness.Pages.Blog/Pages/_ViewStart.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | Layout = "Layout"; 3 | } 4 | -------------------------------------------------------------------------------- /src/Modules.Pages/ModernBusiness.Pages.Blog/Startup.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Microsoft.AspNetCore.Builder; 3 | using Microsoft.AspNetCore.Mvc.ApplicationModels; 4 | using Microsoft.AspNetCore.Mvc.RazorPages; 5 | using Microsoft.AspNetCore.Routing; 6 | using Microsoft.Extensions.DependencyInjection; 7 | using Microsoft.Extensions.Localization; 8 | using OrchardCore.Modules; 9 | 10 | namespace ModernBusiness.Pages.Blog 11 | { 12 | public class Startup : StartupBase 13 | { 14 | public override void ConfigureServices(IServiceCollection services) 15 | { 16 | services.Configure(options => 17 | { 18 | options.Conventions.AddAreaFolderRoute("ModernBusiness.Pages.Blog", "/", ""); 19 | }); 20 | 21 | } 22 | } 23 | } -------------------------------------------------------------------------------- /src/Modules.Pages/ModernBusiness.Pages.Contact/Manifest.cs: -------------------------------------------------------------------------------- 1 | using OrchardCore.Modules.Manifest; 2 | 3 | [assembly: Module( 4 | Name = "ModernBusiness.Pages.Contact", 5 | Author = "The Orchard Team", 6 | Website = "http://orchardproject.net", 7 | Version = "0.0.1", 8 | Description = "ModernBusiness.Pages.Contact", 9 | Category = "Content Management" 10 | )] 11 | -------------------------------------------------------------------------------- /src/Modules.Pages/ModernBusiness.Pages.Contact/ModernBusiness.Pages.Contact.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | netstandard2.0 5 | true 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /src/Modules.Pages/ModernBusiness.Pages.Contact/Pages/Contact.cshtml: -------------------------------------------------------------------------------- 1 | @page "{ThankYou?}" 2 | @inject OrchardCore.ContentManagement.Display.IContentItemDisplayManager DisplayManager 3 | @{ 4 | var form = (await Orchard.GetRecentContentItemsByContentTypeAsync("Form")).Where(c => c.DisplayText == "Contact").SingleOrDefault(); 5 | } 6 | 7 | @functions { 8 | [FromRoute] 9 | public string ThankYou { get; set; } 10 | } 11 | 12 | 13 | 14 | 15 | @if (!string.IsNullOrEmpty(ThankYou)) 16 | { 17 |
18 |
19 |
20 |
21 |

Thank you for contacting us.

22 |

We will contact you as soon as possible!

23 |
24 |
25 | } 26 | else 27 | { 28 |
29 | 30 |
31 | 32 | 33 |
34 |
35 |

Contact Details

36 |

37 | 3481 Melrose Place 38 |
Beverly Hills, CA 90210 39 |
40 |

41 |

42 | P: (123) 456-7890 43 |

44 |

45 | E: 46 | 47 | name@example.com 48 | 49 |

50 |

51 | H: Monday - Friday: 9:00 AM to 5:00 PM 52 |

53 |
54 |
55 | 56 | 57 | 58 |
59 |
60 |

Send us a Message

61 | @await DisplayAsync(await DisplayManager.BuildDisplayAsync(form, null, "Detail")) 62 |
63 |
64 | } 65 | 66 | 67 | 68 | 69 | -------------------------------------------------------------------------------- /src/Modules.Pages/ModernBusiness.Pages.Contact/Pages/_ViewImports.cshtml: -------------------------------------------------------------------------------- 1 | @inherits OrchardCore.DisplayManagement.RazorPages.Page 2 | @using OrchardCore.Forms 3 | @using OrchardCore.ContentManagement.Display 4 | 5 | @addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers 6 | @addTagHelper *, OrchardCore.DisplayManagement 7 | @addTagHelper *, OrchardCore.ResourceManagement 8 | @addTagHelper *, OrchardCore.Forms 9 | @addTagHelper *, OrchardCore.Contents 10 | @addTagHelper *, OrchardCore.Menu 11 | -------------------------------------------------------------------------------- /src/Modules.Pages/ModernBusiness.Pages.Contact/Pages/_ViewStart.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | Layout = "Layout"; 3 | } 4 | -------------------------------------------------------------------------------- /src/Modules.Pages/ModernBusiness.Pages.Contact/Startup.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Microsoft.AspNetCore.Builder; 3 | using Microsoft.AspNetCore.Mvc.ApplicationModels; 4 | using Microsoft.AspNetCore.Mvc.RazorPages; 5 | using Microsoft.AspNetCore.Routing; 6 | using Microsoft.Extensions.DependencyInjection; 7 | using Microsoft.Extensions.Localization; 8 | using OrchardCore.Modules; 9 | 10 | namespace ModernBusiness.Pages 11 | { 12 | public class Startup : StartupBase 13 | { 14 | public override void ConfigureServices(IServiceCollection services) 15 | { 16 | services.Configure(options => 17 | { 18 | options.Conventions.AddAreaFolderRoute("ModernBusiness.Pages.Contact", "/", ""); 19 | }); 20 | 21 | } 22 | } 23 | } -------------------------------------------------------------------------------- /src/Modules.Pages/ModernBusiness.Pages.Faq/Manifest.cs: -------------------------------------------------------------------------------- 1 | using OrchardCore.Modules.Manifest; 2 | 3 | [assembly: Module( 4 | Name = "ModernBusiness.Pages.Faq", 5 | Author = "The Orchard Team", 6 | Website = "http://orchardproject.net", 7 | Version = "0.0.1", 8 | Description = "ModernBusiness.Pages.Faq", 9 | Category = "Content Management" 10 | )] -------------------------------------------------------------------------------- /src/Modules.Pages/ModernBusiness.Pages.Faq/ModernBusiness.Pages.Faq.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | netstandard2.0 5 | true 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /src/Modules.Pages/ModernBusiness.Pages.Faq/Pages/_ViewImports.cshtml: -------------------------------------------------------------------------------- 1 | @inherits OrchardCore.DisplayManagement.RazorPages.Page 2 | @using OrchardCore.Media; 3 | @using OrchardCore.ContentManagement.Display; 4 | @using OrchardCore.Navigation; 5 | @using ModernBusiness.Pages.Faq 6 | @using ModernBusiness.Pages.Shared.ViewModels 7 | 8 | @addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers 9 | @addTagHelper *, OrchardCore.Media 10 | @addTagHelper *, OrchardCore.DisplayManagement 11 | @addTagHelper *, OrchardCore.ResourceManagement 12 | @addTagHelper *, OrchardCore.Contents 13 | @addTagHelper *, OrchardCore.Menu 14 | @addTagHelper *, OrchardCore.Navigation 15 | -------------------------------------------------------------------------------- /src/Modules.Pages/ModernBusiness.Pages.Faq/Pages/_ViewStart.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | Layout = "Layout"; 3 | } 4 | -------------------------------------------------------------------------------- /src/Modules.Pages/ModernBusiness.Pages.Faq/Pages/faq.cshtml: -------------------------------------------------------------------------------- 1 | @page 2 | @model ModernBusiness.Pages.Faq.FaqModel 3 | 4 |
5 | 6 | 7 | 8 | 9 | @{ 10 | // project to list with index 11 | var pairsIndexVal = Model.FaqList.Select((Value, Index) => new { Value, Index }); 12 | } 13 |
14 | @foreach (var qa in Model.FaqList) 15 | { 16 | var index = pairsIndexVal.Single(e => e.Value.ContentItemId == qa.ContentItemId).Index; 17 |
18 | 23 |
24 |
25 | @qa.Content.HtmlBodyPart.Html 26 |
27 |
28 |
29 | } 30 |
31 |
32 | -------------------------------------------------------------------------------- /src/Modules.Pages/ModernBusiness.Pages.Faq/Pages/faq.cshtml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using Microsoft.AspNetCore.Mvc; 6 | using Microsoft.AspNetCore.Mvc.RazorPages; 7 | using OrchardCore; 8 | using OrchardCore.ContentManagement; 9 | 10 | namespace ModernBusiness.Pages.Faq 11 | { 12 | public class FaqModel : PageModel 13 | { 14 | private readonly IOrchardHelper _orchard; 15 | 16 | public FaqModel(IOrchardHelper orchard) 17 | { 18 | _orchard = orchard; 19 | } 20 | 21 | public ContentItem Faq { get; private set; } 22 | public IEnumerable FaqList { get; private set; } 23 | 24 | public async void OnGet() 25 | { 26 | Faq = (await _orchard.GetRecentContentItemsByContentTypeAsync("FAQ")).SingleOrDefault(); 27 | FaqList = await _orchard.GetRecentContentItemsByContentTypeAsync("QuestionAnswer"); 28 | } 29 | } 30 | } -------------------------------------------------------------------------------- /src/Modules.Pages/ModernBusiness.Pages.Faq/Startup.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using Microsoft.AspNetCore.Builder; 6 | using Microsoft.AspNetCore.Http; 7 | using Microsoft.AspNetCore.Mvc.ApplicationModels; 8 | using Microsoft.AspNetCore.Mvc.RazorPages; 9 | using Microsoft.Extensions.DependencyInjection; 10 | using OrchardCore.Modules; 11 | 12 | namespace ModernBusiness.Pages.Faq 13 | { 14 | public class Startup : StartupBase 15 | { 16 | // This method gets called by the runtime. Use this method to add services to the container. 17 | // For more information on how to configure your application, visit https://go.microsoft.com/fwlink/?LinkID=398940 18 | public override void ConfigureServices(IServiceCollection services) 19 | { 20 | services.Configure(options => 21 | { 22 | options.Conventions.AddAreaFolderRoute("ModernBusiness.Pages.Faq", "/", ""); 23 | }); 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/Modules.Pages/ModernBusiness.Pages.Portfolio/Manifest.cs: -------------------------------------------------------------------------------- 1 | using OrchardCore.Modules.Manifest; 2 | 3 | [assembly: Module( 4 | Name = "ModernBusiness.Pages.Portfolio", 5 | Author = "The Orchard Team", 6 | Website = "http://orchardproject.net", 7 | Version = "0.0.1", 8 | Description = "ModernBusiness.Pages.Portfolio", 9 | Category = "Content Management" 10 | )] -------------------------------------------------------------------------------- /src/Modules.Pages/ModernBusiness.Pages.Portfolio/ModernBusiness.Pages.Portfolio.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | netstandard2.0 5 | true 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /src/Modules.Pages/ModernBusiness.Pages.Portfolio/Pages/_ViewImports.cshtml: -------------------------------------------------------------------------------- 1 | @inherits OrchardCore.DisplayManagement.RazorPages.Page 2 | @using OrchardCore.Media; 3 | @using OrchardCore.ContentManagement.Display; 4 | @using OrchardCore.Navigation; 5 | @using ModernBusiness.Pages.Pages 6 | @using ModernBusiness.Pages.Shared.ViewModels 7 | 8 | @addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers 9 | @addTagHelper *, OrchardCore.Media 10 | @addTagHelper *, OrchardCore.DisplayManagement 11 | @addTagHelper *, OrchardCore.ResourceManagement 12 | @addTagHelper *, OrchardCore.Contents 13 | @addTagHelper *, OrchardCore.Menu 14 | @addTagHelper *, OrchardCore.Navigation 15 | -------------------------------------------------------------------------------- /src/Modules.Pages/ModernBusiness.Pages.Portfolio/Pages/_ViewStart.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | Layout = "Layout"; 3 | } 4 | -------------------------------------------------------------------------------- /src/Modules.Pages/ModernBusiness.Pages.Portfolio/Pages/portfolio1.cshtml: -------------------------------------------------------------------------------- 1 | @page 2 | 3 | @model portfolio1Model 4 | 5 | @inject IContentItemDisplayManager DisplayManager 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /src/Modules.Pages/ModernBusiness.Pages.Portfolio/Pages/portfolio1.cshtml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using Microsoft.AspNetCore.Mvc; 6 | using Microsoft.AspNetCore.Mvc.RazorPages; 7 | using ModernBusiness.Pages.Shared.Services; 8 | using ModernBusiness.Pages.Shared.ViewModels; 9 | using OrchardCore; 10 | using OrchardCore.ContentManagement; 11 | 12 | namespace ModernBusiness.Pages.Pages 13 | { 14 | public class portfolio1Model : PageModel 15 | { 16 | private readonly IOrchardHelper _orchard; 17 | public PagerInfo PagerInfo; 18 | public ContentItem Portfolio; 19 | private readonly DataRetriever _dataRetriever; 20 | 21 | public portfolio1Model(IOrchardHelper orchard, DataRetriever dataRetriever) 22 | { 23 | _orchard = orchard; 24 | _dataRetriever = dataRetriever; 25 | } 26 | public async void OnGet(int? pageIndex) 27 | { 28 | Portfolio = await _dataRetriever.InitializeContainer("Portfolio"); 29 | 30 | PagerInfo = await _dataRetriever.InitializePager(4, "/portfolio1", "project"); 31 | 32 | PagerInfo.CurrentPage = pageIndex ?? 1; 33 | 34 | PagerInfo.CurrentItemsOnPage = await _dataRetriever.GetCurrentPage(); 35 | } 36 | } 37 | } -------------------------------------------------------------------------------- /src/Modules.Pages/ModernBusiness.Pages.Portfolio/Pages/portfolio2.cshtml: -------------------------------------------------------------------------------- 1 | @page 2 | 3 | @model portfolio2Model 4 | 5 | @inject IContentItemDisplayManager DisplayManager 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 16 |
17 | 18 | -------------------------------------------------------------------------------- /src/Modules.Pages/ModernBusiness.Pages.Portfolio/Pages/portfolio2.cshtml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using Microsoft.AspNetCore.Mvc; 6 | using Microsoft.AspNetCore.Mvc.RazorPages; 7 | using ModernBusiness.Pages.Shared.Services; 8 | using ModernBusiness.Pages.Shared.ViewModels; 9 | using OrchardCore; 10 | using OrchardCore.ContentManagement; 11 | 12 | namespace ModernBusiness.Pages.Pages 13 | { 14 | public class portfolio2Model : PageModel 15 | { 16 | private readonly IOrchardHelper _orchard; 17 | public PagerInfo PagerInfo; 18 | public ContentItem Portfolio; 19 | private readonly DataRetriever _dataRetriever; 20 | 21 | public portfolio2Model(IOrchardHelper orchard, DataRetriever dataRetriever) 22 | { 23 | _orchard = orchard; 24 | _dataRetriever = dataRetriever; 25 | } 26 | public async void OnGet(int? pageIndex) 27 | { 28 | Portfolio = await _dataRetriever.InitializeContainer("Portfolio"); 29 | 30 | PagerInfo = await _dataRetriever.InitializePager(6, "/portfolio2", "project"); 31 | 32 | PagerInfo.CurrentPage = pageIndex ?? 1; 33 | 34 | PagerInfo.CurrentItemsOnPage = await _dataRetriever.GetCurrentPage(); 35 | 36 | } 37 | } 38 | } -------------------------------------------------------------------------------- /src/Modules.Pages/ModernBusiness.Pages.Portfolio/Pages/portfolio3.cshtml: -------------------------------------------------------------------------------- 1 | @page 2 | 3 | @model portfolio3Model 4 | 5 | @inject IContentItemDisplayManager DisplayManager 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 16 |
17 | 18 | -------------------------------------------------------------------------------- /src/Modules.Pages/ModernBusiness.Pages.Portfolio/Pages/portfolio3.cshtml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Linq.Expressions; 5 | using System.Threading.Tasks; 6 | using Microsoft.AspNetCore.Mvc; 7 | using Microsoft.AspNetCore.Mvc.RazorPages; 8 | using ModernBusiness.Pages.Shared.Services; 9 | using ModernBusiness.Pages.Shared.ViewModels; 10 | using OrchardCore; 11 | using OrchardCore.ContentManagement; 12 | using OrchardCore.DisplayManagement.ModelBinding; 13 | using OrchardCore.Navigation; 14 | 15 | namespace ModernBusiness.Pages.Pages 16 | { 17 | public class portfolio3Model : PageModel 18 | { 19 | private readonly IOrchardHelper _orchard; 20 | public PagerInfo PagerInfo; 21 | public ContentItem Portfolio; 22 | private readonly DataRetriever _dataRetriever; 23 | 24 | public portfolio3Model(IOrchardHelper orchard, DataRetriever dataRetriever) 25 | { 26 | _orchard = orchard; 27 | _dataRetriever = dataRetriever; 28 | } 29 | 30 | public async void OnGet(int? pageIndex) 31 | { 32 | Portfolio = await _dataRetriever.InitializeContainer("Portfolio"); 33 | 34 | PagerInfo = await _dataRetriever.InitializePager(6, "/portfolio3", "project"); 35 | 36 | PagerInfo.CurrentPage = pageIndex ?? 1; 37 | 38 | PagerInfo.CurrentItemsOnPage = await _dataRetriever.GetCurrentPage(); 39 | 40 | } 41 | 42 | } 43 | } -------------------------------------------------------------------------------- /src/Modules.Pages/ModernBusiness.Pages.Portfolio/Pages/portfolio4.cshtml: -------------------------------------------------------------------------------- 1 | @page 2 | 3 | @model portfolio4Model 4 | 5 | @inject IContentItemDisplayManager DisplayManager 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 | 15 |
16 | 17 | -------------------------------------------------------------------------------- /src/Modules.Pages/ModernBusiness.Pages.Portfolio/Pages/portfolio4.cshtml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using Microsoft.AspNetCore.Mvc; 6 | using Microsoft.AspNetCore.Mvc.RazorPages; 7 | using ModernBusiness.Pages.Shared.Services; 8 | using ModernBusiness.Pages.Shared.ViewModels; 9 | using OrchardCore; 10 | using OrchardCore.ContentManagement; 11 | 12 | namespace ModernBusiness.Pages.Pages 13 | { 14 | public class portfolio4Model : PageModel 15 | { 16 | private readonly IOrchardHelper _orchard; 17 | public PagerInfo PagerInfo; 18 | public ContentItem Portfolio; 19 | private readonly DataRetriever _dataRetriever; 20 | 21 | public portfolio4Model(IOrchardHelper orchard, DataRetriever dataRetriever) 22 | { 23 | _orchard = orchard; 24 | _dataRetriever = dataRetriever; 25 | } 26 | 27 | public async void OnGet(int? pageIndex) 28 | { 29 | Portfolio = await _dataRetriever.InitializeContainer("Portfolio"); 30 | 31 | PagerInfo = await _dataRetriever.InitializePager(8, "/portfolio4", "project"); 32 | 33 | PagerInfo.CurrentPage = pageIndex ?? 1; 34 | 35 | PagerInfo.CurrentItemsOnPage = await _dataRetriever.GetCurrentPage(); 36 | 37 | } 38 | } 39 | } -------------------------------------------------------------------------------- /src/Modules.Pages/ModernBusiness.Pages.Portfolio/Pages/project.cshtml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using Microsoft.AspNetCore.Mvc; 7 | using Microsoft.AspNetCore.Mvc.RazorPages; 8 | using Newtonsoft.Json.Linq; 9 | using OrchardCore; 10 | using OrchardCore.ContentManagement; 11 | 12 | namespace ModernBusiness.Pages.Pages 13 | { 14 | public class projectModel : PageModel 15 | { 16 | private readonly IOrchardHelper _orchardHelper; 17 | public dynamic Project { get; private set; } 18 | 19 | public IEnumerable RelatedProjects { get; private set; } 20 | 21 | public projectModel(IOrchardHelper orchardHelper) 22 | { 23 | _orchardHelper = orchardHelper; 24 | } 25 | 26 | public async Task OnGetAsync(string projectTitle) 27 | { 28 | 29 | Project = _orchardHelper.QueryContentItemsAsync(q => q.Where(c => c.DisplayText == projectTitle)) 30 | .GetAwaiter().GetResult().SingleOrDefault(); 31 | 32 | var relatedProjects = (IEnumerable)Project?.Content.Project.RelatedProjects?.ContentItemIds?.ToObject(); 33 | 34 | if (relatedProjects?.Count() > 0) 35 | { 36 | RelatedProjects = await 37 | _orchardHelper.GetContentItemsByIdAsync(relatedProjects); 38 | } 39 | } 40 | } 41 | } -------------------------------------------------------------------------------- /src/Modules.Pages/ModernBusiness.Pages.Portfolio/Startup.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using Microsoft.AspNetCore.Builder; 6 | using Microsoft.AspNetCore.Http; 7 | using Microsoft.AspNetCore.Mvc.ApplicationModels; 8 | using Microsoft.AspNetCore.Mvc.RazorPages; 9 | using Microsoft.Extensions.DependencyInjection; 10 | using ModernBusiness.Pages.Shared.Services; 11 | using OrchardCore.Modules; 12 | 13 | namespace ModernBusiness.Pages.Portfolio 14 | { 15 | public class Startup : StartupBase 16 | { 17 | // This method gets called by the runtime. Use this method to add services to the container. 18 | // For more information on how to configure your application, visit https://go.microsoft.com/fwlink/?LinkID=398940 19 | public override void ConfigureServices(IServiceCollection services) 20 | { 21 | 22 | services.Configure(options => 23 | { 24 | options.Conventions.AddAreaFolderRoute("ModernBusiness.Pages.Portfolio", "/", ""); 25 | }); 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/Modules.Pages/ModernBusiness.Pages.PricePlan/App_Data/Localization/en.po: -------------------------------------------------------------------------------- 1 | msgctxt "ModernBusiness.Pages.PricePlan.Price_PlanModel" 2 | msgid "Prices" 3 | msgstr "Prices" 4 | msgid "Subheading pricing" 5 | msgstr "Our current price plans" 6 | 7 | msgctxt "ModernBusiness.Pages.PricePlan.Pages.Price-Plan" 8 | msgid "per month" 9 | msgstr "per month" 10 | msgid "Sign Up!" 11 | msgstr "Sign up now!" 12 | msgid "Single-node" 13 | msgstr "Single node instance" 14 | msgid "Light-workloads" 15 | msgstr "Best for light workloads" 16 | msgid "Standard-support" 17 | msgstr "Standard support during office hours" 18 | msgid "Redundant-dual" 19 | msgstr "Dual node server for optimal up time" 20 | msgid "High-uptime" 21 | msgstr "Highly available" 22 | msgid "Priority-support" 23 | msgstr "Priority support" 24 | msgid "Fully-redundant" 25 | msgstr "Highest available option" 26 | msgid "Highest-uptime" 27 | msgstr "99.9999 % guaranteed up time" 28 | msgid "247-support" 29 | msgstr "Extended 24 / 7 support available" -------------------------------------------------------------------------------- /src/Modules.Pages/ModernBusiness.Pages.PricePlan/App_Data/Localization/nl.po: -------------------------------------------------------------------------------- 1 | msgctxt "ModernBusiness.Pages.PricePlan.Price_PlanModel" 2 | msgid "Prices" 3 | msgstr "Prijzen" 4 | msgid "Subheading pricing" 5 | msgstr "Onze huidige prijsplannen" 6 | 7 | msgctxt "ModernBusiness.Pages.PricePlan.Pages.Price-Plan" 8 | msgid "per month" 9 | msgstr "per maand" 10 | msgid "Sign Up!" 11 | msgstr "Registreer nu!" 12 | msgid "Single-node" 13 | msgstr "Enkelvoudige server" 14 | msgid "Light-workloads" 15 | msgstr "Beste voor licht bezochte websites" 16 | msgid "Standard-support" 17 | msgstr "Standaard ondersteuning" 18 | msgid "Redundant-dual" 19 | msgstr "Dual server installatie" 20 | msgid "High-uptime" 21 | msgstr "Hoge beschikbaarheid" 22 | msgid "Priority-support" 23 | msgstr "Voorrang bij ondersteuningsbehoeften" 24 | msgid "Fully-redundant" 25 | msgstr "Volledig redundant" 26 | msgid "Highest-uptime" 27 | msgstr "Hoogste beschikbaarheid, 99.999%" 28 | msgid "247-support" 29 | msgstr "Dag en nacht ondersteuning" -------------------------------------------------------------------------------- /src/Modules.Pages/ModernBusiness.Pages.PricePlan/App_Data/Localization/pt.po: -------------------------------------------------------------------------------- 1 | msgctxt "ModernBusiness.Pages.PricePlan.Price_PlanModel" 2 | msgid "Prices" 3 | msgstr "Preços" 4 | msgid "Subheading pricing" 5 | msgstr "Os nossos planos" 6 | 7 | msgctxt "ModernBusiness.Pages.PricePlan.Pages.Price-Plan" 8 | msgid "per month" 9 | msgstr "por mês" 10 | msgid "Sign Up!" 11 | msgstr "Registe Agora!" 12 | msgid "Single-node" 13 | msgstr "única instância" 14 | msgid "Light-workloads" 15 | msgstr "Ideal para páginas com pouco trafego" 16 | msgid "Standard-support" 17 | msgstr "Suporte normal" 18 | msgid "Redundant-dual" 19 | msgstr "Duas instancias de servidor" 20 | msgid "High-uptime" 21 | msgstr "Alto tempo online" 22 | msgid "Priority-support" 23 | msgstr "Suporte prioritário" 24 | msgid "Fully-redundant" 25 | msgstr "Vários servidores disponveis" 26 | msgid "Highest-uptime" 27 | msgstr "Garantido 99,9999% de tempo online" 28 | msgid "247-support" 29 | msgstr "Suporte disponivel 24 / 7" -------------------------------------------------------------------------------- /src/Modules.Pages/ModernBusiness.Pages.PricePlan/Manifest.cs: -------------------------------------------------------------------------------- 1 | using OrchardCore.Modules.Manifest; 2 | 3 | [assembly: Module( 4 | Name = "ModernBusiness.Pages.PricePlan", 5 | Author = "The Orchard Team", 6 | Website = "http://orchardproject.net", 7 | Version = "0.0.1", 8 | Description = "ModernBusiness.Pages.PricePlan", 9 | Category = "Content Management" 10 | )] -------------------------------------------------------------------------------- /src/Modules.Pages/ModernBusiness.Pages.PricePlan/ModernBusiness.Pages.PricePlan.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | netstandard2.0 5 | true 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /src/Modules.Pages/ModernBusiness.Pages.PricePlan/Pages/Price-Plan.cshtml: -------------------------------------------------------------------------------- 1 | @page 2 | @model Price_PlanModel 3 | @{ 4 | } 5 | 6 |
7 | 8 | 9 | 10 | 11 | 12 | @{ 13 | // project to list with index 14 | //var pairsIndexVal = Model.PriceList.Select((Value, Index) => new { Value, Index }); 15 | } 16 | 17 |
18 | @foreach (var pricing in Model.PriceList) 19 | { 20 | //var index = pairsIndexVal.Single(e => e.Value.ContentItemId == pricing.ContentItemId).Index; 21 |
22 |
23 |

@pricing.Content.TitlePart.Title

24 |
25 |
@($"{(pricing.Content.PricePlan.Price.Value / 100):C}")
26 |
@T["per month"]
27 |
28 |
    29 | @foreach (var feature in pricing.Content.BagPart.ContentItems) 30 | { 31 |
  • @T[(string)feature.DisplayText]
  • 32 | } 33 |
  • 34 | @T["Sign Up!"] 35 |
  • 36 |
37 |
38 |
39 | } 40 |
41 | 42 |
43 | 44 | -------------------------------------------------------------------------------- /src/Modules.Pages/ModernBusiness.Pages.PricePlan/Pages/Price-Plan.cshtml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using Microsoft.AspNetCore.Mvc; 6 | using Microsoft.AspNetCore.Mvc.RazorPages; 7 | using Microsoft.Extensions.Localization; 8 | using ModernBusiness.Pages.Shared.ViewModels; 9 | using OrchardCore; 10 | using OrchardCore.ContentManagement; 11 | 12 | namespace ModernBusiness.Pages.PricePlan 13 | { 14 | public class Price_PlanModel : PageModel 15 | { 16 | private readonly IOrchardHelper _orchard; 17 | private readonly IStringLocalizer T; 18 | 19 | public Price_PlanModel(IOrchardHelper orchard, IStringLocalizer t) 20 | { 21 | _orchard = orchard; 22 | T = t; 23 | } 24 | 25 | public ContentItem Pricing { get; private set; } 26 | public BreadCrumbViewModel BreadCrumbVM { get; private set; } 27 | public IEnumerable PriceList { get; private set; } 28 | 29 | public async void OnGet() 30 | { 31 | Pricing = (await _orchard.GetRecentContentItemsByContentTypeAsync("Pricing")).SingleOrDefault(); 32 | BreadCrumbVM = new BreadCrumbViewModel() 33 | { 34 | DisplayText = T[Pricing.DisplayText], 35 | SubTitle = T[(string)Pricing.Content.SubtitlePart?.Subtitle.Text ?? ""] 36 | }; 37 | PriceList = (await _orchard.GetRecentContentItemsByContentTypeAsync("PricePlan")).OrderBy(p => p.Content.PricePlan.Price.Value); 38 | } 39 | } 40 | } -------------------------------------------------------------------------------- /src/Modules.Pages/ModernBusiness.Pages.PricePlan/Pages/_ViewImports.cshtml: -------------------------------------------------------------------------------- 1 | @inherits OrchardCore.DisplayManagement.RazorPages.Page 2 | @using OrchardCore.Media; 3 | @using OrchardCore.ContentManagement.Display; 4 | @using OrchardCore.Navigation; 5 | @using ModernBusiness.Pages.PricePlan 6 | @using ModernBusiness.Pages.Shared.ViewModels 7 | 8 | @addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers 9 | @addTagHelper *, OrchardCore.Media 10 | @addTagHelper *, OrchardCore.DisplayManagement 11 | @addTagHelper *, OrchardCore.ResourceManagement 12 | @addTagHelper *, OrchardCore.Contents 13 | @addTagHelper *, OrchardCore.Menu 14 | @addTagHelper *, OrchardCore.Navigation 15 | -------------------------------------------------------------------------------- /src/Modules.Pages/ModernBusiness.Pages.PricePlan/Pages/_ViewStart.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | Layout = "Layout"; 3 | } 4 | -------------------------------------------------------------------------------- /src/Modules.Pages/ModernBusiness.Pages.PricePlan/Startup.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using Microsoft.AspNetCore.Builder; 6 | using Microsoft.AspNetCore.Http; 7 | using Microsoft.AspNetCore.Mvc.ApplicationModels; 8 | using Microsoft.AspNetCore.Mvc.RazorPages; 9 | using Microsoft.Extensions.DependencyInjection; 10 | using OrchardCore.Modules; 11 | 12 | namespace ModernBusiness.Pages.PricePlan 13 | { 14 | public class Startup : StartupBase 15 | { 16 | // This method gets called by the runtime. Use this method to add services to the container. 17 | // For more information on how to configure your application, visit https://go.microsoft.com/fwlink/?LinkID=398940 18 | public override void ConfigureServices(IServiceCollection services) 19 | { 20 | services.Configure(options => 21 | { 22 | options.Conventions.AddAreaFolderRoute("ModernBusiness.Pages.PricePlan", "/", ""); 23 | }); 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/Modules.Pages/ModernBusiness.Pages.Service/Manifest.cs: -------------------------------------------------------------------------------- 1 | using OrchardCore.Modules.Manifest; 2 | 3 | [assembly: Module( 4 | Name = "ModernBusiness.Pages.Service", 5 | Author = "The Orchard Team", 6 | Website = "http://orchardproject.net", 7 | Version = "0.0.1", 8 | Description = "ModernBusiness.Pages.Service", 9 | Category = "Content Management" 10 | )] -------------------------------------------------------------------------------- /src/Modules.Pages/ModernBusiness.Pages.Service/ModernBusiness.Pages.Service.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | netstandard2.0 5 | true 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /src/Modules.Pages/ModernBusiness.Pages.Service/Pages/Services.cshtml: -------------------------------------------------------------------------------- 1 | @page 2 | @model ServicesModel 3 | @{ 4 | } 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 | 15 |
16 | 17 | -------------------------------------------------------------------------------- /src/Modules.Pages/ModernBusiness.Pages.Service/Pages/Services.cshtml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using Microsoft.AspNetCore.Mvc; 6 | using Microsoft.AspNetCore.Mvc.RazorPages; 7 | using OrchardCore; 8 | using OrchardCore.Contents; 9 | 10 | namespace ModernBusiness.Pages.Service 11 | { 12 | public class ServicesModel : PageModel 13 | { 14 | private readonly IOrchardHelper _orchardHelper; 15 | public dynamic ServicesContainer { get; private set; } 16 | public dynamic ServicesList { get; private set; } 17 | 18 | public ServicesModel(IOrchardHelper orchardHelper) 19 | { 20 | _orchardHelper = orchardHelper; 21 | } 22 | 23 | public void OnGet() 24 | { 25 | ServicesContainer = _orchardHelper.GetRecentContentItemsByContentTypeAsync("Services").GetAwaiter().GetResult().SingleOrDefault(); 26 | ServicesList = _orchardHelper.GetRecentContentItemsByContentTypeAsync("Service").GetAwaiter().GetResult().OrderByDescending(c => c.CreatedUtc).Take(3); 27 | } 28 | } 29 | } -------------------------------------------------------------------------------- /src/Modules.Pages/ModernBusiness.Pages.Service/Pages/_ViewImports.cshtml: -------------------------------------------------------------------------------- 1 | @inherits OrchardCore.DisplayManagement.RazorPages.Page 2 | @using OrchardCore.Media; 3 | @using OrchardCore.ContentManagement.Display; 4 | @using ModernBusiness.Pages.Service; 5 | 6 | @addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers 7 | @addTagHelper *, OrchardCore.Media 8 | @addTagHelper *, OrchardCore.DisplayManagement 9 | @addTagHelper *, OrchardCore.ResourceManagement 10 | @addTagHelper *, OrchardCore.Contents 11 | @addTagHelper *, OrchardCore.Menu 12 | @addTagHelper *, OrchardCore.Navigation 13 | -------------------------------------------------------------------------------- /src/Modules.Pages/ModernBusiness.Pages.Service/Pages/_ViewStart.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | Layout = "Layout"; 3 | } 4 | -------------------------------------------------------------------------------- /src/Modules.Pages/ModernBusiness.Pages.Service/Startup.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using Microsoft.AspNetCore.Builder; 6 | using Microsoft.AspNetCore.Http; 7 | using Microsoft.AspNetCore.Mvc.ApplicationModels; 8 | using Microsoft.AspNetCore.Mvc.RazorPages; 9 | using Microsoft.Extensions.DependencyInjection; 10 | using OrchardCore.Modules; 11 | 12 | namespace ModernBusiness.Pages.Service 13 | { 14 | public class Startup : StartupBase 15 | { 16 | // This method gets called by the runtime. Use this method to add services to the container. 17 | // For more information on how to configure your application, visit https://go.microsoft.com/fwlink/?LinkID=398940 18 | public override void ConfigureServices(IServiceCollection services) 19 | { 20 | services.Configure(options => 21 | { 22 | options.Conventions.AddAreaFolderRoute("ModernBusiness.Pages.Service", "/", ""); 23 | }); 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/Modules.Pages/ModernBusiness.Pages.Shared/Manifest.cs: -------------------------------------------------------------------------------- 1 | using OrchardCore.Modules.Manifest; 2 | 3 | [assembly: Module( 4 | Name = "ModernBusiness.Pages.Shared", 5 | Author = "The Orchard Team", 6 | Website = "http://orchardproject.net", 7 | Version = "0.0.1", 8 | Description = "ModernBusiness.Pages.Shared", 9 | Category = "Content Management" 10 | )] -------------------------------------------------------------------------------- /src/Modules.Pages/ModernBusiness.Pages.Shared/ModernBusiness.Pages.Shared.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | netstandard2.0 5 | true 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /src/Modules.Pages/ModernBusiness.Pages.Shared/Pages/Shared/BlogPostCard1.cshtml: -------------------------------------------------------------------------------- 1 | @model dynamic 2 | 3 | @foreach (var post in Model.CurrentItemsOnPage) 4 | { 5 | var blogLink = $"blog1/{post.DisplayText}"; 6 |
7 | Card image cap 8 |
9 |

@post.Content.TitlePart.Title

10 |

@(Orchard.MarkdownToHtml(((string)post.Content.MarkdownBodyPart.Markdown).Ellipsize(200)))

11 | Read More 12 |
13 | 16 |
17 | } 18 | -------------------------------------------------------------------------------- /src/Modules.Pages/ModernBusiness.Pages.Shared/Pages/Shared/BlogPostCard2.cshtml: -------------------------------------------------------------------------------- 1 | @model dynamic 2 | 3 | @foreach (var post in Model.CurrentItemsOnPage) 4 | { 5 | var blogLink = $"blog2/{post.DisplayText}"; 6 |
7 |
8 |
9 |
10 | 11 | 12 | 13 |
14 |
15 |

@post.Content.TitlePart.Title

16 |

@Html.Raw(((string)post.Content.HtmlBodyPart.Html).Ellipsize(200))

17 | Read More → 18 |
19 |
20 |
21 | 24 |
25 | } 26 | -------------------------------------------------------------------------------- /src/Modules.Pages/ModernBusiness.Pages.Shared/Pages/Shared/BreadcrumbHeader.cshtml: -------------------------------------------------------------------------------- 1 | @model dynamic 2 | @{ 3 | var breadCrumb = Context.Request.Path.Value.Split('/'); 4 | var allItems = breadCrumb.Count() - 1; 5 | } 6 | 7 |
8 | @if (Model != null) 9 | { 10 |

11 | @Model.DisplayText 12 | @if (Model.Content != null) 13 | { 14 | @(Model.Content?.SubtitlePart?.Subtitle.Text ?? "") 15 | } 16 | else 17 | { 18 | @(Model.SubTitle ?? "") 19 | } 20 |

21 | } 22 | 38 |
-------------------------------------------------------------------------------- /src/Modules.Pages/ModernBusiness.Pages.Shared/Pages/Shared/CallToAction.cshtml: -------------------------------------------------------------------------------- 1 | @model dynamic 2 | @* Uses RawContent contenttype *@ 3 | 4 |
5 |
6 | 7 | @if (Model.Content.MarkdownBodyPart != null) 8 | { 9 | @Orchard.MarkdownToHtml((string)Model.Content.MarkdownBodyPart.Markdown) 10 | } 11 | else 12 | { 13 | @Html.Raw(Model.Content.HtmlBodyPart.Html) 14 | } 15 |
16 | 20 |
21 | -------------------------------------------------------------------------------- /src/Modules.Pages/ModernBusiness.Pages.Shared/Pages/Shared/Categories.cshtml: -------------------------------------------------------------------------------- 1 | @model dynamic 2 | @{ 3 | var blogPosts = (await Orchard.GetRecentContentItemsByContentTypeAsync("BLogPost")); 4 | var tags = ""; 5 | 6 | foreach (var item in blogPosts) 7 | { 8 | tags += item.Content.TagsPart.Tags + ","; 9 | } 10 | 11 | var tagArray = tags.Split(',').Select(s => s.Trim()); 12 | } 13 | 14 |
15 |
Categories
16 |
17 |
18 | @foreach (var tag in tagArray.Distinct()) 19 | { 20 |
21 | @tag 22 |
23 | } 24 |
25 |
26 |
27 | -------------------------------------------------------------------------------- /src/Modules.Pages/ModernBusiness.Pages.Shared/Pages/Shared/LinkList.cshtml: -------------------------------------------------------------------------------- 1 | @model dynamic 2 | 3 | @foreach (var item in Model) 4 | { 5 | if (!string.IsNullOrEmpty((string)item.LinkMenuItemPart.Url)) 6 | { 7 | @item.LinkMenuItemPart.Name 8 | } 9 | if (item.MenuItemsListPart?.MenuItems != null) 10 | { 11 | 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/Modules.Pages/ModernBusiness.Pages.Shared/Pages/Shared/PagerControl.cshtml: -------------------------------------------------------------------------------- 1 | @model PagerInfo 2 | @if (Model.TotalPages > 1) 3 | { 4 | 5 | 30 | } -------------------------------------------------------------------------------- /src/Modules.Pages/ModernBusiness.Pages.Shared/Pages/Shared/ProjectCards1.cshtml: -------------------------------------------------------------------------------- 1 | @model dynamic 2 | 3 | @foreach (var project in Model.CurrentItemsOnPage) 4 | { 5 | var projectLink = $"~/project/{project.DisplayText}"; 6 | 7 |
8 |
9 | 10 | 11 | 12 |
13 |
14 |

15 | @project.DisplayText 16 |

17 |

@project.Content.HtmlBodyPart.Html

18 | 19 | @T["View Project"] 20 | 21 | 22 |
23 |
24 |
25 | } 26 | -------------------------------------------------------------------------------- /src/Modules.Pages/ModernBusiness.Pages.Shared/Pages/Shared/ProjectCards2.cshtml: -------------------------------------------------------------------------------- 1 | @model dynamic 2 | 3 | @foreach (var project in Model.CurrentItemsOnPage) 4 | { 5 | var projectLink = $"~/project/{project.DisplayText}"; 6 |
7 |
8 | 9 | 10 | 11 |
12 | 13 |

14 | @project.DisplayText 15 |

16 |
17 |

@project.Content.HtmlBodyPart.Html

18 |
19 |
20 |
21 | } 22 | -------------------------------------------------------------------------------- /src/Modules.Pages/ModernBusiness.Pages.Shared/Pages/Shared/ProjectCards3.cshtml: -------------------------------------------------------------------------------- 1 | @model dynamic 2 | 3 | @foreach (var project in Model.CurrentItemsOnPage) 4 | { 5 | var projectLink = $"~/project/{project.DisplayText}"; 6 |
7 |
8 | 9 | 10 | 11 |
12 | 13 |

14 | @project.DisplayText 15 |

16 |
17 |

@project.Content.HtmlBodyPart.Html

18 |
19 |
20 |
21 | } 22 | -------------------------------------------------------------------------------- /src/Modules.Pages/ModernBusiness.Pages.Shared/Pages/Shared/ProjectCards4.cshtml: -------------------------------------------------------------------------------- 1 | @model dynamic 2 | 3 | @foreach (var project in Model.CurrentItemsOnPage) 4 | { 5 | var projectLink = $"~/project/{project.DisplayText}"; 6 |
7 |
8 | 9 | 10 | 11 |
12 | 13 |

14 | @project.DisplayText 15 |

16 |
17 |

@project.Content.HtmlBodyPart.Html

18 |
19 |
20 |
21 | } 22 | 23 | 24 | -------------------------------------------------------------------------------- /src/Modules.Pages/ModernBusiness.Pages.Shared/Pages/Shared/ServiceCards.cshtml: -------------------------------------------------------------------------------- 1 | @foreach (var service in Model) 2 | { 3 |
4 |
5 |

@service.DisplayText

6 |
7 |

@Html.Raw(service.Content.HtmlBodyPart.Html)

8 |
9 | 12 |
13 |
14 | } -------------------------------------------------------------------------------- /src/Modules.Pages/ModernBusiness.Pages.Shared/Pages/Shared/SideWidget.cshtml: -------------------------------------------------------------------------------- 1 | 
2 |
Side Widget
3 |
4 | You can put anything you want inside of these side widgets. They are easy to use, and feature the new Bootstrap 4 card containers! 5 |
6 |
-------------------------------------------------------------------------------- /src/Modules.Pages/ModernBusiness.Pages.Shared/Pages/Shared/TeamCards.cshtml: -------------------------------------------------------------------------------- 1 | @model dynamic 2 | 3 | @{ 4 | } 5 | 6 |
7 | @foreach (var item in Model) 8 | { 9 |
10 |
11 | 12 |
13 |

@item.Content.TitlePart.Title

14 |
@item.Content.TeamMember.Position.Text
15 |

@Html.Raw(item.Content.HtmlBodyPart.Html)

16 |
17 | 20 |
21 |
22 | } 23 |
-------------------------------------------------------------------------------- /src/Modules.Pages/ModernBusiness.Pages.Shared/Pages/Shared/_ViewImports.cshtml: -------------------------------------------------------------------------------- 1 | @inherits OrchardCore.DisplayManagement.Razor.RazorPage 2 | @using ModernBusiness.Pages.Shared.ViewModels; 3 | @using OrchardCore.Mvc.Utilities; 4 | @using OrchardCore.Markdown; 5 | @using OrchardCore.Queries; 6 | @using OrchardCore.Media; 7 | 8 | @addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers 9 | @addTagHelper *, OrchardCore.DisplayManagement 10 | @addTagHelper *, OrchardCore.ResourceManagement 11 | @addTagHelper *, OrchardCore.Contents 12 | @addTagHelper *, OrchardCore.Media 13 | @addTagHelper *, OrchardCore.Queries -------------------------------------------------------------------------------- /src/Modules.Pages/ModernBusiness.Pages.Shared/Services/DataRetriever.cs: -------------------------------------------------------------------------------- 1 | using ModernBusiness.Pages.Shared.ViewModels; 2 | using OrchardCore; 3 | using OrchardCore.ContentManagement; 4 | using System; 5 | using System.Collections.Generic; 6 | using System.Text; 7 | using System.Linq; 8 | using System.Threading.Tasks; 9 | 10 | namespace ModernBusiness.Pages.Shared.Services 11 | { 12 | public class DataRetriever 13 | { 14 | private PagerInfo _pagerInfo; 15 | private readonly IOrchardHelper _orchard; 16 | 17 | public DataRetriever(IOrchardHelper orchard) 18 | { 19 | _orchard = orchard; 20 | } 21 | 22 | public async Task InitializePager(int pageSize, string baseUrl, string listItemsContentType, bool showPages = true) 23 | { 24 | _pagerInfo = new PagerInfo 25 | { 26 | PageSize = pageSize, 27 | PageBaseUrl = baseUrl, 28 | ItemsContentType = listItemsContentType, 29 | ShowPages = showPages 30 | }; 31 | 32 | var itemsCount = await _orchard.QueryContentItemsAsync(q => q.Where(c => c.ContentType == listItemsContentType && c.Published)); 33 | 34 | _pagerInfo.TotalPages = (int)Math.Ceiling(itemsCount.Count() / (double)_pagerInfo.PageSize); 35 | 36 | return _pagerInfo; 37 | } 38 | 39 | public async Task InitializeContainer(string containerContentType) 40 | { 41 | return (await _orchard.GetRecentContentItemsByContentTypeAsync(containerContentType)).FirstOrDefault(); 42 | } 43 | 44 | public async Task> GetCurrentPage() 45 | { 46 | return _pagerInfo.CurrentItemsOnPage = await _orchard.QueryContentItemsAsync( 47 | q => q.Where(c => c.ContentType == _pagerInfo.ItemsContentType && c.Published) 48 | .OrderByDescending(o => o.PublishedUtc) 49 | .Skip(((_pagerInfo.CurrentPage) - 1) * _pagerInfo.PageSize) 50 | .Take(_pagerInfo.PageSize)); 51 | } 52 | 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /src/Modules.Pages/ModernBusiness.Pages.Shared/Startup.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Microsoft.AspNetCore.Builder; 3 | using Microsoft.AspNetCore.Mvc.ApplicationModels; 4 | using Microsoft.AspNetCore.Mvc.RazorPages; 5 | using Microsoft.AspNetCore.Routing; 6 | using Microsoft.Extensions.DependencyInjection; 7 | using Microsoft.Extensions.Localization; 8 | using ModernBusiness.Pages.Shared.Services; 9 | using OrchardCore.Modules; 10 | 11 | namespace ModernBusiness.Pages.Shared 12 | { 13 | public class Startup : StartupBase 14 | { 15 | 16 | public override void ConfigureServices(IServiceCollection services) 17 | { 18 | services.AddScoped(); 19 | } 20 | } 21 | } -------------------------------------------------------------------------------- /src/Modules.Pages/ModernBusiness.Pages.Shared/ViewModels/BreadCrumbViewModel.cs: -------------------------------------------------------------------------------- 1 | using OrchardCore.ContentManagement; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Text; 5 | 6 | namespace ModernBusiness.Pages.Shared.ViewModels 7 | { 8 | public class BreadCrumbViewModel 9 | { 10 | public string DisplayText { get; set; } 11 | public string SubTitle { get; set; } 12 | public ContentItem Content { get; set; } = null; 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /src/Modules.Pages/ModernBusiness.Pages.Shared/ViewModels/PagerInfo.cs: -------------------------------------------------------------------------------- 1 | using OrchardCore.ContentManagement; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Text; 5 | 6 | namespace ModernBusiness.Pages.Shared.ViewModels 7 | { 8 | public class PagerInfo 9 | { 10 | private bool _hasNextPage; 11 | private bool _hasPreviousPage; 12 | 13 | public int TotalPages { get; set; } 14 | public string PageBaseUrl { get; set; } 15 | public int CurrentPage { get; set; } 16 | public int PageSize { get; set; } 17 | public IEnumerable CurrentItemsOnPage { get; set; } 18 | public bool ShowPages { get; set; } = true; 19 | public string ItemsContentType { get; set; } 20 | 21 | public bool HasPreviousPage 22 | { 23 | get { return CurrentPage > 1; } 24 | set { _hasPreviousPage = value; } 25 | } 26 | public bool HasNextPage 27 | { 28 | get { return CurrentPage < TotalPages; } 29 | set { _hasNextPage = value; } 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /src/Modules.Pages/ModernBusiness.Pages.Static/Manifest.cs: -------------------------------------------------------------------------------- 1 | using OrchardCore.Modules.Manifest; 2 | 3 | [assembly: Module( 4 | Name = "ModernBusiness.Pages.Static", 5 | Author = "The Orchard Team", 6 | Website = "http://orchardproject.net", 7 | Version = "0.0.1", 8 | Description = "ModernBusiness.Pages.Static", 9 | Category = "Content Management" 10 | )] -------------------------------------------------------------------------------- /src/Modules.Pages/ModernBusiness.Pages.Static/ModernBusiness.Pages.Static.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | netstandard2.0 5 | true 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /src/Modules.Pages/ModernBusiness.Pages.Static/Pages/Full-Width.cshtml: -------------------------------------------------------------------------------- 1 | @page 2 | @model Full_WidthModel 3 | @{ 4 | } 5 | 6 | 7 | 8 | 9 |

10 | @Html.Raw(Model.HeaderInfo.Content.HtmlBodyPart.Html) 11 | @Model.HeaderInfo.Content.RawContent.Link.Text. 12 |

13 | 14 | -------------------------------------------------------------------------------- /src/Modules.Pages/ModernBusiness.Pages.Static/Pages/Full-Width.cshtml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using Microsoft.AspNetCore.Authorization; 6 | using Microsoft.AspNetCore.Mvc; 7 | using Microsoft.AspNetCore.Mvc.RazorPages; 8 | using OrchardCore; 9 | using OrchardCore.ContentManagement; 10 | using OrchardCore.Contents; 11 | 12 | namespace ModernBusiness.Pages.Static 13 | { 14 | [Authorize(Roles = "Developer")] 15 | public class Full_WidthModel : PageModel 16 | { 17 | private readonly IOrchardHelper _orchardCore; 18 | private readonly IAuthorizationService _authorizationService; 19 | 20 | public Full_WidthModel(IOrchardHelper orchardCore, IAuthorizationService authorizationService) 21 | { 22 | _orchardCore = orchardCore; 23 | _authorizationService = authorizationService; 24 | 25 | } 26 | 27 | public ContentItem HeaderInfo { get; private set; } 28 | 29 | public async Task OnGet() 30 | { 31 | //var authorized = await _authorizationService.AuthorizeAsync(User, Permissions.ViewContent); 32 | //if (!authorized) 33 | //{ 34 | // return Unauthorized(); 35 | //} 36 | HeaderInfo = await _orchardCore.GetContentItemByAliasAsync("alias:fullwidth"); 37 | 38 | return Page(); 39 | } 40 | } 41 | } -------------------------------------------------------------------------------- /src/Modules.Pages/ModernBusiness.Pages.Static/Pages/_ViewImports.cshtml: -------------------------------------------------------------------------------- 1 | @inherits OrchardCore.DisplayManagement.RazorPages.Page 2 | @using OrchardCore.Media; 3 | @using OrchardCore.ContentManagement.Display; 4 | @using OrchardCore.Navigation; 5 | @using ModernBusiness.Pages.Static 6 | @using ModernBusiness.Pages.Shared.ViewModels 7 | 8 | @addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers 9 | @addTagHelper *, OrchardCore.Media 10 | @addTagHelper *, OrchardCore.DisplayManagement 11 | @addTagHelper *, OrchardCore.ResourceManagement 12 | @addTagHelper *, OrchardCore.Contents 13 | @addTagHelper *, OrchardCore.Menu 14 | @addTagHelper *, OrchardCore.Navigation 15 | -------------------------------------------------------------------------------- /src/Modules.Pages/ModernBusiness.Pages.Static/Pages/_ViewStart.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | Layout = "Layout"; 3 | } 4 | -------------------------------------------------------------------------------- /src/Modules.Pages/ModernBusiness.Pages.Static/Pages/sidebar.cshtml: -------------------------------------------------------------------------------- 1 | @page 2 | @model sidebarModel 3 | @{ 4 | var mainMenu = await Orchard.GetContentItemByAliasAsync("alias:main-menu"); 5 | } 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 | 15 |
16 |
17 | Home 18 | 19 |
20 |
21 | 22 |
23 | @Html.Raw(Model.SideBarInfo.Content.HtmlBodyPart.Html) 24 |
25 |
26 | 27 | -------------------------------------------------------------------------------- /src/Modules.Pages/ModernBusiness.Pages.Static/Pages/sidebar.cshtml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using Microsoft.AspNetCore.Mvc; 6 | using Microsoft.AspNetCore.Mvc.RazorPages; 7 | using OrchardCore; 8 | using OrchardCore.ContentManagement; 9 | 10 | namespace ModernBusiness.Pages.Static 11 | { 12 | public class sidebarModel : PageModel 13 | { 14 | private readonly IOrchardHelper _orchardHelper; 15 | 16 | public sidebarModel(IOrchardHelper orchardHelper) 17 | { 18 | _orchardHelper = orchardHelper; 19 | } 20 | 21 | public ContentItem SideBarInfo { get; private set; } 22 | 23 | public async void OnGet() 24 | { 25 | SideBarInfo = await _orchardHelper.GetContentItemByAliasAsync("alias:sidebar"); 26 | } 27 | } 28 | } -------------------------------------------------------------------------------- /src/Modules.Pages/ModernBusiness.Pages.Static/Startup.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using Microsoft.AspNetCore.Builder; 6 | using Microsoft.AspNetCore.Http; 7 | using Microsoft.AspNetCore.Mvc.ApplicationModels; 8 | using Microsoft.AspNetCore.Mvc.RazorPages; 9 | using Microsoft.Extensions.DependencyInjection; 10 | using OrchardCore.Modules; 11 | 12 | namespace ModernBusiness.Pages.Static 13 | { 14 | public class Startup : StartupBase 15 | { 16 | // This method gets called by the runtime. Use this method to add services to the container. 17 | // For more information on how to configure your application, visit https://go.microsoft.com/fwlink/?LinkID=398940 18 | public override void ConfigureServices(IServiceCollection services) 19 | { 20 | services.Configure(options => 21 | { 22 | options.Conventions.AddAreaFolderRoute("ModernBusiness.Pages.Static", "/", ""); 23 | }); 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/Modules.Pages/ModernBusiness.Pages.Users/App_Data/Localization/nl.po: -------------------------------------------------------------------------------- 1 | msgid "Create a new account." 2 | msgstr "Maak een nieuw account aan." 3 | msgid "Username" 4 | msgstr "Gebruikersnaam" 5 | msgid "Password" 6 | msgstr "Wachtwoord" 7 | msgid "Confirm password" 8 | msgstr "Bevestig wachtwoord" 9 | msgid "Remember me" 10 | msgstr "Gebruikersnaam onthouden" 11 | msgid "Log in" 12 | msgstr "Login" 13 | msgid "Register" 14 | msgstr "Registreren" 15 | msgid "Account" 16 | msgstr "Gebruik lokaal account om in te loggen." -------------------------------------------------------------------------------- /src/Modules.Pages/ModernBusiness.Pages.Users/App_Data/Localization/pt.po: -------------------------------------------------------------------------------- 1 | msgid "Create a new account." 2 | msgstr "Criar uma nova conta" 3 | msgid "Username" 4 | msgstr "Nome utilizador" 5 | msgid "Password" 6 | msgstr "Palavra passe" 7 | msgid "Confirm password" 8 | msgstr "Confirmar palavra passe" 9 | msgid "Remember me" 10 | msgstr "Lembrar-me" 11 | msgid "Log in" 12 | msgstr "Logar" 13 | msgid "Register" 14 | msgstr "Registar" 15 | msgid "Account" 16 | msgstr "Usar uma conta local para logar." -------------------------------------------------------------------------------- /src/Modules.Pages/ModernBusiness.Pages.Users/Manifest.cs: -------------------------------------------------------------------------------- 1 | using OrchardCore.Modules.Manifest; 2 | 3 | [assembly: Module( 4 | Name = "ModernBusiness.Pages.Users", 5 | Author = "The Orchard Team", 6 | Website = "http://orchardproject.net", 7 | Version = "0.0.1", 8 | Description = "ModernBusiness.Pages.Users", 9 | Category = "Content Management" 10 | )] -------------------------------------------------------------------------------- /src/Modules.Pages/ModernBusiness.Pages.Users/Model/ResetPasswordSettings.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace ModernBusiness.Pages.Users.Model 6 | { 7 | public class ResetPasswordSettings 8 | { 9 | public bool AllowResetPassword { get; set; } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/Modules.Pages/ModernBusiness.Pages.Users/ModernBusiness.Pages.Users.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | netstandard2.0 5 | true 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /src/Modules.Pages/ModernBusiness.Pages.Users/Pages/Login.cshtml: -------------------------------------------------------------------------------- 1 | @page 2 | @model LoginModel 3 | @{ 4 | } 5 | 6 |
7 |
8 | 9 |
10 |

@T["Account"]

11 |
12 |
13 |
14 | 15 |
16 | 17 | 18 |
19 |
20 |
21 | 22 |
23 | 24 | 25 |
26 |
27 |
28 |
29 |
30 | 34 |
35 |
36 |
37 |
38 |
39 | 40 |
41 |
42 | @*@if (userCanRegister) 43 | { 44 |

45 | @T["Register as a new user"] 46 |

47 | }*@ 48 | @if (Model.allowResetPassword) 49 | { 50 |

51 | @T["Forgot your password?"] 52 |

53 | } 54 |
55 |
56 |
-------------------------------------------------------------------------------- /src/Modules.Pages/ModernBusiness.Pages.Users/Pages/Login.cshtml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using Microsoft.AspNetCore.Authentication; 6 | using Microsoft.AspNetCore.Authorization; 7 | using Microsoft.AspNetCore.Identity; 8 | using OrchardCore.Users; 9 | using Microsoft.AspNetCore.Mvc; 10 | using Microsoft.AspNetCore.Mvc.RazorPages; 11 | using ModernBusiness.Pages.Users.ViewModels; 12 | using Microsoft.Extensions.Logging; 13 | using OrchardCore.Settings; 14 | using ModernBusiness.Pages.Users.Model; 15 | using OrchardCore.Entities; 16 | 17 | namespace ModernBusiness.Pages.Users.Pages 18 | { 19 | public class LoginModel : PageModel 20 | { 21 | [BindProperty] 22 | public LoginViewModel LoginVM { get; set; } 23 | 24 | public bool allowResetPassword { get; set; } 25 | 26 | private readonly SignInManager _signInManager; 27 | private readonly UserManager _userManager; 28 | private readonly ILogger _logger; 29 | private readonly ISiteService _site; 30 | 31 | public LoginModel(UserManager userManager, SignInManager signInManager, ISiteService site, ILogger logger) 32 | { 33 | _signInManager = signInManager; 34 | _userManager = userManager; 35 | _logger = logger; 36 | _site = site; 37 | } 38 | 39 | public async Task OnGetAsync(string returnUrl = null) 40 | { 41 | await HttpContext.SignOutAsync(IdentityConstants.ExternalScheme); 42 | 43 | if (User.Identity.IsAuthenticated && returnUrl != null) 44 | { 45 | return LocalRedirect("~/notauthorized"); 46 | } 47 | else if (User.Identity.IsAuthenticated) 48 | { 49 | return LocalRedirect("~/warning"); 50 | } 51 | 52 | allowResetPassword = (await _site.GetSiteSettingsAsync()).As().AllowResetPassword; 53 | 54 | ViewData["ReturnUrl"] = returnUrl; 55 | 56 | return Page(); 57 | } 58 | 59 | public async Task OnPostAsync(string returnUrl) 60 | { 61 | if (ModelState.IsValid) 62 | { 63 | returnUrl = returnUrl ?? Url.Content("~/"); 64 | 65 | var result = await _signInManager.PasswordSignInAsync(LoginVM.Name, LoginVM.Password, LoginVM.RememberMe, lockoutOnFailure: false); 66 | if (result.Succeeded) 67 | { 68 | _logger.LogInformation("User {0} logged in.", LoginVM.Name); 69 | return LocalRedirect(returnUrl); 70 | } 71 | } 72 | 73 | return Page(); 74 | } 75 | } 76 | } -------------------------------------------------------------------------------- /src/Modules.Pages/ModernBusiness.Pages.Users/Pages/Logout.cshtml: -------------------------------------------------------------------------------- 1 | @page 2 | @model LogoutModel 3 | @{ 4 | } 5 | -------------------------------------------------------------------------------- /src/Modules.Pages/ModernBusiness.Pages.Users/Pages/Logout.cshtml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using Microsoft.AspNetCore.Identity; 6 | using Microsoft.AspNetCore.Mvc; 7 | using Microsoft.AspNetCore.Mvc.RazorPages; 8 | using OrchardCore.Users; 9 | 10 | namespace ModernBusiness.Pages.Users.Pages 11 | { 12 | public class LogoutModel : PageModel 13 | { 14 | private readonly SignInManager _signinManager; 15 | 16 | public LogoutModel(SignInManager signinManager) 17 | { 18 | _signinManager = signinManager; 19 | } 20 | 21 | public async Task OnGetAsync() 22 | { 23 | await _signinManager.SignOutAsync(); 24 | 25 | return LocalRedirect("~/"); 26 | } 27 | } 28 | } -------------------------------------------------------------------------------- /src/Modules.Pages/ModernBusiness.Pages.Users/Pages/NotAuthorized.cshtml: -------------------------------------------------------------------------------- 1 | @page 2 | @model NotAuthorizedModel 3 | @{ 4 | var mainMenu = await Orchard.GetContentItemByAliasAsync("alias:main-menu"); 5 | } 6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 |
14 |

You are not authorized to access this page.

15 |
Please use this menu to navigate to other pages.
16 |
17 |
18 |
19 | Home 20 | 21 |
22 |
23 |
24 | -------------------------------------------------------------------------------- /src/Modules.Pages/ModernBusiness.Pages.Users/Pages/NotAuthorized.cshtml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using Microsoft.AspNetCore.Mvc; 6 | using Microsoft.AspNetCore.Mvc.RazorPages; 7 | using OrchardCore; 8 | using OrchardCore.ContentManagement; 9 | 10 | namespace ModernBusiness.Pages.Users.Pages 11 | { 12 | public class NotAuthorizedModel : PageModel 13 | { 14 | private readonly IOrchardHelper _orchardHelper; 15 | 16 | public ContentItem UnauthorizedCI { get; set; } 17 | 18 | public NotAuthorizedModel(IOrchardHelper orchardHelper) 19 | { 20 | _orchardHelper = orchardHelper; 21 | } 22 | 23 | public async void OnGetAsync() 24 | { 25 | UnauthorizedCI = await _orchardHelper.GetContentItemByAliasAsync("alias:unauthorized"); 26 | } 27 | } 28 | } -------------------------------------------------------------------------------- /src/Modules.Pages/ModernBusiness.Pages.Users/Pages/Register.cshtml: -------------------------------------------------------------------------------- 1 | @page 2 | @model RegisterModel 3 | @{ 4 | } 5 | 6 |

@T["Register"]

7 |
8 |

@T["Create a new account."]

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 |
-------------------------------------------------------------------------------- /src/Modules.Pages/ModernBusiness.Pages.Users/Pages/Register.cshtml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using Microsoft.AspNetCore.Mvc; 6 | using Microsoft.AspNetCore.Mvc.RazorPages; 7 | using OrchardCore.Users; 8 | using ModernBusiness.Pages.Users.ViewModels; 9 | using OrchardCore.Users.Services; 10 | using OrchardCore.Users.Models; 11 | using Microsoft.Extensions.Logging; 12 | using Microsoft.AspNetCore.Identity; 13 | 14 | namespace ModernBusiness.Pages.Users.Pages 15 | { 16 | public class RegisterModel : PageModel 17 | { 18 | [BindProperty] 19 | public RegisterViewModel RegisterVM { get; set; } 20 | 21 | ILogger _logger; 22 | 23 | private readonly IUserService _userService; 24 | private readonly SignInManager _signInManager; 25 | 26 | public RegisterModel(IUserService userService, ILogger logger, SignInManager signInManager) 27 | { 28 | _userService = userService; 29 | _logger = logger; 30 | _signInManager = signInManager; 31 | } 32 | 33 | public IActionResult OnGet(string returnUrl) 34 | { 35 | ViewData["ReturnUrl"] = returnUrl; 36 | 37 | return Page(); 38 | } 39 | 40 | public async Task OnPostAsync(string returnUrl) 41 | { 42 | ViewData["ReturnUrl"] = returnUrl; 43 | 44 | if (ModelState.IsValid) 45 | { 46 | returnUrl = returnUrl ?? Url.Content("~/"); 47 | 48 | var user = await _userService.CreateUserAsync(new User 49 | { 50 | UserName = RegisterVM.Name, 51 | Email = RegisterVM.Email, 52 | RoleNames = new string[0] 53 | }, RegisterVM.Password, (key, message) => ModelState.AddModelError(key, message)) as User; 54 | 55 | if (user != null) 56 | { 57 | _logger.LogDebug("Hello{0}!!!", user.UserName); 58 | _logger.LogInformation(3, "User created!"); 59 | 60 | await _signInManager.SignInAsync(user, false); 61 | 62 | return LocalRedirect(returnUrl); 63 | } 64 | } 65 | 66 | return Page(); 67 | } 68 | } 69 | } -------------------------------------------------------------------------------- /src/Modules.Pages/ModernBusiness.Pages.Users/Pages/Warning.cshtml: -------------------------------------------------------------------------------- 1 | @page 2 | @{ 3 | } 4 | 5 |

You are already logged in

6 |

Maybe you want to Logout?

-------------------------------------------------------------------------------- /src/Modules.Pages/ModernBusiness.Pages.Users/Pages/_ViewImports.cshtml: -------------------------------------------------------------------------------- 1 | @inherits OrchardCore.DisplayManagement.RazorPages.Page 2 | @using OrchardCore.ContentManagement 3 | @using ModernBusiness.Pages.Users.Pages 4 | @using OrchardCore.Settings 5 | 6 | @addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers 7 | @addTagHelper *, OrchardCore.DisplayManagement 8 | @addTagHelper *, OrchardCore.ResourceManagement 9 | @addTagHelper *, OrchardCore.Contents 10 | @addTagHelper *, OrchardCore.Menu 11 | 12 | -------------------------------------------------------------------------------- /src/Modules.Pages/ModernBusiness.Pages.Users/Pages/_ViewStart.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | Layout = "Layout"; 3 | } 4 | -------------------------------------------------------------------------------- /src/Modules.Pages/ModernBusiness.Pages.Users/Startup.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.Extensions.DependencyInjection; 2 | using Microsoft.AspNetCore.Identity; 3 | using OrchardCore.Modules; 4 | using System; 5 | using System.Collections.Generic; 6 | using System.Text; 7 | using Microsoft.AspNetCore.Mvc.RazorPages; 8 | using Microsoft.AspNetCore.Mvc.ApplicationModels; 9 | 10 | namespace ModernBusiness.Pages.Users 11 | { 12 | public class Startup : StartupBase 13 | { 14 | public override void ConfigureServices(IServiceCollection services) 15 | { 16 | services.ConfigureApplicationCookie(options => 17 | { 18 | options.LoginPath = "/Login"; 19 | }); 20 | 21 | services.Configure(options => 22 | { 23 | options.Conventions.AddAreaFolderRoute("ModernBusiness.Pages.Users", "/", ""); 24 | }); 25 | } 26 | 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/Modules.Pages/ModernBusiness.Pages.Users/ViewModels/ForgotPasswordViewModel.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel.DataAnnotations; 4 | using System.Text; 5 | 6 | namespace ModernBusiness.Pages.Users.ViewModels 7 | { 8 | public class ForgotPasswordViewModel 9 | { 10 | [Required] 11 | public string UserIdentifier { get; set; } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/Modules.Pages/ModernBusiness.Pages.Users/ViewModels/LoginViewModel.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.ComponentModel.DataAnnotations; 5 | 6 | namespace ModernBusiness.Pages.Users.ViewModels 7 | { 8 | public class LoginViewModel 9 | { 10 | [Required] 11 | public string Name { get; set; } 12 | 13 | [Required] 14 | [DataType(DataType.Password)] 15 | public string Password { get; set; } 16 | 17 | public bool RememberMe { get; set; } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/Modules.Pages/ModernBusiness.Pages.Users/ViewModels/LostPasswordViewModel.cs: -------------------------------------------------------------------------------- 1 | using OrchardCore.Users.Models; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Text; 5 | 6 | namespace ModernBusiness.Pages.Users.ViewModels 7 | { 8 | public class LostPasswordViewModel 9 | { 10 | public User User { get; set; } 11 | 12 | public string LostPasswordUrl { get; set; } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /src/Modules.Pages/ModernBusiness.Pages.Users/ViewModels/RegisterViewModel.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel.DataAnnotations; 4 | using System.Text; 5 | 6 | namespace ModernBusiness.Pages.Users.ViewModels 7 | { 8 | public class RegisterViewModel 9 | { 10 | [Required] 11 | public string Name { get; set; } 12 | 13 | [Required] 14 | [EmailAddress] 15 | public string Email { get; set; } 16 | 17 | [Required] 18 | [DataType(DataType.Password)] 19 | public string Password { get; set; } 20 | 21 | [DataType(DataType.Password)] 22 | [Compare("Password")] 23 | public string ConfirmPassword { get; set; } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/Modules.Pages/ModernBusiness.Pages.Users/ViewModels/ResetPasswordViewModel.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel.DataAnnotations; 4 | using System.Text; 5 | 6 | namespace ModernBusiness.Pages.Users.ViewModels 7 | { 8 | public class ResetPasswordViewModel 9 | { 10 | [Required] 11 | [DataType(DataType.EmailAddress)] 12 | public string Email { get; set; } 13 | 14 | [Required] 15 | [DataType(DataType.Password)] 16 | public string NewPassword { get; set; } 17 | 18 | [Required] 19 | [DataType(DataType.Password)] 20 | public string PasswordConfirmation { get; set; } 21 | 22 | public string ResetToken { get; set; } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/Modules.Pages/ModernBusiness.Pages/Manifest.cs: -------------------------------------------------------------------------------- 1 | using OrchardCore.Modules.Manifest; 2 | 3 | [assembly: Module( 4 | Name = "ModernBusiness.Pages", 5 | Author = "The Orchard Team", 6 | Website = "http://orchardproject.net", 7 | Version = "0.0.1", 8 | Description = "ModernBusiness.Pages", 9 | Category = "Content Management" 10 | )] 11 | -------------------------------------------------------------------------------- /src/Modules.Pages/ModernBusiness.Pages/ModernBusiness.Pages.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | netstandard2.0 5 | true 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /src/Modules.Pages/ModernBusiness.Pages/Pages/LogOff.cshtml: -------------------------------------------------------------------------------- 1 | @page 2 | @model LogOffModel 3 | @{ 4 | } 5 | -------------------------------------------------------------------------------- /src/Modules.Pages/ModernBusiness.Pages/Pages/LogOff.cshtml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using Microsoft.AspNetCore.Identity; 6 | using Microsoft.AspNetCore.Mvc; 7 | using Microsoft.AspNetCore.Mvc.RazorPages; 8 | using Microsoft.Extensions.Logging; 9 | using OrchardCore.Users; 10 | 11 | namespace ModernBusiness.Pages 12 | { 13 | public class LogOffModel : PageModel 14 | { 15 | private readonly SignInManager _signInManager; 16 | private readonly ILogger _logger; 17 | 18 | public LogOffModel(SignInManager signInManager, ILogger logger) 19 | { 20 | _signInManager = signInManager; 21 | _logger = logger; 22 | } 23 | 24 | public async Task OnGet() 25 | { 26 | await _signInManager.SignOutAsync(); 27 | _logger.LogInformation(4, "User logged out."); 28 | 29 | return Redirect("~/"); 30 | } 31 | } 32 | } -------------------------------------------------------------------------------- /src/Modules.Pages/ModernBusiness.Pages/Pages/Shared/Carousel.cshtml: -------------------------------------------------------------------------------- 1 |  2 | @{ 3 | var slides = Orchard.GetRecentContentItemsByContentTypeAsync("Carousel", 1) 4 | .GetAwaiter() 5 | .GetResult() 6 | .Single()?.Content.BagPart.ContentItems; 7 | 8 | var state = "active"; 9 | } 10 | 11 |