Skip to content

Commit

Permalink
Úprava stylu, chyby při nevalidním HTML a stylu tabulek.
Browse files Browse the repository at this point in the history
  • Loading branch information
martinrotter committed Aug 30, 2024
1 parent 46c14a4 commit 0b3b0a5
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 3 deletions.
9 changes: 8 additions & 1 deletion ZZZO/ZZZO/Assists/ChromiumWebBrowserAssist.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,14 @@ private static void OnHtmlChanged(DependencyObject d, DependencyPropertyChangedE
{
if (e.Property.Name == HtmlProperty.Name && d is ChromiumWebBrowser browser)
{
browser.LoadHtml(e.NewValue as string, Constants.Uris.Document);
if (e.NewValue is string html)
{
browser.LoadHtml(html, Constants.Uris.Document);
}
else
{
browser.LoadHtml("<p>Nevalidní HTML.</p>", Constants.Uris.Document);
}
}
}

Expand Down
3 changes: 3 additions & 0 deletions resources/editor/editor.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@
allow_html_in_named_anchor: true,
auto_focus: true,
resize: false,
table_use_colgroups: false,
table_default_attributes: {},
table_default_styles: {},
plugins: 'code charmap image link searchreplace table visualchars lists',
menubar: "edit view insert format table tools help",
toolbar: ['alignleft aligncenter alignright | underline bold italic | link subscript superscript', 'styles | bullist numlist'],
Expand Down
15 changes: 13 additions & 2 deletions resources/styles/svésedlice.css
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ Svésedlice, Czechia - style for generating municipality meeting reports.
--failure-color: red;
--warning-color: orange;
--signature-color: gray;
--table-border: black;

font-family: "EB Garamond", serif;
}
Expand All @@ -35,6 +36,16 @@ ol {
padding-left: 1.5em;
}

table {
width: fit-content;
border-collapse: collapse;
}

td, th {
padding: 4px;
border: 1px solid var(--table-border);
}

.ol-classic {
list-style: revert;
padding-left: 1.5em;
Expand Down Expand Up @@ -104,8 +115,8 @@ h1, h2, h3, h4, h5, h6 {
border-width: 3px;
*/

border-top: 1px solid;
border-bottom: 1px solid;
border-top: 2px solid;
border-bottom: 2px solid;
width: 70%;
padding: 0px 10px;
print-color-adjust: exact;
Expand Down

0 comments on commit 0b3b0a5

Please sign in to comment.