Last active 2 months ago

An HTML starter page for a printable zine https://futurama.io/zine-layout/

chip revised this gist 2 months ago. Go to revision

No changes

chip revised this gist 2 months ago. Go to revision

1 file changed, 161 insertions

zine-template.html(file created)

@@ -0,0 +1,161 @@
1 + <style>
2 + /* Container for the entire zine */
3 + .zine-container {
4 + display: grid;
5 + grid-template-columns: 1fr 1fr;
6 + width: 8.5in;
7 + max-width: 8.5in;
8 + max-height: 11in;
9 + height: 11in;
10 + }
11 +
12 + /* Common styles for all panels */
13 + .panel {
14 + border: 1px solid #ccc;
15 + height: 2.55in; /* Adjusted height for four columns */
16 + width: 4.05in; /* Adjusted width for two columns */
17 + margin: 0.1in;
18 + padding: 0;
19 + position: relative;
20 + overflow: hidden;
21 + }
22 +
23 + /* Content container inside each panel */
24 + .panel-content {
25 + width: 2.55in;
26 + height: 4.05in;
27 + padding: 0.1in;
28 + display: flex;
29 + align-items: center;
30 + justify-content: center;
31 + box-sizing: border-box;
32 + }
33 +
34 + /* Left column panels - content oriented right */
35 + .left-panel .panel-content {
36 + transform: rotate(90deg);
37 + transform-origin: center center;
38 + /* writing-mode: vertical-rl; */
39 + text-orientation: mixed;
40 + position: absolute;
41 + top: -0.75in;
42 + right: 0.75in;
43 + }
44 +
45 + /* Right column panels - content oriented left */
46 + .right-panel .panel-content {
47 + transform: rotate(-90deg);
48 + transform-origin: center center;
49 + /* writing-mode: vertical-lr; */
50 + text-orientation: mixed;
51 + position: absolute;
52 + top: -0.75in;
53 + left: 0.75in;
54 + }
55 +
56 + /* Page numbers */
57 + .page-number {
58 + position: absolute;
59 + bottom: 5px;
60 + font-size: 10px;
61 + color: #999;
62 + }
63 +
64 + .left-panel .page-number {
65 + left: 5px;
66 + transform: rotate(90deg);
67 + }
68 +
69 + .right-panel .page-number {
70 + right: 5px;
71 + transform: rotate(-90deg);
72 + }
73 +
74 + /* Media query for print */
75 + @media print {
76 + .zine-container {
77 + max-width: 100%;
78 + margin: 0;
79 + }
80 +
81 + .panel {
82 + border: 1px solid #000;
83 + }
84 + }
85 + </style>
86 +
87 + <div class="zine-container">
88 + <!-- Left Column -->
89 + <div class="panel left-panel">
90 + <div class="panel-content">
91 + <div>
92 + <slot name="page6" />
93 + </div>
94 + </div>
95 + <span class="page-number">6</span>
96 + </div>
97 +
98 + <!-- Right Column -->
99 + <div class="panel right-panel">
100 + <div class="panel-content">
101 + <div>
102 + <slot name="page5" />
103 + </div>
104 + </div>
105 + <span class="page-number">5</span>
106 + </div>
107 +
108 + <div class="panel left-panel">
109 + <div class="panel-content">
110 + <div>
111 + <slot name="page7" />
112 + </div>
113 + </div>
114 + <span class="page-number">7</span>
115 + </div>
116 +
117 + <div class="panel right-panel">
118 + <div class="panel-content">
119 + <div>
120 + <slot name="page4" />
121 + </div>
122 + </div>
123 + <span class="page-number">4</span>
124 + </div>
125 +
126 + <div class="panel left-panel">
127 + <div class="panel-content">
128 + <div>
129 + <slot name="page8" />
130 + </div>
131 + </div>
132 + <span class="page-number">8</span>
133 + </div>
134 +
135 + <div class="panel right-panel">
136 + <div class="panel-content">
137 + <div>
138 + <slot name="page3" />
139 + </div>
140 + </div>
141 + <span class="page-number">3</span>
142 + </div>
143 +
144 + <div class="panel left-panel">
145 + <div class="panel-content">
146 + <div>
147 + <slot name="page1" />
148 + </div>
149 + </div>
150 + <span class="page-number">1</span>
151 + </div>
152 +
153 + <div class="panel right-panel">
154 + <div class="panel-content">
155 + <div>
156 + <slot name="page2" />
157 + </div>
158 + </div>
159 + <span class="page-number">2</span>
160 + </div>
161 + </div>
Newer Older