Browse Source

Hack, hack, hack

master
Luke Murphy 5 years ago
parent
commit
acfdc09f03
No known key found for this signature in database GPG Key ID: 5E2EF5A63E3718CC
  1. 8
      Makefile
  2. 53
      header.html
  3. 53
      styles.css

8
Makefile

@ -8,11 +8,11 @@ STYLES := styles.css
WEASYPRINT := weasyprint -s $(STYLES) WEASYPRINT := weasyprint -s $(STYLES)
portfolio: portfolio:
@mkdir -p generated @mkdir -p generated && \
@$(CURL) $(PORTFOLIO) | $(PANDOC) \ $(CURL) $(PORTFOLIO) | $(PANDOC) \
--read markdown \ --read markdown \
--write html \ --write html \
--standalone \ --standalone \
--include-in-header $(HEADER) \ --include-in-header $(HEADER) \
--output $(GENERATED_DIR)/portfolio.html --output $(GENERATED_DIR)/portfolio.html && \
@$(WEASYPRINT) --presentational-hints $(GENERATED_DIR)/portfolio.html $(GENERATED_DIR)/portfolio.pdf $(WEASYPRINT) --presentational-hints $(GENERATED_DIR)/portfolio.html $(GENERATED_DIR)/portfolio.pdf

53
header.html

@ -1,5 +1,10 @@
<style type='text/css' media='screen'> <style type='text/css' media='screen'>
img {
width: 200px;
padding-left: 10px;
}
@page{ @page{
margin:5mm 12mm; margin:5mm 12mm;
} }
@ -18,14 +23,16 @@ body{
table, th, td { table, th, td {
border: 1px solid black; border: 1px solid black;
} }
table {
width: 100%; table {
margin: 20px 10px; width: 100%;
} margin: 20px 10px;
th, td{ }
padding:5px;
text-align: left; th, td{
} padding:5px;
text-align: left;
}
h1, h2, h3{ h1, h2, h3{
margin-top:1.5em; margin-top:1.5em;
@ -38,17 +45,19 @@ hr{
page-break-after: always; page-break-after: always;
} }
figure img, figure figcaption{ figure img,
max-width:320px; figure figcaption {
max-height:260px; max-width:20px;
max-height:20px;
margin: 10px 10px 0 0; margin: 10px 10px 0 0;
} }
figure figcaption{
font-family: monospace; figure figcaption {
font-size: 12px; font-family: monospace;
line-height: 1.25; font-size: 12px;
margin-bottom:20px; line-height: 1.25;
} margin-bottom:20px;
}
.img-left figure { .img-left figure {
float: left; float: left;
@ -63,12 +72,12 @@ figure img, figure figcaption{
.img-big figure{ .img-big figure{
margin:0 20px; margin:0 20px;
} }
.img-big figure img, .img-big figure figcaption{
max-width: 100%;
max-height: 100%;
clear: both;
}
.img-big figure img, .img-big figure figcaption{
max-width: 100%;
max-height: 100%;
clear: both;
}
.footnotes{ .footnotes{
page-break-before: avoid; page-break-before: avoid;

53
styles.css

@ -13,17 +13,24 @@ body{
width: 100%; width: 100%;
} }
img {
width: 200px;
padding-left: 10px;
}
table, th, td { table, th, td {
border: 1px solid black; border: 1px solid black;
} }
table {
width: 100%; table {
margin: 20px 10px; width: 100%;
} margin: 20px 10px;
th, td{ }
padding:5px;
text-align: left; th, td{
} padding:5px;
text-align: left;
}
h1, h2, h3{ h1, h2, h3{
margin-top:1.5em; margin-top:1.5em;
@ -36,17 +43,19 @@ hr{
page-break-after: always; page-break-after: always;
} }
figure img, figure figcaption{ figure img,
max-width:320px; figure figcaption {
max-height:260px; max-width:20px;
max-height:20px;
margin: 10px 10px 0 0; margin: 10px 10px 0 0;
} }
figure figcaption{
font-family: monospace; figure figcaption {
font-size: 12px; font-family: monospace;
line-height: 1.25; font-size: 12px;
margin-bottom:20px; line-height: 1.25;
} margin-bottom:20px;
}
.img-left figure { .img-left figure {
float: left; float: left;
@ -61,12 +70,12 @@ figure img, figure figcaption{
.img-big figure{ .img-big figure{
margin:0 20px; margin:0 20px;
} }
.img-big figure img, .img-big figure figcaption{
max-width: 100%;
max-height: 100%;
clear: both;
}
.img-big figure img, .img-big figure figcaption{
max-width: 100%;
max-height: 100%;
clear: both;
}
.footnotes{ .footnotes{
page-break-before: avoid; page-break-before: avoid;

Loading…
Cancel
Save