Compare commits

...

34 Commits

Author SHA1 Message Date
Francesco Lorenzo D'Amico f239aaffbb add private Email to contactform and remove Curiculum Vitae button
Deploy Staging / deploy (push) Successful in 1m14s
2026-08-26 16:01:53 +02:00
Francesco Lorenzo D'Amico 04f24cac8f Remove unused static assets and bootstrap/jquery libraries
Deploy Staging / deploy (push) Successful in 1m55s
2026-08-26 15:18:44 +02:00
Francesco Lorenzo D'Amico 29d00fbf7d Remove unused Privacy page 2026-08-26 15:18:17 +02:00
Francesco Lorenzo D'Amico d15a4a6de1 Merge Bewerbung page into Index as the site's home page 2026-08-26 15:17:57 +02:00
Francesco Lorenzo D'Amico be55d56897 Remove Movie feature and drop Movie table via migration 2026-08-26 15:13:58 +02:00
Francesco Lorenzo D'Amico a2f8b98c32 Rename solution and project from RazorPagesMovie to BewerbungsSeite 2026-08-26 15:05:26 +02:00
Francesco Lorenzo D'Amico eaf74222f8 Fix contact form rejecting submissions with empty phone number 2026-08-26 15:03:42 +02:00
Francesco Lorenzo D'Amico 09c0a5fe08 Fix unreadable title tag and add missing favicon on Bewerbung page
Deploy Staging / deploy (push) Successful in 2m33s
2026-08-26 14:13:01 +02:00
Francesco Lorenzo D'Amico 195a9cc440 Replace placeholder portfolio content with real storyboard content
Deploy Staging / deploy (push) Successful in 1m18s
2026-08-24 20:46:57 +02:00
Francesco Lorenzo D'Amico 71a8c7f09c Add personal hero and about-section photos 2026-08-24 20:45:43 +02:00
Francesco Lorenzo D'Amico a2cbe5e3a9 Add real screenshots for Recipes World, Chat App and Truenas dashboard 2026-08-24 20:44:22 +02:00
Francesco Lorenzo D'Amico a1439722bf Add competency-proof and certificate PDF's 2026-08-24 20:43:11 +02:00
Francesco Lorenzo D'Amico 859f9a2323 Tag Telegram notifications with the current environment
Deploy Staging / deploy (push) Successful in 1m12s
2026-08-24 14:56:53 +02:00
Francesco Lorenzo D'Amico 51522e1f3f Replace polling with push-based Telegram notification queue
Deploy Staging / deploy (push) Successful in 1m11s
2026-08-24 14:41:56 +02:00
Francesco Lorenzo D'Amico e66d95ec7a Save per entry for no duplicate data
Deploy Staging / deploy (push) Successful in 1m24s
2026-08-24 13:41:09 +02:00
Francesco Lorenzo D'Amico 28eb67c551 EF Migraion for making Contact Message required 2026-08-24 13:37:57 +02:00
Francesco Lorenzo D'Amico 863a57595e Require subject and validate contact form fields before submit
Deploy Staging / deploy (push) Successful in 1m11s
2026-08-21 15:32:54 +02:00
Francesco Lorenzo D'Amico f563979545 Improve contact form wording
Deploy Staging / deploy (push) Successful in 1m11s
2026-08-21 14:22:13 +02:00
Francesco Lorenzo D'Amico 57e832a95e Add prod redeploy
Deploy Staging / deploy (push) Successful in 1m12s
2026-08-21 12:04:25 +02:00
Francesco Lorenzo D'Amico df781eaf84 Move contact endpoint from Program.cs into ContactController
Deploy Staging / deploy (push) Successful in 1m11s
2026-08-20 11:41:05 +02:00
Francesco Lorenzo D'Amico 10737b8272 Validate phone number before submit, point form /api/v1/contact 2026-08-20 11:40:03 +02:00
Francesco Lorenzo D'Amico a8f664a6ba Log warning when telegram config is missing 2026-08-20 11:36:28 +02:00
Francesco Lorenzo D'Amico 028e62407a Replace contact form POST with async JS API endpoint
Deploy Staging / deploy (push) Successful in 1m10s
Add a POST /api/contact minimal API that returns JSON instead of relying
on the Razor Page's OnPostAsync full-page reload. The contact form now
submits via fetch(), showing an inline success or error message without
reloading the page.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SLdp8vEGVX6EKSDQPAx36a
2026-08-19 18:26:41 +02:00
Francesco Lorenzo D'Amico 46d36fcd04 Add staging configuration
Deploy Staging / deploy (push) Successful in 1m9s
2026-08-19 17:50:59 +02:00
Francesco Lorenzo D'Amico 106bc9c0c1 Add automatic staging redeploy
Deploy Staging / deploy (push) Successful in 58s
2026-08-19 17:28:59 +02:00
Francesco Lorenzo D'Amico 0a5e7f8e75 Add staging deployment workflow
Deploy Staging / deploy (push) Successful in 3m39s
2026-08-19 16:51:26 +02:00
Francesco Lorenzo D'Amico 3392eb8823 Add EF-Migration for changing id on models from int to Guid 2026-08-19 14:23:15 +02:00
Francesco Lorenzo D'Amico 1e5f2adcc7 Change id value from int to Guid 2026-08-19 11:25:53 +02:00
Francesco Lorenzo D'Amico ee43dc60d8 Create EF-Migration for NotificationSent-field 2026-08-18 16:46:57 +02:00
Francesco Lorenzo D'Amico c956c5b3b2 Backend-scheudler for telegram notifications by new contact requests 2026-08-18 16:46:07 +02:00
Francesco Lorenzo D'Amico ee9e8de354 Contactform saves input into db 2026-08-18 16:44:42 +02:00
Francesco Lorenzo D'Amico 7fb60d6f55 Create EF-Migration for AdminUser and ContactMessage 2026-08-18 14:58:08 +02:00
Francesco Lorenzo D'Amico 04877691b9 Add protected admin scope with login 2026-08-18 14:56:41 +02:00
Francesco Lorenzo D'Amico dfe5044c69 Connect contactMessage and adminUser on DB plus added contactMessage model 2026-08-18 14:52:29 +02:00
125 changed files with 2869 additions and 77661 deletions
+44
View File
@@ -0,0 +1,44 @@
name: Deploy Production
on:
workflow_dispatch:
inputs:
image_sha:
description: "Getesteter Commit SHA aus Staging"
required: true
jobs:
deploy-production:
runs-on: francesco
steps:
- name: Login to Docker Hub
run: |
echo "${{ secrets.DOCKER_TOKEN }}" | docker login \
-u "${{ secrets.DOCKER_USERNAME }}" \
--password-stdin
- name: Pull tested image
run: |
docker pull francesco448/razorpagesmovie:${{ inputs.image_sha }}
- name: Promote image to Production
run: |
docker tag \
francesco448/razorpagesmovie:${{ inputs.image_sha }} \
francesco448/razorpagesmovie:prod
docker push francesco448/razorpagesmovie:prod
- name: Configure SSH
run: |
mkdir -p ~/.ssh
echo "${{ secrets.TRUENAS_SSH_KEY }}" > ~/.ssh/id_ed25519
chmod 600 ~/.ssh/id_ed25519
ssh-keyscan -H "${{ secrets.TRUENAS_HOST }}" >> ~/.ssh/known_hosts
- name: Deploy Production
run: |
ssh -i ~/.ssh/id_ed25519 \
"${{ secrets.TRUENAS_USER }}@${{ secrets.TRUENAS_HOST }}" \
"midclt call -j app.redeploy razorpages-movie-dev"
+46
View File
@@ -0,0 +1,46 @@
name: Deploy Staging
on:
push:
branches:
- main
jobs:
deploy:
runs-on: francesco
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Login to Docker Hub
run: |
echo "${{ secrets.DOCKER_TOKEN }}" | docker login \
-u "${{ secrets.DOCKER_USERNAME }}" \
--password-stdin
- name: Build Docker image
run: |
docker build \
-t francesco448/razorpagesmovie:${{ gitea.sha }} \
-t francesco448/razorpagesmovie:staging \
-f RazorPagesMovie/Dockerfile \
.
- name: Push Docker image
run: |
docker push francesco448/razorpagesmovie:${{ gitea.sha }}
docker push francesco448/razorpagesmovie:staging
- name: Configure SSH
run: |
mkdir -p ~/.ssh
echo "${{ secrets.TRUENAS_SSH_KEY }}" > ~/.ssh/id_ed25519
chmod 600 ~/.ssh/id_ed25519
ssh-keyscan -H "${{ secrets.TRUENAS_HOST }}" >> ~/.ssh/known_hosts
- name: Deploy to Staging
run: |
ssh -i ~/.ssh/id_ed25519 \
"${{ secrets.TRUENAS_USER }}@${{ secrets.TRUENAS_HOST }}" \
"midclt call -j app.redeploy bewerbungs-portfolio-staging"
+25
View File
@@ -0,0 +1,25 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.14.37328.6 d17.14
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BewerbungsSeite", "RazorPagesMovie\BewerbungsSeite.csproj", "{C0057BD2-8BA3-42C8-BCB3-B372A9E06DC6}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{C0057BD2-8BA3-42C8-BCB3-B372A9E06DC6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C0057BD2-8BA3-42C8-BCB3-B372A9E06DC6}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C0057BD2-8BA3-42C8-BCB3-B372A9E06DC6}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C0057BD2-8BA3-42C8-BCB3-B372A9E06DC6}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {5BE94117-5970-4C15-96DA-EE0FF86973B5}
EndGlobalSection
EndGlobal
@@ -0,0 +1,3 @@
namespace RazorPagesMovie.Api.V1.Contact;
public record ContactDto(string? Name, string? Email, string? Phone, string? Subject, string? Message);
@@ -4,6 +4,8 @@
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<RootNamespace>RazorPagesMovie</RootNamespace>
<AssemblyName>RazorPagesMovie</AssemblyName>
<UserSecretsId>02763b00-6256-4663-b3cd-9c520c4b3f91</UserSecretsId>
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
</PropertyGroup>
@@ -18,8 +20,4 @@
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.22.1" />
</ItemGroup>
<ItemGroup>
<Folder Include="wwwroot\lib\fontawesome\" />
</ItemGroup>
</Project>
@@ -0,0 +1,39 @@
using System.ComponentModel.DataAnnotations;
using Microsoft.AspNetCore.Mvc;
using RazorPagesMovie.Api.V1.Contact;
using RazorPagesMovie.Data;
using RazorPagesMovie.Models;
using RazorPagesMovie.Services;
namespace RazorPagesMovie.Controllers.Api.V1;
[ApiController]
[Route("api/v1/[controller]")]
public class ContactController(RazorPagesMovieContext context, IContactMessageNotificationQueue notificationQueue) : ControllerBase
{
[HttpPost]
public async Task<IActionResult> Post(ContactDto request)
{
var contactMessage = new ContactMessage
{
Name = request.Name ?? string.Empty,
Email = request.Email ?? string.Empty,
Phone = string.IsNullOrWhiteSpace(request.Phone) ? null : request.Phone,
Subject = request.Subject ?? string.Empty,
Message = request.Message ?? string.Empty
};
var validationResults = new List<ValidationResult>();
if (!Validator.TryValidateObject(contactMessage, new ValidationContext(contactMessage), validationResults, validateAllProperties: true))
{
return BadRequest(new { error = "Bitte alle Pflichtfelder korrekt ausfüllen." });
}
context.ContactMessage.Add(contactMessage);
await context.SaveChangesAsync();
notificationQueue.Enqueue(contactMessage.Id);
return Ok(new { success = true });
}
}
@@ -4,5 +4,6 @@ namespace RazorPagesMovie.Data;
public class RazorPagesMovieContext(DbContextOptions<RazorPagesMovieContext> options) : DbContext(options)
{
public DbSet<RazorPagesMovie.Models.Movie> Movie { get; set; } = default!;
public DbSet<RazorPagesMovie.Models.AdminUser> AdminUser { get; set; } = default!;
public DbSet<RazorPagesMovie.Models.ContactMessage> ContactMessage { get; set; } = default!;
}
+5 -5
View File
@@ -6,17 +6,17 @@ EXPOSE 8081
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
ARG BUILD_CONFIGURATION=Release
WORKDIR /src
COPY ["RazorPagesMovie/RazorPagesMovie.csproj", "RazorPagesMovie/"]
RUN dotnet restore "./RazorPagesMovie/RazorPagesMovie.csproj"
COPY ["RazorPagesMovie/BewerbungsSeite.csproj", "RazorPagesMovie/"]
RUN dotnet restore "./RazorPagesMovie/BewerbungsSeite.csproj"
COPY . .
WORKDIR "/src/RazorPagesMovie"
RUN dotnet build "./RazorPagesMovie.csproj" -c $BUILD_CONFIGURATION -o /app/build
RUN dotnet build "./BewerbungsSeite.csproj" -c $BUILD_CONFIGURATION -o /app/build
FROM build AS publish
ARG BUILD_CONFIGURATION=Release
RUN dotnet publish "./RazorPagesMovie.csproj" -c $BUILD_CONFIGURATION -o /app/publish /p:UseAppHost=false
RUN dotnet publish "./BewerbungsSeite.csproj" -c $BUILD_CONFIGURATION -o /app/publish /p:UseAppHost=false
FROM base AS final
WORKDIR /app
COPY --from=publish /app/publish .
ENTRYPOINT ["dotnet", "RazorPagesMovie.dll"]docker build -t francesco448/razorpagesmovie:latest .
ENTRYPOINT ["dotnet", "RazorPagesMovie.dll"]
@@ -0,0 +1,125 @@
// <auto-generated />
using System;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using RazorPagesMovie.Data;
#nullable disable
namespace RazorPagesMovie.Migrations
{
[DbContext(typeof(RazorPagesMovieContext))]
[Migration("20260818121135_AddAdminUserAndContactMessage")]
partial class AddAdminUserAndContactMessage
{
/// <inheritdoc />
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "8.0.28")
.HasAnnotation("Relational:MaxIdentifierLength", 128);
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
modelBuilder.Entity("RazorPagesMovie.Models.AdminUser", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
b.Property<string>("PasswordHash")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property<string>("Username")
.IsRequired()
.HasMaxLength(100)
.HasColumnType("nvarchar(100)");
b.HasKey("Id");
b.ToTable("AdminUser");
});
modelBuilder.Entity("RazorPagesMovie.Models.ContactMessage", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
b.Property<string>("Email")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("nvarchar(200)");
b.Property<string>("Message")
.IsRequired()
.HasMaxLength(4000)
.HasColumnType("nvarchar(4000)");
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(100)
.HasColumnType("nvarchar(100)");
b.Property<string>("Phone")
.HasMaxLength(30)
.HasColumnType("nvarchar(30)");
b.Property<DateTime>("SentAt")
.HasColumnType("datetime2");
b.Property<string>("Subject")
.HasMaxLength(150)
.HasColumnType("nvarchar(150)");
b.HasKey("Id");
b.ToTable("ContactMessage");
});
modelBuilder.Entity("RazorPagesMovie.Models.Movie", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
b.Property<string>("Genre")
.IsRequired()
.HasMaxLength(30)
.HasColumnType("nvarchar(30)");
b.Property<decimal>("Price")
.HasColumnType("decimal(18, 2)");
b.Property<string>("Rating")
.IsRequired()
.HasMaxLength(5)
.HasColumnType("nvarchar(5)");
b.Property<DateTime>("ReleaseDate")
.HasColumnType("datetime2");
b.Property<string>("Title")
.IsRequired()
.HasMaxLength(60)
.HasColumnType("nvarchar(60)");
b.HasKey("Id");
b.ToTable("Movie");
});
#pragma warning restore 612, 618
}
}
}
@@ -0,0 +1,57 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace RazorPagesMovie.Migrations
{
/// <inheritdoc />
public partial class AddAdminUserAndContactMessage : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "AdminUser",
columns: table => new
{
Id = table.Column<int>(type: "int", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
Username = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: false),
PasswordHash = table.Column<string>(type: "nvarchar(max)", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_AdminUser", x => x.Id);
});
migrationBuilder.CreateTable(
name: "ContactMessage",
columns: table => new
{
Id = table.Column<int>(type: "int", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
Name = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: false),
Email = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: false),
Phone = table.Column<string>(type: "nvarchar(30)", maxLength: 30, nullable: true),
Subject = table.Column<string>(type: "nvarchar(150)", maxLength: 150, nullable: true),
Message = table.Column<string>(type: "nvarchar(4000)", maxLength: 4000, nullable: false),
SentAt = table.Column<DateTime>(type: "datetime2", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_ContactMessage", x => x.Id);
});
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "AdminUser");
migrationBuilder.DropTable(
name: "ContactMessage");
}
}
}
@@ -0,0 +1,128 @@
// <auto-generated />
using System;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using RazorPagesMovie.Data;
#nullable disable
namespace RazorPagesMovie.Migrations
{
[DbContext(typeof(RazorPagesMovieContext))]
[Migration("20260818134749_AddNotificationSentToContactMessage")]
partial class AddNotificationSentToContactMessage
{
/// <inheritdoc />
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "8.0.28")
.HasAnnotation("Relational:MaxIdentifierLength", 128);
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
modelBuilder.Entity("RazorPagesMovie.Models.AdminUser", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
b.Property<string>("PasswordHash")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property<string>("Username")
.IsRequired()
.HasMaxLength(100)
.HasColumnType("nvarchar(100)");
b.HasKey("Id");
b.ToTable("AdminUser");
});
modelBuilder.Entity("RazorPagesMovie.Models.ContactMessage", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
b.Property<string>("Email")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("nvarchar(200)");
b.Property<string>("Message")
.IsRequired()
.HasMaxLength(5000)
.HasColumnType("nvarchar(max)");
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(100)
.HasColumnType("nvarchar(100)");
b.Property<bool>("NotificationSent")
.HasColumnType("bit");
b.Property<string>("Phone")
.HasMaxLength(30)
.HasColumnType("nvarchar(30)");
b.Property<DateTime>("SentAt")
.HasColumnType("datetime2");
b.Property<string>("Subject")
.HasMaxLength(150)
.HasColumnType("nvarchar(150)");
b.HasKey("Id");
b.ToTable("ContactMessage");
});
modelBuilder.Entity("RazorPagesMovie.Models.Movie", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
b.Property<string>("Genre")
.IsRequired()
.HasMaxLength(30)
.HasColumnType("nvarchar(30)");
b.Property<decimal>("Price")
.HasColumnType("decimal(18, 2)");
b.Property<string>("Rating")
.IsRequired()
.HasMaxLength(5)
.HasColumnType("nvarchar(5)");
b.Property<DateTime>("ReleaseDate")
.HasColumnType("datetime2");
b.Property<string>("Title")
.IsRequired()
.HasMaxLength(60)
.HasColumnType("nvarchar(60)");
b.HasKey("Id");
b.ToTable("Movie");
});
#pragma warning restore 612, 618
}
}
}
@@ -0,0 +1,49 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace RazorPagesMovie.Migrations
{
/// <inheritdoc />
public partial class AddNotificationSentToContactMessage : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AlterColumn<string>(
name: "Message",
table: "ContactMessage",
type: "nvarchar(max)",
maxLength: 5000,
nullable: false,
oldClrType: typeof(string),
oldType: "nvarchar(4000)",
oldMaxLength: 4000);
migrationBuilder.AddColumn<bool>(
name: "NotificationSent",
table: "ContactMessage",
type: "bit",
nullable: false,
defaultValue: false);
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "NotificationSent",
table: "ContactMessage");
migrationBuilder.AlterColumn<string>(
name: "Message",
table: "ContactMessage",
type: "nvarchar(4000)",
maxLength: 4000,
nullable: false,
oldClrType: typeof(string),
oldType: "nvarchar(max)",
oldMaxLength: 5000);
}
}
}
@@ -0,0 +1,124 @@
// <auto-generated />
using System;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using RazorPagesMovie.Data;
#nullable disable
namespace RazorPagesMovie.Migrations
{
[DbContext(typeof(RazorPagesMovieContext))]
[Migration("20260819120324_ChangeAdminUserAndContactMessageIdToGuid")]
partial class ChangeAdminUserAndContactMessageIdToGuid
{
/// <inheritdoc />
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "8.0.28")
.HasAnnotation("Relational:MaxIdentifierLength", 128);
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
modelBuilder.Entity("RazorPagesMovie.Models.AdminUser", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property<string>("PasswordHash")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property<string>("Username")
.IsRequired()
.HasMaxLength(100)
.HasColumnType("nvarchar(100)");
b.HasKey("Id");
b.ToTable("AdminUser");
});
modelBuilder.Entity("RazorPagesMovie.Models.ContactMessage", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property<string>("Email")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("nvarchar(200)");
b.Property<string>("Message")
.IsRequired()
.HasMaxLength(5000)
.HasColumnType("nvarchar(max)");
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(100)
.HasColumnType("nvarchar(100)");
b.Property<bool>("NotificationSent")
.HasColumnType("bit");
b.Property<string>("Phone")
.HasMaxLength(30)
.HasColumnType("nvarchar(30)");
b.Property<DateTime>("SentAt")
.HasColumnType("datetime2");
b.Property<string>("Subject")
.HasMaxLength(150)
.HasColumnType("nvarchar(150)");
b.HasKey("Id");
b.ToTable("ContactMessage");
});
modelBuilder.Entity("RazorPagesMovie.Models.Movie", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
b.Property<string>("Genre")
.IsRequired()
.HasMaxLength(30)
.HasColumnType("nvarchar(30)");
b.Property<decimal>("Price")
.HasColumnType("decimal(18, 2)");
b.Property<string>("Rating")
.IsRequired()
.HasMaxLength(5)
.HasColumnType("nvarchar(5)");
b.Property<DateTime>("ReleaseDate")
.HasColumnType("datetime2");
b.Property<string>("Title")
.IsRequired()
.HasMaxLength(60)
.HasColumnType("nvarchar(60)");
b.HasKey("Id");
b.ToTable("Movie");
});
#pragma warning restore 612, 618
}
}
}
@@ -0,0 +1,99 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace RazorPagesMovie.Migrations
{
/// <inheritdoc />
public partial class ChangeAdminUserAndContactMessageIdToGuid : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropPrimaryKey(
name: "PK_ContactMessage",
table: "ContactMessage");
migrationBuilder.DropColumn(
name: "Id",
table: "ContactMessage");
migrationBuilder.AddColumn<Guid>(
name: "Id",
table: "ContactMessage",
type: "uniqueidentifier",
nullable: false,
defaultValueSql: "NEWID()");
migrationBuilder.AddPrimaryKey(
name: "PK_ContactMessage",
table: "ContactMessage",
column: "Id");
migrationBuilder.DropPrimaryKey(
name: "PK_AdminUser",
table: "AdminUser");
migrationBuilder.DropColumn(
name: "Id",
table: "AdminUser");
migrationBuilder.AddColumn<Guid>(
name: "Id",
table: "AdminUser",
type: "uniqueidentifier",
nullable: false,
defaultValueSql: "NEWID()");
migrationBuilder.AddPrimaryKey(
name: "PK_AdminUser",
table: "AdminUser",
column: "Id");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropPrimaryKey(
name: "PK_ContactMessage",
table: "ContactMessage");
migrationBuilder.DropColumn(
name: "Id",
table: "ContactMessage");
migrationBuilder.AddColumn<int>(
name: "Id",
table: "ContactMessage",
type: "int",
nullable: false)
.Annotation("SqlServer:Identity", "1, 1");
migrationBuilder.AddPrimaryKey(
name: "PK_ContactMessage",
table: "ContactMessage",
column: "Id");
migrationBuilder.DropPrimaryKey(
name: "PK_AdminUser",
table: "AdminUser");
migrationBuilder.DropColumn(
name: "Id",
table: "AdminUser");
migrationBuilder.AddColumn<int>(
name: "Id",
table: "AdminUser",
type: "int",
nullable: false)
.Annotation("SqlServer:Identity", "1, 1");
migrationBuilder.AddPrimaryKey(
name: "PK_AdminUser",
table: "AdminUser",
column: "Id");
}
}
}
@@ -0,0 +1,125 @@
// <auto-generated />
using System;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using RazorPagesMovie.Data;
#nullable disable
namespace RazorPagesMovie.Migrations
{
[DbContext(typeof(RazorPagesMovieContext))]
[Migration("20260821123359_MakeContactMessageSubjectRequired")]
partial class MakeContactMessageSubjectRequired
{
/// <inheritdoc />
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "8.0.28")
.HasAnnotation("Relational:MaxIdentifierLength", 128);
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
modelBuilder.Entity("RazorPagesMovie.Models.AdminUser", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property<string>("PasswordHash")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property<string>("Username")
.IsRequired()
.HasMaxLength(100)
.HasColumnType("nvarchar(100)");
b.HasKey("Id");
b.ToTable("AdminUser");
});
modelBuilder.Entity("RazorPagesMovie.Models.ContactMessage", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property<string>("Email")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("nvarchar(200)");
b.Property<string>("Message")
.IsRequired()
.HasMaxLength(5000)
.HasColumnType("nvarchar(max)");
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(100)
.HasColumnType("nvarchar(100)");
b.Property<bool>("NotificationSent")
.HasColumnType("bit");
b.Property<string>("Phone")
.HasMaxLength(30)
.HasColumnType("nvarchar(30)");
b.Property<DateTime>("SentAt")
.HasColumnType("datetime2");
b.Property<string>("Subject")
.IsRequired()
.HasMaxLength(150)
.HasColumnType("nvarchar(150)");
b.HasKey("Id");
b.ToTable("ContactMessage");
});
modelBuilder.Entity("RazorPagesMovie.Models.Movie", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
b.Property<string>("Genre")
.IsRequired()
.HasMaxLength(30)
.HasColumnType("nvarchar(30)");
b.Property<decimal>("Price")
.HasColumnType("decimal(18, 2)");
b.Property<string>("Rating")
.IsRequired()
.HasMaxLength(5)
.HasColumnType("nvarchar(5)");
b.Property<DateTime>("ReleaseDate")
.HasColumnType("datetime2");
b.Property<string>("Title")
.IsRequired()
.HasMaxLength(60)
.HasColumnType("nvarchar(60)");
b.HasKey("Id");
b.ToTable("Movie");
});
#pragma warning restore 612, 618
}
}
}
@@ -0,0 +1,42 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace RazorPagesMovie.Migrations
{
/// <inheritdoc />
public partial class MakeContactMessageSubjectRequired : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.Sql("UPDATE ContactMessage SET Subject = '' WHERE Subject IS NULL;");
migrationBuilder.AlterColumn<string>(
name: "Subject",
table: "ContactMessage",
type: "nvarchar(150)",
maxLength: 150,
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "nvarchar(150)",
oldMaxLength: 150,
oldNullable: true);
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.AlterColumn<string>(
name: "Subject",
table: "ContactMessage",
type: "nvarchar(150)",
maxLength: 150,
nullable: true,
oldClrType: typeof(string),
oldType: "nvarchar(150)",
oldMaxLength: 150);
}
}
}
@@ -0,0 +1,91 @@
// <auto-generated />
using System;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using RazorPagesMovie.Data;
#nullable disable
namespace RazorPagesMovie.Migrations
{
[DbContext(typeof(RazorPagesMovieContext))]
[Migration("20260826122916_DropMovieTable")]
partial class DropMovieTable
{
/// <inheritdoc />
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "8.0.28")
.HasAnnotation("Relational:MaxIdentifierLength", 128);
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
modelBuilder.Entity("RazorPagesMovie.Models.AdminUser", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property<string>("PasswordHash")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property<string>("Username")
.IsRequired()
.HasMaxLength(100)
.HasColumnType("nvarchar(100)");
b.HasKey("Id");
b.ToTable("AdminUser");
});
modelBuilder.Entity("RazorPagesMovie.Models.ContactMessage", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property<string>("Email")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("nvarchar(200)");
b.Property<string>("Message")
.IsRequired()
.HasMaxLength(5000)
.HasColumnType("nvarchar(max)");
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(100)
.HasColumnType("nvarchar(100)");
b.Property<bool>("NotificationSent")
.HasColumnType("bit");
b.Property<string>("Phone")
.HasMaxLength(30)
.HasColumnType("nvarchar(30)");
b.Property<DateTime>("SentAt")
.HasColumnType("datetime2");
b.Property<string>("Subject")
.IsRequired()
.HasMaxLength(150)
.HasColumnType("nvarchar(150)");
b.HasKey("Id");
b.ToTable("ContactMessage");
});
#pragma warning restore 612, 618
}
}
}
@@ -0,0 +1,39 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace RazorPagesMovie.Migrations
{
/// <inheritdoc />
public partial class DropMovieTable : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "Movie");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "Movie",
columns: table => new
{
Id = table.Column<int>(type: "int", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
Genre = table.Column<string>(type: "nvarchar(30)", maxLength: 30, nullable: false),
Price = table.Column<decimal>(type: "decimal(18,2)", nullable: false),
Rating = table.Column<string>(type: "nvarchar(5)", maxLength: 5, nullable: false),
ReleaseDate = table.Column<DateTime>(type: "datetime2", nullable: false),
Title = table.Column<string>(type: "nvarchar(60)", maxLength: 60, nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_Movie", x => x.Id);
});
}
}
}
@@ -22,38 +22,65 @@ namespace RazorPagesMovie.Migrations
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
modelBuilder.Entity("RazorPagesMovie.Models.Movie", b =>
modelBuilder.Entity("RazorPagesMovie.Models.AdminUser", b =>
{
b.Property<int>("Id")
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
.HasColumnType("uniqueidentifier");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
b.Property<string>("Genre")
b.Property<string>("PasswordHash")
.IsRequired()
.HasMaxLength(30)
.HasColumnType("nvarchar(30)");
.HasColumnType("nvarchar(max)");
b.Property<decimal>("Price")
.HasColumnType("decimal(18, 2)");
b.Property<string>("Rating")
b.Property<string>("Username")
.IsRequired()
.HasMaxLength(5)
.HasColumnType("nvarchar(5)");
b.Property<DateTime>("ReleaseDate")
.HasColumnType("datetime2");
b.Property<string>("Title")
.IsRequired()
.HasMaxLength(60)
.HasColumnType("nvarchar(60)");
.HasMaxLength(100)
.HasColumnType("nvarchar(100)");
b.HasKey("Id");
b.ToTable("Movie");
b.ToTable("AdminUser");
});
modelBuilder.Entity("RazorPagesMovie.Models.ContactMessage", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property<string>("Email")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("nvarchar(200)");
b.Property<string>("Message")
.IsRequired()
.HasMaxLength(5000)
.HasColumnType("nvarchar(max)");
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(100)
.HasColumnType("nvarchar(100)");
b.Property<bool>("NotificationSent")
.HasColumnType("bit");
b.Property<string>("Phone")
.HasMaxLength(30)
.HasColumnType("nvarchar(30)");
b.Property<DateTime>("SentAt")
.HasColumnType("datetime2");
b.Property<string>("Subject")
.IsRequired()
.HasMaxLength(150)
.HasColumnType("nvarchar(150)");
b.HasKey("Id");
b.ToTable("ContactMessage");
});
#pragma warning restore 612, 618
}
+15
View File
@@ -0,0 +1,15 @@
using System.ComponentModel.DataAnnotations;
namespace RazorPagesMovie.Models;
public class AdminUser
{
public Guid Id { get; set; }
[Required]
[StringLength(100)]
public string Username { get; set; } = string.Empty;
[Required]
public string PasswordHash { get; set; } = string.Empty;
}
+6 -4
View File
@@ -4,9 +4,8 @@ namespace RazorPagesMovie.Models;
public class ContactMessage
{
public int Id { get; set; }
public Guid Id { get; set; }
[Display(Name = "Name")]
[Required]
[StringLength(100)]
public string Name { get; set; } = string.Empty;
@@ -23,15 +22,18 @@ public class ContactMessage
public string? Phone { get; set; }
[Display(Name = "Betreff")]
[Required]
[StringLength(150)]
public string? Subject { get; set; }
public string Subject { get; set; } = string.Empty;
[Display(Name = "Nachricht")]
[Required]
[StringLength(4000)]
[StringLength(5000)]
public string Message { get; set; } = string.Empty;
[Display(Name = "Gesendet am")]
[DataType(DataType.DateTime)]
public DateTime SentAt { get; set; } = DateTime.Now;
public bool NotificationSent { get; set; } = false;
}
-32
View File
@@ -1,32 +0,0 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace RazorPagesMovie.Models;
public class Movie
{
public int Id { get; set; }
[StringLength(60, MinimumLength = 3)]
[Required]
public string Title { get; set; } = string.Empty;
[Display(Name = "Release Date")]
[DataType(DataType.Date)]
public DateTime ReleaseDate { get; set; }
[Range(1, 100)]
[DataType(DataType.Currency)]
[Column(TypeName = "decimal(18, 2)")]
public decimal Price { get; set; }
[RegularExpression(@"^[A-Z]+[a-zA-Z\s]*$")]
[Required]
[StringLength(30)]
public string Genre { get; set; } = string.Empty;
[RegularExpression(@"^[A-Z]+[a-zA-Z0-9""'\s-]*$")]
[StringLength(5)]
[Required]
public string Rating { get; set; } = string.Empty;
}
+11
View File
@@ -0,0 +1,11 @@
@page
@model RazorPagesMovie.Pages.Admin.IndexModel
@{
ViewData["Title"] = "Admin";
}
<h1>Welcome, @User.Identity?.Name</h1>
<form method="post" asp-page-handler="Logout">
<button type="submit" class="btn btn-secondary">Logout</button>
</form>
@@ -0,0 +1,19 @@
using Microsoft.AspNetCore.Authentication;
using Microsoft.AspNetCore.Authentication.Cookies;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.RazorPages;
namespace RazorPagesMovie.Pages.Admin;
public class IndexModel : PageModel
{
public void OnGet()
{
}
public async Task<IActionResult> OnPostLogoutAsync()
{
await HttpContext.SignOutAsync(CookieAuthenticationDefaults.AuthenticationScheme);
return RedirectToPage("/Login");
}
}
File diff suppressed because it is too large Load Diff
-12
View File
@@ -1,12 +0,0 @@
using Microsoft.AspNetCore.Mvc.RazorPages;
namespace RazorPagesMovie.Pages
{
public class BewerbungModel : PageModel
{
public void OnGet()
{
}
}
}
File diff suppressed because it is too large Load Diff
-8
View File
@@ -1,17 +1,9 @@
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.RazorPages;
namespace RazorPagesMovie.Pages
{
public class IndexModel : PageModel
{
private readonly ILogger<IndexModel> _logger;
public IndexModel(ILogger<IndexModel> logger)
{
_logger = logger;
}
public void OnGet()
{
+28
View File
@@ -0,0 +1,28 @@
@page
@model RazorPagesMovie.Pages.LoginModel
@{
ViewData["Title"] = "Login";
}
<div class="row justify-content-center">
<div class="col-md-4">
<h1>Admin Login</h1>
@if (!string.IsNullOrEmpty(Model.ErrorMessage))
{
<div class="alert alert-danger">@Model.ErrorMessage</div>
}
<form method="post">
<div class="mb-3">
<label asp-for="Username" class="form-label"></label>
<input asp-for="Username" class="form-control" autofocus />
</div>
<div class="mb-3">
<label asp-for="Password" class="form-label"></label>
<input asp-for="Password" type="password" class="form-control" />
</div>
<button type="submit" class="btn btn-primary">Login</button>
</form>
</div>
</div>
+53
View File
@@ -0,0 +1,53 @@
using System.Security.Claims;
using Microsoft.AspNetCore.Authentication;
using Microsoft.AspNetCore.Authentication.Cookies;
using Microsoft.AspNetCore.Identity;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.RazorPages;
using Microsoft.EntityFrameworkCore;
using RazorPagesMovie.Data;
using RazorPagesMovie.Models;
namespace RazorPagesMovie.Pages;
public class LoginModel : PageModel
{
private readonly RazorPagesMovieContext _context;
public LoginModel(RazorPagesMovieContext context)
{
_context = context;
}
[BindProperty]
public string Username { get; set; } = string.Empty;
[BindProperty]
public string Password { get; set; } = string.Empty;
public string? ErrorMessage { get; set; }
public void OnGet()
{
}
public async Task<IActionResult> OnPostAsync(string? returnUrl)
{
var user = await _context.AdminUser.SingleOrDefaultAsync(u => u.Username == Username);
var hasher = new PasswordHasher<AdminUser>();
if (user is null || hasher.VerifyHashedPassword(user, user.PasswordHash, Password) == PasswordVerificationResult.Failed)
{
ErrorMessage = "Benutzername oder Passwort ist falsch.";
return Page();
}
var identity = new ClaimsIdentity(
new[] { new Claim(ClaimTypes.Name, user.Username) },
CookieAuthenticationDefaults.AuthenticationScheme);
await HttpContext.SignInAsync(CookieAuthenticationDefaults.AuthenticationScheme, new ClaimsPrincipal(identity));
return LocalRedirect(returnUrl ?? "/Admin");
}
}
@@ -1,54 +0,0 @@
@page
@model RazorPagesMovie.Pages.MoviePages.CreateModel
@{
ViewData["Title"] = "Create";
}
<h1>Create</h1>
<h4>Movie</h4>
<hr />
<div class="row">
<div class="col-md-4">
<form method="post">
<div asp-validation-summary="ModelOnly" class="text-danger"></div>
<div class="form-group">
<label asp-for="Movie.Title" class="control-label"></label>
<input asp-for="Movie.Title" class="form-control" />
<span asp-validation-for="Movie.Title" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="Movie.ReleaseDate" class="control-label"></label>
<input asp-for="Movie.ReleaseDate" class="form-control" />
<span asp-validation-for="Movie.ReleaseDate" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="Movie.Genre" class="control-label"></label>
<input asp-for="Movie.Genre" class="form-control" />
<span asp-validation-for="Movie.Genre" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="Movie.Price" class="control-label"></label>
<input asp-for="Movie.Price" class="form-control" />
<span asp-validation-for="Movie.Price" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="Movie.Rating" class="control-label"></label>
<input asp-for="Movie.Rating" class="form-control" />
<span asp-validation-for="Movie.Rating" class="text-danger"></span>
</div>
<div class="form-group">
<input type="submit" value="Create" class="btn btn-primary" />
</div>
</form>
</div>
</div>
<div>
<a asp-page="./Index">Back to List</a>
</div>
@section Scripts {
@{await Html.RenderPartialAsync("_ValidationScriptsPartial");}
}
@@ -1,39 +0,0 @@
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.RazorPages;
using Microsoft.EntityFrameworkCore;
using RazorPagesMovie.Data;
using RazorPagesMovie.Models;
namespace RazorPagesMovie.Pages.MoviePages;
public class CreateModel : PageModel
{
private readonly RazorPagesMovieContext _context;
public CreateModel(RazorPagesMovieContext context)
{
_context = context;
}
public IActionResult OnGet()
{
return Page();
}
[BindProperty]
public Movie Movie { get; set; } = default!;
// To protect from overposting attacks, see https://aka.ms/RazorPagesCRUD.
public async Task<IActionResult> OnPostAsync()
{
if (!ModelState.IsValid)
{
return Page();
}
_context.Movie.Add(Movie);
await _context.SaveChangesAsync();
return RedirectToPage("./Index");
}
}
@@ -1,51 +0,0 @@
@page "{id:int}"
@model RazorPagesMovie.Pages.MoviePages.DeleteModel
@{
ViewData["Title"] = "Delete";
}
<h1>Delete</h1>
<h3>Are you sure you want to delete this?</h3>
<div>
<h4>RazorPagesMovie.Models.Movie</h4>
<hr />
<dl class="row">
<dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.Movie.Title)
</dt>
<dd class = "col-sm-10">
@Html.DisplayFor(model => model.Movie.Title)
</dd>
<dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.Movie.ReleaseDate)
</dt>
<dd class = "col-sm-10">
@Html.DisplayFor(model => model.Movie.ReleaseDate)
</dd>
<dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.Movie.Genre)
</dt>
<dd class = "col-sm-10">
@Html.DisplayFor(model => model.Movie.Genre)
</dd>
<dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.Movie.Price)
</dt>
<dd class = "col-sm-10">
@Html.DisplayFor(model => model.Movie.Price)
</dd>
<dt class="col-sm-2">
@Html.DisplayNameFor(model => model.Movie.Rating)
</dt>
<dd class="col-sm-10">
@Html.DisplayFor(model => model.Movie.Rating)
</dd>
</dl>
<form method="post">
<input type="hidden" asp-for="Movie.Id" />
<input type="submit" value="Delete" class="btn btn-danger" /> |
<a asp-page="./Index">Back to List</a>
</form>
</div>
@@ -1,58 +0,0 @@
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.RazorPages;
using Microsoft.EntityFrameworkCore;
using RazorPagesMovie.Data;
using RazorPagesMovie.Models;
namespace RazorPagesMovie.Pages.MoviePages;
public class DeleteModel : PageModel
{
private readonly RazorPagesMovieContext _context;
public DeleteModel(RazorPagesMovieContext context)
{
_context = context;
}
[BindProperty]
public Movie Movie { get; set; } = default!;
public async Task<IActionResult> OnGetAsync(int? id)
{
if (id is null)
{
return NotFound();
}
var movie = await _context.Movie.FirstOrDefaultAsync(m => m.Id == id);
if (movie is null)
{
return NotFound();
}
else
{
Movie = movie;
}
return Page();
}
public async Task<IActionResult> OnPostAsync(int? id)
{
if (id is null)
{
return NotFound();
}
var movie = await _context.Movie.FindAsync(id);
if (movie != null)
{
Movie = movie;
_context.Movie.Remove(Movie);
await _context.SaveChangesAsync();
}
return RedirectToPage("./Index");
}
}
@@ -1,49 +0,0 @@
@page "{id:int}"
@model RazorPagesMovie.Pages.MoviePages.DetailsModel
@{
ViewData["Title"] = "Details";
}
<h1>Details</h1>
<div>
<h4>Movie</h4>
<hr />
<dl class="row">
<dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.Movie.Title)
</dt>
<dd class = "col-sm-10">
@Html.DisplayFor(model => model.Movie.Title)
</dd>
<dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.Movie.ReleaseDate)
</dt>
<dd class = "col-sm-10">
@Html.DisplayFor(model => model.Movie.ReleaseDate)
</dd>
<dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.Movie.Genre)
</dt>
<dd class = "col-sm-10">
@Html.DisplayFor(model => model.Movie.Genre)
</dd>
<dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.Movie.Price)
</dt>
<dd class = "col-sm-10">
@Html.DisplayFor(model => model.Movie.Price)
</dd>
<dt class="col-sm-2">
@Html.DisplayNameFor(model => model.Movie.Rating)
</dt>
<dd class="col-sm-10">
@Html.DisplayFor(model => model.Movie.Rating)
</dd>
</dl>
</div>
<div>
<a asp-page="./Edit" asp-route-id="@Model.Movie.Id">Edit</a> |
<a asp-page="./Index">Back to List</a>
</div>
@@ -1,38 +0,0 @@
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.RazorPages;
using Microsoft.EntityFrameworkCore;
using RazorPagesMovie.Data;
using RazorPagesMovie.Models;
namespace RazorPagesMovie.Pages.MoviePages;
public class DetailsModel : PageModel
{
private readonly RazorPagesMovieContext _context;
public DetailsModel(RazorPagesMovieContext context)
{
_context = context;
}
public Movie Movie { get; set; } = default!;
public async Task<IActionResult> OnGetAsync(int? id)
{
if (id is null)
{
return NotFound();
}
var movie = await _context.Movie.FirstOrDefaultAsync(m => m.Id == id);
if (movie is null)
{
return NotFound();
}
else
{
Movie = movie;
}
return Page();
}
}
@@ -1,55 +0,0 @@
@page "{id:int}"
@model RazorPagesMovie.Pages.MoviePages.EditModel
@{
ViewData["Title"] = "Edit";
}
<h1>Edit</h1>
<h4>Movie</h4>
<hr />
<div class="row">
<div class="col-md-4">
<form method="post">
<div asp-validation-summary="ModelOnly" class="text-danger"></div>
<input type="hidden" asp-for="Movie.Id" />
<div class="form-group">
<label asp-for="Movie.Title" class="control-label"></label>
<input asp-for="Movie.Title" class="form-control" />
<span asp-validation-for="Movie.Title" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="Movie.ReleaseDate" class="control-label"></label>
<input asp-for="Movie.ReleaseDate" class="form-control" />
<span asp-validation-for="Movie.ReleaseDate" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="Movie.Genre" class="control-label"></label>
<input asp-for="Movie.Genre" class="form-control" />
<span asp-validation-for="Movie.Genre" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="Movie.Price" class="control-label"></label>
<input asp-for="Movie.Price" class="form-control" />
<span asp-validation-for="Movie.Price" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="Movie.Rating" class="control-label"></label>
<input asp-for="Movie.Rating" class="form-control" />
<span asp-validation-for="Movie.Rating" class="text-danger"></span>
</div>
<div class="form-group">
<input type="submit" value="Save" class="btn btn-primary" />
</div>
</form>
</div>
</div>
<div>
<a asp-page="./Index">Back to List</a>
</div>
@section Scripts {
@{await Html.RenderPartialAsync("_ValidationScriptsPartial");}
}
@@ -1,71 +0,0 @@
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.RazorPages;
using Microsoft.EntityFrameworkCore;
using RazorPagesMovie.Data;
using RazorPagesMovie.Models;
namespace RazorPagesMovie.Pages.MoviePages;
public class EditModel : PageModel
{
private readonly RazorPagesMovieContext _context;
public EditModel(RazorPagesMovieContext context)
{
_context = context;
}
[BindProperty]
public Movie Movie { get; set; } = default!;
public async Task<IActionResult> OnGetAsync(int? id)
{
if (id is null)
{
return NotFound();
}
var movie = await _context.Movie.FirstOrDefaultAsync(m => m.Id == id);
if (movie is null)
{
return NotFound();
}
Movie = movie;
return Page();
}
// To protect from overposting attacks, enable the specific properties you want to bind to.
// For more details, see https://aka.ms/RazorPagesCRUD.
public async Task<IActionResult> OnPostAsync()
{
if (!ModelState.IsValid)
{
return Page();
}
_context.Attach(Movie).State = EntityState.Modified;
try
{
await _context.SaveChangesAsync();
}
catch (DbUpdateConcurrencyException)
{
if (!MovieExists(Movie.Id))
{
return NotFound();
}
else
{
throw;
}
}
return RedirectToPage("./Index");
}
private bool MovieExists(int id)
{
return _context.Movie.Any(e => e.Id == id);
}
}
@@ -1,63 +0,0 @@
@page
@model RazorPagesMovie.Pages.MoviePages.IndexModel
@{
ViewData["Title"] = "Index";
}
<h1>Index</h1>
<p>
<a asp-page="Create">Create New</a>
</p>
<form>
<p>
<select asp-for="MovieGenre" asp-items="Model.Genres">
<option value="">All</option>
</select>
<label>Title: <input type="text" asp-for="SearchString" /></label>
<input type="submit" value="Filter" />
</p>
</form>
<table class="table">
<thead>
<tr>
<th>
@Html.DisplayNameFor(model => model.Movie[0].Title)
</th>
<th>
@Html.DisplayNameFor(model => model.Movie[0].ReleaseDate)
</th>
<th>
@Html.DisplayNameFor(model => model.Movie[0].Genre)
</th>
<th>
@Html.DisplayNameFor(model => model.Movie[0].Price)
</th>
<th></th>
</tr>
</thead>
<tbody>
@foreach (var item in Model.Movie) {
<tr>
<td>
@Html.DisplayFor(model => item.Title)
</td>
<td>
@Html.DisplayFor(model => item.ReleaseDate)
</td>
<td>
@Html.DisplayFor(model => item.Genre)
</td>
<td>
@Html.DisplayFor(model => item.Price)
</td>
<td>
<a asp-page="./Edit" asp-route-id="@item.Id">Edit</a> |
<a asp-page="./Details" asp-route-id="@item.Id">Details</a> |
<a asp-page="./Delete" asp-route-id="@item.Id">Delete</a>
</td>
</tr>
}
</tbody>
</table>
@@ -1,49 +0,0 @@
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.RazorPages;
using Microsoft.AspNetCore.Mvc.Rendering;
using Microsoft.EntityFrameworkCore;
using RazorPagesMovie.Models;
namespace RazorPagesMovie.Pages.MoviePages;
public class IndexModel : PageModel
{
private readonly RazorPagesMovie.Data.RazorPagesMovieContext _context;
public IndexModel(RazorPagesMovie.Data.RazorPagesMovieContext context)
{
_context = context;
}
public IList<Movie> Movie { get; set; } = default!;
[BindProperty(SupportsGet = true)]
public string? SearchString { get; set; }
public SelectList? Genres { get; set; }
[BindProperty(SupportsGet = true)]
public string? MovieGenre { get; set; }
public async Task OnGetAsync()
{
IQueryable<string> genreQuery = from m in _context.Movie
orderby m.Genre
select m.Genre;
var movies = from m in _context.Movie select m;
if (!string.IsNullOrEmpty(SearchString))
{
movies = movies.Where(s => s.Title.Contains(SearchString));
}
if (!string.IsNullOrEmpty(MovieGenre))
{
movies = movies.Where(x => x.Genre == MovieGenre);
}
Genres = new SelectList(await genreQuery.Distinct().ToListAsync());
Movie = await movies.ToListAsync();
}
}
-8
View File
@@ -1,8 +0,0 @@
@page
@model PrivacyModel
@{
ViewData["Title"] = "Privacy Policy";
}
<h1>@ViewData["Title"]</h1>
<p>Use this page to detail your site's privacy policy.</p>
-20
View File
@@ -1,20 +0,0 @@
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.RazorPages;
namespace RazorPagesMovie.Pages
{
public class PrivacyModel : PageModel
{
private readonly ILogger<PrivacyModel> _logger;
public PrivacyModel(ILogger<PrivacyModel> logger)
{
_logger = logger;
}
public void OnGet()
{
}
}
}
@@ -1,144 +0,0 @@
<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="UTF-8" />
<meta http-equiv="x-ua-compatible" content="ie=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>@ViewData["Title"]</title>
<link rel="stylesheet" href="~/css/bootstrap.min.css" />
<link rel="stylesheet" href="~/css/owl.carousel.min.css" />
<link rel="stylesheet" href="~/css/nivo-slider.css" />
<link rel="stylesheet" href="~/css/animate.css" />
<link rel="stylesheet" href="~/css/animated-text.css" />
<link rel="stylesheet" href="~/css/all.min.css" />
<link rel="stylesheet" href="~/css/flaticon.css" />
<link rel="stylesheet" href="~/css/theme-default.css" />
<link rel="stylesheet" href="~/css/meanmenu.min.css" />
<link rel="stylesheet" href="~/css/style.css" />
<link rel="stylesheet" href="~/css/owl.transitions.css" />
<link rel="stylesheet" href="~/css/widget.css" />
<link rel="stylesheet" href="~/css/responsive.css" />
<link rel="stylesheet" href="~/css/slick.css" />
<link rel="stylesheet" href="~/css/slick-theme.css" />
<style>
html {
scroll-behavior: smooth;
}
body {
overflow-x: hidden;
}
img {
max-width: 100%;
height: auto;
}
</style>
@await RenderSectionAsync("Styles", required: false)
</head>
<body>
<div id="sticky-header" class="techno_nav_manu style-two portfolio-header">
<div class="container">
<div class="row align-items-center">
<div class="col-lg-4">
<a class="portfolio-brand" href="#hero">Francesco Lorenzo D'Amico</a>
</div>
<div class="col-lg-8">
<nav class="techno_menu text-center">
<ul class="nav_scroll">
<li><a href="#about">Über mich</a></li>
<li><a href="#skills">Skills</a></li>
<li><a href="#projects">Projekte</a></li>
<li><a href="#goals">Ziele</a></li>
<li><a href="#experience">Erfahrung</a></li>
<li><a href="#education">Bildung</a></li>
<li><a href="#contact">Kontakt</a></li>
</ul>
</nav>
</div>
</div>
</div>
</div>
<div class="mobile-menu-area d-sm-block d-md-block d-lg-none">
<div class="mobile-menu">
<nav class="techno_menu">
<ul class="nav_scroll">
<li><a href="#about">Über mich</a></li>
<li><a href="#skills">Skills</a></li>
<li><a href="#projects">Projekte</a></li>
<li><a href="#goals">Ziele</a></li>
<li><a href="#experience">Erfahrung</a></li>
<li><a href="#education">Bildung</a></li>
<li><a href="#contact">Kontakt</a></li>
</ul>
</nav>
</div>
</div>
@RenderBody()
<footer class="footer-middle portfolio-footer">
<div class="container">
<div class="row footer-bottom">
<div class="col-lg-12">
<div class="footer-bottom-content">
<div class="footer-bottom-content-copy">
<p>© 2026 Francesco Lorenzo D'Amico Portfolio</p>
</div>
</div>
</div>
</div>
</div>
</footer>
<div class="scroll-area">
<div class="top-wrap">
<div class="go-top-btn-wraper">
<div class="go-top go-top-button">
<i class="fas fa-arrow-up"></i>
<i class="fas fa-arrow-up"></i>
</div>
</div>
</div>
</div>
<script src="~/js/jquery-1.9.0.min.js"></script>
<script src="~/js/bootstrap.min.js"></script>
<script src="~/js/owl.carousel.min.js"></script>
<script src="~/js/jquery.counterup.min.js"></script>
<script src="~/js/waypoints.min.js"></script>
<script src="~/js/wow.js"></script>
<script src="~/js/imagesloaded.pkgd.min.js"></script>
<script src="~/js/ajax-mail.js"></script>
<script src="~/js/animated-text.js"></script>
<script src="~/js/isotope.pkgd.min.js"></script>
<script src="~/js/jquery.nivo.slider.pack.js"></script>
<script src="~/js/jquery.meanmenu.js"></script>
<script src="~/js/popper.min.js"></script>
<script src="~/js/jquery.scrollUp.js"></script>
<script src="~/js/theme.js"></script>
<script src="~/js/slick.js"></script>
<script src="~/js/slick.min.js"></script>
<script src="~/js/jquery.barfiller.js"></script>
<script>
$(window).on("scroll", function () {
var scrolled = $(window).scrollTop();
if (scrolled > 300) $(".go-top").addClass("active");
if (scrolled < 300) $(".go-top").removeClass("active");
});
$(".go-top").on("click", function () {
$("html, body").animate({ scrollTop: "0" }, 1200);
});
</script>
@await RenderSectionAsync("Scripts", required: false)
</body>
</html>
+133 -40
View File
@@ -1,54 +1,147 @@
<!DOCTYPE html>
<html lang="en">
<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>@ViewData["Title"] - Movie</title>
<link rel="stylesheet" href="~/lib/bootstrap/dist/css/bootstrap.min.css" />
<link rel="stylesheet" href="~/css/site.css" asp-append-version="true" />
<link rel="stylesheet" href="~/RazorPagesMovie.styles.css" asp-append-version="true" />
<meta charset="UTF-8" />
<meta http-equiv="x-ua-compatible" content="ie=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>@Html.Raw(ViewData["Title"])</title>
<link rel="icon" type="image/png" href="~/images/fav-icon/icon.png" />
<link rel="stylesheet" href="~/css/bootstrap.min.css" />
<link rel="stylesheet" href="~/css/owl.carousel.min.css" />
<link rel="stylesheet" href="~/css/nivo-slider.css" />
<link rel="stylesheet" href="~/css/animate.css" />
<link rel="stylesheet" href="~/css/animated-text.css" />
<link rel="stylesheet" href="~/css/all.min.css" />
<link rel="stylesheet" href="~/css/flaticon.css" />
<link rel="stylesheet" href="~/css/theme-default.css" />
<link rel="stylesheet" href="~/css/meanmenu.min.css" />
<link rel="stylesheet" href="~/css/style.css" />
<link rel="stylesheet" href="~/css/owl.transitions.css" />
<link rel="stylesheet" href="~/css/widget.css" />
<link rel="stylesheet" href="~/css/responsive.css" />
<link rel="stylesheet" href="~/css/slick.css" />
<link rel="stylesheet" href="~/css/slick-theme.css" />
<style>
html {
scroll-behavior: smooth;
}
body {
overflow-x: hidden;
}
img {
max-width: 100%;
height: auto;
}
</style>
@await RenderSectionAsync("Styles", required: false)
</head>
<body>
<header>
<nav class="navbar navbar-expand-sm navbar-toggleable-sm navbar-light bg-white border-bottom box-shadow mb-3">
<div class="container">
<a class="navbar-brand" asp-page="/Movies/Index">RpMovie</a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target=".navbar-collapse" aria-controls="navbarSupportedContent"
aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="navbar-collapse collapse d-sm-inline-flex justify-content-between">
<ul class="navbar-nav flex-grow-1">
<li class="nav-item">
<a class="nav-link text-dark" asp-area="" asp-page="/Index">Home</a>
</li>
<li class="nav-item">
<a class="nav-link text-dark" asp-area="" asp-page="/Privacy">Privacy</a>
</li>
<li class="nav-item">
<a class="nav-link text-dark" asp-area="" asp-page="/MoviePages/Index">Movies</a>
</li>
</ul>
<div id="sticky-header" class="techno_nav_manu style-two portfolio-header">
<div class="container">
<div class="row align-items-center">
<div class="col-lg-4">
<a class="portfolio-brand" href="#hero">Francesco Lorenzo D'Amico</a>
</div>
<div class="col-lg-8">
<nav class="techno_menu text-center">
<ul class="nav_scroll">
<li><a href="#hero">Start</a></li>
<li><a href="#about">Über mich</a></li>
<li><a href="#skills">Kompetenzen</a></li>
<li><a href="#projects">Projekte</a></li>
<li><a href="#goals">Ziele</a></li>
<li><a href="#experience">Erfahrung</a></li>
<li><a href="#documents">Dokumente</a></li>
<li><a href="#contact">Kontakt</a></li>
</ul>
</nav>
</div>
</div>
</nav>
</header>
<div class="container">
<main role="main" class="pb-3">
@RenderBody()
</main>
</div>
</div>
<footer class="border-top footer text-muted">
<div class="mobile-menu-area d-sm-block d-md-block d-lg-none">
<div class="mobile-menu">
<nav class="techno_menu">
<ul class="nav_scroll">
<li><a href="#hero">Start</a></li>
<li><a href="#about">Über mich</a></li>
<li><a href="#skills">Kompetenzen</a></li>
<li><a href="#projects">Projekte</a></li>
<li><a href="#goals">Ziele</a></li>
<li><a href="#experience">Erfahrung</a></li>
<li><a href="#documents">Dokumente</a></li>
<li><a href="#contact">Kontakt</a></li>
</ul>
</nav>
</div>
</div>
@RenderBody()
<footer class="footer-middle portfolio-footer">
<div class="container">
&copy; 2026 - RazorPagesMovie - <a asp-area="" asp-page="/Privacy">Privacy</a>
<div class="row footer-bottom">
<div class="col-lg-12">
<div class="footer-bottom-content">
<div class="footer-bottom-content-copy">
<p>© 2026 Francesco Lorenzo D'Amico Portfolio</p>
</div>
</div>
</div>
</div>
</div>
</footer>
<script src="~/lib/jquery/dist/jquery.min.js"></script>
<script src="~/lib/bootstrap/dist/js/bootstrap.bundle.min.js"></script>
<script src="~/js/site.js" asp-append-version="true"></script>
<div class="scroll-area">
<div class="top-wrap">
<div class="go-top-btn-wraper">
<div class="go-top go-top-button">
<i class="fas fa-arrow-up"></i>
<i class="fas fa-arrow-up"></i>
</div>
</div>
</div>
</div>
<script src="~/js/jquery-1.9.0.min.js"></script>
<script src="~/js/bootstrap.min.js"></script>
<script src="~/js/owl.carousel.min.js"></script>
<script src="~/js/jquery.counterup.min.js"></script>
<script src="~/js/waypoints.min.js"></script>
<script src="~/js/wow.js"></script>
<script src="~/js/imagesloaded.pkgd.min.js"></script>
<script src="~/js/ajax-mail.js"></script>
<script src="~/js/animated-text.js"></script>
<script src="~/js/isotope.pkgd.min.js"></script>
<script src="~/js/jquery.nivo.slider.pack.js"></script>
<script src="~/js/jquery.meanmenu.js"></script>
<script src="~/js/popper.min.js"></script>
<script src="~/js/jquery.scrollUp.js"></script>
<script src="~/js/theme.js"></script>
<script src="~/js/slick.js"></script>
<script src="~/js/slick.min.js"></script>
<script src="~/js/jquery.barfiller.js"></script>
<script>
$(window).on("scroll", function () {
var scrolled = $(window).scrollTop();
if (scrolled > 300) $(".go-top").addClass("active");
if (scrolled < 300) $(".go-top").removeClass("active");
});
$(".go-top").on("click", function () {
$("html, body").animate({ scrollTop: "0" }, 1200);
});
</script>
@await RenderSectionAsync("Scripts", required: false)
</body>
</html>
</html>
@@ -1,2 +0,0 @@
<script src="~/lib/jquery-validation/dist/jquery.validate.min.js"></script>
<script src="~/lib/jquery-validation-unobtrusive/jquery.validate.unobtrusive.min.js"></script>
+35 -2
View File
@@ -1,12 +1,40 @@
using Microsoft.AspNetCore.Authentication.Cookies;
using Microsoft.EntityFrameworkCore;
using RazorPagesMovie.Data;
using RazorPagesMovie.Models;
using RazorPagesMovie.Services;
using System.Text.Encodings.Web;
using System.Text.Unicode;
var builder = WebApplication.CreateBuilder(args);
builder.Configuration.AddJsonFile("appsettings.Local.json", optional: true, reloadOnChange: true);
if (builder.Environment.IsDevelopment())
{
builder.Configuration.AddJsonFile("appsettings.Local.json", optional: true, reloadOnChange: true);
}
builder.Services.AddDbContext<RazorPagesMovieContext>(options =>
options.UseSqlServer(builder.Configuration.GetConnectionString("RazorPagesMovieContext") ?? throw new InvalidOperationException("Connection string 'RazorPagesMovieContext' not found.")));
builder.Services.AddRazorPages();
builder.Services.AddAuthentication(CookieAuthenticationDefaults.AuthenticationScheme)
.AddCookie(options =>
{
options.LoginPath = "/Login";
options.AccessDeniedPath = "/Login";
});
builder.Services.AddAuthorization();
builder.Services.AddRazorPages(options =>
{
options.Conventions.AuthorizeFolder("/Admin");
});
builder.Services.AddControllers();
builder.Services.AddSingleton(HtmlEncoder.Create(UnicodeRanges.All));
builder.Services.AddHttpClient();
builder.Services.AddSingleton<IContactMessageNotificationQueue, ContactMessageNotificationQueue>();
builder.Services.AddHostedService<ContactMessageNotificationService>();
var app = builder.Build();
@@ -14,7 +42,9 @@ using (var scope = app.Services.CreateScope())
{
var services = scope.ServiceProvider;
var context = services.GetRequiredService<RazorPagesMovieContext>();
context.Database.Migrate();
SeedData.Initialize(services);
}
@@ -27,6 +57,9 @@ if (!app.Environment.IsDevelopment())
app.UseHttpsRedirection();
app.UseStaticFiles();
app.UseRouting();
app.UseAuthentication();
app.UseAuthorization();
app.MapRazorPages();
app.MapControllers();
app.Run();
+30 -12
View File
@@ -1,4 +1,6 @@
using Microsoft.EntityFrameworkCore;
using Microsoft.AspNetCore.Identity;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Configuration;
using RazorPagesMovie.Data;
namespace RazorPagesMovie.Models;
@@ -10,23 +12,39 @@ public static class SeedData
using (var context = new RazorPagesMovieContext(
serviceProvider.GetRequiredService<DbContextOptions<RazorPagesMovieContext>>()))
{
if (context == null || context.Movie == null)
if (context == null)
{
throw new ArgumentNullException("Null RazorPagesMovieContext");
}
if (context.Movie.Any())
if (!context.AdminUser.Any())
{
return;
}
var accounts = serviceProvider.GetRequiredService<IConfiguration>()
.GetSection("AdminAccounts")
.Get<List<AdminAccountSeed>>() ?? new List<AdminAccountSeed>();
context.Movie.AddRange(
new Movie { Title = "When Harry Met Sally", ReleaseDate = DateTime.Parse("1989-2-12"), Genre = "Romantic Comedy", Price = 7.99M, Rating = "R" },
new Movie { Title = "Ghostbusters", ReleaseDate = DateTime.Parse("1984-3-13"), Genre = "Comedy", Price = 8.99M, Rating = "G" },
new Movie { Title = "Ghostbusters 2", ReleaseDate = DateTime.Parse("1986-2-23"), Genre = "Comedy", Price = 9.99M, Rating = "G" },
new Movie { Title = "Rio Bravo", ReleaseDate = DateTime.Parse("1959-4-15"), Genre = "Western", Price = 3.99M, Rating = "NR" }
);
context.SaveChanges();
var hasher = new PasswordHasher<AdminUser>();
foreach (var account in accounts)
{
if (string.IsNullOrWhiteSpace(account.Username) || string.IsNullOrWhiteSpace(account.Password))
{
continue;
}
var user = new AdminUser { Username = account.Username };
user.PasswordHash = hasher.HashPassword(user, account.Password);
context.AdminUser.Add(user);
}
context.SaveChanges();
}
}
}
private class AdminAccountSeed
{
public string Username { get; set; } = string.Empty;
public string Password { get; set; } = string.Empty;
}
}
@@ -0,0 +1,150 @@
using System.Net.Http.Json;
using Microsoft.EntityFrameworkCore;
using RazorPagesMovie.Data;
namespace RazorPagesMovie.Services;
public class ContactMessageNotificationService : BackgroundService
{
private static readonly TimeSpan FallbackSweepInterval = TimeSpan.FromMinutes(2);
private readonly IServiceScopeFactory _scopeFactory;
private readonly IHttpClientFactory _httpClientFactory;
private readonly IConfiguration _configuration;
private readonly IContactMessageNotificationQueue _queue;
private readonly IHostEnvironment _hostEnvironment;
private readonly ILogger<ContactMessageNotificationService> _logger;
public ContactMessageNotificationService(
IServiceScopeFactory scopeFactory,
IHttpClientFactory httpClientFactory,
IConfiguration configuration,
IContactMessageNotificationQueue queue,
IHostEnvironment hostEnvironment,
ILogger<ContactMessageNotificationService> logger)
{
_scopeFactory = scopeFactory;
_httpClientFactory = httpClientFactory;
_configuration = configuration;
_queue = queue;
_hostEnvironment = hostEnvironment;
_logger = logger;
}
protected override async Task ExecuteAsync(CancellationToken stoppingToken)
{
var consumerTask = ConsumeQueueAsync(stoppingToken);
var fallbackSweepTask = RunFallbackSweepAsync(stoppingToken);
await Task.WhenAll(consumerTask, fallbackSweepTask);
}
private async Task ConsumeQueueAsync(CancellationToken stoppingToken)
{
await foreach (var contactMessageId in _queue.DequeueAllAsync(stoppingToken))
{
try
{
await SendNotificationAsync(contactMessageId, stoppingToken);
}
finally
{
_queue.Release(contactMessageId);
}
}
}
private async Task RunFallbackSweepAsync(CancellationToken stoppingToken)
{
while (!stoppingToken.IsCancellationRequested)
{
await EnqueueUnsentFromDatabaseAsync(stoppingToken);
try
{
await Task.Delay(FallbackSweepInterval, stoppingToken);
}
catch (OperationCanceledException)
{
// Dienst wird beendet.
}
}
}
private async Task EnqueueUnsentFromDatabaseAsync(CancellationToken stoppingToken)
{
using var scope = _scopeFactory.CreateScope();
var context = scope.ServiceProvider.GetRequiredService<RazorPagesMovieContext>();
var offeneIds = await context.ContactMessage
.Where(c => !c.NotificationSent)
.OrderBy(c => c.SentAt)
.Select(c => c.Id)
.ToListAsync(stoppingToken);
foreach (var id in offeneIds)
{
_queue.Enqueue(id);
}
}
private async Task SendNotificationAsync(Guid contactMessageId, CancellationToken stoppingToken)
{
var botToken = _configuration["Telegram:BotToken"];
var chatId = _configuration["Telegram:ChatId"];
if (string.IsNullOrWhiteSpace(botToken) || string.IsNullOrWhiteSpace(chatId))
{
_logger.LogWarning("Telegram:BotToken oder Telegram:ChatId ist nicht konfiguriert Benachrichtigung wird übersprungen.");
return;
}
using var scope = _scopeFactory.CreateScope();
var context = scope.ServiceProvider.GetRequiredService<RazorPagesMovieContext>();
var eintrag = await context.ContactMessage.FindAsync(new object?[] { contactMessageId }, stoppingToken);
if (eintrag is null || eintrag.NotificationSent)
{
return;
}
var text = $"[{GetEnvironmentTag()}] Neue Kontaktanfrage von {eintrag.Name}\n"
+ $"E-Mail: {eintrag.Email}\n"
+ (string.IsNullOrWhiteSpace(eintrag.Phone) ? "" : $"Telefon: {eintrag.Phone}\n")
+ (string.IsNullOrWhiteSpace(eintrag.Subject) ? "" : $"Betreff: {eintrag.Subject}\n")
+ $"\n{eintrag.Message}";
var httpClient = _httpClientFactory.CreateClient();
var sendMessageUrl = $"https://api.telegram.org/bot{botToken}/sendMessage";
try
{
var response = await httpClient.PostAsJsonAsync(
sendMessageUrl,
new { chat_id = chatId, text },
stoppingToken);
if (response.IsSuccessStatusCode)
{
eintrag.NotificationSent = true;
await context.SaveChangesAsync(stoppingToken);
}
else
{
_logger.LogWarning("Telegram-Versand fehlgeschlagen für ContactMessage {Id}: {StatusCode}", eintrag.Id, response.StatusCode);
}
}
catch (Exception ex)
{
_logger.LogError(ex, "Telegram-Versand fehlgeschlagen für ContactMessage {Id}", eintrag.Id);
}
}
private string GetEnvironmentTag() => _hostEnvironment.EnvironmentName switch
{
"Development" => "DEV",
"Staging" => "TEST",
"Production" => "PROD",
var other => other.ToUpperInvariant()
};
}
@@ -0,0 +1,32 @@
using System.Collections.Concurrent;
using System.Threading.Channels;
namespace RazorPagesMovie.Services;
public interface IContactMessageNotificationQueue
{
void Enqueue(Guid contactMessageId);
IAsyncEnumerable<Guid> DequeueAllAsync(CancellationToken cancellationToken);
void Release(Guid contactMessageId);
}
public class ContactMessageNotificationQueue : IContactMessageNotificationQueue
{
private readonly Channel<Guid> _channel = Channel.CreateUnbounded<Guid>();
private readonly ConcurrentDictionary<Guid, byte> _inFlight = new();
public void Enqueue(Guid contactMessageId)
{
if (_inFlight.TryAdd(contactMessageId, 0))
{
_channel.Writer.TryWrite(contactMessageId);
}
}
public IAsyncEnumerable<Guid> DequeueAllAsync(CancellationToken cancellationToken) =>
_channel.Reader.ReadAllAsync(cancellationToken);
public void Release(Guid contactMessageId) => _inFlight.TryRemove(contactMessageId, out _);
}
+11
View File
@@ -0,0 +1,11 @@
{
"ConnectionStrings": {
"RazorPagesMovieContext": "Server=sqlserver,1433;Database=RazorPagesMovieContext;User Id=sa;Password=YourPassword123!;TrustServerCertificate=True"
},
"Logging": {
"LogLevel": {
"Default": "Warning",
"Microsoft.AspNetCore": "Warning"
}
}
}
File diff suppressed because it is too large Load Diff
-22
View File
@@ -1,22 +0,0 @@
html {
font-size: 14px;
}
@media (min-width: 768px) {
html {
font-size: 16px;
}
}
.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}
html {
position: relative;
min-height: 100%;
}
body {
margin-bottom: 60px;
}
Binary file not shown.
Binary file not shown.

