looks better i guess

master
Avril 5 years ago
parent 5cc997d0e5
commit fb70eb041e
Signed by: flanchan
GPG Key ID: 284488987C31F630

@ -126,10 +126,11 @@ namespace ndview
if (post.ImageURL != null) if (post.ImageURL != null)
await WriteImageFigure(index, post, token); await WriteImageFigure(index, post, token);
await using (await index.TagAsync("blockquote", token)) await WriteBody(index, post, token);
/*await using (await index.TagAsync("blockquote", token))
{ {
await index.AppendHtml(post.Body); await index.AppendHtml(post.Body);
} }*/
} }
await imageExtractor; await imageExtractor;
@ -222,6 +223,11 @@ namespace ndview
{ {
await index.AppendHtml(post.Body); await index.AppendHtml(post.Body);
} }
/*if(post.ModLog.UserBanned)
{
await index.AppendHtml("<div class='ban'>USER WAS BANNED FOR THIS POST</div>");
}*/ //TODO: Idk?
} }
private async Task WriteThread(HtmlGenerator index, ThreadInfo thread, DirectoryInfo img, bool wasEnc, CancellationToken token) private async Task WriteThread(HtmlGenerator index, ThreadInfo thread, DirectoryInfo img, bool wasEnc, CancellationToken token)
@ -327,7 +333,7 @@ namespace ndview
} }
await using (await index.TagAsync("div", cancel, ("class", "stat"))) await using (await index.TagAsync("div", cancel, ("class", "stat")))
{ {
await index.Append($"Showing {Board.Threads.Count} threads containing {Board.Threads.Select(x => x.Children.Count).Sum()} posts and {Board.Threads.Count + Board.Threads.Select(x => x.Children.Where(y => y.ImageURL != null).Count()).Sum()} images.", cancel); await index.Append($"Showing {Board.Threads.Count} threads containing {Board.Threads.Select(x => x.Children.Count).Sum()} posts and {Board.Threads.Count + Board.Threads.Select(x => x.Children.Where(y => y.IsImageEncrypted || y.ImageURL != null).Count()).Sum()} images.", cancel);
await index.AppendHtml($"<br />Taken at <time>{Board.DumpTimestamp.ToString()}</time>.<br />Original: <a href='{Board.BoardURL}'>", cancel); await index.AppendHtml($"<br />Taken at <time>{Board.DumpTimestamp.ToString()}</time>.<br />Original: <a href='{Board.BoardURL}'>", cancel);
await index.Append(Board.BoardName, cancel); await index.Append(Board.BoardName, cancel);
await index.AppendHtml($"</a>", cancel); await index.AppendHtml($"</a>", cancel);
@ -340,6 +346,13 @@ namespace ndview
{ {
await using(await index.TagAsync("nav", cancel, ("class", "script"))) await using(await index.TagAsync("nav", cancel, ("class", "script")))
{ {
await using(await index.TagAsync("span", cancel)) {
await using(await index.TagAsync("a", cancel, ("href", Board.BoardURL)))
await index.Append(Board.BoardName);
await using(await index.TagAsync("time"))
await index.Append(Board.DumpTimestamp.ToString());
}
await using(await index.TagAsync("ul", cancel)) { await using(await index.TagAsync("ul", cancel)) {
await using(await index.TagAsync("li", cancel)) await using(await index.TagAsync("li", cancel))
await using(await index.TagAsync("a", cancel, ("href", "#!"), ("id", "expand_all_threads"))) await using(await index.TagAsync("a", cancel, ("href", "#!"), ("id", "expand_all_threads")))

@ -179,6 +179,7 @@ namespace ndview
{ {
delk = args[i + 1]; delk = args[i + 1];
args = args.Where((_, j) => j != i && j != (i + 1)).ToArray(); args = args.Where((_, j) => j != i && j != (i + 1)).ToArray();
Console.WriteLine("Set deleted key to "+delk);
} }
} }
@ -291,6 +292,7 @@ namespace ndview
catch (Exception ex) catch (Exception ex)
{ {
Console.WriteLine($"Error ({ex.GetType().Name}) in generation: {ex.Message}"); Console.WriteLine($"Error ({ex.GetType().Name}) in generation: {ex.Message}");
Console.WriteLine(ex.StackTrace);
} }
} }
else Console.WriteLine("Input archive must exist."); else Console.WriteLine("Input archive must exist.");

@ -119,13 +119,25 @@ a:hover {
nav { nav {
position: fixed; position: fixed;
right: 0;
top: 0;
width: 100%;
background: rgba(214,218,240,.7);
border-bottom: 1px solid #b7c5d9;
}
nav > span {
display:inline-block;
padding-left: 10px;
}
nav ul {
display: flex;
justify-content: center;
list-style-type: none;
margin: 0;
padding: 0;
float:right; float:right;
right: 10px;
top: 10px;
background-color: white;
padding: 5px;
border: solid 1px;
border-color: black;
} }
nav :not(a) nav :not(a)
@ -141,7 +153,7 @@ nav ul {
padding: 0; padding: 0;
} }
nav ul::before { nav ul::before {
content: "< "; content: "[ ";
} }
nav ul li { nav ul li {
padding: 0 2px; padding: 0 2px;
@ -150,5 +162,32 @@ nav ul li:not(:last-child)::after {
content: " | "; content: " | ";
} }
nav ul::after { nav ul::after {
content: " >"; content: " ]";
}
nav > span > time {
padding-left: 10px;
padding-right: 10px;
}
article > header {
margin-left: 10px;
padding-top: 1px;
}
a, a:visited {
color: blue;
}
@media only screen and (max-width: 792px)
{
nav > span {
display:none!important;
}
}
@media only screen and (max-width: 542px)
{
nav {
display:none!important;
}
} }

Loading…
Cancel
Save