Skip to content

Commit

Permalink
Merge pull request #86 from adinhodovic/resume-compact-printing
Browse files Browse the repository at this point in the history
feat: Compact resume printing
  • Loading branch information
adinhodovic authored May 4, 2024
2 parents 7155d4a + 70e665f commit 3bacc81
Show file tree
Hide file tree
Showing 4 changed files with 64 additions and 12 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ build-backend = "poetry.core.masonry.api"
name = "wagtail-resume"
authors = ["Adin Hodovic <[email protected]>"]
license = "MIT"
version = "2.8.0"
version = "2.9.0"
readme = "README.md"
homepage = "https://github.com/adinhodovic/wagtail-resume"
repository = "https://github.com/adinhodovic/wagtail-resume"
Expand Down
66 changes: 59 additions & 7 deletions wagtail_resume/static/wagtail_resume/css/resume_page.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@ body {
}

p {
font-size: 1rem;
line-height: 1.5;
}

li {
font-size: 1rem;
}

Expand Down Expand Up @@ -108,8 +112,6 @@ a {
}

.photo {
margin-bottom: 2.5rem;
margin-top: 1rem;
border-radius: 50%;
width: 250px;
}
Expand All @@ -126,11 +128,6 @@ a {
color: #5b5b55;
}

.fas,
.fab {
font-size: 1.5rem;
}

.pdf {
display: None;
}
Expand Down Expand Up @@ -181,3 +178,58 @@ a {
width: 45%;
}
}

/* Print styles */
@media print {
h1 {
font-size: 1.3rem;
}

h2 {
font-size: 1.1rem;
}

p,
li,
h3,
a {
font-size: 0.8rem;
}

.mt-1 {
margin-top: 0.125rem;
}

.mb-1 {
margin-bottom: 0.125rem;
}

.mb-2 {
margin-bottom: 0.25rem;
}

.mt-2 {
margin-top: 0.25rem;
}

.mt-3 {
margin-top: 0.5rem;
}

.mt-4 {
margin-top: 1.5rem;
}

hr {
margin-top: 0.5rem;
margin-bottom: 0.5rem;
}

.social-links img {
width: 1rem;
}

.photo {
width: 200px;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ <h3 class="mb-1">
{{ experience.to_date }}
{% endif %}
</p>
<div style="margin-top: 1.5rem;">{{ experience.text | markdown }}</div>
<div class="mt-3">{{ experience.text | markdown }}</div>
{% if not forloop.last %}<hr />{% endif %}
{% endfor %}
{% if value.maximum_experiences_displayed > 0 %}
<p style="margin-top:2rem; font-weight:600; font-style: italic;">{{ value.maximum_experiences_user_text }}</p>
<h3 class="mt-4 italic">{{ value.maximum_experiences_user_text }}</h3>
{% endif %}
4 changes: 2 additions & 2 deletions wagtail_resume/templates/wagtail_resume/resume_page_body.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<body style="font-family:{% if page.font %} '{{ page.font|title }}',{% endif %} 'Roboto Condensed', sans-serif">
<div class="container">
<div class="resume">
<div class="personal-info mt-2 mb-1">
<div class="personal-info">
<div>
<h2 class="mt-2 mb-0">{{ page.full_name }}</h2>
{% if page.role %}<h2 class="mt-2">{{ page.role }}</h2>{% endif %}
Expand All @@ -45,7 +45,7 @@ <h2 class="mt-2 mb-0">{{ page.full_name }}</h2>
<p class="small italic mt-1">Last update: {{ page.latest_revision_created_at|date }}</p>
{% endif %}
</div>
<div>{% image page.photo original class="photo" %}</div>
<div class="mt-4">{% image page.photo original class="photo" %}</div>
</div>
<div>
<h2 class="mt-4 mb-0">
Expand Down

0 comments on commit 3bacc81

Please sign in to comment.