Skip to content

Commit

Permalink
Revise editorial article print styles
Browse files Browse the repository at this point in the history
  • Loading branch information
rlskoeser committed Sep 5, 2023
1 parent bf17f86 commit 0999a37
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 23 deletions.
10 changes: 3 additions & 7 deletions ppa/editorial/templates/editorial/editorial_page.html
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,11 @@
{% include 'editorial/snippets/attribution.html' with page=page add_urls=True full=True %}
{% endblock %}

{% block page_footer %}
{#* elements for PDF header & footer #}
{% block content %}
{#* elements for PDF header & footer; must occur BEFORE content #}
<section class='print-only'>
<a class="first-page-header" href="{{ site.domain }}">
<img class="ppa-logo" src="{% static 'img/logos/filled/logo-filled-monochrome.svg' %}" alt="Princeton Prosody Archive" />
</a>

<a class="page-header" href="{{ site.domain }}">
<img class="ppa-logo" src="{% static 'img/logos/filled/logo-filled-monochrome.svg' %}" alt="Princeton Prosody Archive" />
<img src="{% static 'img/logotype/logotype.svg' %}" alt="Princeton Prosody Archive" />
</a>

{% if page.doi %}
Expand Down
42 changes: 26 additions & 16 deletions srcmedia/scss/print.scss
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
}

@bottom-left {
content: element(page-footer);
content: string(doi);
opacity: 1;
font-size: 11px;
font-weight: 300;
Expand All @@ -43,29 +43,36 @@


@page :first {
/* don't display article title on first page */
/* don't display article title on top left of first page */
@top-left {
content: '';
}
@top-right {
content: element(first-page-header);
}
}

// pagedjs page container somewhere is inheriting site dark background;
// override to aid debugging
.pagedjs_pages {
background-color: white;
}


a.page-header {
position: running(page-header);
}
a.first-page-header {
position: running(first-page-header);
opacity: 1;

img {
height: 50px;

}
}

h1.page-title {
position: running(header-title);
// use text contents for title in header
string-set: title content();
}

a.page-doi {
position: running(page-footer);
a.doi {
string-set: doi content();
}


Expand Down Expand Up @@ -103,10 +110,10 @@
}

// avoid page break beween heading and paragraph that follows immediately after
h2 + p,
/* h2 + p,
h3 + p {
page-break-before: avoid;
}
} */

#editorial header .meta {
font-size: 1rem;
Expand All @@ -123,7 +130,8 @@

time {
&:before {
display: none; // suppress slash used for screen
// suppress slash used for screen
display: none !important;
}
}
.pdf { // hide link to pdf (since this is used to generate pdf)
Expand All @@ -137,9 +145,11 @@
#footer,
.ribbon-box {
display: none;
opacity: 0;
height: 0;
}

.ppa-logo {
/* .ppa-logo {
position: running(page-header);
}
} */
}

0 comments on commit 0999a37

Please sign in to comment.