PDF-Layout: Glassmorphism-Design mit abgerundeten Karten und Schatten

This commit is contained in:
Adam Gaiswinkler
2026-02-19 16:36:15 +01:00
parent e7ee313472
commit 8b357f5653
3 changed files with 131 additions and 309 deletions

View File

@@ -63,36 +63,59 @@ namespace SZUAbsolventenverein.Module.HallOfFame.Controllers
page.Content().Layers(layers =>
{
// Hintergrund-Layer: Bild als Vollbild
// ── Hintergrundbild (Edge-to-Edge) ──
if (imageBytes != null)
{
layers.Layer().Image(imageBytes).FitUnproportionally();
}
else
{
layers.Layer().Background(Colors.Grey.Darken3);
layers.Layer().Background("#1A1A2E");
}
// Inhalt-Layer (PrimaryLayer bestimmt die Größe)
// ── Inhalt (PrimaryLayer) ──
layers.PrimaryLayer()
.Padding(40)
.Column(column =>
{
// === OBEN: Name und Jahr in halbtransparenter grauer Box ===
// ═══ TITELKARTE (oben) ═══
column.Item()
.Background("#AA9E9E9E") // halbtransparentes Grau
.Padding(20)
.Row(row =>
.Border(5f).BorderColor("#20000000")
.CornerRadius(24)
.Border(3f).BorderColor("#33000000")
.CornerRadius(22)
.Border(1f).BorderColor("#44FFFFFF")
.Background("#CC1A1A2E")
.CornerRadius(20)
.PaddingVertical(28)
.PaddingHorizontal(36)
.Column(inner =>
{
row.RelativeItem().Column(inner =>
{
inner.Item().Text(entry.Name)
.FontSize(28).Bold().FontColor(Colors.White);
inner.Item().Text($"Jahrgang {entry.Year}")
.FontSize(14).FontColor(Colors.White);
});
// Name: groß, dominant, Uppercase
inner.Item()
.PaddingBottom(6)
.Text(entry.Name.ToUpper())
.FontSize(36)
.ExtraBold()
.FontColor(Colors.White)
.LetterSpacing(0.5f);
// Trennlinie
inner.Item()
.PaddingVertical(8)
.Height(1.5f)
.Background("#55FFFFFF");
// Jahr: sekundär, elegant
inner.Item()
.PaddingTop(4)
.Text($"Jahrgang {entry.Year}")
.FontSize(15)
.FontColor("#CCFFFFFF")
.LetterSpacing(1.5f);
});
// === UNTEN: Beschreibung am Seitenende ===
// ═══ BESCHREIBUNGSKARTE (unten) ═══
var description = entry.Description ?? "";
var sections = description.Split('\n')
.Select(s => s.Trim())
@@ -100,22 +123,43 @@ namespace SZUAbsolventenverein.Module.HallOfFame.Controllers
.ToArray();
column.Item().ExtendVertical().AlignBottom()
.Background("#CC333333") // dunkles halbtransparentes Overlay
.Padding(25)
.Border(5f).BorderColor("#20000000")
.CornerRadius(20)
.Border(3f).BorderColor("#33000000")
.CornerRadius(18)
.Border(1f).BorderColor("#33FFFFFF")
.Background("#CC1A1A2E")
.CornerRadius(16)
.PaddingVertical(24)
.PaddingHorizontal(32)
.Column(descColumn =>
{
if (sections.Length > 0)
{
descColumn.Item().PaddingBottom(10)
.Text("Beschreibung:")
.FontSize(16).Bold().FontColor(Colors.White);
// Überschrift
descColumn.Item()
.PaddingBottom(12)
.Text("Beschreibung")
.FontSize(14)
.SemiBold()
.FontColor("#B0FFFFFF")
.LetterSpacing(2f);
// Trennlinie
descColumn.Item()
.PaddingBottom(14)
.Height(1f)
.Background("#33FFFFFF");
// Text
foreach (var line in sections)
{
descColumn.Item().PaddingBottom(6)
descColumn.Item()
.PaddingBottom(8)
.Text(line)
.FontSize(11).FontColor(Colors.White)
.LineHeight(1.4f);
.FontSize(11)
.FontColor("#E8FFFFFF")
.LineHeight(1.5f);
}
}
});

View File

@@ -35,9 +35,12 @@
<Reference Include="Oqtane.Server"><HintPath>..\..\oqtane.framework\Oqtane.Server\bin\Debug\net9.0\Oqtane.Server.dll</HintPath></Reference>
<Reference Include="Oqtane.Shared"><HintPath>..\..\oqtane.framework\Oqtane.Server\bin\Debug\net9.0\Oqtane.Shared.dll</HintPath></Reference>
</ItemGroup>
<!-- Copy QuestPDF DLLs to Oqtane.Server so they are available at runtime -->
<!-- Copy QuestPDF and Module DLLs to Oqtane.Server so they are available at runtime -->
<Target Name="CopyQuestPdfToOqtane" AfterTargets="Build">
<Message Importance="high" Text="Deploying QuestPDF and Module DLLs to Oqtane bin..." />
<Copy SourceFiles="$(OutputPath)QuestPDF.dll" DestinationFolder="$(ProjectDir)..\..\oqtane.framework\Oqtane.Server\bin\$(Configuration)\$(TargetFramework)\" SkipUnchangedFiles="true" />
<Copy SourceFiles="$(OutputPath)SZUAbsolventenverein.Module.HallOfFame.Server.Oqtane.dll" DestinationFolder="$(ProjectDir)..\..\oqtane.framework\Oqtane.Server\bin\$(Configuration)\$(TargetFramework)\" SkipUnchangedFiles="false" />
<Copy SourceFiles="$(OutputPath)SZUAbsolventenverein.Module.HallOfFame.Shared.Oqtane.dll" DestinationFolder="$(ProjectDir)..\..\oqtane.framework\Oqtane.Server\bin\$(Configuration)\$(TargetFramework)\" SkipUnchangedFiles="false" />
<ItemGroup>
<QuestPdfNativeFiles Include="$(OutputPath)runtimes\**\*.*" />
</ItemGroup>