summaryrefslogtreecommitdiff
path: root/CoreWiki/Pages
diff options
context:
space:
mode:
authorPaweł Bernaciak <pawelbernaciak@zohomail.eu>2023-02-10 16:19:46 +0100
committerPaweł Bernaciak <pawelbernaciak@zohomail.eu>2023-02-10 16:19:46 +0100
commit00c3b32e2db200a2f42396ac7f8381704ec97268 (patch)
tree089d68dcbda127d4c95ccca9b0c9a18b59dc8bdc /CoreWiki/Pages
Initial Commit
Diffstat (limited to 'CoreWiki/Pages')
-rw-r--r--CoreWiki/Pages/Create.cshtml49
-rw-r--r--CoreWiki/Pages/Create.cshtml.cs44
-rw-r--r--CoreWiki/Pages/Delete.cshtml34
-rw-r--r--CoreWiki/Pages/Delete.cshtml.cs62
-rw-r--r--CoreWiki/Pages/Details.cshtml19
-rw-r--r--CoreWiki/Pages/Details.cshtml.cs44
-rw-r--r--CoreWiki/Pages/Edit.cshtml47
-rw-r--r--CoreWiki/Pages/Edit.cshtml.cs76
-rw-r--r--CoreWiki/Pages/Error.cshtml26
-rw-r--r--CoreWiki/Pages/Error.cshtml.cs26
-rw-r--r--CoreWiki/Pages/LatestChanges.cshtml25
-rw-r--r--CoreWiki/Pages/LatestChanges.cshtml.cs31
-rw-r--r--CoreWiki/Pages/OldIndex.cshtml42
-rw-r--r--CoreWiki/Pages/OldIndex.cshtml.cs31
-rw-r--r--CoreWiki/Pages/Privacy.cshtml8
-rw-r--r--CoreWiki/Pages/Privacy.cshtml.cs18
-rw-r--r--CoreWiki/Pages/Shared/_Layout.cshtml56
-rw-r--r--CoreWiki/Pages/Shared/_Layout.cshtml.css48
-rw-r--r--CoreWiki/Pages/Shared/_ValidationScriptsPartial.cshtml2
-rw-r--r--CoreWiki/Pages/_ViewImports.cshtml4
-rw-r--r--CoreWiki/Pages/_ViewStart.cshtml3
21 files changed, 695 insertions, 0 deletions
diff --git a/CoreWiki/Pages/Create.cshtml b/CoreWiki/Pages/Create.cshtml
new file mode 100644
index 0000000..fc74317
--- /dev/null
+++ b/CoreWiki/Pages/Create.cshtml
@@ -0,0 +1,49 @@
+@page
+@model CoreWiki.Pages.CreateModel
+
+@{
+ ViewData["Title"] = "Create";
+}
+
+<h1>Create</h1>
+
+<h4>Article</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="Article.Topic" class="control-label"></label>
+ <input asp-for="Article.Topic" class="form-control" />
+ <span asp-validation-for="Article.Topic" class="text-danger"></span>
+ </div>
+ <div class="form-group">
+ <label asp-for="Article.Content" class="control-label"></label>
+ <textarea asp-for="Article.Content" class="form-control"></textarea>
+ <span asp-validation-for="Article.Content" 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 {
+ <script src="~/lib/simplemde/simplemde.min.js"></script>
+ <script>
+ var simplemde = new SimpleMDE();
+ </script>
+ @{await Html.RenderPartialAsync("_ValidationScriptsPartial");}
+
+}
+
+@section Styles
+{
+ <link href="~/lib/simplemde/simplemde.min.css" rel="stylesheet"/>
+}
diff --git a/CoreWiki/Pages/Create.cshtml.cs b/CoreWiki/Pages/Create.cshtml.cs
new file mode 100644
index 0000000..ccde2ff
--- /dev/null
+++ b/CoreWiki/Pages/Create.cshtml.cs
@@ -0,0 +1,44 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Threading.Tasks;
+using Microsoft.AspNetCore.Mvc;
+using Microsoft.AspNetCore.Mvc.RazorPages;
+using Microsoft.AspNetCore.Mvc.Rendering;
+using CoreWiki.Models;
+
+namespace CoreWiki.Pages
+{
+ public class CreateModel : PageModel
+ {
+ private readonly CoreWiki.Models.ApplicationDbContext _context;
+
+ public CreateModel(CoreWiki.Models.ApplicationDbContext context)
+ {
+ _context = context;
+ }
+
+ public IActionResult OnGet()
+ {
+ return Page();
+ }
+
+ [BindProperty]
+ public Article Article { get; set; } = default!;
+
+
+ // To protect from overposting attacks, see https://aka.ms/RazorPagesCRUD
+ public async Task<IActionResult> OnPostAsync()
+ {
+ if (!ModelState.IsValid || _context.Articles == null || Article == null)
+ {
+ return Page();
+ }
+
+ _context.Articles.Add(Article);
+ await _context.SaveChangesAsync();
+
+ return Redirect($"/{Article.Topic}");
+ }
+ }
+}
diff --git a/CoreWiki/Pages/Delete.cshtml b/CoreWiki/Pages/Delete.cshtml
new file mode 100644
index 0000000..ec40822
--- /dev/null
+++ b/CoreWiki/Pages/Delete.cshtml
@@ -0,0 +1,34 @@
+@page
+@model CoreWiki.Pages.DeleteModel
+
+@{
+ ViewData["Title"] = "Delete";
+}
+
+<h1>Delete</h1>
+
+<h3>Are you sure you want to delete this?</h3>
+<div>
+ <h4>Article</h4>
+ <hr />
+ <dl class="row">
+ <dt class="col-sm-2">
+ @Html.DisplayNameFor(model => model.Article.Published)
+ </dt>
+ <dd class="col-sm-10">
+ @Html.DisplayFor(model => model.Article.Published)
+ </dd>
+ <dt class="col-sm-2">
+ @Html.DisplayNameFor(model => model.Article.Content)
+ </dt>
+ <dd class="col-sm-10">
+ @Html.DisplayFor(model => model.Article.Content)
+ </dd>
+ </dl>
+
+ <form method="post">
+ <input type="hidden" asp-for="Article.Topic" />
+ <input type="submit" value="Delete" class="btn btn-danger" /> |
+ <a asp-page="./Index">Back to List</a>
+ </form>
+</div>
diff --git a/CoreWiki/Pages/Delete.cshtml.cs b/CoreWiki/Pages/Delete.cshtml.cs
new file mode 100644
index 0000000..9de563e
--- /dev/null
+++ b/CoreWiki/Pages/Delete.cshtml.cs
@@ -0,0 +1,62 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Threading.Tasks;
+using Microsoft.AspNetCore.Mvc;
+using Microsoft.AspNetCore.Mvc.RazorPages;
+using Microsoft.EntityFrameworkCore;
+using CoreWiki.Models;
+
+namespace CoreWiki.Pages
+{
+ public class DeleteModel : PageModel
+ {
+ private readonly CoreWiki.Models.ApplicationDbContext _context;
+
+ public DeleteModel(CoreWiki.Models.ApplicationDbContext context)
+ {
+ _context = context;
+ }
+
+ [BindProperty]
+ public Article Article { get; set; } = default!;
+
+ public async Task<IActionResult> OnGetAsync(string id)
+ {
+ if (id == null || _context.Articles == null)
+ {
+ return NotFound();
+ }
+
+ var article = await _context.Articles.FirstOrDefaultAsync(m => m.Topic == id);
+
+ if (article == null)
+ {
+ return NotFound();
+ }
+ else
+ {
+ Article = article;
+ }
+ return Page();
+ }
+
+ public async Task<IActionResult> OnPostAsync(string id)
+ {
+ if (id == null || _context.Articles == null)
+ {
+ return NotFound();
+ }
+ var article = await _context.Articles.FindAsync(id);
+
+ if (article != null)
+ {
+ Article = article;
+ _context.Articles.Remove(Article);
+ await _context.SaveChangesAsync();
+ }
+
+ return Redirect("/");
+ }
+ }
+}
diff --git a/CoreWiki/Pages/Details.cshtml b/CoreWiki/Pages/Details.cshtml
new file mode 100644
index 0000000..5ef6460
--- /dev/null
+++ b/CoreWiki/Pages/Details.cshtml
@@ -0,0 +1,19 @@
+@page "{topicName?}"
+@model CoreWiki.Pages.DetailsModel
+
+@{
+ ViewData["Title"] = "Details";
+}
+
+<h1>@Model.Article.Topic</h1>
+<h5>Last Published: @Model.Article.Published.ToShortDateString()</h5>
+
+<markdown markdown="Article.Content"/>
+
+<div>
+ <a asp-page="./Edit" asp-route-id="@Model.Article?.Topic">Edit</a>
+ @if (Model.Article.Topic != "HomePage")
+ {
+ <text>| </text> <a href="~/">Back to Home</a>
+ }
+</div>
diff --git a/CoreWiki/Pages/Details.cshtml.cs b/CoreWiki/Pages/Details.cshtml.cs
new file mode 100644
index 0000000..25ff6c0
--- /dev/null
+++ b/CoreWiki/Pages/Details.cshtml.cs
@@ -0,0 +1,44 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Threading.Tasks;
+using Microsoft.AspNetCore.Mvc;
+using Microsoft.AspNetCore.Mvc.RazorPages;
+using Microsoft.EntityFrameworkCore;
+using CoreWiki.Models;
+
+namespace CoreWiki.Pages
+{
+ public class DetailsModel : PageModel
+ {
+ private readonly CoreWiki.Models.ApplicationDbContext _context;
+
+ public DetailsModel(CoreWiki.Models.ApplicationDbContext context)
+ {
+ _context = context;
+ }
+
+ public Article Article { get; set; } = default!;
+
+ public async Task<IActionResult> OnGetAsync(string? topicName)
+ {
+ topicName ??= "HomePage";
+
+ if (_context.Articles == null)
+ {
+ return NotFound();
+ }
+
+ var article = await _context.Articles.FirstOrDefaultAsync(m => m.Topic == topicName);
+ if (article == null)
+ {
+ return NotFound();
+ }
+ else
+ {
+ Article = article;
+ }
+ return Page();
+ }
+ }
+}
diff --git a/CoreWiki/Pages/Edit.cshtml b/CoreWiki/Pages/Edit.cshtml
new file mode 100644
index 0000000..7609348
--- /dev/null
+++ b/CoreWiki/Pages/Edit.cshtml
@@ -0,0 +1,47 @@
+@page
+@using CoreWiki.Models
+@model CoreWiki.Pages.EditModel
+
+@{
+ ViewData["Title"] = "Edit";
+}
+
+<h1>Edit</h1>
+
+<h3>@Model.Article.Topic</h3>
+<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="Article.Topic" />
+ <div class="form-group">
+ <label asp-for="Article.Published" class="control-label"></label>
+ <input disabled asp-for="Article.Published" class="form-control" />
+ <span asp-validation-for="Article.Published" class="text-danger"></span>
+ </div>
+ <div class="form-group">
+ <label asp-for="Article.Content" class="control-label"></label>
+ <textarea asp-for="Article.Content" class="form-control"></textarea>
+ <span asp-validation-for="Article.Content" class="text-danger"></span>
+ </div>
+ <div class="form-group">
+ <input type="submit" value="Save" class="btn btn-primary" />
+ <a class="btn btn-outline-secondary" href="~/">Back to Home</a>
+ </div>
+ </form>
+ </div>
+</div>
+
+@section Scripts {
+ <script src="~/lib/simplemde/simplemde.min.js"></script>
+ <script>
+ var simplemde = new SimpleMDE();
+ </script>
+ @{await Html.RenderPartialAsync("_ValidationScriptsPartial");}
+}
+
+@section Styles
+{
+ <link href="~/lib/simplemde/simplemde.min.css" rel="stylesheet"/>
+}
diff --git a/CoreWiki/Pages/Edit.cshtml.cs b/CoreWiki/Pages/Edit.cshtml.cs
new file mode 100644
index 0000000..06d002f
--- /dev/null
+++ b/CoreWiki/Pages/Edit.cshtml.cs
@@ -0,0 +1,76 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Threading.Tasks;
+using Microsoft.AspNetCore.Mvc;
+using Microsoft.AspNetCore.Mvc.RazorPages;
+using Microsoft.AspNetCore.Mvc.Rendering;
+using Microsoft.EntityFrameworkCore;
+using CoreWiki.Models;
+
+namespace CoreWiki.Pages
+{
+ public class EditModel : PageModel
+ {
+ private readonly CoreWiki.Models.ApplicationDbContext _context;
+
+ public EditModel(CoreWiki.Models.ApplicationDbContext context)
+ {
+ _context = context;
+ }
+
+ [BindProperty]
+ public Article Article { get; set; } = default!;
+
+ public async Task<IActionResult> OnGetAsync(string id)
+ {
+ if (id == null || _context.Articles == null)
+ {
+ return NotFound();
+ }
+
+ var article = await _context.Articles.FirstOrDefaultAsync(m => m.Topic == id);
+ if (article == null)
+ {
+ return NotFound();
+ }
+ Article = article;
+ 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(Article).State = EntityState.Modified;
+
+ try
+ {
+ await _context.SaveChangesAsync();
+ }
+ catch (DbUpdateConcurrencyException)
+ {
+ if (!ArticleExists(Article.Topic))
+ {
+ return NotFound();
+ }
+ else
+ {
+ throw;
+ }
+ }
+
+ return Redirect($"./{(Article.Topic == "HomePage" ? "" : Article.Topic)}");
+ }
+
+ private bool ArticleExists(string id)
+ {
+ return (_context.Articles?.Any(e => e.Topic == id)).GetValueOrDefault();
+ }
+ }
+}
diff --git a/CoreWiki/Pages/Error.cshtml b/CoreWiki/Pages/Error.cshtml
new file mode 100644
index 0000000..b5105b6
--- /dev/null
+++ b/CoreWiki/Pages/Error.cshtml
@@ -0,0 +1,26 @@
+@page
+@model ErrorModel
+@{
+ ViewData["Title"] = "Error";
+}
+
+<h1 class="text-danger">Error.</h1>
+<h2 class="text-danger">An error occurred while processing your request.</h2>
+
+@if (Model.ShowRequestId)
+{
+ <p>
+ <strong>Request ID:</strong> <code>@Model.RequestId</code>
+ </p>
+}
+
+<h3>Development Mode</h3>
+<p>
+ Swapping to the <strong>Development</strong> environment displays detailed information about the error that occurred.
+</p>
+<p>
+ <strong>The Development environment shouldn't be enabled for deployed applications.</strong>
+ It can result in displaying sensitive information from exceptions to end users.
+ For local debugging, enable the <strong>Development</strong> environment by setting the <strong>ASPNETCORE_ENVIRONMENT</strong> environment variable to <strong>Development</strong>
+ and restarting the app.
+</p> \ No newline at end of file
diff --git a/CoreWiki/Pages/Error.cshtml.cs b/CoreWiki/Pages/Error.cshtml.cs
new file mode 100644
index 0000000..8f88dd5
--- /dev/null
+++ b/CoreWiki/Pages/Error.cshtml.cs
@@ -0,0 +1,26 @@
+using System.Diagnostics;
+using Microsoft.AspNetCore.Mvc;
+using Microsoft.AspNetCore.Mvc.RazorPages;
+
+namespace CoreWiki.Pages;
+
+[ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)]
+[IgnoreAntiforgeryToken]
+public class ErrorModel : PageModel
+{
+ public string? RequestId { get; set; }
+
+ public bool ShowRequestId => !string.IsNullOrEmpty(RequestId);
+
+ private readonly ILogger<ErrorModel> _logger;
+
+ public ErrorModel(ILogger<ErrorModel> logger)
+ {
+ _logger = logger;
+ }
+
+ public void OnGet()
+ {
+ RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier;
+ }
+} \ No newline at end of file
diff --git a/CoreWiki/Pages/LatestChanges.cshtml b/CoreWiki/Pages/LatestChanges.cshtml
new file mode 100644
index 0000000..6a49022
--- /dev/null
+++ b/CoreWiki/Pages/LatestChanges.cshtml
@@ -0,0 +1,25 @@
+@page
+@model LatestChangesModel
+
+@{
+ ViewData["Title"] = "LatestChanges";
+}
+
+<h1>Latest Changes</h1>
+
+<p>
+ <a asp-page="Create">Create New</a>
+</p>
+
+@foreach (var item in Model.Article)
+{
+ <div class="card border-primary m-1">
+ <div class="card-body">
+ <h3 class="card-title"><a href="~/@item.Topic">@item.Topic</a></h3>
+ <h6 class="card-subtitle mb-2 text-muted">@item.Published.ToShortDateString()</h6>
+
+ <a class="card-link" asp-page="./Edit" asp-route-id="@item.Topic">Edit</a>
+ <a class="card-link" asp-page="./Delete" asp-route-id="@item.Topic">Delete</a>
+ </div>
+ </div>
+} \ No newline at end of file
diff --git a/CoreWiki/Pages/LatestChanges.cshtml.cs b/CoreWiki/Pages/LatestChanges.cshtml.cs
new file mode 100644
index 0000000..d750417
--- /dev/null
+++ b/CoreWiki/Pages/LatestChanges.cshtml.cs
@@ -0,0 +1,31 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Threading.Tasks;
+using Microsoft.AspNetCore.Mvc;
+using Microsoft.AspNetCore.Mvc.RazorPages;
+using Microsoft.EntityFrameworkCore;
+using CoreWiki.Models;
+
+namespace CoreWiki.Pages
+{
+ public class LatestChangesModel : PageModel
+ {
+ private readonly CoreWiki.Models.ApplicationDbContext _context;
+
+ public LatestChangesModel(CoreWiki.Models.ApplicationDbContext context)
+ {
+ _context = context;
+ }
+
+ public IList<Article> Article { get;set; } = default!;
+
+ public async Task OnGetAsync()
+ {
+ if (_context.Articles != null)
+ {
+ Article = await _context.Articles.OrderByDescending(a => a.Published).Take(10).ToListAsync();
+ }
+ }
+ }
+}
diff --git a/CoreWiki/Pages/OldIndex.cshtml b/CoreWiki/Pages/OldIndex.cshtml
new file mode 100644
index 0000000..c1342e4
--- /dev/null
+++ b/CoreWiki/Pages/OldIndex.cshtml
@@ -0,0 +1,42 @@
+@page
+@model CoreWiki.Pages.IndexModel
+
+@{
+ ViewData["Title"] = "Index";
+}
+
+<h1>Index</h1>
+
+<p>
+ <a asp-page="Create">Create New</a>
+</p>
+<table class="table">
+ <thead>
+ <tr>
+ <th>
+ @Html.DisplayNameFor(model => model.Article[0].Published)
+ </th>
+ <th>
+ @Html.DisplayNameFor(model => model.Article[0].Content)
+ </th>
+ <th></th>
+ </tr>
+ </thead>
+ <tbody>
+@foreach (var item in Model.Article) {
+ <tr>
+ <td>
+ @Html.DisplayFor(modelItem => item.Published)
+ </td>
+ <td>
+ @Html.DisplayFor(modelItem => item.Content)
+ </td>
+ <td>
+ <a asp-page="./Edit" asp-route-id="@item.Topic">Edit</a> |
+ <a asp-page="./Details" asp-route-id="@item.Topic">Details</a> |
+ <a asp-page="./Delete" asp-route-id="@item.Topic">Delete</a>
+ </td>
+ </tr>
+}
+ </tbody>
+</table>
diff --git a/CoreWiki/Pages/OldIndex.cshtml.cs b/CoreWiki/Pages/OldIndex.cshtml.cs
new file mode 100644
index 0000000..b449772
--- /dev/null
+++ b/CoreWiki/Pages/OldIndex.cshtml.cs
@@ -0,0 +1,31 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Threading.Tasks;
+using Microsoft.AspNetCore.Mvc;
+using Microsoft.AspNetCore.Mvc.RazorPages;
+using Microsoft.EntityFrameworkCore;
+using CoreWiki.Models;
+
+namespace CoreWiki.Pages
+{
+ public class IndexModel : PageModel
+ {
+ private readonly CoreWiki.Models.ApplicationDbContext _context;
+
+ public IndexModel(CoreWiki.Models.ApplicationDbContext context)
+ {
+ _context = context;
+ }
+
+ public IList<Article> Article { get;set; } = default!;
+
+ public async Task OnGetAsync()
+ {
+ if (_context.Articles != null)
+ {
+ Article = await _context.Articles.ToListAsync();
+ }
+ }
+ }
+}
diff --git a/CoreWiki/Pages/Privacy.cshtml b/CoreWiki/Pages/Privacy.cshtml
new file mode 100644
index 0000000..a92998a
--- /dev/null
+++ b/CoreWiki/Pages/Privacy.cshtml
@@ -0,0 +1,8 @@
+@page
+@model PrivacyModel
+@{
+ ViewData["Title"] = "Privacy Policy";
+}
+<h1>@ViewData["Title"]</h1>
+
+<p>Use this page to detail your site's privacy policy.</p> \ No newline at end of file
diff --git a/CoreWiki/Pages/Privacy.cshtml.cs b/CoreWiki/Pages/Privacy.cshtml.cs
new file mode 100644
index 0000000..5b28148
--- /dev/null
+++ b/CoreWiki/Pages/Privacy.cshtml.cs
@@ -0,0 +1,18 @@
+using Microsoft.AspNetCore.Mvc;
+using Microsoft.AspNetCore.Mvc.RazorPages;
+
+namespace CoreWiki.Pages;
+
+public class PrivacyModel : PageModel
+{
+ private readonly ILogger<PrivacyModel> _logger;
+
+ public PrivacyModel(ILogger<PrivacyModel> logger)
+ {
+ _logger = logger;
+ }
+
+ public void OnGet()
+ {
+ }
+} \ No newline at end of file
diff --git a/CoreWiki/Pages/Shared/_Layout.cshtml b/CoreWiki/Pages/Shared/_Layout.cshtml
new file mode 100644
index 0000000..6376153
--- /dev/null
+++ b/CoreWiki/Pages/Shared/_Layout.cshtml
@@ -0,0 +1,56 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="utf-8"/>
+ <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
+ <title>@ViewData["Title"] - CoreWiki</title>
+ <link rel="stylesheet" href="~/lib/bootstrap/css/bootstrap.min.css"/>
+ <link rel="stylesheet" href="~/css/site.css" asp-append-version="true"/>
+ <link rel="stylesheet" href="~/CoreWiki.styles.css" asp-append-version="true"/>
+ @await RenderSectionAsync("Styles", required: false)
+</head>
+<body>
+<header>
+ <nav class="navbar navbar-expand-sm navbar-toggleable-sm navbar-dark bg-dark border-bottom box-shadow mb-3">
+ <div class="container">
+ <a class="navbar-brand" asp-area="" asp-page="/Index">CoreWiki</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-light" href="~/Index">Home</a>
+ </li>
+ <li class="nav-item">
+ <a class="nav-link text-light" asp-area="" asp-page="/Create">Create</a>
+ </li>
+ <li class="nav-item">
+ <a class="nav-link text-light" href="~/LatestChanges">Latest Changes</a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </nav>
+</header>
+<div class="container">
+ <main role="main" class="pb-3">
+ @RenderBody()
+ </main>
+</div>
+
+<footer class="border-top footer text-muted">
+ <div class="container">
+ &copy; 2023 - CoreWiki - <a asp-area="" asp-page="/Privacy">Privacy</a>
+ </div>
+</footer>
+
+<script src="~/lib/jquery/dist/jquery.min.js"></script>
+<script src="~/lib/bootstrap/js/bootstrap.bundle.min.js"></script>
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.3.0/css/all.min.css" integrity="sha512-SzlrxWUlpfuzQ+pcUCosxcglQRNAq/DZjVsC0lE40xsADsfeQoEypE+enwcOiGjk/bSuGGKHEyjSoQ1zVisanQ==" crossorigin="anonymous" referrerpolicy="no-referrer" />
+<script src="~/js/site.js" asp-append-version="true"></script>
+
+@await RenderSectionAsync("Scripts", required: false)
+</body>
+</html> \ No newline at end of file
diff --git a/CoreWiki/Pages/Shared/_Layout.cshtml.css b/CoreWiki/Pages/Shared/_Layout.cshtml.css
new file mode 100644
index 0000000..a72cbea
--- /dev/null
+++ b/CoreWiki/Pages/Shared/_Layout.cshtml.css
@@ -0,0 +1,48 @@
+/* Please see documentation at https://docs.microsoft.com/aspnet/core/client-side/bundling-and-minification
+for details on configuring this project to bundle and minify static web assets. */
+
+a.navbar-brand {
+ white-space: normal;
+ text-align: center;
+ word-break: break-all;
+}
+
+a {
+ color: #0077cc;
+}
+
+.btn-primary {
+ color: #fff;
+ background-color: #1b6ec2;
+ border-color: #1861ac;
+}
+
+.nav-pills .nav-link.active, .nav-pills .show > .nav-link {
+ color: #fff;
+ background-color: #1b6ec2;
+ border-color: #1861ac;
+}
+
+.border-top {
+ border-top: 1px solid #e5e5e5;
+}
+.border-bottom {
+ border-bottom: 1px solid #e5e5e5;
+}
+
+.box-shadow {
+ box-shadow: 0 .25rem .75rem rgba(0, 0, 0, .05);
+}
+
+button.accept-policy {
+ font-size: 1rem;
+ line-height: inherit;
+}
+
+.footer {
+ position: absolute;
+ bottom: 0;
+ width: 100%;
+ white-space: nowrap;
+ line-height: 60px;
+}
diff --git a/CoreWiki/Pages/Shared/_ValidationScriptsPartial.cshtml b/CoreWiki/Pages/Shared/_ValidationScriptsPartial.cshtml
new file mode 100644
index 0000000..660f00c
--- /dev/null
+++ b/CoreWiki/Pages/Shared/_ValidationScriptsPartial.cshtml
@@ -0,0 +1,2 @@
+<script src="~/lib/jquery-validation/dist/jquery.validate.min.js"></script>
+<script src="~/lib/jquery-validation-unobtrusive/jquery.validate.unobtrusive.min.js"></script> \ No newline at end of file
diff --git a/CoreWiki/Pages/_ViewImports.cshtml b/CoreWiki/Pages/_ViewImports.cshtml
new file mode 100644
index 0000000..802f152
--- /dev/null
+++ b/CoreWiki/Pages/_ViewImports.cshtml
@@ -0,0 +1,4 @@
+@using CoreWiki
+@namespace CoreWiki.Pages
+@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
+@addTagHelper *, Westwind.AspNetCore.Markdown \ No newline at end of file
diff --git a/CoreWiki/Pages/_ViewStart.cshtml b/CoreWiki/Pages/_ViewStart.cshtml
new file mode 100644
index 0000000..1af6e49
--- /dev/null
+++ b/CoreWiki/Pages/_ViewStart.cshtml
@@ -0,0 +1,3 @@
+@{
+ Layout = "_Layout";
+} \ No newline at end of file