Initial Commit - Umbraco CMS

Signed-off-by: Carl Sargunar <carl@sargunar.com>
This commit is contained in:
Carl Sargunar 2022-06-01 21:37:02 +01:00
parent 8f0a75de45
commit 4b0685f359
53 changed files with 4491 additions and 0 deletions

35
.vscode/launch.json vendored Normal file
View File

@ -0,0 +1,35 @@
{
"version": "0.2.0",
"configurations": [
{
// Use IntelliSense to find out which attributes exist for C# debugging
// Use hover for the description of the existing attributes
// For further information visit https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md
"name": ".NET Core Launch (web)",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build",
// If you have changed target frameworks, make sure to update the program path.
"program": "${workspaceFolder}/aspnet-mssql/app/aspnetapp/bin/Debug/net5.0/aspnetapp.dll",
"args": [],
"cwd": "${workspaceFolder}/aspnet-mssql/app/aspnetapp",
"stopAtEntry": false,
// Enable launching a web browser when ASP.NET Core starts. For more information: https://aka.ms/VSCode-CS-LaunchJson-WebBrowser
"serverReadyAction": {
"action": "openExternally",
"pattern": "\\bNow listening on:\\s+(https?://\\S+)"
},
"env": {
"ASPNETCORE_ENVIRONMENT": "Development"
},
"sourceFileMap": {
"/Views": "${workspaceFolder}/Views"
}
},
{
"name": ".NET Core Attach",
"type": "coreclr",
"request": "attach"
}
]
}

41
.vscode/tasks.json vendored Normal file
View File

@ -0,0 +1,41 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "build",
"command": "dotnet",
"type": "process",
"args": [
"build",
"${workspaceFolder}/aspnet-mssql/app/aspnetapp/aspnetapp.csproj",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
"problemMatcher": "$msCompile"
},
{
"label": "publish",
"command": "dotnet",
"type": "process",
"args": [
"publish",
"${workspaceFolder}/aspnet-mssql/app/aspnetapp/aspnetapp.csproj",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
"problemMatcher": "$msCompile"
},
{
"label": "watch",
"command": "dotnet",
"type": "process",
"args": [
"watch",
"run",
"--project",
"${workspaceFolder}/aspnet-mssql/app/aspnetapp/aspnetapp.csproj"
],
"problemMatcher": "$msCompile"
}
]
}

454
umbraco-cms/app/.gitignore vendored Normal file
View File

