Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

self service, lang: en, size: A3 #1

Open
wants to merge 2 commits into
base: gh-pages
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions _layouts/a3.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<!DOCTYPE html>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't this somehow be extended from a4.html layout? Like

---
layout: a4
additional_style: a3
---
{{ content }}

And in a4.html another

{% if page.additional_style %}
... include it ...
{% endif %}

Haven't tried it, but I think it could work.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will make like this:

---
title: Self service
layout: paper
size: a3
---

commit is comming right up...

<html mozNoMarginBoxes mozDisallowSelectionPrint>
<head>
<meta charset="utf-8"/>
<base href="{{ site.baseurl }}/"/>
<link rel="stylesheet" href="{{ site.baseurl }}/css/a4.css"/>
<link rel="stylesheet" href="{{ site.baseurl }}/css/a3.css"/>
</head>
<body>
{{ content }}
</body>
</html>
19 changes: 19 additions & 0 deletions _posts/2015-02-13-self-service.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
title: Self service
layout: a3
---
{::options parse_block_html="true" /}

<div class="a3page small-caps">

Self service :)
{: .center .font20}

| | | donation (at least) |
| ![ClubMate](img/clubmate.png){: style="width:15em"} | **Club-Mate** is a caffeinated carbonated mate-extract beverage made by the Loscher Brewery near Münchsteinach, Germany, which originated in 1924. Club-Mate has 20 mg of caffeine per 100 ml. Club-Mate has a relatively low sugar content of 5 g/100 ml, and low calories compared to other beverages such as Coke or most energy drinks. | 2 € |
| ![Coffee](img/coffee.png){: style="width:15em"} | **Coffee** is a brewed drink with a distinct aroma and flavor, prepared from roasted coffee beans, the seeds found inside "berries" of the Coffea plant. Coffee plants are cultivated in over 70 countries, primarily in equatorial Latin America, Southeast Asia, India and Africa. | 0.5 € |
| ![NoodleSoup](img/noodlesoup.png){: style="width:15em"} | **Noodle Soup** | 0.5 € |
| ![Tea](img/tea.png){: style="width:15em"} | **Tea** of your choice. | 0.3 € |
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd put 0 for tea. The rationale is I drink lots of it, it costs us almost nothing to make it available free, you want to reward desired bahavior like tea-drinking, and it would in fact be beneficial if people just hanged around.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

0.1 EUR it is, you can pay 0.3 EUR if you really want

{: .tpadding}

</div>
34 changes: 34 additions & 0 deletions css/a3.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@

.a3page {
height: 42cm;
max-height: 42cm;
width: 29.7cm;
padding: 1.5cm 2cm; /* That's the page print margin */
background: white;
margin: 0.5cm auto;
box-shadow: 0 0 .5cm rgba(0, 0, 0, 0.5);
}

@page {
size: A3;
margin: 0;
}
@media print {
html,
body {
height: 42cm;
width: 297mm;
}
.a3page {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Couldn't all these be inherited from a4page? Like if the div was <div class="a4page a3page">. While everything were inherited from a4page, the size overrides of a3page would prevail.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thats ugly, will do something better...

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

another, better, idea is: Jekyll on GitHub supports SCSS which has @includes.

margin: 0;
width: initial;
min-height: initial;
box-shadow: initial;
background: transparent;
page-break-after: always;
page-break-before: auto;
page-break-inside: avoid;
orphans: 0;
widows: 0;
}
}
7 changes: 7 additions & 0 deletions css/a4.css
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@ html, body {
overflow: hidden;
white-space: nowrap
}
.small-caps {
font-variant: small-caps
}

.center .logo {
width: 50%;
Expand Down Expand Up @@ -87,3 +90,7 @@ table.pretty th {
table.pretty tr:nth-of-type(even) {
background: #fafafa;
}

table.tpadding td {
padding: 1em;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Forgot to mention, when designing for print, always use cm/mm/pt (for fonts) units only! Everything else (em included) is relative when it comes to print.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

}
1 change: 1 addition & 0 deletions img/.gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* binary
Binary file added img/clubmate.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/coffee.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/noodlesoup.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/tea.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.