From 17032285fa8e4005d67519f79d3456f9cfd7305b Mon Sep 17 00:00:00 2001 From: Bruce Bannon Date: Mon, 25 Sep 2023 16:44:14 -0600 Subject: [PATCH] rework docs.css and css in sql2html.pl --- docs/Makefile | 13 +- docs/sql2html.pl | 87 +++++------ includes/css/docs.css | 337 ++++++++++++++++++++++++++---------------- 3 files changed, 264 insertions(+), 173 deletions(-) diff --git a/docs/Makefile b/docs/Makefile index 928468212..63cba61bb 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -2,11 +2,11 @@ # If you have phpdoc installed, you can use that to # generate additional documentation. - all: WebCalendar-Database.html faqs.html # List include files that will be searched for function documentation INCLUDES = \ + ../about.php \ ../access.php \ ../admin.php \ ../category_handler.php \ @@ -15,9 +15,12 @@ INCLUDES = \ ../edit_layer_handler.php \ ../edit_remotes_handler.php \ ../edit_report.php \ + ../events_ajax.php \ + ../export.php \ ../export_handler.php \ ../icalclient.php \ ../import.php \ + ../import_gitlog.php \ ../import_outlookcsv.php \ ../import_palmdesktop.php \ ../includes/access.php \ @@ -27,7 +30,6 @@ INCLUDES = \ ../includes/classes/Doc.php \ ../includes/classes/DocList.php \ ../includes/classes/Event.php \ - ../includes/classes/hkit/hcal.profile.php \ ../includes/classes/RptEvent.php \ ../includes/classes/WebCalendar.php \ ../includes/classes/WebCalMailer.php \ @@ -48,12 +50,19 @@ INCLUDES = \ ../includes/xcal.php \ ../install/default_config.php \ ../install/install_functions.php \ + ../layers_ajax.php \ ../list_unapproved.php \ + ../login-app.php \ + ../pref.php \ ../purge.php \ ../register.php \ ../report.php \ + ../rss_activity_log.php \ + ../rss_unapproved.php \ + ../security_audit.php \ ../tools/send_reminders.php \ ../upcoming.php \ + ../users_ajax.php \ ../view_entry.php \ ../view_r.php \ ../view_t.php \ diff --git a/docs/sql2html.pl b/docs/sql2html.pl index 0533ca8dd..76ecdab62 100755 --- a/docs/sql2html.pl +++ b/docs/sql2html.pl @@ -3,12 +3,12 @@ # sql2html.pl # # Description: -# Create HTML documentation from a sql file. +# Create HTML documentation from an SQL file. # # Usage: # perl sql2html.pl < ../install/sql/tables-mysql.sql > WebCalendar-Database.html # -####################################################################### +################################################################################ $verbose = 0; @@ -26,11 +26,10 @@ sub td { sub print_table { $out{ $name } = ' -

' . $name . '

+

$name" . '

'; $out{ $name } .= ' - ' . $description . '

' - if ( defined ( $description ) ); + ' . $description . '

