diff --git a/HaWeb/Controllers/APIController.cs b/HaWeb/Controllers/APIController.cs index 7411747..ba662c3 100644 --- a/HaWeb/Controllers/APIController.cs +++ b/HaWeb/Controllers/APIController.cs @@ -169,6 +169,25 @@ public class APIController : Controller { _ = _lib.SetLibrary(savedfile.PhysicalPath, ModelState); if (!ModelState.IsValid) return BadRequest(ModelState); + return Created("/", _xmlProvider.GetHamannFiles()); + } + + [HttpPost] + [Route("API/SetUsed/{id}")] + [DisableFormValueModelBinding] + [ValidateAntiForgeryToken] + [FeatureGate(Features.UploadService, Features.AdminService)] + public async Task SetUsed(string id) { + return Ok(); + } + + + [HttpPost] + [Route("API/SetUsedHamann")] + [DisableFormValueModelBinding] + [ValidateAntiForgeryToken] + [FeatureGate(Features.UploadService, Features.AdminService)] + public async Task SetUsedHamann() { return Ok(); } } \ No newline at end of file diff --git a/HaWeb/Controllers/UploadController.cs b/HaWeb/Controllers/UploadController.cs index 7093beb..97a8cc5 100644 --- a/HaWeb/Controllers/UploadController.cs +++ b/HaWeb/Controllers/UploadController.cs @@ -10,6 +10,7 @@ using HaWeb.Filters; using HaWeb.XMLParser; using HaWeb.Models; using HaWeb.FileHelpers; +using Microsoft.AspNetCore.Mvc.Rendering; public class UploadController : Controller { // DI @@ -43,28 +44,56 @@ public class UploadController : Controller { [FeatureGate(Features.AdminService)] [GenerateAntiforgeryTokenCookie] public IActionResult Index(string? id) { + var roots = _xmlService.GetRootsList(); + if (roots == null) return error404(); + + var hF = _xmlProvider.GetHamannFiles(); + List<(string, DateTime)>? hamannFiles = null; + if (hF != null) + hamannFiles = hF + .OrderByDescending(x => x.LastModified) + .Select(x => (x.Name, x.LastModified.LocalDateTime)) + .ToList(); + + var uF = _xmlService.GetUsedDictionary(); + var pF = _xmlService.GetInProduction(); + + Dictionary?>? usedFiles = null; + if (uF != null) { + usedFiles = new Dictionary?>(); + foreach (var kv in uF) { + if (kv.Value == null) continue; + usedFiles.Add(kv.Key, XMLFileHelpers.ToFileModel(kv.Value, pF, uF)); + } + } + + Dictionary?>? productionFiles = null; + if (pF != null) { + productionFiles = new Dictionary?>(); + foreach (var kv in pF) { + if (kv.Value == null) continue; + productionFiles.Add(kv.Key, XMLFileHelpers.ToFileModel(kv.Value, pF, uF)); + } + } + if (id != null) { id = id.ToLower(); var root = _xmlService.GetRoot(id); if (root == null) return error404(); - - var roots = _xmlService.GetRootsList(); - if (roots == null) return error404(); - - var usedFiles = _xmlService.GetUsedDictionary(); - var availableFiles = _xmlProvider.GetFiles(id); - - var model = new UploadViewModel(root.Type, id, roots, availableFiles, usedFiles); + + var model = new UploadViewModel(root.Type, id, roots, usedFiles); + model.ProductionFiles = productionFiles; + model.HamannFiles = hamannFiles; + model.AvailableFiles = XMLFileHelpers.ToFileModel(_xmlProvider.GetFiles(id), pF, uF); + return View("../Admin/Upload/Index", model); } else { - var roots = _xmlService.GetRootsList(); - if (roots == null) return error404(); + var model = new UploadViewModel("Upload", id, roots, usedFiles); + model.ProductionFiles = productionFiles; + model.HamannFiles = hamannFiles; - var usedFiles = _xmlService.GetUsedDictionary(); - - var model = new UploadViewModel("Upload", id, roots, null, usedFiles); return View("../Admin/Upload/Index", model); } } diff --git a/HaWeb/FileHelpers/HaDocumentWrapper.cs b/HaWeb/FileHelpers/HaDocumentWrapper.cs index ab1a5c4..4592a9a 100644 --- a/HaWeb/FileHelpers/HaDocumentWrapper.cs +++ b/HaWeb/FileHelpers/HaDocumentWrapper.cs @@ -1,26 +1,43 @@ namespace HaWeb.FileHelpers; using HaDocument.Interfaces; using Microsoft.AspNetCore.Mvc.ModelBinding; +using Microsoft.Extensions.FileProviders; public class HaDocumentWrapper : IHaDocumentWrappper { - public ILibrary Library; + private ILibrary Library; + private IXMLProvider _xmlProvider; + + private int _startYear; + private int _endYear; + + public HaDocumentWrapper(IXMLProvider xmlProvider, IConfiguration configuration) { + _xmlProvider = xmlProvider; + + _startYear = configuration.GetValue("AvailableStartYear"); + _endYear = configuration.GetValue("AvailableEndYear"); + + var filelist = xmlProvider.GetHamannFiles(); + if (filelist != null && filelist.Any()) + _AutoLoad(filelist); + + // Use Fallback library + if (Library == null) + Library = HaDocument.Document.Create(new HaWeb.Settings.HaDocumentOptions() { AvailableYearRange = (_startYear, _endYear) }); - public HaDocumentWrapper() { - Library = HaDocument.Document.Create(new HaWeb.Settings.HaDocumentOptions()); } - public ILibrary SetLibrary() { - Library = HaDocument.Document.Create(new HaWeb.Settings.HaDocumentOptions()); + public ILibrary ResetLibrary() { + Library = HaDocument.Document.Create(new HaWeb.Settings.HaDocumentOptions() { AvailableYearRange = (_startYear, _endYear) }); return Library; } - public ILibrary? SetLibrary(string filepath, ModelStateDictionary ModelState) { + public ILibrary? SetLibrary(string filepath, ModelStateDictionary? ModelState = null) { try { - Library = HaDocument.Document.Create(new HaWeb.Settings.HaDocumentOptions() { HamannXMLFilePath = filepath }); + Library = HaDocument.Document.Create(new HaWeb.Settings.HaDocumentOptions() { HamannXMLFilePath = filepath, AvailableYearRange = (_startYear, _endYear) }); } catch (Exception ex) { - ModelState.AddModelError("Error:", "Das Dokument konnte nicht geparst werden: " + ex.Message); + if (ModelState != null) ModelState.AddModelError("Error:", "Das Dokument konnte nicht geparst werden: " + ex.Message); return null; } return Library; @@ -29,4 +46,11 @@ public class HaDocumentWrapper : IHaDocumentWrappper { public ILibrary GetLibrary() { return Library; } + + private void _AutoLoad(List files) { + var orderdlist = files.OrderByDescending(x => x.LastModified); + foreach(var item in orderdlist) { + if (SetLibrary(item.PhysicalPath) != null) return; + } + } } \ No newline at end of file diff --git a/HaWeb/FileHelpers/IHaDocumentWrapper.cs b/HaWeb/FileHelpers/IHaDocumentWrapper.cs index a2ce771..f56230f 100644 --- a/HaWeb/FileHelpers/IHaDocumentWrapper.cs +++ b/HaWeb/FileHelpers/IHaDocumentWrapper.cs @@ -3,7 +3,7 @@ using HaDocument.Interfaces; using Microsoft.AspNetCore.Mvc.ModelBinding; public interface IHaDocumentWrappper { - public ILibrary SetLibrary(); + public ILibrary ResetLibrary(); public ILibrary? SetLibrary(string filepath, ModelStateDictionary ModelState); public ILibrary GetLibrary(); } \ No newline at end of file diff --git a/HaWeb/FileHelpers/IXMLProvider.cs b/HaWeb/FileHelpers/IXMLProvider.cs index 7ca65c5..7b669a3 100644 --- a/HaWeb/FileHelpers/IXMLProvider.cs +++ b/HaWeb/FileHelpers/IXMLProvider.cs @@ -9,4 +9,5 @@ public interface IXMLProvider { public FileList? GetFiles(string prefix); public Task Save(XMLRootDocument doc, string basefilepath, ModelStateDictionary ModelState); public Task SaveHamannFile(XElement element, string basefilepath, ModelStateDictionary ModelState); + public List? GetHamannFiles(); } \ No newline at end of file diff --git a/HaWeb/FileHelpers/XMLFileHelpers.cs b/HaWeb/FileHelpers/XMLFileHelpers.cs index 8edc7ca..efc14c0 100644 --- a/HaWeb/FileHelpers/XMLFileHelpers.cs +++ b/HaWeb/FileHelpers/XMLFileHelpers.cs @@ -11,6 +11,7 @@ using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc.ModelBinding; using Microsoft.AspNetCore.WebUtilities; using Microsoft.Net.Http.Headers; +using HaWeb.Models; public static class XMLFileHelpers { // File Signatures Database (https://www.filesignatures.net/) @@ -139,6 +140,34 @@ public static class XMLFileHelpers { // return Array.Empty(); // } + public static List? ToFileModel(FileList? fileList, Dictionary? productionFiles = null, Dictionary? usedFiles = null) { + if (fileList == null) return null; + var fL = fileList.GetFileList(); + if (fL == null) return null; + var ret = new List(); + foreach (var f in fL) { + if (f.File == null) continue; + ret.Add(ToFileModel(f, productionFiles, usedFiles)); + }; + return ret.OrderBy(x => x.LastModified).ToList(); + } + + public static FileModel ToFileModel(XMLRootDocument document, Dictionary? productionFiles = null, Dictionary? usedFiles = null) { + string id = document.Prefix; + + bool inProduction = false; + if (productionFiles != null && productionFiles.ContainsKey(id)) { + inProduction = productionFiles[id]!.Contains(document); + } + + bool isUsed = false; + if (usedFiles != null && usedFiles.ContainsKey(id)) { + isUsed = usedFiles[id]!.Contains(document); + } + + return new FileModel(document.FileName, document.Prefix, document.File.LastModified.LocalDateTime, isUsed, inProduction) { Fields = document.Fields }; + } + public static async Task ProcessStreamedFile( MultipartSection section, ContentDispositionHeaderValue contentDisposition, ModelStateDictionary modelState, string[] permittedExtensions, long sizeLimit) { diff --git a/HaWeb/FileHelpers/XMLProvider.cs b/HaWeb/FileHelpers/XMLProvider.cs index 9b4a82d..31e8dcd 100644 --- a/HaWeb/FileHelpers/XMLProvider.cs +++ b/HaWeb/FileHelpers/XMLProvider.cs @@ -10,11 +10,13 @@ public class XMLProvider : IXMLProvider { private Dictionary? _Files; private Dictionary? _Roots; private List? _HamannFiles; + private IFileInfo? _InProduction; public XMLProvider(IFileProvider provider, IXMLService xmlservice) { _fileProvider = provider; _Roots = xmlservice.GetRootsDictionary(); _Files = _ScanFiles(); + _HamannFiles = _ScanHamannFiles(); if (_Files != null) foreach(var category in _Files) @@ -22,6 +24,8 @@ public class XMLProvider : IXMLProvider { xmlservice.AutoUse(category.Value); } + public List? GetHamannFiles() => this._HamannFiles; + public FileList? GetFiles(string prefix) => _Files != null && _Files.ContainsKey(prefix) ? _Files[prefix] : null; @@ -80,7 +84,7 @@ public class XMLProvider : IXMLProvider { if (_HamannFiles == null) _HamannFiles = new List(); _HamannFiles.Add(info); - + _InProduction = info; return info; } @@ -110,4 +114,12 @@ public class XMLProvider : IXMLProvider { } return res; } + + private List? _ScanHamannFiles() { + var dir = _fileProvider.GetDirectoryContents(string.Empty).Where(x => x.IsDirectory && x.Name == "hamann"); + if (dir == null || !dir.Any()) return null; + var files = _fileProvider.GetDirectoryContents(dir.First().Name).Where(x => !x.IsDirectory && x.Name.StartsWith("hamann") && x.Name.EndsWith(".xml")); + if (files == null || !files.Any()) return null; + return files.ToList(); + } } \ No newline at end of file diff --git a/HaWeb/Models/FileList.cs b/HaWeb/Models/FileList.cs index 32e374c..b22e9cb 100644 --- a/HaWeb/Models/FileList.cs +++ b/HaWeb/Models/FileList.cs @@ -20,6 +20,19 @@ public class FileList { if (!_Files.Contains(document)) _Files.Add(document); } + public bool Contains(XMLRootDocument doc) { + if (_Files == null) return false; + return _Files.Contains(doc); + } + public List? GetFileList() => this._Files != null ? this._Files.ToList() : null; + + public FileList Clone() { + var ret = new FileList(this.XMLRoot); + foreach (var file in _Files) { + ret.Add(file); + } + return ret; + } } \ No newline at end of file diff --git a/HaWeb/Models/FileModel.cs b/HaWeb/Models/FileModel.cs new file mode 100644 index 0000000..657d1d3 --- /dev/null +++ b/HaWeb/Models/FileModel.cs @@ -0,0 +1,17 @@ +namespace HaWeb.Models; + +public class FileModel { + public string FileName { get; private set; } + public string Prefix { get; private set; } + public DateTime LastModified { get; private set; } + public bool IsUsed { get; private set; } + public bool InProduction { get; private set; } + public List<(string, string?)>? Fields { get; set; } + + public FileModel(string name, string prefix, DateTime lastModified, bool isUSed, bool inProduction) { + FileName = name; + IsUsed = IsUsed; + LastModified = lastModified; + InProduction = InProduction; + } +} \ No newline at end of file diff --git a/HaWeb/Models/UploadViewModel.cs b/HaWeb/Models/UploadViewModel.cs index 3856f12..bc50ee2 100644 --- a/HaWeb/Models/UploadViewModel.cs +++ b/HaWeb/Models/UploadViewModel.cs @@ -1,19 +1,22 @@ namespace HaWeb.Models; using HaWeb.XMLParser; +using Microsoft.Extensions.FileProviders; +using Microsoft.AspNetCore.Mvc.Rendering; public class UploadViewModel { public string ActiveTitle { get; private set; } public string? Prefix { get; private set; } public List? AvailableRoots { get; private set; } - public FileList? AvailableFiles { get; private set; } - public Dictionary? UsedFiles { get; private set; } + public List? AvailableFiles { get; set; } + public Dictionary?>? UsedFiles { get; private set; } + public Dictionary?>? ProductionFiles { get; set; } + public List<(string, DateTime)>? HamannFiles { get; set; } - public UploadViewModel(string title, string? prefix, List? roots, FileList? availableFiles, Dictionary? usedFiles) { + public UploadViewModel(string title, string? prefix, List? roots, Dictionary?>? usedFiles) { Prefix = prefix; ActiveTitle = title; AvailableRoots = roots; - AvailableFiles = availableFiles; UsedFiles = usedFiles; } } \ No newline at end of file diff --git a/HaWeb/README.md b/HaWeb/README.md index f9b0be2..c364598 100644 --- a/HaWeb/README.md +++ b/HaWeb/README.md @@ -44,6 +44,6 @@ TODO pills are not mobile friendly (hover / click) TODO Evtl alignment von center / right an der letzten oder nächsten zeile TODO Abhärten des Konstruktors von XMLRootDokument für von außerhalb platzierte Dokumente TODO XML-Check im Client -TODO Lock für die Liste +TODO Lock für die Liste, Bzw ConcurretBag TODO Up-Button TODO Neue Forschungsliteratur einsenden \ No newline at end of file diff --git a/HaWeb/Views/Admin/Upload/Index.cshtml b/HaWeb/Views/Admin/Upload/Index.cshtml index cc8f1aa..8706424 100644 --- a/HaWeb/Views/Admin/Upload/Index.cshtml +++ b/HaWeb/Views/Admin/Upload/Index.cshtml @@ -1,13 +1,13 @@ -@model UploadViewModel?; +@model UploadViewModel;
- @foreach (var item in Model.AvailableRoots.OrderBy(x => x.Type)) { + @foreach (var item in Model.AvailableRoots!.OrderBy(x => x.Type)) {
@item.Type
@if (Model.UsedFiles != null && Model.UsedFiles.ContainsKey(item.Prefix)) {
- @foreach(var file in Model.UsedFiles[item.Prefix].GetFileList()!) { - @if (file == Model.UsedFiles[item.Prefix].GetFileList()!.Last()) + @foreach(var file in Model.UsedFiles[item.Prefix]!) { + @if (file == Model.UsedFiles[item.Prefix]!.Last()) { @file.FileName } @@ -38,7 +38,7 @@
@@ -56,9 +56,9 @@
@if(Model.UsedFiles != null && Model.UsedFiles.ContainsKey(Model.Prefix)) { - @foreach (var item in Model.UsedFiles[Model.Prefix].GetFileList()) + @foreach (var item in Model.UsedFiles[Model.Prefix]!) { -
@item.File.Name
+
@item.FileName
} } else { @@ -88,6 +88,11 @@
} +else { + + + +}
@section Scripts { @@ -121,6 +126,8 @@ const LOCALPUBLISHSubmit = async function (oFormElement) { var fd = new FormData(); + document.getElementById("ha-publishfilelabel").style.pointerEvents = "none"; + document.getElementById("ha-lds-ellipsis-publish").style.display = "inline-block"; document.getElementById("ha-publishmessage").style.opacity = "0"; await fetch(oFormElement.action, { method: 'POST', @@ -131,19 +138,29 @@ .then(response => response.json()) .then(json => { if ("Error" in json) { + document.getElementById("ha-publishfilelabel").style.pointerEvents = "auto"; + document.getElementById("ha-lds-ellipsis-publish").style.display = "none"; document.getElementById("ha-publishmessage").style.opacity = "1"; oFormElement.elements.namedItem("update-result").value = json.Error; } else { + document.getElementById("ha-publishfilelabel").style.pointerEvents = "auto"; + document.getElementById("ha-lds-ellipsis-publish").style.display = "none"; + document.getElementById("ha-publishmessage").style.opacity = "1"; oFormElement.elements.namedItem("update-result").value = "Erfolg!"; } }) - .catch ((e) => console.log('Error:', e)) + .catch ((e) => { + document.getElementById("ha-publishfilelabel").style.pointerEvents = "auto"; + document.getElementById("ha-lds-ellipsis-publish").style.display = "none"; + console.log('Error:', e); + }) } const UPLOADSubmit = async function (oFormElement, file = null) { var fd = new FormData(); if (file !== null) fd.append("file", file); else fd = new FormData(oFormElement); + document.getElementById("dropzone").style.pointerEvents = "none"; document.getElementById("ha-lds-ellipsis").style.display = "inline-block"; document.getElementById("ha-uploadmessage").style.opacity = "0"; await fetch(oFormElement.action, { @@ -156,18 +173,27 @@ .then(response => response.json()) .then(json => { if ("Error" in json) { + document.getElementById("dropzone").style.pointerEvents = "auto"; document.getElementById("ha-lds-ellipsis").style.display = "none"; document.getElementById("ha-uploadmessage").style.opacity = "1"; oFormElement.elements.namedItem("upload-result").value = json.Error; } else { + document.getElementById("dropzone").style.pointerEvents = "auto"; document.getElementById("ha-lds-ellipsis").style.display = "none"; oFormElement.elements.namedItem("upload-result").value = "Erfolg!"; if ("Prefix" in json[0]) { + document.getElementById("dropzone").style.pointerEvents = "auto"; + document.getElementById("ha-lds-ellipsis").style.display = "none"; window.location.replace("/Admin/Upload/" + json[0].Prefix); } } }) - .catch ((e) => console.log('Error:', e)) + .catch ((e) => { + document.getElementById("dropzone").style.pointerEvents = "auto"; + document.getElementById("ha-lds-ellipsis").style.display = "none"; + document.getElementById("ha-uploadmessage").style.opacity = "1"; + oFormElement.elements.namedItem("upload-result").value = "Keine Antwort. Bitte Seite neu laden!"; + }) } function getCookie(name) { diff --git a/HaWeb/XMLParser/IXMLService.cs b/HaWeb/XMLParser/IXMLService.cs index 9c485c3..fd64b5e 100644 --- a/HaWeb/XMLParser/IXMLService.cs +++ b/HaWeb/XMLParser/IXMLService.cs @@ -13,4 +13,5 @@ public interface IXMLService { public void Use(XMLRootDocument doc); public void AutoUse(string prefix); public void AutoUse(FileList filelist); + public Dictionary? GetInProduction(); } \ No newline at end of file diff --git a/HaWeb/XMLParser/XMLService.cs b/HaWeb/XMLParser/XMLService.cs index 13fe4fc..91bfda7 100644 --- a/HaWeb/XMLParser/XMLService.cs +++ b/HaWeb/XMLParser/XMLService.cs @@ -7,6 +7,8 @@ public class XMLService : IXMLService { private Dictionary? _Used; private Dictionary? _Roots; + private Dictionary? _InProduction; + public XMLService() { // Getting all classes which implement IXMLRoot for possible document endpoints var types = _GetAllTypesThatImplementInterface().ToList(); @@ -30,6 +32,8 @@ public class XMLService : IXMLService { public Dictionary? GetRootsDictionary() => this._Roots == null ? null : this._Roots; + public Dictionary? GetInProduction() => this._InProduction; + public List? ProbeHamannFile(XDocument document, ModelStateDictionary ModelState) { if (document.Root!.Name != "opus") { ModelState.AddModelError("Error", "A valid Hamann-Docuemnt must begin with "); @@ -93,17 +97,20 @@ public class XMLService : IXMLService { } var opus = new XElement("opus"); + var inProduction = new Dictionary(); foreach (var category in _Used) { if (category.Value == null || category.Value.GetFileList() == null || !category.Value.GetFileList()!.Any()) { ModelState.AddModelError("Error", _Roots![category.Key].Type + " nicht vorhanden."); return null; } - + inProduction.Add(category.Key, category.Value); var documents = category.Value.GetFileList(); foreach (var document in documents!) { document.XMLRoot.MergeIntoFile(opus, document); } } + + _InProduction = inProduction; return opus; } diff --git a/HaWeb/appsettings.json b/HaWeb/appsettings.json index 40c4208..6a4b172 100644 --- a/HaWeb/appsettings.json +++ b/HaWeb/appsettings.json @@ -15,5 +15,7 @@ "AllowedHosts": "*", "StoredFilePathLinux": "/home/simon/Downloads/test/", "StoredFilePathWindows": "D:/test/", - "FileSizeLimit": 52428800 + "FileSizeLimit": 52428800, + "AvailableStartYear": 1700, + "AvailableEndYear": 1800 } diff --git a/HaWeb/wwwroot/css/output.css b/HaWeb/wwwroot/css/output.css index 3b803ad..79d6be9 100644 --- a/HaWeb/wwwroot/css/output.css +++ b/HaWeb/wwwroot/css/output.css @@ -900,7 +900,7 @@ body { .ha-letterheader .ha-lettermetalinks { border-bottom-width: 2px; --tw-border-opacity: 1; - border-color: rgb(226 232 240 / var(--tw-border-opacity)); + border-color: rgb(203 213 225 / var(--tw-border-opacity)); } .ha-letterheader .ha-lettermetalinks a { @@ -1943,6 +1943,11 @@ body { padding-top: 0.5rem; } +.ha-adminuploadfields .ha-uploadform .ha-uploadfilelabel:hover { + --tw-bg-opacity: 1; + background-color: rgb(241 245 249 / var(--tw-bg-opacity)); +} + .ha-adminuploadfields .ha-uploadform .ha-uploadmessage { border-radius: 0.125rem; background-color: rgb(51 65 85 / var(--tw-bg-opacity)); @@ -1980,6 +1985,15 @@ body { padding-top: 0.5rem; } +.ha-adminuploadfields .ha-publishform .ha-publishfilelabel:hover { + --tw-bg-opacity: 1; + background-color: rgb(241 245 249 / var(--tw-bg-opacity)); +} + +.ha-adminuploadfields .ha-publishform .ha-publishtext { + text-align: center; +} + .ha-adminuploadfields .ha-publishform .ha-publishmessage { border-radius: 0.125rem; background-color: rgb(51 65 85 / var(--tw-bg-opacity)); @@ -2674,8 +2688,8 @@ body { .ha-added, .ha-added *:not(.ha-linecount *, .ha-linecount, .ha-marginalbox *, .ha-marginalbox, .ha-marginal, .ha-marginal *, .ha-btn-collapsed-box) { border-radius: 0.125rem; - padding-left: 0.25rem; - padding-right: 0.25rem; + padding-left: 0.125rem; + padding-right: 0.125rem; } .ha-note, .ha-note *:not(.ha-linecount *, .ha-linecount, .ha-marginalbox *, .ha-marginalbox, .ha-marginal, .ha-marginal *, .ha-btn-collapsed-box) { diff --git a/HaWeb/wwwroot/css/site.css b/HaWeb/wwwroot/css/site.css index d4806db..01826d9 100644 --- a/HaWeb/wwwroot/css/site.css +++ b/HaWeb/wwwroot/css/site.css @@ -229,7 +229,7 @@ } .ha-letterheader .ha-lettermetalinks { - @apply border-b-2 border-slate-200 + @apply border-b-2 border-slate-300 } .ha-letterheader .ha-lettermetalinks a { @@ -698,7 +698,7 @@ } .ha-adminuploadfields .ha-uploadform { - @apply bg-slate-50 rounded shadow grow relative + @apply bg-slate-50 rounded shadow grow relative } .ha-adminuploadfields .ha-uploadform .ha-uploadtext { @@ -710,7 +710,7 @@ } .ha-adminuploadfields .ha-uploadform .ha-uploadfilelabel { - @apply inline-block px-2 py-1 pt-2 cursor-pointer w-full h-full + @apply inline-block px-2 py-1 pt-2 cursor-pointer w-full h-full hover:bg-slate-100 } .ha-adminuploadfields .ha-uploadform .ha-uploadmessage { @@ -726,7 +726,11 @@ } .ha-adminuploadfields .ha-publishform .ha-publishfilelabel { - @apply inline-block px-2 py-1 pt-2 cursor-pointer w-full h-full + @apply inline-block px-2 py-1 pt-2 cursor-pointer w-full h-full hover:bg-slate-100 + } + + .ha-adminuploadfields .ha-publishform .ha-publishtext { + @apply text-center } .ha-adminuploadfields .ha-publishform .ha-publishmessage { @@ -1107,7 +1111,7 @@ .ha-added, .ha-added *:not(.ha-linecount *, .ha-linecount, .ha-marginalbox *, .ha-marginalbox, .ha-marginal, .ha-marginal *, .ha-btn-collapsed-box) { - @apply px-1 rounded-sm + @apply px-0.5 rounded-sm } .ha-note,