mirror of
https://github.com/Theodor-Springmann-Stiftung/hamann-ausgabe-core.git
synced 2025-10-29 01:05:32 +00:00
Fixed little things
This commit is contained in:
@@ -51,7 +51,7 @@ public class Briefecontroller : Controller {
|
||||
ViewData["SEODescription"] = "Johann Georg Hamann: Kommentierte Briefausgabe. Brief " + id.ToLower();
|
||||
ViewData["Filename"] = "HKB_" + meta.Autopsic + ".pdf";
|
||||
if (!string.IsNullOrWhiteSpace(search)) {
|
||||
ViewData["Mark"] = "search";
|
||||
ViewData["Mark"] = search;
|
||||
}
|
||||
|
||||
// Model creation
|
||||
|
||||
@@ -40,13 +40,15 @@ public class SearchRules {
|
||||
}
|
||||
sb.Remove(0, sb.Length - sw.Length);
|
||||
}
|
||||
} else {
|
||||
if (t.ToUpperInvariant().Contains(sw)) {
|
||||
if (reader.State.Results == null)
|
||||
reader.State.Results = new List<(string Page, string Line, string Identifier)>();
|
||||
reader.State.Results.Add((reader.CurrentPage, reader.CurrentLine, reader.State.CurrentIdentifier));
|
||||
}
|
||||
}
|
||||
}
|
||||
// Enable, if zou want unparsed context tto be conidered when searching.
|
||||
// else {
|
||||
// if (t.ToUpperInvariant().Contains(sw)) {
|
||||
// if (reader.State.Results == null)
|
||||
// reader.State.Results = new List<(string Page, string Line, string Identifier)>();
|
||||
// reader.State.Results.Add((reader.CurrentPage, reader.CurrentLine, reader.State.CurrentIdentifier));
|
||||
// }
|
||||
// }
|
||||
}
|
||||
})
|
||||
};
|
||||
|
||||
@@ -154,4 +154,12 @@
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@* <script src="~/js/mark.min.js" asp-append-version="true"></script>
|
||||
<script>
|
||||
var instance = new Mark(document.querySelectorAll(".ha-letterbody"));
|
||||
instance.mark('l', { "element": "span", "className": "ha-found", "acrossElements": true, "separateWordSearch": false, "exclude": [".ha-searchresultcommentpill", ".ha-letlink", ".ha-letlinks", ".ha-hkb"]});
|
||||
|
||||
</script> *@
|
||||
@@ -4,9 +4,10 @@
|
||||
@if(ViewData.ContainsKey("Mark")) {
|
||||
<script src="~/js/mark.min.js" asp-append-version="true"></script>
|
||||
<script>
|
||||
var instance = new Mark(document.querySelectorAll(".ha-register-body, .ha-letterbody *, .ha-searchresultpreview, .ha-comment"));
|
||||
instance.mark('@ViewData["Mark"]', { "element": "span", "className": "ha-found", "acrossElements": true, "separateWordSearch": false, "exclude": [".ha-searchresultcommentpill", ".ha-letlink", ".ha-letlinks", ".ha-hkb"]});
|
||||
|
||||
var instancesearch = new Mark(document.querySelectorAll(".ha-register-body, .ha-searchresultpreview, .ha-comment"));
|
||||
instancesearch.mark('@ViewData["Mark"]', { "element": "span", "className": "ha-found", "acrossElements": true, "separateWordSearch": false, "exclude": [".ha-searchresultcommentpill", ".ha-letlink", ".ha-letlinks", ".ha-hkb"]});
|
||||
var instanceletter = new Mark(document.querySelectorAll(".ha-letterbody"));
|
||||
instanceletter.mark('@ViewData["Mark"]', { "element": "span", "className": "ha-found", "acrossElements": true, "debug": true, "separateWordSearch": false, "exclude": [".ha-searchresultcommentpill", ".ha-letlink", ".ha-letlinks", ".ha-hkb"]});
|
||||
</script>
|
||||
}
|
||||
<script>
|
||||
@@ -16,13 +17,13 @@
|
||||
var anchor = (urlParts.length > 1) ? urlParts[1] : null;
|
||||
if (anchor != null) {
|
||||
var element = document.getElementById(anchor);
|
||||
if (element !== null && element.classList.contains("ha-linecount") && element.firstChild.classList.contains("ha-hiddenlinecount")) {
|
||||
element.classList.add("ha-found");
|
||||
if (element !== null && element.classList.contains("ha-linecount")) {
|
||||
element.classList.add("ha-location");
|
||||
element.classList.add("font-bold");
|
||||
element.classList.add("mr-3");
|
||||
element.prepend("● ");
|
||||
} else if (element !== null && element.classList.contains("ha-commenthead")) {
|
||||
element.classList.add("ha-found");
|
||||
element.classList.add("ha-location");
|
||||
element.classList.add("font-bold");
|
||||
element.prepend("● ");
|
||||
}
|
||||
|
||||
@@ -261,7 +261,7 @@
|
||||
}
|
||||
|
||||
.ha-linecount {
|
||||
@apply sm:absolute sm:right-full sm:mr-2 sm:text-right text-xs sm:mt-1 font-sans select-none
|
||||
@apply sm:absolute sm:right-full sm:mr-2 sm:text-right text-xs sm:mt-1 font-sans select-none whitespace-nowrap
|
||||
}
|
||||
|
||||
.ha-linecount .ha-zhline {
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -58,9 +58,14 @@
|
||||
}
|
||||
|
||||
.ha-found {
|
||||
@apply !text-hamannSlate-300
|
||||
@apply !text-hamannHighlight
|
||||
}
|
||||
|
||||
.ha-location {
|
||||
@apply !text-hamannHighlight
|
||||
}
|
||||
|
||||
|
||||
.ha-zhbreak {
|
||||
@apply hidden sm:inline
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user