@ -0,0 +1,454 @@
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
##
## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
# User-specific files
*.rsuser
*.suo
*.user
*.userosscache
*.sln.docstates
# User-specific files (MonoDevelop/Xamarin Studio)
*.userprefs
# Mono auto generated files
mono_crash.*
# Build results
[Dd]ebug/
[Dd]ebugPublic/
[Rr]elease/
[Rr]eleases/
x64/
x86/
[Ww][Ii][Nn]32/
[Aa][Rr][Mm]/
[Aa][Rr][Mm]64/
bld/
[Bb]in/
[Oo]bj/
[Ll]og/
[Ll]ogs/
# Visual Studio 2015/2017 cache/options directory
.vs/
# Uncomment if you have tasks that create the project's static files in wwwroot
#wwwroot/
# Visual Studio 2017 auto generated files
Generated\ Files/
# MSTest test Results
[Tt]est[Rr]esult*/
[Bb]uild[Ll]og.*
# NUnit
*.VisualState.xml
TestResult.xml
nunit-*.xml
# Build Results of an ATL Project
[Dd]ebugPS/
[Rr]eleasePS/
dlldata.c
# Benchmark Results
BenchmarkDotNet.Artifacts/
# .NET
project.lock.json
project.fragment.lock.json
artifacts/
# Tye
.tye/
# ASP.NET Scaffolding
ScaffoldingReadMe.txt
# StyleCop
StyleCopReport.xml
# Files built by Visual Studio
*_i.c
*_p.c
*_h.h
*.ilk
*.meta
*.obj
*.iobj
*.pch
*.pdb
*.ipdb
*.pgc
*.pgd
*.rsp
*.sbr
*.tlb
*.tli
*.tlh
*.tmp
*.tmp_proj
*_wpftmp.csproj
*.log
*.vspscc
*.vssscc
.builds
*.pidb
*.svclog
*.scc
# Chutzpah Test files
_Chutzpah*
# Visual C++ cache files
ipch/
*.aps
*.ncb
*.opendb
*.opensdf
*.sdf
*.cachefile
*.VC.db
*.VC.VC.opendb
# Visual Studio profiler
*.psess
*.vsp
*.vspx
*.sap
# Visual Studio Trace Files
*.e2e
# TFS 2012 Local Workspace
$tf/
# Guidance Automation Toolkit
*.gpState
# ReSharper is a .NET coding add-in
_ReSharper*/
*.[Rr]e[Ss]harper
*.DotSettings.user
# TeamCity is a build add-in
_TeamCity*
# DotCover is a Code Coverage Tool
*.dotCover
# AxoCover is a Code Coverage Tool
.axoCover/*
!.axoCover/settings.json
# Coverlet is a free, cross platform Code Coverage Tool
coverage*.json
coverage*.xml
coverage*.info
# Visual Studio code coverage results
*.coverage
*.coveragexml
# NCrunch
_NCrunch_*
.*crunch*.local.xml
nCrunchTemp_*
# MightyMoose
*.mm.*
AutoTest.Net/
# Web workbench (sass)
.sass-cache/
# Installshield output folder
[Ee]xpress/
# DocProject is a documentation generator add-in
DocProject/buildhelp/
DocProject/Help/*.HxT
DocProject/Help/*.HxC
DocProject/Help/*.hhc
DocProject/Help/*.hhk
DocProject/Help/*.hhp
DocProject/Help/Html2
DocProject/Help/html
# Click-Once directory
publish/
# Publish Web Output
*.[Pp]ublish.xml
*.azurePubxml
# Note: Comment the next line if you want to checkin your web deploy settings,
# but database connection strings (with potential passwords) will be unencrypted
*.pubxml
*.publishproj
# Microsoft Azure Web App publish settings. Comment the next line if you want to
# checkin your Azure Web App publish settings, but sensitive information contained
# in these scripts will be unencrypted
PublishScripts/
# NuGet Packages
*.nupkg
# NuGet Symbol Packages
*.snupkg
# The packages folder can be ignored because of Package Restore
**/[Pp]ackages/*
# except build/, which is used as an MSBuild target.
!**/[Pp]ackages/build/
# Uncomment if necessary however generally it will be regenerated when needed
#!**/[Pp]ackages/repositories.config
# NuGet v3's project.json files produces more ignorable files
*.nuget.props
*.nuget.targets
# Microsoft Azure Build Output
csx/
*.build.csdef
# Microsoft Azure Emulator
ecf/
rcf/
# Windows Store app package directories and files
AppPackages/
BundleArtifacts/
Package.StoreAssociation.xml
_pkginfo.txt
*.appx
*.appxbundle
*.appxupload
# Visual Studio cache files
# files ending in .cache can be ignored
*.[Cc]ache
# but keep track of directories ending in .cache
!?*.[Cc]ache/
# Others
ClientBin/
~$*
*~
*.dbmdl
*.dbproj.schemaview
*.jfm
*.pfx
*.publishsettings
orleans.codegen.cs
# Including strong name files can present a security risk
# (https://github.com/github/gitignore/pull/2483#issue-259490424)
#*.snk
# Since there are multiple workflows, uncomment next line to ignore bower_components
# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
#bower_components/
# RIA/Silverlight projects
Generated_Code/
# Backup & report files from converting an old project file
# to a newer Visual Studio version. Backup files are not needed,
# because we have git ;-)
_UpgradeReport_Files/
Backup*/
UpgradeLog*.XML
UpgradeLog*.htm
ServiceFabricBackup/
*.rptproj.bak
# SQL Server files
*.mdf
*.ldf
*.ndf
# Business Intelligence projects
*.rdl.data
*.bim.layout
*.bim_*.settings
*.rptproj.rsuser
*- [Bb]ackup.rdl
*- [Bb]ackup ([0-9]).rdl
*- [Bb]ackup ([0-9][0-9]).rdl
# Microsoft Fakes
FakesAssemblies/
# GhostDoc plugin setting file
*.GhostDoc.xml
# Node.js Tools for Visual Studio
.ntvs_analysis.dat
node_modules/
# Visual Studio 6 build log
*.plg
# Visual Studio 6 workspace options file
*.opt
# Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
*.vbw
# Visual Studio LightSwitch build output
**/*.HTMLClient/GeneratedArtifacts
**/*.DesktopClient/GeneratedArtifacts
**/*.DesktopClient/ModelManifest.xml
**/*.Server/GeneratedArtifacts
**/*.Server/ModelManifest.xml
_Pvt_Extensions
# Paket dependency manager
.paket/paket.exe
paket-files/
# FAKE - F# Make
.fake/
# CodeRush personal settings
.cr/personal
# Python Tools for Visual Studio (PTVS)
__pycache__/
*.pyc
# Cake - Uncomment if you are using it
# tools/**
# !tools/packages.config
# Tabs Studio
*.tss
# Telerik's JustMock configuration file
*.jmconfig
# BizTalk build output
*.btp.cs
*.btm.cs
*.odx.cs
*.xsd.cs
# OpenCover UI analysis results
OpenCover/
# Azure Stream Analytics local run output
ASALocalRun/
# MSBuild Binary and Structured Log
*.binlog
# NVidia Nsight GPU debugger configuration file
*.nvuser
# MFractors (Xamarin productivity tool) working folder
.mfractor/
# Local History for Visual Studio
.localhistory/
# BeatPulse healthcheck temp database
healthchecksdb
# Backup folder for Package Reference Convert tool in Visual Studio 2017
MigrationBackup/
# Ionide (cross platform F# VS Code tools) working folder
.ionide/
# Fody - auto-generated XML schema
FodyWeavers.xsd
##
## Visual studio for Mac
##
# globs
Makefile.in
*.userprefs
*.usertasks
config.make
config.status
aclocal.m4
install-sh
autom4te.cache/
*.tar.gz
tarballs/
test-results/
# Mac bundle stuff
*.dmg
*.app
# content below from: https://github.com/github/gitignore/blob/master/Global/macOS.gitignore
# General
.DS_Store
.AppleDouble
.LSOverride
# Icon must end with two \r
Icon
# Thumbnails
._*
# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent
# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk
# content below from: https://github.com/github/gitignore/blob/master/Global/Windows.gitignore
# Windows thumbnail cache files
Thumbs.db
ehthumbs.db
ehthumbs_vista.db
# Dump file
*.stackdump
# Folder config file
[Dd]esktop.ini
# Recycle Bin used on file shares
$RECYCLE.BIN/
# Windows Installer files
*.cab
*.msi
*.msix
*.msm
*.msp
# Windows shortcuts
*.lnk
# JetBrains Rider
.idea/
*.sln.iml
##
## Visual Studio Code
##
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json

View File

@ -0,0 +1,22 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.30114.105
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "umbraco", "umbraco\umbraco.csproj", "{8CABE562-AC29-4C7C-9F6A-E2508D6B8C8A}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{8CABE562-AC29-4C7C-9F6A-E2508D6B8C8A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8CABE562-AC29-4C7C-9F6A-E2508D6B8C8A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8CABE562-AC29-4C7C-9F6A-E2508D6B8C8A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8CABE562-AC29-4C7C-9F6A-E2508D6B8C8A}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
EndGlobal

478
umbraco-cms/app/umbraco/.gitignore vendored Normal file
View File

@ -0,0 +1,478 @@
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
##
## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
# User-specific files
*.rsuser
*.suo
*.user
*.userosscache
*.sln.docstates
# User-specific files (MonoDevelop/Xamarin Studio)
*.userprefs
# Mono auto generated files
mono_crash.*
# Build results
[Dd]ebug/
[Dd]ebugPublic/
[Rr]elease/
[Rr]eleases/
x64/
x86/
[Ww][Ii][Nn]32/
[Aa][Rr][Mm]/
[Aa][Rr][Mm]64/
bld/
[Bb]in/
[Oo]bj/
[Ll]og/
[Ll]ogs/
# Visual Studio 2015/2017 cache/options directory
.vs/
# Uncomment if you have tasks that create the project's static files in wwwroot
#wwwroot/
# Visual Studio 2017 auto generated files
Generated\ Files/
# MSTest test Results
[Tt]est[Rr]esult*/
[Bb]uild[Ll]og.*
# NUnit
*.VisualState.xml
TestResult.xml
nunit-*.xml
# Build Results of an ATL Project
[Dd]ebugPS/
[Rr]eleasePS/
dlldata.c
# Benchmark Results
BenchmarkDotNet.Artifacts/
# .NET Core
project.lock.json
project.fragment.lock.json
artifacts/
# Tye
.tye/
# ASP.NET Scaffolding
ScaffoldingReadMe.txt
# StyleCop
StyleCopReport.xml
# Files built by Visual Studio
*_i.c
*_p.c
*_h.h
*.ilk
*.meta
*.obj
*.iobj
*.pch
*.pdb
*.ipdb
*.pgc
*.pgd
*.rsp
*.sbr
*.tlb
*.tli
*.tlh
*.tmp
*.tmp_proj
*_wpftmp.csproj
*.log
*.vspscc
*.vssscc
.builds
*.pidb
*.svclog
*.scc
# Chutzpah Test files
_Chutzpah*
# Visual C++ cache files
ipch/
*.aps
*.ncb
*.opendb
*.opensdf
*.sdf
*.cachefile
*.VC.db
*.VC.VC.opendb
# Visual Studio profiler
*.psess
*.vsp
*.vspx
*.sap
# Visual Studio Trace Files
*.e2e
# TFS 2012 Local Workspace
$tf/
# Guidance Automation Toolkit
*.gpState
# ReSharper is a .NET coding add-in
_ReSharper*/
*.[Rr]e[Ss]harper
*.DotSettings.user
# TeamCity is a build add-in
_TeamCity*
# DotCover is a Code Coverage Tool
*.dotCover
# AxoCover is a Code Coverage Tool
.axoCover/*
!.axoCover/settings.json
# Coverlet is a free, cross platform Code Coverage Tool
coverage*.json
coverage*.xml
coverage*.info
# Visual Studio code coverage results
*.coverage
*.coveragexml
# NCrunch
_NCrunch_*
.*crunch*.local.xml
nCrunchTemp_*
# MightyMoose
*.mm.*
AutoTest.Net/
# Web workbench (sass)
.sass-cache/
# Installshield output folder
[Ee]xpress/
# DocProject is a documentation generator add-in
DocProject/buildhelp/
DocProject/Help/*.HxT
DocProject/Help/*.HxC
DocProject/Help/*.hhc
DocProject/Help/*.hhk
DocProject/Help/*.hhp
DocProject/Help/Html2
DocProject/Help/html
# Click-Once directory
publish/
# Publish Web Output
*.[Pp]ublish.xml
*.azurePubxml
# Note: Comment the next line if you want to checkin your web deploy settings,
# but database connection strings (with potential passwords) will be unencrypted
*.pubxml
*.publishproj
# Microsoft Azure Web App publish settings. Comment the next line if you want to
# checkin your Azure Web App publish settings, but sensitive information contained
# in these scripts will be unencrypted
PublishScripts/
# NuGet Packages
*.nupkg
# NuGet Symbol Packages
*.snupkg
# The packages folder can be ignored because of Package Restore
**/[Pp]ackages/*
# except build/, which is used as an MSBuild target.
!**/[Pp]ackages/build/
# Uncomment if necessary however generally it will be regenerated when needed
#!**/[Pp]ackages/repositories.config
# NuGet v3's project.json files produces more ignorable files
*.nuget.props
*.nuget.targets
# Microsoft Azure Build Output
csx/
*.build.csdef
# Microsoft Azure Emulator
ecf/
rcf/
# Windows Store app package directories and files
AppPackages/
BundleArtifacts/
Package.StoreAssociation.xml
_pkginfo.txt
*.appx
*.appxbundle
*.appxupload
# Visual Studio cache files
# files ending in .cache can be ignored
*.[Cc]ache
# but keep track of directories ending in .cache
!?*.[Cc]ache/
# Others
ClientBin/
~$*
*~
*.dbmdl
*.dbproj.schemaview
*.jfm
*.pfx
*.publishsettings
orleans.codegen.cs
# Including strong name files can present a security risk
# (https://github.com/github/gitignore/pull/2483#issue-259490424)
#*.snk
# Since there are multiple workflows, uncomment next line to ignore bower_components
# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
#bower_components/
# RIA/Silverlight projects
Generated_Code/
# Backup & report files from converting an old project file
# to a newer Visual Studio version. Backup files are not needed,
# because we have git ;-)
_UpgradeReport_Files/
Backup*/
UpgradeLog*.XML
UpgradeLog*.htm
ServiceFabricBackup/
*.rptproj.bak
# SQL Server files
*.mdf
*.ldf
*.ndf
# Business Intelligence projects
*.rdl.data
*.bim.layout
*.bim_*.settings
*.rptproj.rsuser
*- [Bb]ackup.rdl
*- [Bb]ackup ([0-9]).rdl
*- [Bb]ackup ([0-9][0-9]).rdl
# Microsoft Fakes
FakesAssemblies/
# GhostDoc plugin setting file
*.GhostDoc.xml
# Node.js Tools for Visual Studio
.ntvs_analysis.dat
node_modules/
# Visual Studio 6 build log
*.plg
# Visual Studio 6 workspace options file
*.opt
# Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
*.vbw
# Visual Studio LightSwitch build output
**/*.HTMLClient/GeneratedArtifacts
**/*.DesktopClient/GeneratedArtifacts
**/*.DesktopClient/ModelManifest.xml
**/*.Server/GeneratedArtifacts
**/*.Server/ModelManifest.xml
_Pvt_Extensions
# Paket dependency manager
.paket/paket.exe
paket-files/
# FAKE - F# Make
.fake/
# CodeRush personal settings
.cr/personal
# Python Tools for Visual Studio (PTVS)
__pycache__/
*.pyc
# Cake - Uncomment if you are using it
# tools/**
# !tools/packages.config
# Tabs Studio
*.tss
# Telerik's JustMock configuration file
*.jmconfig
# BizTalk build output
*.btp.cs
*.btm.cs
*.odx.cs
*.xsd.cs
# OpenCover UI analysis results
OpenCover/
# Azure Stream Analytics local run output
ASALocalRun/
# MSBuild Binary and Structured Log
*.binlog
# NVidia Nsight GPU debugger configuration file
*.nvuser
# MFractors (Xamarin productivity tool) working folder
.mfractor/
# Local History for Visual Studio
.localhistory/
# BeatPulse healthcheck temp database
healthchecksdb
# Backup folder for Package Reference Convert tool in Visual Studio 2017
MigrationBackup/
# Ionide (cross platform F# VS Code tools) working folder
.ionide/
# Fody - auto-generated XML schema
FodyWeavers.xsd
##
## Visual studio for Mac
##
# globs
Makefile.in
*.userprefs
*.usertasks
config.make
config.status
aclocal.m4
install-sh
autom4te.cache/
*.tar.gz
tarballs/
test-results/
# Mac bundle stuff
*.dmg
*.app
# content below from: https://github.com/github/gitignore/blob/master/Global/macOS.gitignore
# General
.DS_Store
.AppleDouble
.LSOverride
# Icon must end with two \r
Icon
# Thumbnails
._*
# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent
# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk
# content below from: https://github.com/github/gitignore/blob/master/Global/Windows.gitignore
# Windows thumbnail cache files
Thumbs.db
ehthumbs.db
ehthumbs_vista.db
# Dump file
*.stackdump
# Folder config file
[Dd]esktop.ini
# Recycle Bin used on file shares
$RECYCLE.BIN/
# Windows Installer files
*.cab
*.msi
*.msix
*.msm
*.msp
# Windows shortcuts
*.lnk
# JetBrains Rider
.idea/
*.sln.iml
##
## Visual Studio Code
##
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
##
## Umbraco CMS
##
# JSON schema file for appsettings.json
appsettings-schema.json
# Packages created from the backoffice (package.xml/package.zip)
/umbraco/Data/CreatedPackages/
# Temp folder containing Examine indexes, NuCache, MediaCache, etc.
/umbraco/Data/TEMP/
# SQLite database files
/umbraco/Data/*.sqlite.db
/umbraco/Data/*.sqlite.db-shm
/umbraco/Data/*.sqlite.db-wal
# Log files
/umbraco/Logs/
# Media files
/wwwroot/media/

View File

@ -0,0 +1,23 @@
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Hosting;
using Umbraco.Cms.Web.Common.Hosting;
namespace umbraco
{
public class Program
{
public static void Main(string[] args)
=> CreateHostBuilder(args)
.Build()
.Run();
public static IHostBuilder CreateHostBuilder(string[] args) =>
Host.CreateDefaultBuilder(args)
.ConfigureUmbracoDefaults()
.ConfigureWebHostDefaults(webBuilder =>
{
webBuilder.UseStaticWebAssets();
webBuilder.UseStartup<Startup>();
});
}
}

View File

@ -0,0 +1,29 @@
{
"$schema": "https://json.schemastore.org/launchsettings.json",
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:41055",
"sslPort": 44339
}
},
"profiles": {
"IIS Express": {
"commandName": "IISExpress",
"launchBrowser": true,
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"Umbraco.Web.UI": {
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": true,
"applicationUrl": "https://localhost:44339;http://localhost:41055",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
}
}
}

View File

@ -0,0 +1,74 @@
using System;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using Umbraco.Cms.Core.DependencyInjection;
using Umbraco.Extensions;
namespace umbraco
{
public class Startup
{
private readonly IWebHostEnvironment _env;
private readonly IConfiguration _config;
/// <summary>
/// Initializes a new instance of the <see cref="Startup" /> class.
/// </summary>
/// <param name="webHostEnvironment">The web hosting environment.</param>
/// <param name="config">The configuration.</param>
/// <remarks>
/// Only a few services are possible to be injected here https://github.com/dotnet/aspnetcore/issues/9337.
/// </remarks>
public Startup(IWebHostEnvironment webHostEnvironment, IConfiguration config)
{
_env = webHostEnvironment ?? throw new ArgumentNullException(nameof(webHostEnvironment));
_config = config ?? throw new ArgumentNullException(nameof(config));
}
/// <summary>
/// Configures the services.
/// </summary>
/// <param name="services">The services.</param>
/// <remarks>
/// This method gets called by the runtime. Use this method to add services to the container.
/// For more information on how to configure your application, visit https://go.microsoft.com/fwlink/?LinkID=398940.
/// </remarks>
public void ConfigureServices(IServiceCollection services)
{
services.AddUmbraco(_env, _config)
.AddBackOffice()
.AddWebsite()
.AddComposers()
.Build();
}
/// <summary>
/// Configures the application.
/// </summary>
/// <param name="app">The application builder.</param>
/// <param name="env">The web hosting environment.</param>
public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
{
if (env.IsDevelopment())
{
app.UseDeveloperExceptionPage();
}
app.UseUmbraco()
.WithMiddleware(u =>
{
u.UseBackOffice();
u.UseWebsite();
})
.WithEndpoints(u =>
{
u.UseInstallerEndpoints();
u.UseBackOfficeEndpoints();
u.UseWebsiteEndpoints();
});
}
}
}

View File

@ -0,0 +1,29 @@
@inherits Umbraco.Cms.Web.Common.Views.UmbracoViewPage<ContentModels.CV>
@using ContentModels = Umbraco.Cms.Web.Common.PublishedModels
@{
Layout = "Master.cshtml";
var homePage = Model.AncestorOrSelf<ContentModels.Home>();
}
<main class="page cv-page">
@await Html.PartialAsync("avatarHeader", homePage)
<section class="portfolio-block cv">
<div class="container">
@await Html.PartialAsync("workHistory", Model)
@await Html.PartialAsync("educationHistory", Model)
<div class="group">
<div class="row">
<div class="col-md-6">
@await Html.PartialAsync("skills", Model)
</div>
<div class="col-md-6">
@await Html.PartialAsync("contactInfo", Model)
</div>
</div>
</div>
@await Html.PartialAsync("hobbies", Model)
</div>
</section>
</main>

View File

@ -0,0 +1,54 @@
@inherits Umbraco.Cms.Web.Common.Views.UmbracoViewPage<ContentModels.Contact>
@using Portfolio.Core.Models.ViewModels
@using Portfolio.Core.Controllers.Surface
@using Portfolio.Core.Extensions
@using ContentModels = Umbraco.Cms.Web.Common.PublishedModels
@{
Layout = "Master.cshtml";
var thisPage = (IPublishedContent)Model;
var submitted = false;
if (bool.TryParse(TempData["Success"]?.ToString() ?? "", out var success))
{
submitted = true;
}
}
<main class="page contact-page">
<section class="portfolio-block contact">
<div class="container">
<div class="heading">
<h1 class="text-uppercase font-weight-bold">@(thisPage.GetPageTitle())</h1>
</div>
@if (submitted)
{
<div class="row">
<div class="col-12 text-center">
@if (success)
{
<p>@Model.ThankYouMessage</p>
}
else
{
<p>@Model.ErrorMessage</p>
}
</div>
</div>
}
else
{
@using (Html.BeginUmbracoForm<ContactSurfaceController>("SubmitForm"))
{
<div class="form-group"><label for="Name">Name</label><input class="form-control item" type="text" id="Name" name="Name"></div>
<div class="form-group"><label for="Subject">Subject</label><input class="form-control item" type="text" id="Subject" name="Subject"></div>
<div class="form-group"><label for="Email">Email</label><input class="form-control item" type="email" id="Email" name="Email"></div>
<div class="form-group"><label for="Message">Message</label><textarea class="form-control item" id="Message" name="Message"></textarea></div>
<div class="form-group"><button class="btn btn-primary btn-block btn-lg" type="submit">Submit Form</button></div>
}
}
</div>
</section>
</main>

View File

@ -0,0 +1,13 @@
@inherits Umbraco.Cms.Web.Common.Views.UmbracoViewPage<ContentModels.Home>
@using ContentModels = Umbraco.Cms.Web.Common.PublishedModels
@{
Layout = "Master.cshtml";
}
<main class="page lanidng-page">
@await Html.PartialAsync("avatarHeader", Model)
@await Html.PartialAsync("latestProjects", Model.Children<ContentModels.ProjectList>().FirstOrDefault())
@Html.GetBlockListHtml(Model.MainContent)
</main>

View File

@ -0,0 +1,29 @@
@inherits Umbraco.Cms.Web.Common.Views.UmbracoViewPage
@using ContentModels = Umbraco.Cms.Web.Common.PublishedModels
@{
Layout = null;
var homePage = Model.AncestorOrSelf<ContentModels.Home>();
}
<!DOCTYPE html>
<html lang="@UmbracoContext.PublishedRequest.Culture">
<head>
@await Html.PartialAsync("metaData")
<link rel="stylesheet preload" as="style" href="@Url.Content("~/portfolio-assets/bootstrap.min.css")">
<link rel="stylesheet preload" as="style" href="@Url.Content("~/portfolio-assets/ionicons.min.css")">
</head>
<body>
@await Html.PartialAsync("topNavigation", homePage)
@RenderBody()
@await Html.PartialAsync("footer", homePage)
<script src="https://code.jquery.com/jquery-3.6.0.slim.min.js"
integrity="sha256-u7e5khyithlIdTpu22PHhENmPcRdFiHRjhAuHcs05RI="
crossorigin="anonymous"></script>
<script src="@Url.Content("/portfolio-assets/bootstrap.min.js")"></script>
<script src="@Url.Content("~/portfolio-assets/theme.js")"></script>
</body>
</html>

View File

@ -0,0 +1,18 @@
@inherits UmbracoViewPage<ContentModels.IProfileControls>
@using ContentModels = Umbraco.Cms.Web.Common.PublishedModels
<section class="portfolio-block block-intro">
<div class="container">
@if (Model.Avatar != null)
{
<div class="avatar" style="background-image:url('@(Model.Avatar.GetCropUrl(width: 150, height: 150))');"></div>
}
<div class="about-me">
@Model.AboutMe
@if (Model.ProfileLink != null && !string.IsNullOrWhiteSpace(Model.ProfileLink.Url))
{
<a class="btn btn-outline-primary" role="button" target="@Model.ProfileLink.Target" href="@Model.ProfileLink.Url">@Model.ProfileLink.Name</a>
}
</div>
</div>
</section>

View File

@ -0,0 +1,22 @@
@inherits UmbracoViewPage<Umbraco.Cms.Core.Models.Blocks.BlockListItem>
@using Umbraco.Cms.Web.Common.PublishedModels
@{
var cta = (CallToAction)Model.Content;
}
<section class="portfolio-block call-to-action border-bottom">
<div class="container">
<div class="d-flex justify-content-center align-items-center content">
@if(!string.IsNullOrWhiteSpace(cta.Text))
{
<h3>@cta.Text</h3>
}
@if(cta.Link != null)
{
<a class="btn btn-outline-primary btn-lg" target="@cta.Link.Target" href="@cta.Link.Url">@cta.Link.Name</a>
}
</div>
</div>
</section>

View File

@ -0,0 +1,53 @@
@inherits UmbracoViewPage<Umbraco.Cms.Core.Models.Blocks.BlockListItem>
@using Umbraco.Cms.Web.Common.PublishedModels
@using System.Collections
@using Umbraco.Cms.Core.Models
@using Portfolio.Core.Extensions
@{
var cardsRow = (CardsRow)Model.Content;
}
<section class="portfolio-block skills">
<div class="container">
@if(!string.IsNullOrWhiteSpace(cardsRow.Title))
{
<div class="heading">
<h2>@cardsRow.Title</h2>
</div>
}
@if(cardsRow.Cards != null && cardsRow.Cards.Any())
{
var visibleCards = cardsRow.Cards.Where(x => x.Settings == null
|| !x.Settings.HasProperty("hide")
|| !x.Settings.HasValue("hide")
|| !x.Settings.Value<bool>("hide"));
if(visibleCards != null && visibleCards.Any())
{
<div class="row">
@foreach (var item in cardsRow.Cards)
{
IconCard card = (IconCard)item.Content;
<div class="col-md-4">
<div class="card special-skill-item border-0">
@if (!string.IsNullOrWhiteSpace(card.IconClass))
{
<div class="card-header bg-transparent border-0"><i class="icon @card.IconClass.ToIconClass()"></i></div>
}
@if(!string.IsNullOrWhiteSpace(card.Title) || !string.IsNullOrWhiteSpace(card.Description))
{
<div class="card-body">
<h3 class="card-title">@card.Title</h3>
<p class="card-text">@card.Description</p>
</div>
}
</div>
</div>
}
</div>
}
}
</div>
</section>

View File

@ -0,0 +1,29 @@
@inherits UmbracoViewPage<Umbraco.Cms.Core.Models.Blocks.BlockListItem>
@using Umbraco.Cms.Web.Common.PublishedModels
@{
var projectPreview = (ProjectPreview)Model.Content;
}
<section class="portfolio-block website bg-primary text-white">
<div class="container">
<div class="row align-items-center">
<div class="col-md-12 col-lg-5 offset-lg-1 text">
<h3>@projectPreview.Title</h3>
<p>@projectPreview.Description</p>
</div>
<div class="col-md-12 col-lg-5">
@if (projectPreview.Image != null)
{
<div class="portfolio-laptop-mockup">
<div class="screen">
<div class="screen-content" style="background-image:url('@(projectPreview.Image.GetCropUrl(width: 298, height: 189))');"></div>
</div>
<div class="keyboard"></div>
</div>
}
</div>
</div>
</div>
</section>

View File

@ -0,0 +1,22 @@
@inherits Umbraco.Cms.Web.Common.Views.UmbracoViewPage<Umbraco.Cms.Core.Models.Blocks.BlockListModel>
@using Umbraco.Extensions
@{
if (!Model.Any()) { return; }
var visibleBlocks = Model.Where(x =>
x.Settings == null
|| !x.Settings.HasProperty("hide")
|| !x.Settings.HasValue("hide")
|| !x.Settings.Value<bool>("hide"));
if (!visibleBlocks.Any()) { return; }
}
@foreach (var block in visibleBlocks)
{
if (block?.ContentUdi == null) { continue; }
var data = block.Content;
@await Html.PartialAsync("blocklist/Components/" + data.ContentType.Alias, block)
}

View File

@ -0,0 +1,31 @@
@inherits UmbracoViewPage<ContentModels.IWorkHistoryControls>
@using ContentModels = Umbraco.Cms.Web.Common.PublishedModels
@using Portfolio.Core.Extensions
<div class="contact-info portfolio-info-card">
@if (!string.IsNullOrWhiteSpace(Model?.ContactInfoTitle ?? ""))
{
<h2>@Model.ContactInfoTitle</h2>
}
@if (Model.ContactInfo != null && Model.ContactInfo.Any())
{
foreach (var item in Model.ContactInfo)
{
<div class="row">
<div class="col-1"><i class="icon @(item.Value<string>("icon").ToIconClass())"></i></div>
@if (item is ContentModels.IconLinkItem)
{
var linkItem = item as ContentModels.IconLinkItem;
<div class="col-9"><span><a href="@(linkItem.Link.Url)" target="@linkItem.Link.Target">@linkItem.Link.Name</a></span></div>
}
else if (item is ContentModels.IconTextItem)
{
<div class="col-9"><span>@(item.Value<string>("text"))</span></div>
}
</div>
}
}
</div>

View File

@ -0,0 +1,26 @@
@inherits UmbracoViewPage<ContentModels.IWorkHistoryControls>
@using ContentModels = Umbraco.Cms.Web.Common.PublishedModels
<div class="education group">
<div class="heading">
<h2 class="text-center">@Model.EducationHistoryTitle</h2>
</div>
@if (Model.EducationHistory != null && Model.EducationHistory.Any())
{
foreach (var item in Model.EducationHistory)
{
<div class="item">
<div class="row">
<div class="col-md-6">
<h3>@item.Title</h3>
<h4 class="organization">@item.PlaceName</h4>
</div>
<div class="col-md-6"><span class="period">@item.StartDate.ToString("MM/yyyy") - @(item.EndDate != null && item.EndDate > DateTime.MinValue ? item.EndDate.ToString("MM/yyyy") : "Present")</span></div>
</div>
<div class="text-muted">@item.Details</div>
</div>
}
}
</div>

View File

@ -0,0 +1,38 @@
@inherits UmbracoViewPage<ContentModels.IFooterControls>
@using ContentModels = Umbraco.Cms.Web.Common.PublishedModels
@using Portfolio.Core.Extensions
@if (Model != null)
{
var homePage = (IPublishedContent)Model;
<footer class="page-footer">
<div class="container">
@if (Model.FooterContentLinks != null && Model.FooterContentLinks.Any())
{
<div class="links">
@foreach (var item in Model.FooterContentLinks)
{
<a href="@item.Url" target="@item.Target">@item.Name</a>
}
</div>
}
@if (Model.FooterSocialLinks != null && Model.FooterSocialLinks.Any())
{
<div class="social-icons">
@foreach (var item in Model.FooterSocialLinks)
{
@if (item is ContentModels.IconLinkItem)
{
var linkItem = item as ContentModels.IconLinkItem;
<a href="@(linkItem.Link.Url)" target="@linkItem.Link.Target" rel="noopener" title="@linkItem.Link.Name" class="bg-primary"><i class="icon @(item.Value<string>("icon").ToIconClass())"></i></a>
}
}
</div>
}
<p class="text-center small">&copy; Copyright @homePage.GetSiteName() @DateTime.UtcNow.Year</p>
</div>
</footer>
}

View File

@ -0,0 +1,106 @@
@using System.Web
@using Microsoft.AspNetCore.Html
@using Newtonsoft.Json.Linq
@inherits Umbraco.Cms.Web.Common.Views.UmbracoViewPage<dynamic>
@*
Razor helpers located at the bottom of this file
*@
@if (Model is JObject && Model?.sections is not null)
{
var oneColumn = ((System.Collections.ICollection)Model.sections).Count == 1;
<div class="umb-grid">
@if (oneColumn)
{
foreach (var section in Model.sections)
{
<div class="grid-section">
@foreach (var row in section.rows)
{
renderRow(row);
}
</div>
}
}
else
{
<div class="row clearfix">
@foreach (var sec in Model.sections)
{
<div class="grid-section">
<div class="col-md-@sec.grid column">
@foreach (var row in sec.rows)
{
renderRow(row);
}
</div>
</div>
}
</div>
}
</div>
}
@functions{
private async Task renderRow(dynamic row)
{
<div @RenderElementAttributes(row)>
<div class="row clearfix">
@foreach (var area in row.areas)
{
<div class="col-md-@area.grid column">
<div @RenderElementAttributes(area)>
@foreach (var control in area.controls)
{
if (control?.editor?.view != null)
{
<text>@await Html.PartialAsync("grid/editors/base", (object)control)</text>
}
}
</div>
</div>
}
</div>
</div>
}
}
@functions{
public static HtmlString RenderElementAttributes(dynamic contentItem)
{
var attrs = new List<string>();
JObject cfg = contentItem.config;
if (cfg != null)
{
foreach (JProperty property in cfg.Properties())
{
var propertyValue = HttpUtility.HtmlAttributeEncode(property.Value.ToString());
attrs.Add(property.Name + "=\"" + propertyValue + "\"");
}
}
JObject style = contentItem.styles;
if (style != null) {
var cssVals = new List<string>();
foreach (JProperty property in style.Properties())
{
var propertyValue = property.Value.ToString();
if (string.IsNullOrWhiteSpace(propertyValue) == false)
{
cssVals.Add(property.Name + ":" + propertyValue + ";");
}
}
if (cssVals.Any())
attrs.Add("style='" + HttpUtility.HtmlAttributeEncode(string.Join(" ", cssVals)) + "'");
}
return new HtmlString(string.Join(" ", attrs));
}
}

View File

@ -0,0 +1,112 @@
@using System.Web
@using Microsoft.AspNetCore.Html
@using Newtonsoft.Json.Linq
@inherits Umbraco.Cms.Web.Common.Views.UmbracoViewPage<dynamic>
@if (Model is JObject && Model?.sections is not null)
{
var oneColumn = ((System.Collections.ICollection)Model.sections).Count == 1;
<div class="umb-grid">
@if (oneColumn)
{
foreach (var section in Model.sections)
{
<div class="grid-section">
@foreach (var row in section.rows)
{
renderRow(row, true);
}
</div>
}
}
else
{
<div class="container">
<div class="row clearfix">
@foreach (var sec in Model.sections)
{
<div class="grid-section">
<div class="col-md-@sec.grid column">
@foreach (var row in sec.rows)
{
renderRow(row, false);
}
</div>
</div>
}
</div>
</div>
}
</div>
}
@functions{
private async Task renderRow(dynamic row, bool singleColumn)
{
<div @RenderElementAttributes(row)>
@if (singleColumn) {
@:<div class="container">
}
<div class="row clearfix">
@foreach (var area in row.areas)
{
<div class="col-md-@area.grid column">
<div @RenderElementAttributes(area)>
@foreach (var control in area.controls)
{
if (control?.editor?.view != null)
{
<text>@await Html.PartialAsync("grid/editors/base", (object)control)</text>
}
}
</div>
</div>
}
</div>
@if (singleColumn) {
@:</div>
}
</div>
}
}
@functions{
public static HtmlString RenderElementAttributes(dynamic contentItem)
{
var attrs = new List<string>();
JObject cfg = contentItem.config;
if (cfg != null)
{
foreach (JProperty property in cfg.Properties())
{
var propertyValue = HttpUtility.HtmlAttributeEncode(property.Value.ToString());
attrs.Add(property.Name + "=\"" + propertyValue + "\"");
}
}
JObject style = contentItem.styles;
if (style != null)
{
var cssVals = new List<string>();
foreach (JProperty property in style.Properties())
{
var propertyValue = property.Value.ToString();
if (string.IsNullOrWhiteSpace(propertyValue) == false)
{
cssVals.Add(property.Name + ":" + propertyValue + ";");
}
}
if (cssVals.Any())
attrs.Add("style=\"" + HttpUtility.HtmlAttributeEncode(string.Join(" ", cssVals)) + "\"");
}
return new HtmlString(string.Join(" ", attrs));
}
}

View File

@ -0,0 +1,27 @@
@model dynamic
@try
{
string editor = EditorView(Model);
<text>@await Html.PartialAsync(editor, Model as object)</text>
}
catch (Exception ex)
{
<pre>@ex.ToString()</pre>
}
@functions{
public static string EditorView(dynamic contentItem)
{
string view = contentItem.editor.render != null ? contentItem.editor.render.ToString() : contentItem.editor.view.ToString();
view = view.Replace(".html", ".cshtml");
if (!view.Contains("/"))
{
view = "grid/editors/" + view;
}
return view;
}
}

View File

@ -0,0 +1,11 @@
@inherits Umbraco.Cms.Web.Common.Views.UmbracoViewPage<dynamic>
@if (Model is not null)
{
string embedValue = Convert.ToString(Model.value);
embedValue = embedValue.DetectIsJson() ? Model.value.preview : Model.value;
<div class="video-wrapper">
@Html.Raw(embedValue)
</div>
}

View File

@ -0,0 +1,15 @@
@inherits Umbraco.Cms.Web.Common.Views.UmbracoViewPage<dynamic>
@if (Model?.value is not null)
{
string macroAlias = Model.value.macroAlias.ToString();
var parameters = new Dictionary<string,object>();
foreach (var mpd in Model.value.macroParamsDictionary)
{
parameters.Add(mpd.Name, mpd.Value);
}
<text>
@await Umbraco.RenderMacroAsync(macroAlias, parameters)
</text>
}

View File

@ -0,0 +1,64 @@
@model dynamic
@using Umbraco.Cms.Core.Media
@using Umbraco.Cms.Core.PropertyEditors.ValueConverters
@inject IImageUrlGenerator ImageUrlGenerator
@if (Model?.value is not null)
{
var url = Model.value.image;
if (Model.editor.config != null && Model.editor.config.size != null)
{
if (Model.value.coordinates != null)
{
url = ImageCropperTemplateCoreExtensions.GetCropUrl(
(string)url,
ImageUrlGenerator,
width: (int)Model.editor.config.size.width,
height: (int)Model.editor.config.size.height,
cropAlias: "default",
cropDataSet: new ImageCropperValue
{
Crops = new[]
{
new ImageCropperValue.ImageCropperCrop
{
Alias = "default",
Coordinates = new ImageCropperValue.ImageCropperCropCoordinates
{
X1 = (decimal)Model.value.coordinates.x1,
Y1 = (decimal)Model.value.coordinates.y1,
X2 = (decimal)Model.value.coordinates.x2,
Y2 = (decimal)Model.value.coordinates.y2
}
}
}
});
}
else
{
url = ImageCropperTemplateCoreExtensions.GetCropUrl(
(string)url,
ImageUrlGenerator,
width: (int)Model.editor.config.size.width,
height: (int)Model.editor.config.size.height,
cropDataSet: new ImageCropperValue
{
FocalPoint = new ImageCropperValue.ImageCropperFocalPoint
{
Top = Model.value.focalPoint == null ? 0.5m : Model.value.focalPoint.top,
Left = Model.value.focalPoint == null ? 0.5m : Model.value.focalPoint.left
}
});
}
}
var altText = Model.value.altText ?? Model.value.caption ?? string.Empty;
<img src="@url" alt="@altText">
if (Model.value.caption != null)
{
<p class="caption">@Model.value.caption</p>
}
}

View File

@ -0,0 +1,13 @@
@using Umbraco.Cms.Core.Templates
@model dynamic
@inject HtmlLocalLinkParser HtmlLocalLinkParser;
@inject HtmlUrlParser HtmlUrlParser;
@inject HtmlImageSourceParser HtmlImageSourceParser;
@{
var value = HtmlLocalLinkParser.EnsureInternalLinks(Model?.value.ToString());
value = HtmlUrlParser.EnsureUrls(value);
value = HtmlImageSourceParser.EnsureImageSources(value);
}
@Html.Raw(value)

View File

@ -0,0 +1,23 @@
@using System.Web
@model dynamic
@if (Model?.editor.config.markup is not null)
{
string markup = Model.editor.config.markup.ToString();
markup = markup.Replace("#value#", Html.ReplaceLineBreaks((string)Model.value.ToString()).ToString());
if (Model.editor.config.style != null)
{
markup = markup.Replace("#style#", Model.editor.config.style.ToString());
}
<text>
@Html.Raw(markup)
</text>
}
else
{
<text>
<div style="@Model?.editor.config.style">@Model?.value</div>
</text>
}

View File

@ -0,0 +1,13 @@
@inherits UmbracoViewPage<ContentModels.CV>
@using ContentModels = Umbraco.Cms.Web.Common.PublishedModels
<div class="hobbies group">
<div class="heading">
<h2 class="text-center">@Model.HobbiesTitle</h2>
</div>
<div class="text-center w-100">
<p class="text-muted">@Model.Hobbies</p>
</div>
</div>

View File

@ -0,0 +1,34 @@
@inherits UmbracoViewPage<ContentModels.ProjectList>
@using ContentModels = Umbraco.Cms.Web.Common.PublishedModels
@using Portfolio.Core.Extensions
@{
var projects = Model != null ? Model.Children<ContentModels.Project>().Where(x => x.IsVisible()) : Enumerable.Empty<ContentModels.Project>();
}
@if (projects != null && projects.Any())
{
<section class="portfolio-block photography">
<div class="container">
<div class="row no-gutters">
@foreach (var project in projects)
{
var projectTitle = project.GetPageTitle();
<div class="col-md-6 col-lg-4 item zoom-on-hover">
<a href="@project.Url()" title="@projectTitle">
@if (project.MainImage != null)
{
<img class="img-fluid image" width="663" height="442" src="@project.MainImage.GetCropUrl(width: 663, height: 442)" alt="@project.MainImage.GetAltText()">
}
else
{
@projectTitle;
}
</a>
</div>
}
</div>
</div>
</section>
}

View File

@ -0,0 +1,10 @@
@inherits Umbraco.Cms.Web.Common.Views.UmbracoViewPage
@using Portfolio.Core.Extensions
<meta charset="utf-8">
<meta content="IE=edge,chrome=1' http-equiv='X-UA-Compatible">
<meta name="viewport" content="width=device-width, initial-scale=1.0, shrink-to-fit=no">
<meta name="description" content="@Model.GetMetaDescription()">
<title>@Model.GetMetaTitle()</title>
<link rel="canonical" href="@Model.GetCanonicalUrl()">

View File

@ -0,0 +1,17 @@
@inherits UmbracoViewPage<ContentModels.IWorkHistoryControls>
@using ContentModels = Umbraco.Cms.Web.Common.PublishedModels
<div class="skills portfolio-info-card">
<h2>@Model.SkillsTitle</h2>
@if (Model.Skills != null && Model.Skills.Any())
{
foreach (var item in Model.Skills)
{
<h3>@item.Skill</h3>
<div class="progress">
<div class="progress-bar" aria-valuenow="@(item.Rating)" aria-valuemin="0" aria-valuemax="100" style="width: @(item.Rating)%;"><span class="sr-only">@(item.Rating)%</span></div>
</div>
}
}
</div>

View File

@ -0,0 +1,25 @@
@inherits UmbracoViewPage<ContentModels.Home>
@using ContentModels = Umbraco.Cms.Web.Common.PublishedModels
@{
var pages = Model?.Children().Where(x => x.IsVisible()) ?? Enumerable.Empty<IPublishedContent>();
}
<nav class="navbar navbar-dark navbar-expand-lg fixed-top bg-primary portfolio-navbar">
<div class="container">
<a class="navbar-brand logo" href="@Model.Url()">@(Model.SiteName)</a><button data-toggle="collapse" class="navbar-toggler" data-target="#navbarNav"><span class="sr-only">Toggle navigation</span><span class="navbar-toggler-icon"></span></button>
<div class="collapse navbar-collapse" id="navbarNav">
<ul class="navbar-nav ml-auto">
<li class="nav-item"><a class="nav-link active" href="@Model.Url()">@Model.Name</a></li>
@if (pages != null && pages.Any())
{
@foreach (var item in pages)
{
<li class="nav-item"><a class="nav-link active" href="@item.Url()">@item.Name</a></li>
}
}
</ul>
</div>
</div>
</nav>

View File

@ -0,0 +1,25 @@
@inherits UmbracoViewPage<ContentModels.IWorkHistoryControls>
@using ContentModels = Umbraco.Cms.Web.Common.PublishedModels
<div class="work-experience group">
<div class="heading">
<h2 class="text-center">@Model.WorkHistoryTitle</h2>
</div>
@if (Model.WorkHistory != null && Model.WorkHistory.Any())
{
foreach (var item in Model.WorkHistory)
{
<div class="item">
<div class="row">
<div class="col-md-6">
<h3>@item.Title</h3>
<h4 class="organization">@item.PlaceName</h4>
</div>
<div class="col-md-6"><span class="period">@item.StartDate.ToString("MM/yyyy") - @(item.EndDate != null && item.EndDate > DateTime.MinValue ? item.EndDate.ToString("MM/yyyy") : "Present")</span></div>
</div>
<div class="text-muted">@item.Details</div>
</div>
}
}
</div>

View File

@ -0,0 +1,63 @@
@inherits Umbraco.Cms.Web.Common.Views.UmbracoViewPage<ContentModels.Project>
@using ContentModels = Umbraco.Cms.Web.Common.PublishedModels
@using Portfolio.Core.Extensions
@{
Layout = "Master.cshtml";
var projectList = Model.Parent;
var otherProjects = projectList.Children<ContentModels.Project>().Where(x => x.Id != Model.Id);
var title = Model.Value<string>("title", fallback: Fallback.ToDefaultValue, defaultValue: Model.Name);
}
<main class="page project-page">
<section class="portfolio-block project">
<div class="container">
<div class="heading">
<h1 class="font-weight-bold text-uppercase">@title</h1>
</div>
@if (Model.MainImage != null)
{
<div class="image" style="background-image: url('@Model.MainImage.GetCropUrl(width: 1110, height: 450)');"></div>
}
<div class="row">
<div class="col-12 col-md-6 offset-md-1 info">
<h3>Description</h3>
@Model.Description
</div>
<div class="col-12 col-md-3 offset-md-1 meta">
<div class="tags">
@if (Model.ProjectDate != null && Model.ProjectDate > DateTime.MinValue)
{
<span class="meta-heading">Date</span>
<span>@Model.ProjectDate.ToString("dd MMM yyyy")</span>
}
</div>
</div>
</div>
@if (otherProjects != null && otherProjects.Any())
{
<div class="more-projects">
<h3 class="text-center">More Projects</h3>
<div class="row gallery">
@foreach (var project in otherProjects)
{
var projectContentItem = (IPublishedContent)project;
<div class="col-md-4 col-lg-3 mx-auto">
<div class="item">
<a href="@project.Url()" title="@projectContentItem.GetPageTitle()">
@if (project.MainImage != null)
{
<img class="img-fluid scale-on-hover" src="@project.MainImage.GetCropUrl(width: 663, height: 442)">
}
</a>
</div>
</div>
}
</div>
</div>
}
</div>
</section>
</main>

View File

@ -0,0 +1,36 @@
@inherits Umbraco.Cms.Web.Common.Views.UmbracoViewPage<ContentModels.ProjectList>
@using ContentModels = Umbraco.Cms.Web.Common.PublishedModels
@using Portfolio.Core.Extensions
@{
Layout = "Master.cshtml";
var projects = Model.Children<ContentModels.Project>().Where(x => x.IsVisible());
}
<main class="page projets-page">
<section class="portfolio-block projects compact-grid">
<div class="heading">
<h1 class="text-uppercase font-weight-bold">@Model.Title</h1>
</div>
@if (projects != null && projects.Any())
{
<div class="row no-gutters">
@foreach (var project in projects)
{
<div class="col-md-6 col-lg-4 item zoom-on-hover">
<a href="@project.Url()">
@if (project.MainImage != null)
{
<img class="img-fluid image" src="@project.MainImage.GetCropUrl(width: 976, height: 650)" alt="@project.MainImage.GetAltText()">
}
<span class="description">
<span class="description-heading">@project.Name</span>
<span class="description-body">@project.MetaDescription</span>
</span>
</a>
</div>
}
</div>
}
</section>
</main>

View File

@ -0,0 +1,9 @@
@using Umbraco.Extensions
@using umbraco
@using Umbraco.Cms.Web.Common.PublishedModels
@using Umbraco.Cms.Web.Common.Views
@using Umbraco.Cms.Core.Models.PublishedContent
@using Microsoft.AspNetCore.Html
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
@addTagHelper *, Smidge
@inject Smidge.SmidgeHelper SmidgeHelper

View File

@ -0,0 +1,34 @@
{
"$schema": "./appsettings-schema.json",
"Serilog": {
"MinimumLevel": {
"Default": "Information"
},
"WriteTo": [
{
"Name": "Async",
"Args": {
"configure": [
{
"Name": "Console"
}
]
}
}
]
},
"Umbraco": {
"CMS": {
"Content": {
"MacroErrors": "Throw"
},
"Hosting": {
"Debug": true
},
"RuntimeMinification": {
"UseInMemoryCache": true,
"CacheBuster": "Timestamp"
}
}
}
}

View File

@ -0,0 +1,30 @@
{
"$schema": "./appsettings-schema.json",
"Serilog": {
"MinimumLevel": {
"Default": "Information",
"Override": {
"Microsoft": "Warning",
"Microsoft.Hosting.Lifetime": "Information",
"System": "Warning"
}
}
},
"Umbraco": {
"CMS": {
"Global": {
"Id": "8dbef9ca-2789-4e17-adfb-ef1fd05b6502",
"SanitizeTinyMce": true
},
"Content": {
"ContentVersionCleanupPolicy": {
"EnableCleanup": true
}
}
}
},
"ConnectionStrings": {
"umbracoDbDSN": "Data Source=|DataDirectory|/Umbraco.sqlite.db;Cache=Shared;Foreign Keys=True;Pooling=True",
"umbracoDbDSN_ProviderName": "Microsoft.Data.SQLite"
}
}

View File

@ -0,0 +1,34 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Portfolio" Version="1.0.5" />
<PackageReference Include="Umbraco.Cms" Version="10.0.0-rc4" />
</ItemGroup>
<!-- Force Windows to use ICU. Otherwise Windows 10 2019H1+ will do it, but older Windows 10 and most, if not all, Windows Server editions will run NLS -->
<ItemGroup>
<PackageReference Include="Microsoft.ICU.ICU4C.Runtime" Version="68.2.0.9" />
<RuntimeHostConfigurationOption Include="System.Globalization.AppLocalIcu" Value="68.2.0.9" Condition="$(RuntimeIdentifier.StartsWith('linux')) or $(RuntimeIdentifier.StartsWith('win')) or ('$(RuntimeIdentifier)' == '' and !$([MSBuild]::IsOSPlatform('osx')))" />
</ItemGroup>
<PropertyGroup>
<CopyRazorGenerateFilesToPublishDirectory>true</CopyRazorGenerateFilesToPublishDirectory>
</PropertyGroup>
<ItemGroup>
<Folder Include="wwwroot" />
</ItemGroup>
<!-- Keep this as false if ModelsBuilder mode is InMemoryAuto -->
<PropertyGroup>
<RazorCompileOnBuild>false</RazorCompileOnBuild>
<RazorCompileOnPublish>false</RazorCompileOnPublish>
</PropertyGroup>
</Project>

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

After

Width:  |  Height:  |  Size: 326 KiB

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,5 @@
$('.datepicker').each(function(){
var picker = new Pikaday({
field: this
});
});

0
umbraco-cms/compose.yaml Normal file
View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 245 KiB

8
umbraco-cms/readme.md Normal file
View File

@ -0,0 +1,8 @@
# Umbraco CMS Docker compose file
This sample project will start up the [Umbraco CMS](https://github.com/umbraco/Umbraco-CMS/) in a Docker container, with an attached database container running SQL Server.
*Note: The current version is released using version 9 of the CMS, but that will be updated to version 10 after the [2022 Codegarden conference](http://codegarden.umbraco.com/), when version 10 will be launced officially.*
## Project Structure