After

Width:  |  Height:  |  Size: 142 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 432 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 747 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 222 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 98 KiB

-4
View File
@@ -1,4 +0,0 @@
// Please see documentation at https://learn.microsoft.com/aspnet/core/client-side/bundling-and-minification
// for details on configuring this project to bundle and minify static web assets.
// Write your JavaScript code.
+12 -4
View File
@@ -425,6 +425,8 @@
time: 1000
});
/* Portfolio Isotope */
if ($('.image_load').length) {
$('.image_load').imagesLoaded(function() {
if ($.fn.isotope) {
@@ -463,15 +465,21 @@
};
});
}
// Venubox
$('.venobox').venobox({
if ($.fn.venobox && $('.venobox').length) {
numeratio: true,
$('.venobox').venobox({
infinigall: true
numeratio: true,
});
infinigall: true
});
}
/*--------------------------
scrollUp
@@ -1,22 +0,0 @@
The MIT License (MIT)
Copyright (c) 2011-2021 Twitter, Inc.
Copyright (c) 2011-2021 The Bootstrap Authors
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
File diff suppressed because it is too large Load Diff
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
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
@@ -1,427 +0,0 @@
/*!
* Bootstrap Reboot v5.1.0 (https://getbootstrap.com/)
* Copyright 2011-2021 The Bootstrap Authors
* Copyright 2011-2021 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* Forked from Normalize.css, licensed MIT (https://github.com/necolas/normalize.css/blob/master/LICENSE.md)
*/
*,
*::before,
*::after {
box-sizing: border-box;
}
@media (prefers-reduced-motion: no-preference) {
:root {
scroll-behavior: smooth;
}
}
body {
margin: 0;
font-family: var(--bs-body-font-family);
font-size: var(--bs-body-font-size);
font-weight: var(--bs-body-font-weight);
line-height: var(--bs-body-line-height);
color: var(--bs-body-color);
text-align: var(--bs-body-text-align);
background-color: var(--bs-body-bg);
-webkit-text-size-adjust: 100%;
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}
hr {
margin: 1rem 0;
color: inherit;
background-color: currentColor;
border: 0;
opacity: 0.25;
}
hr:not([size]) {
height: 1px;
}
h6, h5, h4, h3, h2, h1 {
margin-top: 0;
margin-bottom: 0.5rem;
font-weight: 500;
line-height: 1.2;
}
h1 {
font-size: calc(1.375rem + 1.5vw);
}
@media (min-width: 1200px) {
h1 {
font-size: 2.5rem;
}
}
h2 {
font-size: calc(1.325rem + 0.9vw);
}
@media (min-width: 1200px) {
h2 {
font-size: 2rem;
}
}
h3 {
font-size: calc(1.3rem + 0.6vw);
}
@media (min-width: 1200px) {
h3 {
font-size: 1.75rem;
}
}
h4 {
font-size: calc(1.275rem + 0.3vw);
}
@media (min-width: 1200px) {
h4 {
font-size: 1.5rem;
}
}
h5 {
font-size: 1.25rem;
}
h6 {
font-size: 1rem;
}
p {
margin-top: 0;
margin-bottom: 1rem;
}
abbr[title],
abbr[data-bs-original-title] {
-webkit-text-decoration: underline dotted;
text-decoration: underline dotted;
cursor: help;
-webkit-text-decoration-skip-ink: none;
text-decoration-skip-ink: none;
}
address {
margin-bottom: 1rem;
font-style: normal;
line-height: inherit;
}
ol,
ul {
padding-left: 2rem;
}
ol,
ul,
dl {
margin-top: 0;
margin-bottom: 1rem;
}
ol ol,
ul ul,
ol ul,
ul ol {
margin-bottom: 0;
}
dt {
font-weight: 700;
}
dd {
margin-bottom: 0.5rem;
margin-left: 0;
}
blockquote {
margin: 0 0 1rem;
}
b,
strong {
font-weight: bolder;
}
small {
font-size: 0.875em;
}
mark {
padding: 0.2em;
background-color: #fcf8e3;
}
sub,
sup {
position: relative;
font-size: 0.75em;
line-height: 0;
vertical-align: baseline;
}
sub {
bottom: -0.25em;
}
sup {
top: -0.5em;
}
a {
color: #0d6efd;
text-decoration: underline;
}
a:hover {
color: #0a58ca;
}
a:not([href]):not([class]), a:not([href]):not([class]):hover {
color: inherit;
text-decoration: none;
}
pre,
code,
kbd,
samp {
font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
font-size: 1em;
direction: ltr /* rtl:ignore */;
unicode-bidi: bidi-override;
}
pre {
display: block;
margin-top: 0;
margin-bottom: 1rem;
overflow: auto;
font-size: 0.875em;
}
pre code {
font-size: inherit;
color: inherit;
word-break: normal;
}
code {
font-size: 0.875em;
color: #d63384;
word-wrap: break-word;
}
a > code {
color: inherit;
}
kbd {
padding: 0.2rem 0.4rem;
font-size: 0.875em;
color: #fff;
background-color: #212529;
border-radius: 0.2rem;
}
kbd kbd {
padding: 0;
font-size: 1em;
font-weight: 700;
}
figure {
margin: 0 0 1rem;
}
img,
svg {
vertical-align: middle;
}
table {
caption-side: bottom;
border-collapse: collapse;
}
caption {
padding-top: 0.5rem;
padding-bottom: 0.5rem;
color: #6c757d;
text-align: left;
}
th {
text-align: inherit;
text-align: -webkit-match-parent;
}
thead,
tbody,
tfoot,
tr,
td,
th {
border-color: inherit;
border-style: solid;
border-width: 0;
}
label {
display: inline-block;
}
button {
border-radius: 0;
}
button:focus:not(:focus-visible) {
outline: 0;
}
input,
button,
select,
optgroup,
textarea {
margin: 0;
font-family: inherit;
font-size: inherit;
line-height: inherit;
}
button,
select {
text-transform: none;
}
[role=button] {
cursor: pointer;
}
select {
word-wrap: normal;
}
select:disabled {
opacity: 1;
}
[list]::-webkit-calendar-picker-indicator {
display: none;
}
button,
[type=button],
[type=reset],
[type=submit] {
-webkit-appearance: button;
}
button:not(:disabled),
[type=button]:not(:disabled),
[type=reset]:not(:disabled),
[type=submit]:not(:disabled) {
cursor: pointer;
}
::-moz-focus-inner {
padding: 0;
border-style: none;
}
textarea {
resize: vertical;
}
fieldset {
min-width: 0;
padding: 0;
margin: 0;
border: 0;
}
legend {
float: left;
width: 100%;
padding: 0;
margin-bottom: 0.5rem;
font-size: calc(1.275rem + 0.3vw);
line-height: inherit;
}
@media (min-width: 1200px) {
legend {
font-size: 1.5rem;
}
}
legend + * {
clear: left;
}
::-webkit-datetime-edit-fields-wrapper,
::-webkit-datetime-edit-text,
::-webkit-datetime-edit-minute,
::-webkit-datetime-edit-hour-field,
::-webkit-datetime-edit-day-field,
::-webkit-datetime-edit-month-field,
::-webkit-datetime-edit-year-field {
padding: 0;
}
::-webkit-inner-spin-button {
height: auto;
}
[type=search] {
outline-offset: -2px;
-webkit-appearance: textfield;
}
/* rtl:raw:
[type="tel"],
[type="url"],
[type="email"],
[type="number"] {
direction: ltr;
}
*/
::-webkit-search-decoration {
-webkit-appearance: none;
}
::-webkit-color-swatch-wrapper {
padding: 0;
}
::file-selector-button {
font: inherit;
}
::-webkit-file-upload-button {
font: inherit;
-webkit-appearance: button;
}
output {
display: inline-block;
}
iframe {
border: 0;
}
summary {
display: list-item;
cursor: pointer;
}
progress {
vertical-align: baseline;
}
[hidden] {
display: none !important;
}
/*# sourceMappingURL=bootstrap-reboot.css.map */
File diff suppressed because one or more lines are too long
@@ -1,8 +0,0 @@
/*!
* Bootstrap Reboot v5.1.0 (https://getbootstrap.com/)
* Copyright 2011-2021 The Bootstrap Authors
* Copyright 2011-2021 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* Forked from Normalize.css, licensed MIT (https://github.com/necolas/normalize.css/blob/master/LICENSE.md)
*/*,::after,::before{box-sizing:border-box}@media (prefers-reduced-motion:no-preference){:root{scroll-behavior:smooth}}body{margin:0;font-family:var(--bs-body-font-family);font-size:var(--bs-body-font-size);font-weight:var(--bs-body-font-weight);line-height:var(--bs-body-line-height);color:var(--bs-body-color);text-align:var(--bs-body-text-align);background-color:var(--bs-body-bg);-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:transparent}hr{margin:1rem 0;color:inherit;background-color:currentColor;border:0;opacity:.25}hr:not([size]){height:1px}h1,h2,h3,h4,h5,h6{margin-top:0;margin-bottom:.5rem;font-weight:500;line-height:1.2}h1{font-size:calc(1.375rem + 1.5vw)}@media (min-width:1200px){h1{font-size:2.5rem}}h2{font-size:calc(1.325rem + .9vw)}@media (min-width:1200px){h2{font-size:2rem}}h3{font-size:calc(1.3rem + .6vw)}@media (min-width:1200px){h3{font-size:1.75rem}}h4{font-size:calc(1.275rem + .3vw)}@media (min-width:1200px){h4{font-size:1.5rem}}h5{font-size:1.25rem}h6{font-size:1rem}p{margin-top:0;margin-bottom:1rem}abbr[data-bs-original-title],abbr[title]{-webkit-text-decoration:underline dotted;text-decoration:underline dotted;cursor:help;-webkit-text-decoration-skip-ink:none;text-decoration-skip-ink:none}address{margin-bottom:1rem;font-style:normal;line-height:inherit}ol,ul{padding-left:2rem}dl,ol,ul{margin-top:0;margin-bottom:1rem}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}dt{font-weight:700}dd{margin-bottom:.5rem;margin-left:0}blockquote{margin:0 0 1rem}b,strong{font-weight:bolder}small{font-size:.875em}mark{padding:.2em;background-color:#fcf8e3}sub,sup{position:relative;font-size:.75em;line-height:0;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}a{color:#0d6efd;text-decoration:underline}a:hover{color:#0a58ca}a:not([href]):not([class]),a:not([href]):not([class]):hover{color:inherit;text-decoration:none}code,kbd,pre,samp{font-family:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;font-size:1em;direction:ltr;unicode-bidi:bidi-override}pre{display:block;margin-top:0;margin-bottom:1rem;overflow:auto;font-size:.875em}pre code{font-size:inherit;color:inherit;word-break:normal}code{font-size:.875em;color:#d63384;word-wrap:break-word}a>code{color:inherit}kbd{padding:.2rem .4rem;font-size:.875em;color:#fff;background-color:#212529;border-radius:.2rem}kbd kbd{padding:0;font-size:1em;font-weight:700}figure{margin:0 0 1rem}img,svg{vertical-align:middle}table{caption-side:bottom;border-collapse:collapse}caption{padding-top:.5rem;padding-bottom:.5rem;color:#6c757d;text-align:left}th{text-align:inherit;text-align:-webkit-match-parent}tbody,td,tfoot,th,thead,tr{border-color:inherit;border-style:solid;border-width:0}label{display:inline-block}button{border-radius:0}button:focus:not(:focus-visible){outline:0}button,input,optgroup,select,textarea{margin:0;font-family:inherit;font-size:inherit;line-height:inherit}button,select{text-transform:none}[role=button]{cursor:pointer}select{word-wrap:normal}select:disabled{opacity:1}[list]::-webkit-calendar-picker-indicator{display:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}[type=button]:not(:disabled),[type=reset]:not(:disabled),[type=submit]:not(:disabled),button:not(:disabled){cursor:pointer}::-moz-focus-inner{padding:0;border-style:none}textarea{resize:vertical}fieldset{min-width:0;padding:0;margin:0;border:0}legend{float:left;width:100%;padding:0;margin-bottom:.5rem;font-size:calc(1.275rem + .3vw);line-height:inherit}@media (min-width:1200px){legend{font-size:1.5rem}}legend+*{clear:left}::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-fields-wrapper,::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-minute,::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-text,::-webkit-datetime-edit-year-field{padding:0}::-webkit-inner-spin-button{height:auto}[type=search]{outline-offset:-2px;-webkit-appearance:textfield}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-color-swatch-wrapper{padding:0}::file-selector-button{font:inherit}::-webkit-file-upload-button{font:inherit;-webkit-appearance:button}output{display:inline-block}iframe{border:0}summary{display:list-item;cursor:pointer}progress{vertical-align:baseline}[hidden]{display:none!important}
/*# sourceMappingURL=bootstrap-reboot.min.css.map */
File diff suppressed because one or more lines are too long
@@ -1,424 +0,0 @@
/*!
* Bootstrap Reboot v5.1.0 (https://getbootstrap.com/)
* Copyright 2011-2021 The Bootstrap Authors
* Copyright 2011-2021 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* Forked from Normalize.css, licensed MIT (https://github.com/necolas/normalize.css/blob/master/LICENSE.md)
*/
*,
*::before,
*::after {
box-sizing: border-box;
}
@media (prefers-reduced-motion: no-preference) {
:root {
scroll-behavior: smooth;
}
}
body {
margin: 0;
font-family: var(--bs-body-font-family);
font-size: var(--bs-body-font-size);
font-weight: var(--bs-body-font-weight);
line-height: var(--bs-body-line-height);
color: var(--bs-body-color);
text-align: var(--bs-body-text-align);
background-color: var(--bs-body-bg);
-webkit-text-size-adjust: 100%;
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}
hr {
margin: 1rem 0;
color: inherit;
background-color: currentColor;
border: 0;
opacity: 0.25;
}
hr:not([size]) {
height: 1px;
}
h6, h5, h4, h3, h2, h1 {
margin-top: 0;
margin-bottom: 0.5rem;
font-weight: 500;
line-height: 1.2;
}
h1 {
font-size: calc(1.375rem + 1.5vw);
}
@media (min-width: 1200px) {
h1 {
font-size: 2.5rem;
}
}
h2 {
font-size: calc(1.325rem + 0.9vw);
}
@media (min-width: 1200px) {
h2 {
font-size: 2rem;
}
}
h3 {
font-size: calc(1.3rem + 0.6vw);
}
@media (min-width: 1200px) {
h3 {
font-size: 1.75rem;
}
}
h4 {
font-size: calc(1.275rem + 0.3vw);
}
@media (min-width: 1200px) {
h4 {
font-size: 1.5rem;
}
}
h5 {
font-size: 1.25rem;
}
h6 {
font-size: 1rem;
}
p {
margin-top: 0;
margin-bottom: 1rem;
}
abbr[title],
abbr[data-bs-original-title] {
-webkit-text-decoration: underline dotted;
text-decoration: underline dotted;
cursor: help;
-webkit-text-decoration-skip-ink: none;
text-decoration-skip-ink: none;
}
address {
margin-bottom: 1rem;
font-style: normal;
line-height: inherit;
}
ol,
ul {
padding-right: 2rem;
}
ol,
ul,
dl {
margin-top: 0;
margin-bottom: 1rem;
}
ol ol,
ul ul,
ol ul,
ul ol {
margin-bottom: 0;
}
dt {
font-weight: 700;
}
dd {
margin-bottom: 0.5rem;
margin-right: 0;
}
blockquote {
margin: 0 0 1rem;
}
b,
strong {
font-weight: bolder;
}
small {
font-size: 0.875em;
}
mark {
padding: 0.2em;
background-color: #fcf8e3;
}
sub,
sup {
position: relative;
font-size: 0.75em;
line-height: 0;
vertical-align: baseline;
}
sub {
bottom: -0.25em;
}
sup {
top: -0.5em;
}
a {
color: #0d6efd;
text-decoration: underline;
}
a:hover {
color: #0a58ca;
}
a:not([href]):not([class]), a:not([href]):not([class]):hover {
color: inherit;
text-decoration: none;
}
pre,
code,
kbd,
samp {
font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
font-size: 1em;
direction: ltr ;
unicode-bidi: bidi-override;
}
pre {
display: block;
margin-top: 0;
margin-bottom: 1rem;
overflow: auto;
font-size: 0.875em;
}
pre code {
font-size: inherit;
color: inherit;
word-break: normal;
}
code {
font-size: 0.875em;
color: #d63384;
word-wrap: break-word;
}
a > code {
color: inherit;
}
kbd {
padding: 0.2rem 0.4rem;
font-size: 0.875em;
color: #fff;
background-color: #212529;
border-radius: 0.2rem;
}
kbd kbd {
padding: 0;
font-size: 1em;
font-weight: 700;
}
figure {
margin: 0 0 1rem;
}
img,
svg {
vertical-align: middle;
}
table {
caption-side: bottom;
border-collapse: collapse;
}
caption {
padding-top: 0.5rem;
padding-bottom: 0.5rem;
color: #6c757d;
text-align: right;
}
th {
text-align: inherit;
text-align: -webkit-match-parent;
}
thead,
tbody,
tfoot,
tr,
td,
th {
border-color: inherit;
border-style: solid;
border-width: 0;
}
label {
display: inline-block;
}
button {
border-radius: 0;
}
button:focus:not(:focus-visible) {
outline: 0;
}
input,
button,
select,
optgroup,
textarea {
margin: 0;
font-family: inherit;
font-size: inherit;
line-height: inherit;
}
button,
select {
text-transform: none;
}
[role=button] {
cursor: pointer;
}
select {
word-wrap: normal;
}
select:disabled {
opacity: 1;
}
[list]::-webkit-calendar-picker-indicator {
display: none;
}
button,
[type=button],
[type=reset],
[type=submit] {
-webkit-appearance: button;
}
button:not(:disabled),
[type=button]:not(:disabled),
[type=reset]:not(:disabled),
[type=submit]:not(:disabled) {
cursor: pointer;
}
::-moz-focus-inner {
padding: 0;
border-style: none;
}
textarea {
resize: vertical;
}
fieldset {
min-width: 0;
padding: 0;
margin: 0;
border: 0;
}
legend {
float: right;
width: 100%;
padding: 0;
margin-bottom: 0.5rem;
font-size: calc(1.275rem + 0.3vw);
line-height: inherit;
}
@media (min-width: 1200px) {
legend {
font-size: 1.5rem;
}
}
legend + * {
clear: right;
}
::-webkit-datetime-edit-fields-wrapper,
::-webkit-datetime-edit-text,
::-webkit-datetime-edit-minute,
::-webkit-datetime-edit-hour-field,
::-webkit-datetime-edit-day-field,
::-webkit-datetime-edit-month-field,
::-webkit-datetime-edit-year-field {
padding: 0;
}
::-webkit-inner-spin-button {
height: auto;
}
[type=search] {
outline-offset: -2px;
-webkit-appearance: textfield;
}
[type="tel"],
[type="url"],
[type="email"],
[type="number"] {
direction: ltr;
}
::-webkit-search-decoration {
-webkit-appearance: none;
}
::-webkit-color-swatch-wrapper {
padding: 0;
}
::file-selector-button {
font: inherit;
}
::-webkit-file-upload-button {
font: inherit;
-webkit-appearance: button;
}
output {
display: inline-block;
}
iframe {
border: 0;
}
summary {
display: list-item;
cursor: pointer;
}
progress {
vertical-align: baseline;
}
[hidden] {
display: none !important;
}
/*# sourceMappingURL=bootstrap-reboot.rtl.css.map */
File diff suppressed because one or more lines are too long
@@ -1,8 +0,0 @@
/*!
* Bootstrap Reboot v5.1.0 (https://getbootstrap.com/)
* Copyright 2011-2021 The Bootstrap Authors
* Copyright 2011-2021 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* Forked from Normalize.css, licensed MIT (https://github.com/necolas/normalize.css/blob/master/LICENSE.md)
*/*,::after,::before{box-sizing:border-box}@media (prefers-reduced-motion:no-preference){:root{scroll-behavior:smooth}}body{margin:0;font-family:var(--bs-body-font-family);font-size:var(--bs-body-font-size);font-weight:var(--bs-body-font-weight);line-height:var(--bs-body-line-height);color:var(--bs-body-color);text-align:var(--bs-body-text-align);background-color:var(--bs-body-bg);-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:transparent}hr{margin:1rem 0;color:inherit;background-color:currentColor;border:0;opacity:.25}hr:not([size]){height:1px}h1,h2,h3,h4,h5,h6{margin-top:0;margin-bottom:.5rem;font-weight:500;line-height:1.2}h1{font-size:calc(1.375rem + 1.5vw)}@media (min-width:1200px){h1{font-size:2.5rem}}h2{font-size:calc(1.325rem + .9vw)}@media (min-width:1200px){h2{font-size:2rem}}h3{font-size:calc(1.3rem + .6vw)}@media (min-width:1200px){h3{font-size:1.75rem}}h4{font-size:calc(1.275rem + .3vw)}@media (min-width:1200px){h4{font-size:1.5rem}}h5{font-size:1.25rem}h6{font-size:1rem}p{margin-top:0;margin-bottom:1rem}abbr[data-bs-original-title],abbr[title]{-webkit-text-decoration:underline dotted;text-decoration:underline dotted;cursor:help;-webkit-text-decoration-skip-ink:none;text-decoration-skip-ink:none}address{margin-bottom:1rem;font-style:normal;line-height:inherit}ol,ul{padding-right:2rem}dl,ol,ul{margin-top:0;margin-bottom:1rem}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}dt{font-weight:700}dd{margin-bottom:.5rem;margin-right:0}blockquote{margin:0 0 1rem}b,strong{font-weight:bolder}small{font-size:.875em}mark{padding:.2em;background-color:#fcf8e3}sub,sup{position:relative;font-size:.75em;line-height:0;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}a{color:#0d6efd;text-decoration:underline}a:hover{color:#0a58ca}a:not([href]):not([class]),a:not([href]):not([class]):hover{color:inherit;text-decoration:none}code,kbd,pre,samp{font-family:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;font-size:1em;direction:ltr;unicode-bidi:bidi-override}pre{display:block;margin-top:0;margin-bottom:1rem;overflow:auto;font-size:.875em}pre code{font-size:inherit;color:inherit;word-break:normal}code{font-size:.875em;color:#d63384;word-wrap:break-word}a>code{color:inherit}kbd{padding:.2rem .4rem;font-size:.875em;color:#fff;background-color:#212529;border-radius:.2rem}kbd kbd{padding:0;font-size:1em;font-weight:700}figure{margin:0 0 1rem}img,svg{vertical-align:middle}table{caption-side:bottom;border-collapse:collapse}caption{padding-top:.5rem;padding-bottom:.5rem;color:#6c757d;text-align:right}th{text-align:inherit;text-align:-webkit-match-parent}tbody,td,tfoot,th,thead,tr{border-color:inherit;border-style:solid;border-width:0}label{display:inline-block}button{border-radius:0}button:focus:not(:focus-visible){outline:0}button,input,optgroup,select,textarea{margin:0;font-family:inherit;font-size:inherit;line-height:inherit}button,select{text-transform:none}[role=button]{cursor:pointer}select{word-wrap:normal}select:disabled{opacity:1}[list]::-webkit-calendar-picker-indicator{display:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}[type=button]:not(:disabled),[type=reset]:not(:disabled),[type=submit]:not(:disabled),button:not(:disabled){cursor:pointer}::-moz-focus-inner{padding:0;border-style:none}textarea{resize:vertical}fieldset{min-width:0;padding:0;margin:0;border:0}legend{float:right;width:100%;padding:0;margin-bottom:.5rem;font-size:calc(1.275rem + .3vw);line-height:inherit}@media (min-width:1200px){legend{font-size:1.5rem}}legend+*{clear:right}::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-fields-wrapper,::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-minute,::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-text,::-webkit-datetime-edit-year-field{padding:0}::-webkit-inner-spin-button{height:auto}[type=search]{outline-offset:-2px;-webkit-appearance:textfield}[type=email],[type=number],[type=tel],[type=url]{direction:ltr}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-color-swatch-wrapper{padding:0}::file-selector-button{font:inherit}::-webkit-file-upload-button{font:inherit;-webkit-appearance:button}output{display:inline-block}iframe{border:0}summary{display:list-item;cursor:pointer}progress{vertical-align:baseline}[hidden]{display:none!important}
/*# sourceMappingURL=bootstrap-reboot.rtl.min.css.map */
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large Load Diff
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
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
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
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long

Some files were not shown because too many files have changed in this diff Show More