New Font, Refactor of Layout, Expanded <link> Tags on search

This commit is contained in:
Simon Martens
2022-11-10 01:56:00 +01:00
parent e97103e7d9
commit 4f3581ee6a
36 changed files with 185 additions and 148 deletions

View File

@@ -32,7 +32,7 @@ public class SucheController : Controller {
if (String.IsNullOrWhiteSpace(search))
return _paginateSendLetters(lib, page, search, SearchResultType.InvalidSearchTerm, null, null);
search = search.Trim();
var res = _xmlService.SearchCollection("letters", search, _readerService);
var res = _xmlService.SearchCollection("letters", search, _readerService, null);
if (res == null || !res.Any())
return _paginateSendLetters(lib, page, search, SearchResultType.NotFound, null, null);
var ret = res.ToDictionary(
@@ -52,9 +52,9 @@ public class SucheController : Controller {
List<(string Index, List<(string Page, string Line, string Preview, string Identifier)> Results)>? res = null;
if (page == 0)
res = _xmlService.SearchCollection("register-comments", search, _readerService);
res = _xmlService.SearchCollection("register-comments", search, _readerService, lib);
if (page == 1)
res = _xmlService.SearchCollection("forschung-comments", search, _readerService);
res = _xmlService.SearchCollection("forschung-comments", search, _readerService, lib);
if (res == null || !res.Any())
return _paginateSendRegister(lib, page, search, SearchResultType.NotFound, null);
@@ -128,7 +128,7 @@ public class SucheController : Controller {
string activeSearch,
SearchResultType SRT,
List<CommentModel> comments) {
var model = new SucheViewModel("register", SRT, page, new List<string>() { "Allgmeines Register", "Forschungsbibliographie" }, activeSearch, null, null, comments);
var model = new SucheViewModel("register", SRT, page, new List<string>() { "Allgemeines Register", "Forschungsbibliographie" }, activeSearch, null, null, comments);
return View("~/Views/HKB/Dynamic/Suche.cshtml", model);
}

View File

@@ -85,7 +85,7 @@ public class LinkHelper {
_sb.Append(HTMLHelpers.TagHelpers.CreateElement("a", REFLINKCLASS, "/HKB/Register/Bibelstellen/" + linkloc[0] + linkloc[1] + "#" + comment.Index));
else if (comment.Type == "forschung")
_sb.Append(HTMLHelpers.TagHelpers.CreateElement("a", REFLINKCLASS, "/HKB/Register/Forschung/" + linkloc[0] + "#" + comment.Index));
_sb.Append(GetLemmaString(tag, comment));
_sb.Append(GetLemmaString(tag, comment, _lib, _followlinksinchildren));
}
}
if (tag.IsEmpty && _followlinksinthis) _sb.Append(HTMLHelpers.TagHelpers.CreateEndElement("a"));
@@ -93,12 +93,12 @@ public class LinkHelper {
}
}
private string GetLemmaString(Tag tag, Comment comment) {
if (!tag.Values.ContainsKey("linktext") || tag.Values["linktext"] == "true") {
public static string GetLemmaString(Tag tag, Comment comment, ILibrary lib, bool followlinksinchildren) {
if (!tag.Values.ContainsKey("linktext") || tag["linktext"] == "true") {
var linkState = new LinkState();
var sb = new StringBuilder();
var subreader = new UTF8StringReader(comment.Lemma);
new LinkHelper(_lib, subreader, sb, _followlinksinchildren, _followlinksinchildren);
new LinkHelper(lib, subreader, sb, followlinksinchildren, followlinksinchildren);
new HTMLParser.XMLHelper<LinkState>(linkState, subreader, sb, LinkRules.OTagRules, null, LinkRules.CTagRules, LinkRules.TextRules, null);
subreader.Read();
return sb.ToString();

View File

@@ -71,14 +71,15 @@ TODO High Contrast Mode manchmal komisch
TODO Kein High Contrast Mode für den Upload
TODO High Contrast Mode: Kursiv und ausgegraut (Herausgeberanmerkungen) schwer sichtbar
TODO 400: Traditions nicht genug Abstand
TODO Word-wrap before align, tabs
Technische Details:
TODO Move ILibrary -> neuer Parser
TODO Word-wrap before align, tabs
TODO Hochstellungen nach mediaevalziffern
TODO Syntax-Check
TODO Datum im Footer Edierdatum der Hamann-Datei
TODO Fußnoten in Editionsgeschichte als Marginalkommentare
TODO Navigation auf die Startseite / von Kontakt
Vor dem internen release:
TODO Jahreszahlen auf der Startseite
@@ -95,5 +96,7 @@ tabellen ok, ausser 939, 806 falsch geschachtelt: dort sind htabs geschachtelt
Fehlende Seiten auf HKW
vmtl bei sendern und empfängern
theophrast-abschilderungen: Link mit linktext

View File

@@ -1,6 +1,9 @@
namespace HaWeb.SearchHelpers;
using System.Text;
using System.Web;
using HaDocument.Models;
using HaDocument.Interfaces;
using System.Xml.Linq;
using TagFuncList = List<(Func<HaXMLReader.EvArgs.Tag, HaWeb.HTMLParser.LineXMLHelper<SearchState>, bool>, Action<System.Text.StringBuilder, HaXMLReader.EvArgs.Tag, HaWeb.HTMLParser.LineXMLHelper<SearchState>>)>;
using TextFuncList = List<(Func<HaXMLReader.EvArgs.Text, HaWeb.HTMLParser.LineXMLHelper<SearchState>, bool>, Action<System.Text.StringBuilder, HaXMLReader.EvArgs.Text, HaWeb.HTMLParser.LineXMLHelper<SearchState>>)>;
@@ -10,6 +13,42 @@ using WhitespaceFuncList = List<(Func<HaXMLReader.EvArgs.Whitespace, HaWeb.HTMLP
public class SearchRules {
public static readonly TagFuncList OTagRules = new TagFuncList() {
( (x, _) => x.Name.ToLower() == "kommentar" || x.Name.ToLower() == "subsection", (_, tag, reader) => reader.State.CurrentIdentifier = tag["id"]),
( (x, reader) => (x.Name.ToLower() == "link" && reader.State.Lib != null), (sb, tag, reader) => {
// LINKTEXT NEVER GETS TO TRUE
Comment? comment = null;
if (tag.Values.ContainsKey("subref") && reader.State.Lib.SubCommentsByID.ContainsKey(tag["subref"]))
comment = reader.State.Lib.SubCommentsByID[tag["subref"]];
else if (tag.Values.ContainsKey("ref"))
if (reader.State.Lib.Comments.ContainsKey(tag["ref"]))
comment = reader.State.Lib.Comments[tag["ref"]];
else if (reader.State.Lib.SubCommentsByID.ContainsKey(tag["ref"]))
comment = reader.State.Lib.SubCommentsByID[tag["ref"]];
if (comment != null) {
var t = String.Empty;
var sw = reader.State.SearchWord;
if (!String.IsNullOrWhiteSpace(comment.Lemma))
t = XElement.Parse(comment.Lemma).Value;
if (reader.State.Normalize)
t = HaWeb.SearchHelpers.StringHelpers.NormalizeWhiteSpace(t);
if (tag["linktext"] != "false") {
sb.Append(t.ToUpperInvariant());
if (sb.Length >= sw.Length) {
if (sb.ToString().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));
}
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));
}
}
}
})
};
public static readonly TextFuncList TextRules = new TextFuncList() {
@@ -17,10 +56,10 @@ public class SearchRules {
var t = text.Value;
if (reader.State.Normalize)
t = HaWeb.SearchHelpers.StringHelpers.NormalizeWhiteSpace(t);
sb.Append(t);
sb.Append(t.ToUpperInvariant());
var sw = reader.State.SearchWord;
if (sb.Length >= sw.Length) {
if (sb.ToString().ToUpperInvariant().Contains(sw)) {
if (sb.ToString().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));

View File

@@ -1,13 +1,16 @@
namespace HaWeb.SearchHelpers;
using System.Text;
using HaDocument.Interfaces;
public class SearchState : HaWeb.HTMLParser.IState {
internal string SearchWord;
internal string? CurrentIdentifier;
internal ILibrary? Lib;
internal bool Normalize;
internal List<(string Page, string Line, string Identifier)>? Results;
public SearchState(string searchword, bool normalize = false) {
public SearchState(string searchword, bool normalize = false, ILibrary? lib = null) {
Lib = lib;
Normalize = normalize;
SearchWord = searchword;
}

View File

@@ -15,14 +15,19 @@
@if (Model.ActiveSearch != null) {
<div class="ha-activefilterinfo">
@if (Model.SearchType == "letters") {
<span>Biefe, die »@Model.ActiveSearch« enthalten.&emsp;</span><br>
<span><span class="">Briefe</span>, die »@Model.ActiveSearch« enthalten.&emsp;</span><br>
}
@if (Model.SearchType == "register") {
<span>Registereinträge, die »@Model.ActiveSearch« enthalten.&emsp;</span><br>
<a class="ha-reversefilter" asp-controller="Register" asp-action="Allgemein">← Registerübersicht</a><span> / </span>
@if (Model.ActivePage == 0) {
<span><span class="">Registereinträge</span>, die »@Model.ActiveSearch« enthalten.&emsp;</span><br>
<a class="ha-reversefilter" asp-controller="Register" asp-action="Allgemein">← Registerübersicht</a><span> / </span>
} else {
<span><span class="">Bibliografische Einträge</span>, die »@Model.ActiveSearch« enthalten.&emsp;</span><br>
<a class="ha-reversefilter" asp-controller="Register" asp-action="Forschung">← Forschungsbibliographie</a><span> / </span>
}
}
@if (Model.SearchType == "marginals") {
<span>Stellenkommentare, die »@Model.ActiveSearch« enthalten.&emsp;</span><br>
<span><span class="">Stellenkommentare</span>, die »@Model.ActiveSearch« enthalten.&emsp;</span><br>
}
<a class="ha-reversefilter" asp-controller="Index" asp-action="Index">← Briefübersicht</a>
</div>
@@ -130,5 +135,16 @@
</div>
}
@if (Model.SearchResultType == SearchResultType.NotFound) {
<div class="ha-commentlist">
Keine Treffer für »@Model.ActiveSearch«.
</div>
}
@if (Model.SearchResultType == SearchResultType.InvalidSearchTerm) {
<div class="ha-commentlist">
»@Model.ActiveSearch« ist ein ungültiger Suchbegriff. Die Suche darf nicht leer sein und nicht ausschließlich aus Spatien bestehen.
</div>
}
</div>
</div>

View File

@@ -49,6 +49,7 @@
}
</fieldset>
@section JavaScript {
<script>
const USESubmit = async function (oFormElement, file = null) {
let fd = new FormData(oFormElement);
@@ -81,3 +82,4 @@
})
}
</script>
}

View File

@@ -2,28 +2,7 @@
<html lang="de" id="top">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="description" content="@ViewData["SEODescription"]">
<title>@ViewData["Title"]</title>
<!-- crossorigin is a workaround to prevent double downloading bugs in chrome -->
<!-- also, the graphite versions of the font are available for use:
<link rel="preload" href="/fonts/LinLibertine_R_G.ttf" as="font" crossorigin/>
<link rel="preload" href="/fonts/LinBiolinum_R_G.ttf" as="font" crossorigin/>
-->
<link rel="preload" href="/css/output.css" as="style" asp-append-version="true"/>
<link rel="preload" href="/img/subtlenet2.png" as="image" />
<link rel="preload" href="/fonts/LinBiolinum_R.woff" as="font" crossorigin/>
<link rel="preload" href="/fonts/LinLibertine_R.woff" as="font" crossorigin/>
<link rel="preload" href="/fonts/LinLibertine_RI.woff" as="font" crossorigin/>
<link rel="preload" href="/fonts/LinLibertine_RB.woff" as="font" crossorigin/>
<link rel="stylesheet" href="/css/output.css" asp-append-version="true" />
<script src="~/js/site.js" asp-append-version="true"></script>
@await Html.PartialAsync("/Views/Shared/_Head.cshtml")
</head>
<body class="w-full ">
@@ -38,17 +17,8 @@
@await Html.PartialAsync("/Views/Shared/_Footer.cshtml")
</div>
</div>
<a class="ha-scrollbutton" id="ha-scrollbutton">
<svg class="ha-scrollbuttonarrow" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
<path strokeLinecap="round" strokeLinejoin="round" stroke-width="2" d="M5 11l7-7 7 7M5 19l7-7 7 7" />
</svg>
</a>
@await Html.PartialAsync("/Views/Shared/_ScrollButton.cshtml")
</div>
@RenderSection("Scripts", required: false)
<environment exclude="Development">
@await Html.PartialAsync("/Views/Shared/_Javascript.cshtml")
</environment>
@await RenderSectionAsync("JavaScript", false)
</body>
</html>

View File

@@ -1,6 +1,7 @@
@{
var showCredits = ViewData["showCredits"] == "true" ? true : false;
}
<header class="sticky w-100 font-serif mb-6">
<nav class="flex flex-row w-100 bg-slate-50 border-t-[5px] border-gray-300 dark:shadow-xl dark:border-gray-900 py-3 px-3 desktop:px-8 flex-wrap">
<a asp-controller="Index" asp-action="Index" class="text-xl xl:text-3xl grow-0 shrink-0 text-black hover:text-black">
@@ -30,7 +31,7 @@
</button>
</div>
<div class="ha-topnav " id="ha-topnav">
<a asp-controller="Index" asp-action="Index">
<a class="ha-active-default" asp-controller="Index" asp-action="Index">
Suche & Briefauswahl
</a>
<a asp-controller="Briefe" asp-action="Index">
@@ -60,10 +61,10 @@
</div>
</div>
</nav>
@if(showCredits)
@* @if(showCredits)
{
<div class="desktop:block hidden w-100 bg-slate-50 dark:pt-2 dark:pb-2 dark:bg-slate-800 pb-3 px-3 desktop:px-8 overflow-hidden whitespace-nowrap text-ellipsis">
<a href="/Edition/Mitwirkende">Hg. v. Leonard Keidel und Janina Reibold, auf Grundlage der Vorarbeiten Arthur Henkels, unter Mitarbeit von G. Babelotzky, K. Bucher, Ch. Großmann, C.F. Haak, L. Klopfer, J. Knüchel, I. Langkabel und S. Martens (Heidelberg 2020ff.)</a>
</div>
}
} *@
</header>

View File

@@ -2,28 +2,7 @@
<html lang="de" id="top">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="description" content="@ViewData["SEODescription"]">
<title>@ViewData["Title"]</title>
<!-- crossorigin is a workaround to prevent double downloading bugs in chrome -->
<!-- also, the graphite versions of the font are available for use:
<link rel="preload" href="/fonts/LinLibertine_R_G.ttf" as="font" crossorigin/>
<link rel="preload" href="/fonts/LinBiolinum_R_G.ttf" as="font" crossorigin/>
-->
<link rel="preload" href="/css/output.css" as="style" asp-append-version="true"/>
<link rel="preload" href="/img/subtlenet2.png" as="image" />
<link rel="preload" href="/fonts/LinBiolinum_R.woff" as="font" crossorigin/>
<link rel="preload" href="/fonts/LinLibertine_R.woff" as="font" crossorigin/>
<link rel="preload" href="/fonts/LinLibertine_RI.woff" as="font" crossorigin/>
<link rel="preload" href="/fonts/LinLibertine_RB.woff" as="font" crossorigin/>
<link rel="stylesheet" href="/css/output.css" asp-append-version="true" />
<script src="~/js/site.js" asp-append-version="true"></script>
@await Html.PartialAsync("/Views/Shared/_Head.cshtml")
</head>
<body class="w-full ">
@@ -38,17 +17,8 @@
@await Html.PartialAsync("/Views/Shared/_Footer.cshtml")
</div>
</div>
<a class="ha-scrollbutton" id="ha-scrollbutton">
<svg class="ha-scrollbuttonarrow" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
<path strokeLinecap="round" strokeLinejoin="round" stroke-width="2" d="M5 11l7-7 7 7M5 19l7-7 7 7" />
</svg>
</a>
@await Html.PartialAsync("/Views/Shared/_ScrollButton.cshtml")
</div>
@RenderSection("Scripts", required: false)
<environment exclude="Development">
@await Html.PartialAsync("/Views/Shared/_Javascript.cshtml")
</environment>
@await RenderSectionAsync("JavaScript", false)
</body>
</html>

View File

@@ -0,0 +1,26 @@
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="description" content="@ViewData["SEODescription"]">
<title>@ViewData["Title"]</title>
<!-- crossorigin is a workaround to prevent double downloading bugs in chrome -->
<!-- also, the graphite versions of the font are available for use:
<link rel="preload" href="/fonts/LinLibertine_R_G.ttf" as="font" crossorigin/>
<link rel="preload" href="/fonts/LinBiolinum_R_G.ttf" as="font" crossorigin/>
-->
<link rel="preload" href="/css/output.css" as="style" asp-append-version="true"/>
<link rel="preload" href="/img/subtlenet2.png" as="image" />
<link rel="preload" href="/fonts/LinBiolinum_Rah.ttf" as="font" crossorigin/>
<link rel="preload" href="/fonts/LinLibertine_Rah.ttf" as="font" crossorigin/>
<link rel="preload" href="/fonts/LinLibertine_RIah.ttf" as="font" crossorigin/>
<link rel="preload" href="/fonts/LinLibertine_RBah.ttf" as="font" crossorigin/>
<link rel="stylesheet" href="/css/output.css" asp-append-version="true" />
<script src="~/js/site.js" asp-append-version="true"></script>
<environment exclude="Development">
@await Html.PartialAsync("/Views/Shared/_Javascript.cshtml")
</environment>

View File

@@ -1,29 +1,8 @@
<!DOCTYPE html>
<html lang="de" id="top">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
@* TODO: Description für die Startseite *@
<meta name="description" content="">
<title>@ViewData["Title"]</title>
<!-- crossorigin is a workaround to prevent double downloading bugs in chrome -->
<!-- also, the graphite versions of the font are available for use:
<link rel="preload" href="/fonts/LinLibertine_R_G.ttf" as="font" crossorigin/>
<link rel="preload" href="/fonts/LinBiolinum_R_G.ttf" as="font" crossorigin/>
-->
<link rel="preload" href="/css/output.css" as="style" asp-append-version="true"/>
<link rel="preload" href="/img/subtlenet2.png" as="image" />
<link rel="preload" href="/fonts/LinBiolinum_R.woff" as="font" crossorigin/>
<link rel="preload" href="/fonts/LinLibertine_R.woff" as="font" crossorigin/>
<link rel="preload" href="/fonts/LinLibertine_RI.woff" as="font" crossorigin/>
<link rel="preload" href="/fonts/LinLibertine_RB.woff" as="font" crossorigin/>
<link rel="stylesheet" href="/css/output.css" asp-append-version="true" />
<script src="~/js/site.js" asp-append-version="true"></script>
@await Html.PartialAsync("/Views/Shared/_Head.cshtml")
</head>
<body class="w-full ">
@@ -50,17 +29,8 @@
@await Html.PartialAsync("/Views/Shared/_Footer.cshtml")
</div>
</div>
<a class="ha-scrollbutton" id="ha-scrollbutton">
<svg class="ha-scrollbuttonarrow" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
<path strokeLinecap="round" strokeLinejoin="round" stroke-width="2" d="M5 11l7-7 7 7M5 19l7-7 7 7" />
</svg>
</a>
@await Html.PartialAsync("/Views/Shared/_ScrollButton.cshtml")
</div>
@RenderSection("Scripts", required: false)
<environment exclude="Development">
@await Html.PartialAsync("/Views/Shared/_Javascript.cshtml")
</environment>
@await RenderSectionAsync("JavaScript", false)
</body>
</html>

View File

@@ -0,0 +1,5 @@
<a class="ha-scrollbutton" id="ha-scrollbutton">
<svg class="ha-scrollbuttonarrow" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
<path strokeLinecap="round" strokeLinejoin="round" stroke-width="2" d="M5 11l7-7 7 7M5 19l7-7 7 7" />
</svg>
</a>

View File

@@ -2,6 +2,7 @@ namespace HaWeb.XMLParser;
using System.Xml.Linq;
using Microsoft.AspNetCore.Mvc.ModelBinding;
using HaWeb.Models;
using HaDocument.Interfaces;
using HaXMLReader.Interfaces;
public interface IXMLService {
@@ -19,5 +20,5 @@ public interface IXMLService {
public void UnUseProduction();
public void SetInProduction();
public void SetInProduction(XDocument document);
public List<(string Index, List<(string Page, string Line, string Preview, string Identifier)> Results)>? SearchCollection(string collection, string searchword, IReaderService reader);
public List<(string Index, List<(string Page, string Line, string Preview, string Identifier)> Results)>? SearchCollection(string collection, string searchword, IReaderService reader, ILibrary? lib);
}

View File

@@ -8,6 +8,7 @@ using System.Collections.Concurrent;
using System.Threading.Tasks;
using System.Text;
using HaXMLReader.Interfaces;
using HaDocument.Interfaces;
public class XMLService : IXMLService {
private Dictionary<string, FileList?>? _Used;
@@ -112,16 +113,41 @@ public class XMLService : IXMLService {
_collectedProduction = ret.ToDictionary(x => x.Key, y => y.Value);
}
public List<(string Index, List<(string Page, string Line, string Preview, string Identifier)> Results)>? SearchCollection(string collection, string searchword, IReaderService reader) {
public List<(string Index, List<(string Page, string Line, string Preview, string Identifier)> Results)>? SearchCollection(string collection, string searchword, IReaderService reader, ILibrary? lib = null) {
if (!_collectedProduction.ContainsKey(collection)) return null;
var searchableObjects = _collectedProduction[collection].Items;
var res = new ConcurrentBag<(string Index, List<(string Page, string Line, string preview, string identifier)> Results)>();
var sw = StringHelpers.NormalizeWhiteSpace(searchword.Trim());
// Non Parallel:
// foreach (var obj in searchableObjects) {
// if (obj.Value.SearchText != null) {
// var state = new SearchState(sw, false, lib);
// var rd = reader.RequestStringReader(obj.Value.SearchText);
// var parser = new HaWeb.HTMLParser.LineXMLHelper<SearchState>(state, rd, new StringBuilder(), SearchRules.OTagRules, null, null, SearchRules.TextRules, SearchRules.WhitespaceRules);
// rd.Read();
// if (state.Results != null)
// res.Add((
// obj.Value.Index,
// state.Results.Select(x => (
// x.Page,
// x.Line,
// parser.Lines != null ?
// parser.Lines
// .Where(y => y.Page == x.Page && y.Line == x.Line)
// .Select(x => x.Text)
// .FirstOrDefault(string.Empty)
// : "",
// x.Identifier
// )).ToList()));
// }
// }
Parallel.ForEach(searchableObjects, (obj) => {
if (obj.Value.SearchText != null) {
var state = new SearchState(sw);
var state = new SearchState(sw, false, lib);
var rd = reader.RequestStringReader(obj.Value.SearchText);
var parser = new HaWeb.HTMLParser.LineXMLHelper<SearchState>(state, rd, new StringBuilder(), SearchRules.OTagRules, null, null, SearchRules.TextRules, SearchRules.WhitespaceRules);
var parser = new HaWeb.HTMLParser.LineXMLHelper<SearchState>(state, rd, new StringBuilder(), SearchRules.OTagRules, SearchRules.OTagRules, null, SearchRules.TextRules, SearchRules.WhitespaceRules);
rd.Read();
if (state.Results != null)
res.Add((

View File

@@ -22,10 +22,10 @@ module.exports = {
mono: ['ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace', 'mono']
},
fontSize: {
xs: ['0.75rem', { lineHeight: '1rem' }],
sm: ['0.875rem', { lineHeight: '1.25rem' }],
xs: ['0.7rem', { lineHeight: '1rem' }],
sm: ['0.85rem', { lineHeight: '1.25rem' }],
base: ['1rem', { lineHeight: '1.5rem' }],
lg: ['1.125rem', { lineHeight: '1.75rem' }],
lg: ['1.15rem', { lineHeight: '1.75rem' }],
xl: ['1.25rem', { lineHeight: '1.75rem' }],
'2xl': ['1.5rem', { lineHeight: '2rem' }],
'3xl': ['1.875rem', { lineHeight: '2.25rem' }],

View File

@@ -21,7 +21,7 @@
@font-face {
font-family: "Biolinum";
src: url("../fonts/LinBiolinum_R.woff") format("woff");
src: url("../fonts/LinBiolinum_Rah.ttf") format("truetype");
font-display: swap;
font-weight: normal;
font-style: normal;
@@ -29,7 +29,7 @@
@font-face {
font-family: "Libertine";
src: url("../fonts/LinLibertine_R.woff") format("woff");
src: url("../fonts/LinLibertine_Rah.ttf") format("truetype");
font-display: swap;
font-weight: normal;
font-style: normal;
@@ -37,7 +37,7 @@
@font-face {
font-family: "Biolinum";
src: url("../fonts/LinBiolinum_RI.woff") format("woff");
src: url("../fonts/LinBiolinum_RIah.ttf") format("truetype");
font-display: swap;
font-weight: normal;
font-style: italic;
@@ -45,7 +45,7 @@
@font-face {
font-family: "Biolinum";
src: url("../fonts/LinBiolinum_RB.woff") format("woff");
src: url("../fonts/LinBiolinum_RBah.ttf") format("truetype");
font-display: swap;
font-weight: bold;
font-style: normal;
@@ -53,7 +53,7 @@
@font-face {
font-family: "Libertine";
src: url("../fonts/LinLibertine_RI.woff") format("woff");
src: url("../fonts/LinLibertine_RIah.ttf") format("truetype");
font-display: swap;
font-weight: normal;
font-style: italic;
@@ -61,7 +61,7 @@
@font-face {
font-family: "Libertine";
src: url("../fonts/LinLibertine_RB.woff") format("woff");
src: url("../fonts/LinLibertine_RZah.ttf") format("truetype");
font-display: swap;
font-weight: bold;
font-style: normal;

File diff suppressed because one or more lines are too long

View File

@@ -123,7 +123,7 @@
}
.ha-search .ha-searchbody {
@apply pt-4 md:pr-[29rem] pb-9 md:pb-12 rounded-b-sm
@apply pt-4 md:pr-[24rem] pb-9 md:pb-12 rounded-b-sm
}
.ha-search .ha-searchbody .ha-letterlist {

View File

@@ -53,10 +53,6 @@
@apply text-base desktop:text-lg w-full h-full;
}
.active {
@apply pointer-events-none
}
.hide {
@apply !hidden
}
@@ -123,19 +119,16 @@
@apply italic
}
.ha-sup,
.ha-sup *:not(.ha-linecount *, .ha-linecount, .ha-marginalbox *, .ha-marginalbox, .ha-marginal, .ha-marginal *, .ha-btn-collapsed-box) {
.ha-sup:not(.ha-linecount *, .ha-linecount, .ha-marginalbox *, .ha-marginalbox, .ha-marginal, .ha-marginal *, .ha-btn-collapsed-box) {
@apply relative -top-[0.3em] text-[80%]
}
/* TODO: Something dooesnt work here */
.ha-super,
.ha-super *:not(.ha-linecount *, .ha-linecount, .ha-marginalbox *, .ha-marginalbox, .ha-marginal, .ha-marginal *, .ha-btn-collapsed-box) {
@apply numeric-normal relative text-xs leading-none align-baseline -top-[0.3em]
.ha-super:not(.ha-linecount *, .ha-linecount, .ha-marginalbox *, .ha-marginalbox, .ha-marginal, .ha-marginal *, .ha-btn-collapsed-box) {
@apply numeric-normal relative text-xs leading-none align-baseline -top-[0.3em] inline-block
}
.ha-sub,
.ha-sub *:not(.ha-linecount *, .ha-linecount, .ha-marginalbox *, .ha-marginalbox, .ha-marginal, .ha-marginal *, .ha-btn-collapsed-box) {
.ha-sub:not(.ha-linecount *, .ha-linecount, .ha-marginalbox *, .ha-marginalbox, .ha-marginal, .ha-marginal *, .ha-btn-collapsed-box) {
@apply relative text-xs leading-none align-baseline -bottom-[0.25em]
}

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.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -51,16 +51,28 @@ const markactive_menu = function (element) {
var all_links = element.getElementsByTagName("a"),
i = 0,
len = all_links.length,
marked = false,
full_path = location.href.split("#")[0].toLowerCase(); //Ignore hashes
full_path = full_path.split("?")[0];
full_path = full_path.split("?")[0];
for (; i < len; i++) {
if (all_links[i].parentNode.classList.contains("ha-topnav-dropdown")) {
if (full_path.startsWith(all_links[i].href.toLowerCase())) {
all_links[i].className += " active";
all_links[i].className += " active pointer-events-none";
marked = true;
}
} else {
if (full_path == all_links[i].href.toLowerCase() || full_path == all_links[i].href.toLowerCase() + "/") {
all_links[i].className += " active pointer-events-none";
marked = true;
}
}
}
i = 0;
if (marked === false) {
for (; i < len; i++) {
if (all_links[i].classList.contains("ha-active-default")) {
all_links[i].className += " active";
}
}