From ff5f1f340c6e8fd6a2deb2c81a2f54fe074ef055 Mon Sep 17 00:00:00 2001 From: Francesco Lorenzo D'Amico Date: Fri, 11 Sep 2026 13:40:04 +0200 Subject: [PATCH] Add the editable section partials (Hero, About, Skills, Projects, Goals, Experience, Documents, Contact) --- .../Pages/Shared/Sections/_About.cshtml | 43 ++++ .../Pages/Shared/Sections/_Contact.cshtml | 187 ++++++++++++++++++ .../Pages/Shared/Sections/_Documents.cshtml | 43 ++++ .../Pages/Shared/Sections/_Experience.cshtml | 61 ++++++ .../Pages/Shared/Sections/_Goals.cshtml | 54 +++++ .../Pages/Shared/Sections/_Hero.cshtml | 93 +++++++++ .../Pages/Shared/Sections/_Projects.cshtml | 141 +++++++++++++ .../Pages/Shared/Sections/_Skills.cshtml | 49 +++++ 8 files changed, 671 insertions(+) create mode 100644 BewerbungWebseite/Pages/Shared/Sections/_About.cshtml create mode 100644 BewerbungWebseite/Pages/Shared/Sections/_Contact.cshtml create mode 100644 BewerbungWebseite/Pages/Shared/Sections/_Documents.cshtml create mode 100644 BewerbungWebseite/Pages/Shared/Sections/_Experience.cshtml create mode 100644 BewerbungWebseite/Pages/Shared/Sections/_Goals.cshtml create mode 100644 BewerbungWebseite/Pages/Shared/Sections/_Hero.cshtml create mode 100644 BewerbungWebseite/Pages/Shared/Sections/_Projects.cshtml create mode 100644 BewerbungWebseite/Pages/Shared/Sections/_Skills.cshtml diff --git a/BewerbungWebseite/Pages/Shared/Sections/_About.cshtml b/BewerbungWebseite/Pages/Shared/Sections/_About.cshtml new file mode 100644 index 0000000..29a1ce5 --- /dev/null +++ b/BewerbungWebseite/Pages/Shared/Sections/_About.cshtml @@ -0,0 +1,43 @@ +@model SectionView +@{ + var about = Model.Section; + var edit = Model.EditMode; +} + +
+
+
+
+
+
+
+ @about.ImageAlt +
+
+
+
+
+
+
+
@about.Kicker
+

@about.TitleLine1

+

@about.TitleLine2Highlight

+

@about.Text

+
+
+ @foreach (var fact in about.Facts) + { +
@fact.Label @if (edit) {}
+ } + @if (edit) + { + + } +
+
+
+
+
+
+
+
diff --git a/BewerbungWebseite/Pages/Shared/Sections/_Contact.cshtml b/BewerbungWebseite/Pages/Shared/Sections/_Contact.cshtml new file mode 100644 index 0000000..70411cd --- /dev/null +++ b/BewerbungWebseite/Pages/Shared/Sections/_Contact.cshtml @@ -0,0 +1,187 @@ +@model SectionView +@{ + var contact = Model.Section; + var edit = Model.EditMode; +} + +
+
+
+ +
+
+
+
@contact.Kicker
+

@contact.TitleHighlight

+
+
+
+ +
+ +
+
+ @foreach (var box in contact.InfoBoxes) + { +
+
+
+ +
+ +
+

@box.Title

+

+ @if (string.IsNullOrWhiteSpace(box.LinkUrl) && !edit) + { + @box.Text + } + else if (!edit) + { + @box.Text + } + else + { + @box.Text + + } +

+
+
+ @if (edit) + { + + + } +
+ } + @if (edit) + { + + } +
+
+ + @* Das Formular selbst ist Funktionalitaet und bleibt fest im Code; + nur die Einleitung darueber kommt aus dem Inhalt. *@ +
+
+
+ +
+ + + +
+ + @* Zeilenumbrueche im Text werden als
gerendert. *@ +

+ @{ var headingLines = contact.FormHeading.Replace("\r\n", "\n").Split('\n'); } + @for (var i = 0; i < headingLines.Length; i++) + { + if (i > 0) + { +
+ } + @headingLines[i] + } +

