More progress on moving to the box layout
authorArt Cancro <ajc@citadel.org>
Fri, 2 Sep 2022 15:29:03 +0000 (11:29 -0400)
committerArt Cancro <ajc@citadel.org>
Fri, 2 Sep 2022 15:29:03 +0000 (11:29 -0400)
webcit-ng/caldav_reports.c
webcit-ng/static/css/webcit.css
webcit-ng/static/index.html

index ce98e918cc4e7d45ae68b77a1727872838f97821..9bcca613fd9873c9f4a69e28f35d41dbb0138d61 100644 (file)
@@ -160,8 +160,9 @@ void caldav_response(struct http_transaction *h, struct ctdlsession *c, StrBuf *
        }
 
        char *unescaped_euid = strdup(euid);
-       if (!unescaped_euid)
+       if (!unescaped_euid) {
                return;
+       }
        unescape_input(unescaped_euid);
 
        StrBufAppendPrintf(ReportOut, "<D:response>");
@@ -240,8 +241,13 @@ void caldav_report(struct http_transaction *h, struct ctdlsession *c) {
        // Now begin the REPORT.
        syslog(LOG_DEBUG, "CalDAV REPORT type is: %d", crp.report_type);
        StrBuf *ReportOut = NewStrBuf();
-       StrBufAppendPrintf(ReportOut, "<?xml version=\"1.0\" encoding=\"utf-8\"?>"
-                          "<D:multistatus " "xmlns:D=\"DAV:\" " "xmlns:C=\"urn:ietf:params:xml:ns:caldav\"" ">");
+       StrBufAppendPrintf(ReportOut,
+               "<?xml version=\"1.0\" encoding=\"utf-8\"?>"
+               "<D:multistatus "
+               "xmlns:D=\"DAV:\" "
+               "xmlns:C=\"urn:ietf:params:xml:ns:caldav\""
+               ">"
+       );
 
        if (crp.Hrefs != NULL) {        // Output all qualifying calendar items!
                StrBuf *ThisHref = NewStrBuf();
index a9a99f7caa41cd1b5068e69503c87f1b8317be3d..f4dd27364e9d5bc1ef018afac08431ef74a9ced8 100644 (file)
 
 .ctdl-grid-banner-item {               /* These grid items will be referenced in the grid container */
        grid-area: header;
+       background-color: #282a35;
 }
 
 .ctdl-grid-navbar-item {
        grid-area: menu;
+       background-color: GhostWhite;
 }
 
 .ctdl-grid-main-item {
 
 .ctdl-main-grid-container {                    /* This is so mind-bogglingly simple I can't believe it works */
        display: grid;
+       grid-template-rows: 100px auto;
+       grid-template-columns: 200px auto;
        grid-template-areas:
-               'header header header header header header'
-               'menu main main main main main'
-               'menu main main main main main'
-               'menu main main main main main'
-               'menu main main main main main'
-               'menu main main main main main'
-               'menu main main main main main'
-               'menu main main main main main';
+               'header header'
+               'menu main';
        gap: 3px;
-       background-color: #456789;      /* This is the color of the lines between the boxes */
+       background-color: #456789;      /* This is the color of the lines between the boxes, and also the boxes themselves if not overridden */
        padding: 0;                     /* This is the border around the edges of the screen */
        width: 100vw;
        height: 100vh;
 }
 
 .ctdl-main-grid-container > div {
-       background-color: #DDEEFF;
        text-align: left;
        padding: 10px 0;
 }
 
+.ctdl-banner-buttons li {              /* Buttons that appear in the top banner are list items that reference this class */
+       float: left;
+       display: block;
+       padding: 8px;
+       background-color: #282a35;
+       color: white;
+}
+
+.ctdl-banner-buttons li:hover {                /* Buttons that appear in the top banner also reference this class when hovered over */
+       background-color: black;
+}
+
 html,body,h1,h2,h3,h4,h5 {
-       font-family: verdana, sans-serif
+       font-family: sans-serif
 }
 
 .ctdl-modal {
@@ -64,7 +73,7 @@ html,body,h1,h2,h3,h4,h5 {
        justify-content: center;
        align-items: center;
        padding: 10px;
-       background-color: #DDDDDD;
+       background-color: #BBBBBB;
 }
 
 .ctdl-sidebar-class button {
index fff7dc870c1f14a8bb092a462da93e17b0425dbb..a2f5b1c87549f5482e9ba88fa5b3f3e44d120474 100644 (file)
@@ -21,15 +21,22 @@ MODAL LOADING
 
 <div class="ctdl-main-grid-container">
 
+       <!-- The style for these appears in webcit.css and was inspired by https://www.w3schools.com/css/css_navbar_horizontal.asp -->
        <div class="ctdl-grid-banner-item" id="banner">
-               <button onClick="sidebar_open();"><i class="fa fa-bars"></i>Menu</button>
-               <span id="ctdl-logo">CITADEL</span>
-               <span id="ctdl_banner_title" class="w3-bar-item">---</span>
-               <button id="ctdl-newmsg-button" style="display:none" onClick="entmsg_dispatcher();">enter</button>
-               <button id="ctdl-ungoto-button" style="display:none" onClick="gotonext(0);">ungoto</button>
-               <button id="ctdl-skip-button" style="display:none" onClick="gotonext(1);">skip</button>
-               <button id="ctdl-goto-button" style="display:none" onClick="gotonext(2);">goto</button>
-               <button id="lilo">Login</button>
+               <!-- These items float to the LEFT side of the banner -->
+               <ul class="ctdl-banner-buttons" style="float:left">
+                       <li id="ctdl-sidebar-open" onClick="sidebar_open();"><i class="fa fa-bars"></i>Menu</li>
+                       <li id="ctdl-logo">CITADEL</li>
+                       <li id="ctdl_banner_title">---</li>
+               </ul>
+               <!-- These items float to the RIGHT side of the banner -->
+               <ul class="ctdl-banner-buttons" style="float:right">
+                       <li id="ctdl-newmsg-button" style="display:none" onClick="entmsg_dispatcher();">enter</li>
+                       <li id="ctdl-ungoto-button" style="display:none" onClick="gotonext(0);">ungoto</li>
+                       <li id="ctdl-skip-button" style="display:none" onClick="gotonext(1);">skip</li>
+                       <li id="ctdl-goto-button" style="display:none" onClick="gotonext(2);">goto</li>
+                       <li id="lilo">Login</button>
+               </ul>
        </div>
 
        <div class="ctdl-grid-navbar-item" id="navbar">