From c5a514ac0d29a58a79a708771fe4b2a16d400031 Mon Sep 17 00:00:00 2001 From: Jeffrey Armstrong Date: Wed, 12 May 2021 14:21:05 -0400 Subject: Added some CSS styling. Fixed checks for zero-length pointers since it seems to freak out Fortran. --- captain/example/static/style.css | 98 ++++++++++++++++++++++++++++++++++++++++ captain/postutils.f90 | 4 -- captain/requtils.f90 | 18 +++++++- captain/templates/index.html | 2 +- captain/web.f90 | 9 ++-- 5 files changed, 119 insertions(+), 12 deletions(-) create mode 100644 captain/example/static/style.css diff --git a/captain/example/static/style.css b/captain/example/static/style.css new file mode 100644 index 0000000..0a7a556 --- /dev/null +++ b/captain/example/static/style.css @@ -0,0 +1,98 @@ +body { + font-family: Sans-Serif; + margin:0; + padding:0; + font-size: 1.0em; +} + +.heading { + background-color: #ddd; + margin:0; + padding:0; + border-bottom: 1px solid #333333; + width:100%; + top: 0px; + font-weight: 600; + position: fixed; +} + + +.heading li a:link, #headerlinks li a:active { + color: #000; + text-decoration: none; +} + +.heading li a:visited { + color: #000; +} + +.heading ul { + margin-left: 0px; + padding-left: 0px; + margin-right:1.2em; + list_style: none; + float: right; +} + +.heading li { + margin-left: 0px; + padding-left: 5px; + padding-right: 5px; + display: inline; +} + +.heading h1 { + margin-top: 0.2em; + margin-bottom: 0px; + padding: 0; + margin-left:5px; + margin-right:5px; + font-size:1.8em; +} + + +.content { + margin-top: 80px; + clear:both; + margin-left: 1em; + margin-right: 1em; + margin-bottom: 30px; +} + +.footing { + border-top: 1px solid #333333; + text-align: center; + font-size: small; +} + +.joblist { + list-style-type: none; +} + +.job_result_listitem { + font-size: small; + border: 1px solid #333333; + width: 300px; + margin-top: 5px; + margin-bottom: 5px; + padding-left: 10px; + padding-right: 10px; +} + +.failure { + background-color: #fcc; +} + +.success { + background-color: #cfc; +} + +.working { + background-color: #ffc; +} + +@media only screen and (max-width: 590px) { + .heading h1 { + display:none; + } +} diff --git a/captain/postutils.f90 b/captain/postutils.f90 index 2961f98..1d4c666 100644 --- a/captain/postutils.f90 +++ b/captain/postutils.f90 @@ -22,14 +22,12 @@ contains else content_length = 0 end if - call write_log("Content Length is: "//trim(header_info), LOG_DEBUG) call get_environment_variable("CONTENT_TYPE", header_info, status=istat) if(content_length > 0 .and. & istat == 0 .and. & trim(header_info) == content_type_required) & then - call write_log("Processing post", LOG_DEBUG) allocate(character(len=content_length) :: transfered) @@ -42,8 +40,6 @@ contains deallocate(transfered) end if - - call write_log("Content Type is: "//trim(header_info), LOG_DEBUG) end function read_post_contents diff --git a/captain/requtils.f90 b/captain/requtils.f90 index cb52113..d2ffb29 100644 --- a/captain/requtils.f90 +++ b/captain/requtils.f90 @@ -231,7 +231,7 @@ contains if(gemini_mode) then res = " " else - res ="