' if ( defined ( $description ) ); $out{ $name } .= ' ' @@ -64,8 +63,7 @@ sub print_table { } # first, get WebCalendar version -open ( F, '../includes/config.php' ) - || die 'Error reading config.php:' . "$!\n"; +open ( F, '../includes/config.php' ) || die "Error reading config.php: $!\n"; while ( ) { if ( /PROGRAM_VERSION =/ ) { if ( /'/ ) { @@ -192,56 +190,59 @@ sub print_table { WebCalendar Database Documentation -

WebCalendar Database Documentation

-

- http://k5n.us/webcalendar.php

-

Craig Knudsen, - Craig@k5n.us

-

$v

+

http://k5n.us/webcalendar

+

Craig Knudsen,Craig@k5n.us

+

$v

-

This file is generated from tables-mysql.sql. Below are the - definitions of all WebCalendar tables, along with some descriptions of how - each table is used. Column names shown in red are the primary keys for - that table.

-

If you update the SQL for WebCalendar, use the sql2html.pl script to - regenerate this file.

+

This file is generated from tables-mysql.sql. Below are the definitions of all WebCalendar tables, along with some descriptions of how each table is used. Column names shown in red are the primary keys for that table.

+

If you update the SQL for WebCalendar, use the sql2html.pl script to regenerate this file.



List of Tables

diff --git a/includes/css/docs.css b/includes/css/docs.css index df126dc47..a8719a827 100644 --- a/includes/css/docs.css +++ b/includes/css/docs.css @@ -1,247 +1,328 @@ +:root { + --blk: rgb(0, 0, 0); + --wht: rgb(255, 255, 255); + + --red: rgb(255, 0, 0); + --grn: rgb(0, 255, 0); + --blu: rgb(0, 0, 255); +} + +html, body { - background-color: #FFFFFF; - color: #000000; - font:16px/1.15 Arial, Helvetica, sans-serif; + margin: 0; + border: 0; + padding: 0; +} + +body { + background-color: var(--wht); + color: var(--blk); + font: 16px/1.15 Arial, Helvetica, sans-serif; +} + +* + * { + margin-block-start: 0; } + a { text-decoration: none; } + +a[target="_top"], +#upgrading th { + margin-inline-start: 95%; +} + +b, +dt, +.note, +.tip, +#styling code, +#funcs .prompt, +#wc_db table th { + font-weight: bold; +} + dl, ul { - margin-left: 10px; + margin-inline-start: 10px; } + dt { - margin-top: 10px; - font-weight: bold; + margin-block-start: 10px; } + h2 { - background-color: #191970; - color: #FFFFFF; + background-color: rgb(25, 25, 112); + color: var(--wht); } + h2, -h3 { +h3, +.ptip, +#funcs h3, +#guide h2 { padding: 5px; } + hr { - margin-bottom: 7px; + margin-block-end: 7px; } -img { + +img, +table { border: 0; } + p { margin: 10px; } + pre { - background-color: #EEEEFF; - margin-right: 25px; - margin-left: 25px; - border: 1px solid #0000FF; + background-color: rgb(238, 238, 255); + margin-inline-start: 25px; + border: 1px solid var(--blu); padding: 4px; font: 0.875rem courier, monospace; } -table { - border: 0; + +ol, +ul { + margin-block-end: 1rem; } + .colorheader { - background-color: #000000; - color: #FFFFFF; - margin-right: 3px; - margin-left: 3px; + background-color: var(--blk); + color: var(--wht); + margin-inline-end: 3px; +} + +.colorheader, +.note, +.tip { padding: 2px; } + .hide { display: none; } -.newwin { - border: 0; -} + .note { - background-color: #87CEFA; - padding: 2px; - border: 1px solid #000000; - font-weight: bold; + background-color: rgb(135, 206, 250); + border: 1px solid var(--blk); } + .nowrap { white-space: nowrap; } + .ptip { - background: #DDDDDD; - border: 1px solid #AAAAAA; - padding: 5px; + background: rgb(221, 221, 221); + border: 1px solid rgb(170, 170, 170); } + .tip { - background-color: #FFFF00; - padding: 2px; - font-weight: bold; -} -.top { - text-align: right; + background-color: rgb(255, 255, 0); } + .tt { - font: .85rem monospace; -} -.vbottom { - vertical-align: bottom; + font: 0.85rem monospace; } + .vtop { vertical-align: top; } + +.vbottom { + vertical-align: bottom; +} + #funcs blockquote { - margin-top: 5px; - margin-bottom: 5px; + margin-block: 5px; } + #funcs h3 { - background-color: #191970; - color: #FFFFFF; - padding: 5px; + background-color: rgb(25, 25, 112); + color: var(--wht); } + #funcs p { - margin-top: 2px; + margin-block-start: 2px; } + #funcs ul { - margin-top: 2px; - margin-bottom: 2px; + margin-block: 2px; } + #funcs .note { - background-color: #CCCCCC; - color: #000000; + background-color: rgb(204, 204, 204); + color: var(--blk); padding: 1px; } -#funcs .prompt { - font-weight: bold; -} + #funcs .tip { - margin-right: 10px; - border: 1px solid #000000; + margin-inline-end: 10px; + border: 1px solid var(--blk); padding: 1px 5px; } -#guide dt { - margin-left: 25px; + +:where(#guide, #sysadmin) .note { + background-color: var(--blu); + color: var(--wht); } -#guide h2 { - padding: 5px; + +#guide dt { + margin-inline-start: 25px; } + #guide tr { - background-color: #606080; - color: #F0F0F0; + background-color: rgb(96, 96, 128); + color: rgb(240, 240, 240); } + #guide th { - background-color: #000000; + background-color: var(--blk); } + #guide td { vertical-align: top; } -#guide .note, -#sysadmin .note { - background-color: blue; - color: #FFFFFF; -} + #guide .tip { - margin-right: 10px; - border: 1px solid #000000; + margin-inline-end: 10px; + border: 1px solid var(--blk); padding: 1px 5px; } -#rpt_matrix td { - text-align: center; + +#manual h3 + dl dt { + padding-inline-start: 20px; } -#styling body { - padding: 0 40px; + +#rpt_matrix { + margin-block-start: 1rem; } -#styling code { - font-weight: bold; -} -#styling div.example { - width: 350px; - margin: 0 auto; + +#rpt_matrix tr:nth-of-type(2) { + margin-inline: auto; } -#styling div.example p { - margin: 0px; - font-style: italic; - font-size: small; + +#rpt_matrix :where(th, td) { + inline-size: 100%; + margin: 1px; + border: 1px; + padding: 3px; text-align: center; } -#styling div.example pre { - background-color: #EEEEFF; - margin: 0; - border: 1px solid blue; - padding: 5px; + +#rpt_matrix td:last-of-type { + text-align: start; } + +#styling body { + padding: 0 40px; +} + #styling dt { font-family: monospace; } -#styling h1, -#styling h2 { - margin-left: -20px; + +#styling :where(h1, h2) { + margin-inline-start: -20px; } + #styling p { text-indent: 3ex; } + #styling table { margin: 0 auto; border-collapse: collapse; } -#styling td { - background-color: #DDDDDD; - color: #000000; - border: 1px solid #BBBBBB; - vertical-align: top; -} -#styling th, -#styling td { - border: 1px solid gray; + +#styling :where(th, td) { + border: 1px solid rgb(128, 128, 128); padding: 3px; } + #styling td { + background-color: rgb(221, 221, 221); + color: var(--blk); + border-color: rgb(187, 187, 187); font-family: monospace; + vertical-align: top; } + +#styling div.example { + inline-size: 350px; + margin: 0 auto; +} + +#styling div.example p { + margin: 0; + font-style: italic; + font-size: small; + text-align: center; +} + +#styling div.example pre { + background-color: rgb(238, 238, 255); + margin: 0; + border: 1px solid var(--blu); + padding: 5px; +} + #sysadmin dt { - margin-top: 20px; - margin-left: 25px; + margin-block-start: 20px; + margin-inline-start: 25px; } + #sysadmin th { - background-color: #EEEEEE; - color: #000000; - border: 1px solid #CCCCCC; + background-color: rgb(238, 238, 238); + color: var(--blk); + border: 1px solid rgb(204, 204, 204); } + #sysadmin .tip { - margin-right: 10px; - border: 1px solid #000000; + margin-inline-end: 10px; + border: 1px solid var(--blk); padding: 1px 5px; } -#upgrading table { - margin-left: 50px; -} -#upgrading th { - text-align: right; -} + #upgrading p:first-of-type { - margin-bottom: 0; + margin-block-end: 0; } + +#upgrading table { + margin-inline-start: 50px; +} + #upgrading tr { - background-color: #606080; - color: #F0F0F0; + background-color: rgb(96, 96, 128); + color: rgb(240, 240, 240); } + #upgrading td { vertical-align: top; } + #upgrading ul:first-of-type { - margin-top: 0; + margin-block-start: 0; } + #wc_db table { - width: 100%; + inline-size: 100%; border-collapse: collapse; border-spacing: 0; } -#wc_db table table, -#wc_db table th, -#wc_db table td { - border: .1rem solid #000000; -} + #wc_db table th { - background-color: #E5E5E5; - font-weight: bold; + background-color: rgb(229, 229, 229); +} + +#wc_db table :where(table, th, td) { + border: 0.1rem solid var(--blk); } -#wc_db table th, -#wc_db table td { + +#wc_db table :where(th, td) { padding: 0.2rem; }