Skip to content

Commit

Permalink
Change byline h4 to be p. (#84)
Browse files Browse the repository at this point in the history
This removes them from the PDF table of contents.
  • Loading branch information
AncientBison committed Nov 13, 2023
1 parent ceb39f9 commit 017cee1
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 7 deletions.
4 changes: 2 additions & 2 deletions goosepaper/story.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def __init__(
self.placement_preference = placement_preference

def to_html(self) -> str:
byline_h4 = f"<h4 class='byline'>{self.byline}</h4>" if self.byline else ""
byline_p = f"<p class='byline'>{self.byline}</p>" if self.byline else ""
priority_class = {
StoryPriority.DEFAULT: "",
StoryPriority.LOW: "priority-low",
Expand All @@ -48,7 +48,7 @@ def to_html(self) -> str:
return f"""
<article class="story">
{headline}
{byline_h4}
{byline_p}
{self.body_html}
</article>
"""
8 changes: 6 additions & 2 deletions goosepaper/styles.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def get_css(self, font_size: int = None):
.stories {{
font-size: {font_size}pt !important;
}}
article>h4.byline {{
article>.byline {{
font-size: {font_size}pt !important;
}}
"""
Expand Down Expand Up @@ -126,12 +126,16 @@ def read_default_style(self): # code copied from FifthAvenueStyle
margin-bottom: 0.15em;
}
article>h4.byline {
article>.byline {
font-family: "Open Sans";
font-size: 14pt;
font-weight: 400;
text-indent: 0;
border-bottom: 1px solid #dedede;
margin-top: 1.33em;
margin-bottom: 1.33em;
margin-left: 0;
margin-right: 0;
}
article>h3 {
Expand Down
6 changes: 5 additions & 1 deletion styles/Academy/stylesheet.css
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,15 @@ article>h1.priority-low {
text-indent: 0;
margin-bottom: 0.15em;
}
article>h4.byline {
article>.byline {
font-family: "Times New Roman";
font-size: 14pt;
font-weight: 400;
text-indent: 0;
margin-top: 1.33em;
margin-bottom: 1.33em;
margin-left: 0;
margin-right: 0;
}
article>h3 {
font-family: "Times New Roman";
Expand Down
6 changes: 5 additions & 1 deletion styles/Autumn/stylesheet.css
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,16 @@ article>h1.priority-low {
border-bottom: 1px solid #dedede;
margin-bottom: 0.15em;
}
article>h4.byline {
article>.byline {
font-family: "Oswald";
font-size: 14pt;
font-weight: 400;
text-indent: 0;
border-bottom: 1px solid #dedede;
margin-top: 1.33em;
margin-bottom: 1.33em;
margin-left: 0;
margin-right: 0;
}
article>h3 {
font-family: "Oswald";
Expand Down
6 changes: 5 additions & 1 deletion styles/FifthAvenue/stylesheet.css
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,16 @@ article>h1.priority-low {
border-bottom: 1px solid #dedede;
margin-bottom: 0.15em;
}
article>h4.byline {
article>.byline {
font-family: "Open Sans";
font-size: 14pt;
font-weight: 400;
text-indent: 0;
border-bottom: 1px solid #dedede;
margin-top: 1.33em;
margin-bottom: 1.33em;
margin-left: 0;
margin-right: 0;
}
article>h3 {
font-family: "Open Sans";
Expand Down

0 comments on commit 017cee1

Please sign in to comment.