Browse Source

Hack, hack, hack

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

8
Makefile

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

17
header.html

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

17
styles.css

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

Loading…
Cancel
Save