Corrected table border color and fixed html background color and font

This commit is contained in:
Willem Cazander 2025-01-31 14:37:22 +01:00
parent 5a5665259b
commit a72c2df48d
9 changed files with 33 additions and 39 deletions

View file

@ -86,7 +86,7 @@ public class FCDocPageWriterMuffin implements MaisDocPageWriter, FCDocSegmentWri
} }
} }
try (ContentCloseable content = writer.docPageContent()) { try (ContentCloseable content = writer.docPageContent()) {
String xSpec = FourCornerDotCake.FC_PIE9C_01.nameSpec().replaceAll("01", "Cake"); String xSpec = FourCornerDotCake.FC_PIE9C_01.nameSpec().replaceAll("01", "Left");
try (ContentCloseable table = writer.docTable(xSpec, null, MaisDocContentCss.overviewSummary)) { try (ContentCloseable table = writer.docTable(xSpec, null, MaisDocContentCss.overviewSummary)) {
writeTableBoxHeaderNumeric(writer, 28, true); writeTableBoxHeaderNumeric(writer, 28, true);
writePIE(writer, FourCornerDotCake.FC_PIE9C_01); writePIE(writer, FourCornerDotCake.FC_PIE9C_01);
@ -119,7 +119,7 @@ public class FCDocPageWriterMuffin implements MaisDocPageWriter, FCDocSegmentWri
} }
} }
try (ContentCloseable content = writer.docPageContent()) { try (ContentCloseable content = writer.docPageContent()) {
String xSpec = FourCornerDotCake.FC_PIE9D_01.nameSpec().replaceAll("01", "Cake"); String xSpec = FourCornerDotCake.FC_PIE9D_01.nameSpec().replaceAll("01", "Right");
try (ContentCloseable table = writer.docTable(xSpec, null, MaisDocContentCss.overviewSummary)) { try (ContentCloseable table = writer.docTable(xSpec, null, MaisDocContentCss.overviewSummary)) {
writeTableBoxHeaderNumeric(writer, 28, true); writeTableBoxHeaderNumeric(writer, 28, true);
writePIE(writer, FourCornerDotCake.FC_PIE9D_01); writePIE(writer, FourCornerDotCake.FC_PIE9D_01);

View file

@ -1041,7 +1041,7 @@ public class MaisDocGenerator implements MaisDocContentPrinter {
buf.append("const switchTheme = document.getElementById('theme_switcher');\n"); buf.append("const switchTheme = document.getElementById('theme_switcher');\n");
buf.append("switchTheme.addEventListener('click', (e) => {\n"); buf.append("switchTheme.addEventListener('click', (e) => {\n");
buf.append("\te.preventDefault();\n"); buf.append("\te.preventDefault();\n");
buf.append("\tif (\"dark\"==readCookie(\"theme\")) {\n"); buf.append("\tif (\"dark\"===readCookie(\"theme\")) {\n");
buf.append("\t\tcreateCookie(\"theme\", \"light\", 365);\n"); buf.append("\t\tcreateCookie(\"theme\", \"light\", 365);\n");
buf.append("\t} else {\n"); buf.append("\t} else {\n");
buf.append("\t\tcreateCookie(\"theme\", \"dark\", 365);\n"); buf.append("\t\tcreateCookie(\"theme\", \"dark\", 365);\n");
@ -1052,7 +1052,7 @@ public class MaisDocGenerator implements MaisDocContentPrinter {
buf.append("\ttop.location.href = '"+pathPrefix+"index.html';\n"); buf.append("\ttop.location.href = '"+pathPrefix+"index.html';\n");
} }
buf.append("});\n"); buf.append("});\n");
buf.append("if (\"dark\"==readCookie(\"theme\")) {\n"); buf.append("if (\"dark\"===readCookie(\"theme\")) {\n");
buf.append("\tswitchTheme.innerHTML = '⍝ Light';\n"); buf.append("\tswitchTheme.innerHTML = '⍝ Light';\n");
buf.append("} else {\n"); buf.append("} else {\n");
buf.append("\tswitchTheme.innerHTML = '⍝ Dark';\n"); buf.append("\tswitchTheme.innerHTML = '⍝ Dark';\n");

View file

@ -20,7 +20,7 @@
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
body { html {
background-color: var(--body-background-color); background-color: var(--body-background-color);
color: var(--body-text-color); color: var(--body-text-color);
} }
@ -101,7 +101,7 @@ ul.blockList ul.blockList ul.blockList ul.blockList li.blockListLast {
border-bottom:none; border-bottom:none;
} }
.contentContainer table, .classUseContainer table, .constantValuesContainer table { .contentContainer table, .classUseContainer table, .constantValuesContainer table {
border-bottom:1px solid var(--border-color); border-bottom:1px solid var(--table-border-color);
} }
.contentContainer .description table, .contentContainer .details table { .contentContainer .description table, .contentContainer .details table {
border-bottom:none; border-bottom:none;
@ -127,20 +127,19 @@ caption a:link, caption a:hover, caption a:active, caption a:visited {
} }
th.colFirst, th.colLast, th.colOne, .constantValuesContainer th { th.colFirst, th.colLast, th.colOne, .constantValuesContainer th {
background:var(--subnav-background-color); background:var(--subnav-background-color);
border-top:1px solid var(--border-color); border-top:1px solid var(--table-border-color);
border-bottom:1px solid var(--border-color); border-bottom:1px solid var(--table-border-color);
} }
td.colFirst, th.colFirst { td.colFirst, th.colFirst {
border-left:1px solid var(--border-color); border-left:1px solid var(--table-border-color);
} }
td.colLast, th.colLast { td.colLast, th.colLast {
border-right:1px solid var(--border-color); border-right:1px solid var(--table-border-color);
} }
td.colOne, th.colOne { td.colOne, th.colOne {
border-right:1px solid var(--border-color); border-right:1px solid var(--table-border-color);
border-left:1px solid var(--border-color); border-left:1px solid var(--table-border-color);
} }
.sourceLineNo { .sourceLineNo {
color: var(--snippet-highlight-color); color: var(--snippet-highlight-color);
} }

View file

@ -108,6 +108,3 @@ h1.hidden {
.strong { .strong {
font-weight:bold; font-weight:bold;
} }

View file

@ -29,12 +29,9 @@ a:hover, a:focus {
a:active { a:active {
text-decoration:none; text-decoration:none;
} }
a[name] {
}
a[name]:hover { a[name]:hover {
text-decoration:none; text-decoration:none;
} }
ul { ul {
list-style-type:disc; list-style-type:disc;
} }
@ -68,5 +65,3 @@ ul.blockList li.blockList, ul.blockListLast li.blockList {
ul.blockList ul.blockList ul.blockList ul.blockList li.blockListLast { ul.blockList ul.blockList ul.blockList ul.blockList li.blockListLast {
list-style:none; list-style:none;
} }

View file

@ -173,8 +173,8 @@ table tr td dl, table tr td dl dt, table tr td dl dd {
.overviewSummary caption span, .packageSummary caption span, .contentContainer ul.blockList li.blockList caption span, .summary caption span, .classUseContainer caption span, .constantValuesContainer caption span { .overviewSummary caption span, .packageSummary caption span, .contentContainer ul.blockList li.blockList caption span, .summary caption span, .classUseContainer caption span, .constantValuesContainer caption span {
padding-top:6px; padding-top:6px;
padding-bottom:2px; padding-bottom:2px;
padding-left:8px; padding-left:6px;
padding-right:8px; padding-right:2px;
} }
ul.blockList ul.blockList li.blockList table { ul.blockList ul.blockList li.blockList table {
margin:0px 0px 12px 0px; margin:0px 0px 12px 0px;
@ -205,4 +205,3 @@ table.overviewSummary {
.block { .block {
margin:3px 0px 0px 0px; margin:3px 0px 0px 0px;
} }

View file

@ -23,8 +23,7 @@
:root { :root {
/* body, block and code fonts */ /* body, block and code fonts */
--body-font-family: 'DejaVu Sans', Arial, Helvetica, sans-serif; --body-font-family: 'DejaVu Sans', Arial, Helvetica, sans-serif;
--block-font-family: 'DejaVu Serif', Georgia, "Times New Roman", Times, --block-font-family: 'DejaVu Serif', Georgia, "Times New Roman", Times, serif;
serif;
--code-font-family: 'DejaVu Sans Mono', monospace; --code-font-family: 'DejaVu Sans Mono', monospace;
/* Base font sizes for body and code elements */ /* Base font sizes for body and code elements */
--body-font-size: 14px; --body-font-size: 14px;

View file

@ -1,6 +1,6 @@
function createCookie(name, value, days) { function createCookie(name, value, days) {
expires = ""; let expires = "";
if (days) { if (days) {
let date = new Date(); let date = new Date();
date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000)); date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000));
@ -11,15 +11,17 @@ function createCookie(name, value, days) {
function readCookie(name) { function readCookie(name) {
let nameEQ = name + "="; let nameEQ = name + "=";
let ca = document.cookie.split(';'); let ca = document.cookie.split(";");
for (let i = 0; i < ca.length; i++) { for (let i = 0; i < ca.length; i++) {
let c = ca[i]; let c = ca[i];
while (c.charAt(0) == ' ') c = c.substring(1, c.length); while (c.charAt(0) === " ") {
if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length, c.length); c = c.substring(1, c.length);
}
if (c.indexOf(nameEQ) === 0) {
return c.substring(nameEQ.length, c.length);
}
} }
return null; return null;
} }
document.addEventListener('DOMContentLoaded', () => { document.documentElement.setAttribute("data-theme", readCookie("theme"));
document.documentElement.setAttribute('data-theme', readCookie("theme"));
})

View file

@ -21,19 +21,17 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
:root { html:not([data-theme="dark"]) {
--body-font-family: Arial, Helvetica, sans-serif; --body-font-family: Arial, Helvetica, sans-serif;
--body-font-size: 76%; --body-font-size: 76%;
--link-color: #4c6b87; --link-color: #4c6b87;
--border-color: #9eadc0; --border-color: #9eadc0;
--table-border-color: var(--border-color);
--block-text-color: #4E4E4E; --block-text-color: #4E4E4E;
--detail-background-color: #dee3e9; --detail-background-color: #dee3e9;
--section-background-color: #f9f9f9; --section-background-color: #f9f9f9;
--selected-background-color: #bb7a2a; --selected-background-color: #bb7a2a;
--snippet-highlight-color: green; --snippet-highlight-color: green;
}
html:not([data-theme="dark"]) {
.tab { .tab {
background-image:url(titlebar.png); background-image:url(titlebar.png);
background-position:left top; background-position:left top;
@ -57,6 +55,7 @@ html:not([data-theme="dark"]) {
} }
html[data-theme="dark"] { html[data-theme="dark"] {
--body-font-size: 76%;
--body-text-color: #e0e0e3; --body-text-color: #e0e0e3;
--block-text-color: #e6e7ef; --block-text-color: #e6e7ef;
--body-background-color: #404040; --body-background-color: #404040;
@ -77,7 +76,7 @@ html[data-theme="dark"] {
--snippet-text-color: var(--block-text-color); --snippet-text-color: var(--block-text-color);
--snippet-highlight-color: #f7c590; --snippet-highlight-color: #f7c590;
--border-color: #383838; --border-color: #383838;
--table-border-color: #000000; --table-border-color: #222222;
--search-input-background-color: #000000; --search-input-background-color: #000000;
--search-input-text-color: #ffffff; --search-input-text-color: #ffffff;
--search-input-placeholder-color: #909090; --search-input-placeholder-color: #909090;
@ -86,4 +85,8 @@ html[data-theme="dark"] {
--copy-button-background-color-active: rgba(168, 168, 176, 0.3); --copy-button-background-color-active: rgba(168, 168, 176, 0.3);
--invalid-tag-background-color: #ffe6e6; --invalid-tag-background-color: #ffe6e6;
--invalid-tag-text-color: #000000; --invalid-tag-text-color: #000000;
.overviewSummary caption, .packageSummary caption, .contentContainer ul.blockList li.blockList caption, .summary caption, .classUseContainer caption, .constantValuesContainer caption {
border-left: solid 1px var(--table-border-color);
}
} }