diff --git a/.DS_Store b/.DS_Store index 489dcc2..d97923f 100644 Binary files a/.DS_Store and b/.DS_Store differ diff --git a/Vm_back.png b/Vm_back.png new file mode 100644 index 0000000..2136399 Binary files /dev/null and b/Vm_back.png differ diff --git a/dogs.db b/dogs.db index b12e89d..a7b62e8 100644 Binary files a/dogs.db and b/dogs.db differ diff --git a/result_into_pdf.py b/result_into_pdf.py index dc8dbb2..39c2422 100644 --- a/result_into_pdf.py +++ b/result_into_pdf.py @@ -1,62 +1,60 @@ from fpdf import FPDF from result import Result - -#this is to test def gen_pdf(data, result: Result, temp_link: str): #this will convert json into txt, thus we use txt file to convert it into pdf format pdf = FPDF('P', 'mm', (100, 150)) - # variable pdf pdf = FPDF(format='letter') # Add a page pdf.add_page() - pdf.set_font("Times", 'B', size = 15) + pdf.set_font("Helvetica", 'B', size = 17) #this will make print the color in red pdf.set_text_color(0, 40, 85) pdf.ln(.15) pdf.set_author("Dr.Reagan") - pdf.cell(200, 0, txt = "Here is the result of the Leptospirosis Machine Learning Algorithm: ",ln = 1, align = 'L') - - pdf.set_font("Times", 'BI', size = 30) - pdf.cell(200, 100, txt = "Result: " + Result.fmt(result), ln = 1, align='C') - pdf.set_font("Times", size = 15) - # add another cell - - # the user emails - #pdf.cell(200, 0, txt = "This is the user email + " , ln = 2, align = 'C') - - # emails - pdf.cell(200, 10, border = 1, txt = "If you have any question or would like to make an inquiry please visit our website: ", ln = 2, align = 'C') - pdf.cell(200, 10, border = 1, txt= "https://drkrystlereagan.com/", ln= 1, align = 'C') - pdf.set_y(-40) - pdf.cell(200, 10, border = 1, txt = "(Copyright © 2022 UC DAVIS VETERINARY MEDICINE. All rights reserved)", ln =1, align = 'C') + pdf.cell(200, 0, txt = "Here is the result of the Leptospirosis Machine Learning Algorithm: ",ln = 0, align = 'L') + #result moved to new location + pdf.cell(200, 20, txt = "Result: " + Result.fmt(result), ln = 0, align='C') + print(Result.fmt(result)) + pdf.set_font("Helvetica", 'BI', size = 18) + pdf.set_font("Helvetica", size = 12) pdf.set_text_color(179, 163, 105) - + pdf.cell(200, 45, ln=1) i = 1; + #how to make coulmns go side by side for data_point in data: - pdf.cell(100, 10, border = 1, txt= str(data_point), align = 'C') - pdf.cell(100, 10, border = 1, txt= str(data[data_point][0]), ln= 1, align = 'C') - i += 1 + if (i == 42): + break + elif (i >= 20): + pdf.cell(100,-50) + pdf.cell(50, -8.6, border = 0, txt= str(data_point), align = 'C') + pdf.cell(50, -8.6, border = 0, txt= str(data[data_point][0]), ln= 1, align = 'C') + i += 1 + else: + pdf.cell(50, 10, border = 0, txt= str(data_point), align = 'C') + pdf.cell(50, 10, border = 0, txt= str(data[data_point][0]), ln= 1, align = 'C') + i += 1 + #does not work to send this side + + print(i) + pdf.set_font("Helvetica", 'BI', size = 20) + pdf.set_text_color(0, 40, 85) + pdf.cell(200, -20, ln=1) + pdf.cell(200, -1, txt = "Result: " + Result.fmt(result), ln = 0, align='C') + #pdf.cell(200, 200, border = 0, txt = "If you have any question or would like to make an inquiry please visit our website: ", ln = 1, align = 'C') + + #cant print the bottom parts for some reason + pdf.cell(200, 100, border = 0, txt= "https://drkrystlereagan.com/", ln= 1, align = 'C') + #pdf.set_font("Helvetica", 'B', size = 8) + #pdf.cell(200, 146, border = 0, txt = "(Copyright © 2022 UC DAVIS VETERINARY MEDICINE. All rights reserved)", ln = 1, align = 'C') # save the pdf with name .pdf print("Process completed") pdf.footer() - # additional link - #pdf image fix/position needs to be fixed - #TODO: add image to repo pdf.image('vm2.png', 110, 250, 100) - #pdf.image('vm.png', 100, 150, 100) pdf.output("./generated_pdfs/" + temp_link + ".pdf") - #return pdf.output(dest = "S").encode('latin-1') - - #will change the formatting of the fpdf - - # Here is the result of the Lepto-Classifier [logo of vm office] - - # display the result - - # credential by uc davis + diff --git a/static/contact.css b/static/contact.css index 2911907..866459d 100644 --- a/static/contact.css +++ b/static/contact.css @@ -11,6 +11,11 @@ z-index: 1; color: #002855; } + h2 { + font-size: .4rem; + z-index: 1; + color: #002855; + }; .box { height: 3rem; display: block; @@ -59,7 +64,7 @@ margin-bottom: 5px; } #contact .contact-info h2 { - font-size: .8rem; + font-size: .6rem; line-height: 1.5rem; font-weight: 500; } diff --git a/static/git.png b/static/git.png new file mode 100644 index 0000000..de43dfc Binary files /dev/null and b/static/git.png differ diff --git a/static/help.css b/static/help.css index 986e0e4..a5fd468 100644 --- a/static/help.css +++ b/static/help.css @@ -350,7 +350,6 @@ .right { font-size: .9rem; margin-left: 0px; - margin-top: 50px; } hr { margin-left: 0px; diff --git a/static/index.css b/static/index.css index 3127daf..31ef9d7 100644 --- a/static/index.css +++ b/static/index.css @@ -267,7 +267,7 @@ text-decoration: none; color: white; text-transform: uppercase; - padding: 11px; + padding: 20px; display: block; font-weight: 900; } diff --git a/static/main.css b/static/main.css index fb97e47..f5c786e 100644 --- a/static/main.css +++ b/static/main.css @@ -217,7 +217,7 @@ text-decoration: none; color: white; text-transform: uppercase; - padding: 11px; + padding: 20px; display: block; font-weight: 900; } diff --git a/static/result.css b/static/result.css index 9c16eb6..b394d67 100644 --- a/static/result.css +++ b/static/result.css @@ -437,6 +437,9 @@ margin-left: 0px; margin-top: 50px; margin-bottom: 30px; + display: flex; + justify-content: center; + align-items: center; } hr { margin-left: 0px; diff --git a/templates/contact.html b/templates/contact.html index 0e4fc57..ec70233 100644 --- a/templates/contact.html +++ b/templates/contact.html @@ -15,7 +15,7 @@