+ +
+ +
+
+

Name (Pflichtfeld)

+
+ +
+ +
+
+
+ +
+
+

E-Mail (Pflichtfeld)

+
+ +
+ +
+
+
+ +
+
+

Telefon (optional)

+
+ +
+ +
+
+
+ +
+
+

Betreff (Pflichtfeld)

+
+ +
+ +
+
+
+ +
+
+

Nachricht

+
+ +
+ +
+
+
+ +
+
+ +
+
+ +
+
+ +
+
+
+
+ +
+
+
+
diff --git a/BewerbungWebseite/Pages/Shared/Sections/_Documents.cshtml b/BewerbungWebseite/Pages/Shared/Sections/_Documents.cshtml new file mode 100644 index 0000000..58bb2aa --- /dev/null +++ b/BewerbungWebseite/Pages/Shared/Sections/_Documents.cshtml @@ -0,0 +1,43 @@ +@model SectionView +@{ + var documents = Model.Section; + var edit = Model.EditMode; +} + +
+
+
+
@documents.Kicker
+

@documents.TitleHighlight

+
+ +
+ @foreach (var item in documents.Items) + { +
+
+
+

@item.Title

+

@item.Description

+
+ +
+ @if (edit) + { +
+ + +
+ + } +
+ } +
+ @if (edit) + { + + } +
+
diff --git a/BewerbungWebseite/Pages/Shared/Sections/_Experience.cshtml b/BewerbungWebseite/Pages/Shared/Sections/_Experience.cshtml new file mode 100644 index 0000000..9fb86a1 --- /dev/null +++ b/BewerbungWebseite/Pages/Shared/Sections/_Experience.cshtml @@ -0,0 +1,61 @@ +@model SectionView +@{ + var experience = Model.Section; + var edit = Model.EditMode; +} + +
+
+
+
+
@experience.Kicker
+

@experience.TitleHighlight

+
+ +
+
+
+ @foreach (var item in experience.Items) + { +
+

@item.Title

+
@item.Meta
+
+

@item.DetailHeading

+

@item.Text

+
+ @if (edit) + { + + + } +
+ } +
+ @if (edit) + { + + } + +
+ +
+ @if (edit) + { +
+ + +
+ } +
+
+
+
+
diff --git a/BewerbungWebseite/Pages/Shared/Sections/_Goals.cshtml b/BewerbungWebseite/Pages/Shared/Sections/_Goals.cshtml new file mode 100644 index 0000000..0efbf84 --- /dev/null +++ b/BewerbungWebseite/Pages/Shared/Sections/_Goals.cshtml @@ -0,0 +1,54 @@ +@model SectionView +@{ + var goals = Model.Section; + var edit = Model.EditMode; +} + +
+
+
+
+
+
+
@goals.Kicker
+

@goals.TitleHighlight

+
+
+
+ +
+ @for (var i = 0; i < goals.Items.Count; i++) + { + var item = goals.Items[i]; + @* Vier Kacheln pro Reihe, jede zweite in der abweichenden Theme-Variante. *@ + var boxClass = i % 2 == 1 ? "techno-sinlge-service-box-1" : "techno-sinlge-service-box"; + if (item.Highlighted) + { + boxClass += " active"; + } + +
+
+
+
+
+

@item.Title

@item.Text

+
+
+
+ @if (edit) + { + + + + } +
+ } +
+ @if (edit) + { + + } +
+
+
diff --git a/BewerbungWebseite/Pages/Shared/Sections/_Hero.cshtml b/BewerbungWebseite/Pages/Shared/Sections/_Hero.cshtml new file mode 100644 index 0000000..2b14eb0 --- /dev/null +++ b/BewerbungWebseite/Pages/Shared/Sections/_Hero.cshtml @@ -0,0 +1,93 @@ +@model SectionView +@{ + var hero = Model.Section; + var edit = Model.EditMode; + var lastLine = hero.TitleLines.Count - 1; +} + +
+
+
+
+
+

@hero.Kicker

+ @for (var i = 0; i < hero.TitleLines.Count; i++) + { + @if (i == lastLine) + { +

@hero.TitleLines[i]

+ } + else + { +

@hero.TitleLines[i]

+ } + } +

