Compare commits
22 Commits
028e62407a
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| f239aaffbb | |||
| 04f24cac8f | |||
| 29d00fbf7d | |||
| d15a4a6de1 | |||
| be55d56897 | |||
| a2f8b98c32 | |||
| eaf74222f8 | |||
| 09c0a5fe08 | |||
| 195a9cc440 | |||
| 71a8c7f09c | |||
| a2cbe5e3a9 | |||
| a1439722bf | |||
| 859f9a2323 | |||
| 51522e1f3f | |||
| e66d95ec7a | |||
| 28eb67c551 | |||
| 863a57595e | |||
| f563979545 | |||
| 57e832a95e | |||
| df781eaf84 | |||
| 10737b8272 | |||
| a8f664a6ba |
@@ -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"
|
||||
@@ -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,7 +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!;
|
||||
}
|
||||
@@ -6,15 +6,15 @@ 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
|
||||
|
||||
+125
@@ -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);
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -74,6 +74,7 @@ namespace RazorPagesMovie.Migrations
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("Subject")
|
||||
.IsRequired()
|
||||
.HasMaxLength(150)
|
||||
.HasColumnType("nvarchar(150)");
|
||||
|
||||
@@ -81,40 +82,6 @@ namespace RazorPagesMovie.Migrations
|
||||
|
||||
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
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,8 +22,9 @@ 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]
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -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
@@ -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()
|
||||
{
|
||||
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
}
|
||||
@@ -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>
|
||||
@@ -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>
|
||||
@@ -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">
|
||||
© 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>
|
||||
+15
-27
@@ -1,12 +1,18 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
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.")));
|
||||
|
||||
@@ -22,8 +28,12 @@ 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();
|
||||
@@ -32,7 +42,9 @@ using (var scope = app.Services.CreateScope())
|
||||
{
|
||||
var services = scope.ServiceProvider;
|
||||
var context = services.GetRequiredService<RazorPagesMovieContext>();
|
||||
|
||||
context.Database.Migrate();
|
||||
|
||||
SeedData.Initialize(services);
|
||||
}
|
||||
|
||||
@@ -48,30 +60,6 @@ app.UseRouting();
|
||||
app.UseAuthentication();
|
||||
app.UseAuthorization();
|
||||
app.MapRazorPages();
|
||||
|
||||
app.MapPost("/api/contact", async (ContactMessageRequest request, RazorPagesMovieContext context) =>
|
||||
{
|
||||
var contactMessage = new ContactMessage
|
||||
{
|
||||
Name = request.Name ?? string.Empty,
|
||||
Email = request.Email ?? string.Empty,
|
||||
Phone = request.Phone,
|
||||
Subject = request.Subject,
|
||||
Message = request.Message ?? string.Empty
|
||||
};
|
||||
|
||||
var validationResults = new List<ValidationResult>();
|
||||
if (!Validator.TryValidateObject(contactMessage, new ValidationContext(contactMessage), validationResults, validateAllProperties: true))
|
||||
{
|
||||
return Results.BadRequest(new { error = "Bitte alle Pflichtfelder korrekt ausfüllen." });
|
||||
}
|
||||
|
||||
context.ContactMessage.Add(contactMessage);
|
||||
await context.SaveChangesAsync();
|
||||
|
||||
return Results.Ok(new { success = true });
|
||||
});
|
||||
app.MapControllers();
|
||||
|
||||
app.Run();
|
||||
|
||||
record ContactMessageRequest(string? Name, string? Email, string? Phone, string? Subject, string? Message);
|
||||
|
||||
@@ -12,22 +12,11 @@ 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())
|
||||
{
|
||||
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();
|
||||
}
|
||||
|
||||
if (!context.AdminUser.Any())
|
||||
{
|
||||
var accounts = serviceProvider.GetRequiredService<IConfiguration>()
|
||||
|
||||
@@ -6,90 +6,145 @@ namespace RazorPagesMovie.Services;
|
||||
|
||||
public class ContactMessageNotificationService : BackgroundService
|
||||
{
|
||||
private static readonly TimeSpan CheckInterval = TimeSpan.FromMinutes(5);
|
||||
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)
|
||||
{
|
||||
while (!stoppingToken.IsCancellationRequested)
|
||||
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))
|
||||
{
|
||||
await CheckForNewContactMessagesAsync(stoppingToken);
|
||||
await Task.Delay(CheckInterval, stoppingToken);
|
||||
try
|
||||
{
|
||||
await SendNotificationAsync(contactMessageId, stoppingToken);
|
||||
}
|
||||
finally
|
||||
{
|
||||
_queue.Release(contactMessageId);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private async Task CheckForNewContactMessagesAsync(CancellationToken stoppingToken)
|
||||
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 neueEintraege = await context.ContactMessage
|
||||
.Where(c => !c.NotificationSent)
|
||||
.OrderBy(c => c.SentAt)
|
||||
.ToListAsync(stoppingToken);
|
||||
|
||||
if (neueEintraege.Count == 0)
|
||||
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";
|
||||
|
||||
foreach (var eintrag in neueEintraege)
|
||||
try
|
||||
{
|
||||
var text = $"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 response = await httpClient.PostAsJsonAsync(
|
||||
sendMessageUrl,
|
||||
new { chat_id = chatId, text },
|
||||
stoppingToken);
|
||||
|
||||
try
|
||||
if (response.IsSuccessStatusCode)
|
||||
{
|
||||
var response = await httpClient.PostAsJsonAsync(
|
||||
sendMessageUrl,
|
||||
new { chat_id = chatId, text },
|
||||
stoppingToken);
|
||||
|
||||
if (response.IsSuccessStatusCode)
|
||||
{
|
||||
eintrag.NotificationSent = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
_logger.LogWarning("Telegram-Versand fehlgeschlagen für ContactMessage {Id}: {StatusCode}", eintrag.Id, response.StatusCode);
|
||||
}
|
||||
eintrag.NotificationSent = true;
|
||||
await context.SaveChangesAsync(stoppingToken);
|
||||
}
|
||||
catch (Exception ex)
|
||||
else
|
||||
{
|
||||
_logger.LogError(ex, "Telegram-Versand fehlgeschlagen für ContactMessage {Id}", eintrag.Id);
|
||||
_logger.LogWarning("Telegram-Versand fehlgeschlagen für ContactMessage {Id}: {StatusCode}", eintrag.Id, response.StatusCode);
|
||||
}
|
||||
}
|
||||
|
||||
await context.SaveChangesAsync(stoppingToken);
|
||||
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 _);
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -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.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
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 |
@@ -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.
|
||||
@@ -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 */
|
||||
-1
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
-1
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
-1
File diff suppressed because one or more lines are too long
-7
File diff suppressed because one or more lines are too long
-1
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
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
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user