Skip to content

Commit

Permalink
rework docs.css and css in sql2html.pl
Browse files Browse the repository at this point in the history
  • Loading branch information
bbannon committed Sep 25, 2023
1 parent b311aa6 commit 1703228
Show file tree
Hide file tree
Showing 3 changed files with 264 additions and 173 deletions.
13 changes: 11 additions & 2 deletions docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand All @@ -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 \
Expand All @@ -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 \
Expand All @@ -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 \
Expand Down
87 changes: 44 additions & 43 deletions docs/sql2html.pl
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -26,11 +26,10 @@ sub td {

sub print_table {
$out{ $name } = '
<h3><a name="' . $name . '">' . $name . '</a></h3>
<h3><a name="' . "$name\">$name" . '</a></h3>
<blockquote>';
$out{ $name } .= '
' . $description . '<br><br>'
if ( defined ( $description ) );
' . $description . '<br><br>' if ( defined ( $description ) );
$out{ $name } .= '
<table summary="Schema for table ' . $name . '">
<tr>'
Expand Down Expand Up @@ -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 ( <F> ) {
if ( /PROGRAM_VERSION =/ ) {
if ( /'/ ) {
Expand Down Expand Up @@ -192,56 +190,59 @@ sub print_table {
<head>
<title>WebCalendar Database Documentation</title>
<link href="../includes/css/docs.css" rel="stylesheet">
<style> <!--
#DB_Doc blockquote {
left-margin:15px;
}
#DB_Doc p {
margin:0;
padding:0;
}
#DB_Doc label {
clear:left;
float:left;
width:13%;
font-weight:bold;
line-height:120%;
<style>
span {
color: rgb(160, 0, 0);
font-weight: bold;
}
table {
border:0;
padding:1px;
padding: 1px;
}
th {
vertical-align:top;
background-color:#C0C0C0;
background-color: rgb(192, 192, 192);
}
td {
vertical-align:top;
padding:2px;
background-color:#E0E0E0;
background-color: rgb(224, 224, 224);
padding: 2px;
}
span {
font-weight:bold;
color:#A00000;
} -->
th,
td {
vertical-align: top;
}
#DB_Doc blockquote {
margin-inline-start: 15px;
}
#DB_Doc label {
clear: left;
float: left;
inline-size: 13%;
font-weight: bold;
line-height: 120%;
}
#DB_Doc p {
margin: 0;
padding: 0;
}
</style>
</head>
<body>
<h2>WebCalendar Database Documentation</h2>
<div id="DB_Doc">
<p><label>Home Page:</label>
<a href="http://k5n.us/webcalendar.php">http://k5n.us/webcalendar.php</a></p>
<p><label>Author:</label><a href="http://k5n.us">Craig Knudsen</a>,
<a href="mailto:&#109;&#097;&#105;&#108;&#116;&#111;&#058;&#67;&#114;&#97;&#105;&#103;&#64;&#107;&#53;&#110;&#46;&#117;&#115;">&#67;&#114;&#97;&#105;&#103;&#64;&#107;&#53;&#110;&#46;&#117;&#115;</a></p>
<p></p><label>Version:</label>$v</p>
<p><label>Home Page:</label> <a href="http://k5n.us/webcalendar" target="_blank">http://k5n.us/webcalendar</a></p>
<p><label>Author:</label><a href="http://k5n.us" target="_blank">Craig Knudsen</a>,<a href="mailto:&#109;&#097;&#105;&#108;&#116;&#111;&#058;&#67;&#114;&#97;&#105;&#103;&#64;&#107;&#53;&#110;&#46;&#117;&#115;">&#67;&#114;&#97;&#105;&#103;&#64;&#107;&#53;&#110;&#46;&#117;&#115;</a></p>
<p><label>Version:</label>$v</p>
</div>
<blockquote>
<p>This file is generated from <tt>tables-mysql.sql</tt>. 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.</p>
<p>If you update the SQL for WebCalendar, use the sql2html.pl script to
regenerate this file.</p>
<p>This file is generated from <span class="tt">tables-mysql.sql</span>. 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.</p>
<p>If you update the SQL for WebCalendar, use the sql2html.pl script to regenerate this file.</p>
</blockquote>
<br><br>
<h2>List of Tables</h2>
Expand Down
Loading

1 comment on commit 1703228

@bbannon
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trying to eliminate the need for !important
Arranging selectors from lowest to highest specificity. Mostly.
Shortening the file by combining some things.

Please sign in to comment.