@hero.Intro

+
+
+ + @if (edit) + { + + } +
+ @if (edit) + { + + + @hero.SecondaryButton.Text + + + + } + else + { + + @hero.SecondaryButton.Text + + } +
+
+ @foreach (var link in hero.SocialLinks) + { + var external = !link.Url.StartsWith("mailto:", StringComparison.OrdinalIgnoreCase); + @if (edit) + { + + @link.Text + + + + } + else if (external) + { + @link.Text + } + else + { + @link.Text + } + } + @if (edit) + { + + } +
+
+
+
+
+ @hero.PortraitAlt +
+
+
+ +
+
+ +
+
+
+
+
+
diff --git a/BewerbungWebseite/Pages/Shared/Sections/_Projects.cshtml b/BewerbungWebseite/Pages/Shared/Sections/_Projects.cshtml new file mode 100644 index 0000000..60d4040 --- /dev/null +++ b/BewerbungWebseite/Pages/Shared/Sections/_Projects.cshtml @@ -0,0 +1,141 @@ +@model SectionView +@{ + var projects = Model.Section; + var edit = Model.EditMode; +} + +@functions { + // Titel, Beschreibung, Detailbloecke und Links -- identisch fuer schmale und breite Karten. + async Task RenderCardBody(ProjectItem project, bool edit) + { +
+

@project.Title

+

+ @if (edit) + { + @project.DescriptionLead + } + else if (!string.IsNullOrWhiteSpace(project.DescriptionLead)) + { + @project.DescriptionLead@: + } + +

+
+
+ @foreach (var detail in project.Details) + { + @if (edit) + { +
+

@detail.Heading

+

@detail.Text

+ +
+ } + else + { +

@detail.Heading

+

@detail.Text

+ } + } + @if (edit) + { + + } +
+ @if (edit) + { +
+ @foreach (var link in project.Links) + { + + @link.Text + + + + } + +
+ } + else if (project.Links.Count > 0) + { +
+ @for (var i = 0; i < project.Links.Count; i++) + { + var link = project.Links[i]; + @link.Text + } +
+ } + } +} + +
+
+
+
@projects.Kicker
+

@projects.TitleHighlight

+
+ + @{ + // Schmale Karten stehen zu zweit in einer Reihe, breite Karten je allein. + var index = 0; + } + @while (index < projects.Items.Count) + { + var project = projects.Items[index]; + + if (project.Wide) + { +
+
+
+
+
+
@project.ImageAlt
+
+
+ @{ await RenderCardBody(project, edit); } +
+
+
+ @if (edit) + { + + + } +
+
+ index++; + } + else + { + var pair = projects.Items.Skip(index).TakeWhile(p => !p.Wide).Take(2).ToList(); + +
+ @foreach (var narrow in pair) + { +
+
+
@narrow.ImageAlt
+ @{ await RenderCardBody(narrow, edit); } +
+ @if (edit) + { + + + } +
+ } +
+ index += pair.Count; + } + } + + @if (edit) + { + + } +
+
diff --git a/BewerbungWebseite/Pages/Shared/Sections/_Skills.cshtml b/BewerbungWebseite/Pages/Shared/Sections/_Skills.cshtml new file mode 100644 index 0000000..28e5762 --- /dev/null +++ b/BewerbungWebseite/Pages/Shared/Sections/_Skills.cshtml @@ -0,0 +1,49 @@ +@model SectionView +@{ + var skills = Model.Section; + var edit = Model.EditMode; +} + +
+
+
+
@skills.Kicker
+

@skills.TitleHighlight

+

@skills.Intro

+
+ +
+ @for (var i = 0; i < skills.Items.Count; i++) + { + var item = skills.Items[i]; + @* Drei Kacheln pro Reihe; die mittlere Spalte hat im Theme eine eigene Variante. *@ + var boxClass = i % 3 == 1 ? "techno-sinlge-service-box-1" : "techno-sinlge-service-box"; + if (item.Highlighted) + { + boxClass += " active"; + } + +
+
+
+
+
+

@item.Title

@item.Text

+
+
+
+ @if (edit) + { + + + + } +
+ } +
+ @if (edit) + { + + } +
+