fmard/pdf-api
0
1<!DOCTYPE html>2<html lang="en">3<head>4 <meta charset="UTF-8">5 <title>{{ assignment_title | default('Assignment') }}</title>6 <style>7 * { margin: 0; padding: 0; box-sizing: border-box; }8 body {9 font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;10 padding: 40px;11 font-size: 14px;12 line-height: 1.6;13 color: #1f2937;14 }15 .title-page {16 text-align: center;17 border: 2px solid #4f46e5;18 padding: 50px 35px;19 margin-bottom: 35px;20 border-radius: 8px;21 position: relative;22 }23 .title-page::before {24 content: '';25 position: absolute;26 top: 5px; left: 5px; right: 5px; bottom: 5px;27 border: 1px solid #e5e7eb;28 border-radius: 5px;29 pointer-events: none;30 }31 .title-page .institution {32 font-size: 18px;33 font-weight: 700;34 color: #374151;35 text-transform: uppercase;36 letter-spacing: 1.5px;37 margin-bottom: 30px;38 }39 .title-page .course {40 font-size: 15px;41 color: #4f46e5;42 font-weight: 600;43 margin-bottom: 5px;44 }45 .title-page .course-code {46 font-size: 12px;47 color: #6b7280;48 margin-bottom: 30px;49 }50 .title-page h1 {51 font-size: 24px;52 color: #1f2937;53 margin-bottom: 30px;54 line-height: 1.3;55 }56 .title-page .divider {57 width: 80px;58 height: 3px;59 background: #4f46e5;60 margin: 0 auto 25px;61 }62 .title-page .meta {63 font-size: 13px;64 color: #374151;65 }66 .title-page .meta p {67 margin-bottom: 5px;68 }69 .title-page .meta strong {70 color: #4f46e5;71 display: inline-block;72 min-width: 110px;73 }74 .content-section {75 margin-bottom: 28px;76 page-break-inside: avoid;77 }78 .content-heading {79 font-size: 17px;80 font-weight: 700;81 color: #4f46e5;82 border-bottom: 2px solid #e5e7eb;83 padding-bottom: 6px;84 margin-bottom: 14px;85 }86 .content-body {87 text-align: justify;88 }89 .page-divider {90 border: none;91 border-top: 1px dashed #d1d5db;92 margin: 30px 0;93 }94 </style>95</head>96<body>97 <div class="title-page">98 <div class="institution">{{ institution_name | default('University Name') }}</div>99 <div class="course">{{ course_name | default('Course Name') }}</div>100 <div class="course-code">{{ course_code | default('CS101') }}</div>101 <h1>{{ assignment_title | default('Assignment Title') }}</h1>102 <div class="divider"></div>103 <div class="meta">104 <p><strong>Student Name:</strong> {{ student_name | default('Student Name') }}</p>105 <p><strong>Student ID:</strong> {{ student_id | default('00000000') }}</p>106 <p><strong>Instructor:</strong> {{ instructor_name | default('Instructor Name') }}</p>107 {% if due_date %}108 <p><strong>Due Date:</strong> {{ due_date }}</p>109 {% endif %}110 {% if submission_date %}111 <p><strong>Submitted:</strong> {{ submission_date }}</p>112 {% endif %}113 </div>114 </div>115 116 <hr class="page-divider">117 118 {% for section in content_sections | default([{'heading': 'Introduction', 'body': 'This section introduces the topic of the assignment and provides context for the discussion that follows. The purpose of this work is to explore and analyze the key concepts presented in the course material.'}, {'heading': 'Discussion', 'body': 'This section contains the main body of the assignment with detailed analysis, supported arguments, and references to relevant literature. The discussion examines multiple perspectives on the topic.'}, {'heading': 'Conclusion', 'body': 'This section summarizes the key findings and provides concluding remarks. Recommendations for further study are also presented based on the analysis conducted.'}]) %}119 <div class="content-section">120 <div class="content-heading">{{ section.heading }}</div>121 <div class="content-body">{{ section.body }}</div>122 </div>123 {% endfor %}124</body>125</html>126 