Nachschlagewerke-Reiter

This commit is contained in:
Simon-Martens
2024-01-22 17:07:04 +01:00
parent 8e5343a65a
commit 40f4329fad
3 changed files with 14 additions and 6 deletions

View File

@@ -101,18 +101,18 @@ public class RegisterController : Controller {
if (String.IsNullOrWhiteSpace(id)) return Redirect(url + defaultLetter);
id = normalizeID(id, defaultLetter);
if (String.IsNullOrWhiteSpace(id)) return Redirect(url + defaultLetter);
if (id != "EDITIONEN" && !lib.CommentsByCategoryLetter[category].Contains(id)) return error404();
if (id == "EDITIONEN" && !lib.CommentsByCategoryLetter.Keys.Contains(id.ToLower())) return error404();
if (id != "EDITIONEN" && id != "NACHSCHLAGEWERKE" && !lib.CommentsByCategoryLetter[category].Contains(id)) return error404();
if ((id == "EDITIONEN" || id == "NACHSCHLAGEWERKE") && !lib.CommentsByCategoryLetter.Keys.Contains(id.ToLower())) return error404();
// Data aquisition and validation
IOrderedEnumerable<Comment>? comments = null;
if (id == "EDITIONEN") {
if (id == "EDITIONEN" || id == "NACHSCHLAGEWERKE") {
comments = lib.CommentsByCategory[id.ToLower()].OrderBy(x => x.Index);
} else {
comments = lib.CommentsByCategoryLetter[category][id].OrderBy(x => x.Index);
}
var availableCategories = lib.CommentsByCategoryLetter[category].Select(x => (x.Key.ToUpper(), url + x.Key.ToUpper())).OrderBy(x => x.Item1).ToList();
var AvailableSideCategories = new List<(string, string)>() { ("Editionen", "Editionen") };
var AvailableSideCategories = new List<(string, string)>() { ("Editionen", "Editionen"), ("Nachschlagewerke", "Nachschlagewerke") };
if (comments == null) return error404();
// Parsing

File diff suppressed because one or more lines are too long

View File

@@ -55,7 +55,7 @@
.ha-register .ha-register-head,
.ha-register .ha-register-body {
@apply pt-9 md:pt-12 px-9 md:px-16
@apply pt-9 md:pt-12 pl-9 lg:pl-16
}
.ha-register .ha-register-head {
@@ -111,6 +111,14 @@
@apply pl-0
}
.ha-register .ha-register-head .ha-register-nav .ha-register-right-nav a:first-child {
}
.ha-register .ha-register-head .ha-register-nav .ha-register-right-nav a:last-child {
}
.ha-register .ha-register-head .ha-register-nav .ha-register-left-nav {
@apply inline-block
}