-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add styling to activity certificates (#306)
Co-authored-by: Rui Lopes <76881129+RuiL1904@users.noreply.github.com>
- Loading branch information
1 parent
e8a33fd
commit 2b9b137
Showing
7 changed files
with
108 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
86 changes: 70 additions & 16 deletions
86
lib/atomic_web/templates/pdf/activity_certificate.html.eex
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,73 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<meta http-equiv="Content-Type" content="text/html charset=UTF-8" /> | ||
</head> | ||
<body> | ||
<div> | ||
<h1>Certificado de Participação</h1> | ||
<h2><%= @enrollment.activity.title %></h2> | ||
|
||
<p> | ||
Certifica-se que <%= @enrollment.user.name %> participou na atividade <%= @enrollment.activity.title %>. | ||
</p> | ||
|
||
<p>Este certificado foi gerado automaticamente pela plataforma <i>open-source</i> de gestão de núcleos <a href="https://github.com/cesium/atomic">Atomic</a></p> | ||
</div> | ||
</body> | ||
<head> | ||
<title>Certificado <%= @activity.title %></title> | ||
<meta charset="UTF-8" /> | ||
<meta name="viewport" content="width=device-width" /> | ||
<style> | ||
/* Inline styles */ | ||
.container { | ||
background: url('<%= AtomicWeb.Endpoint.url() <> "/images/atomic_background.svg" %>') no-repeat center; | ||
text-align: center; | ||
width: 1500px; | ||
height: 1045px; | ||
margin: auto; | ||
padding: 0; | ||
} | ||
.title { | ||
font-size: 62px; | ||
color: #fb923c; | ||
font-weight: bolder; | ||
padding-top: 36px; | ||
margin-bottom: 120px; | ||
} | ||
.content { | ||
font-size: 24px; | ||
text-align: justify; | ||
padding: 32px; | ||
} | ||
.name { | ||
font-size: 72px; | ||
font-weight: bold; | ||
text-align: center; | ||
text-decoration: underline; | ||
width: 100%; | ||
display: block; | ||
margin-top: 32px; | ||
margin-bottom: 32px; | ||
} | ||
.organization { | ||
font-size: 24px; | ||
text-align: justify; | ||
} | ||
.note { | ||
position: absolute; | ||
bottom: 0; | ||
font-size: 12px; | ||
text-align: center; | ||
padding-left: 24px; | ||
padding-right: 24px; | ||
padding-bottom: 10px; | ||
} | ||
.note a { | ||
color: indigo; | ||
text-decoration: underline; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
<div class="container"> | ||
<div class="title">Certificado de Participação</div> | ||
<p class="content"> | ||
Para os devidos efeitos, certifica-se que | ||
</p> | ||
<span class="name"><%= @enrollment.user.name %></span> | ||
<p class="content"> | ||
participou na atividade <span class="organization"><%= @activity.title %></span>, organizada pelo(a) <span class="organization"><%= @organization.name %></span>. | ||
</p> | ||
<p class="note"> | ||
Este certificado foi gerado automaticamente pela plataforma <i>open-source</i> de gestão de núcleos <a href="https://github.com/cesium/atomic">Atomic</a>, sendo da exclusiva responsabilidade do Centro de Estudantes de Engenharia de Informática da Universidade do Minho, com a devida autorização da organização dinamizadora da atividade. | ||
</p> | ||
</div> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters