forked from tronicum/inkpour
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathprint.html
More file actions
173 lines (157 loc) · 4.58 KB
/
Copy pathprint.html
File metadata and controls
173 lines (157 loc) · 4.58 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Inkpour — Print Preview</title>
<style>
/* ── Screen styles ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
font-family: Georgia, 'Times New Roman', serif;
font-size: 15px;
line-height: 1.7;
color: #1a1a1a;
background: #f9f9f9;
padding: 2rem 1rem;
}
#page {
max-width: 800px;
margin: 0 auto;
background: #fff;
padding: 3rem;
border-radius: 8px;
box-shadow: 0 2px 20px rgba(0,0,0,0.08);
}
/* ── Document header ── */
.doc-header {
margin-bottom: 2.5rem;
padding-bottom: 1.25rem;
border-bottom: 2px solid #e5e7eb;
}
.doc-header h1 {
font-size: 1.75rem;
font-weight: 700;
color: #111;
margin-bottom: 0.4rem;
}
.meta {
font-size: 0.85rem;
color: #6b7280;
font-style: italic;
}
/* ── Messages ── */
.message {
margin-bottom: 1.5rem;
padding: 1.1rem 1.25rem;
border-radius: 8px;
border-inline-start: 3px solid transparent;
}
.message.user {
background: #f0f4ff;
border-inline-start-color: #5b5bd6;
}
.message.assistant {
background: #f0fdf4;
border-inline-start-color: #16a34a;
}
.role-label {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
font-size: 0.7rem;
font-weight: 700;
text-transform: uppercase;
letter-spacing: 0.08em;
margin-bottom: 0.6rem;
}
.message.user .role-label { color: #5b5bd6; }
.message.assistant .role-label { color: #16a34a; }
/* ── Content typography ── */
.content h1, .content h2, .content h3,
.content h4, .content h5, .content h6 {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
margin: 1rem 0 0.4rem;
line-height: 1.3;
}
.content h1 { font-size: 1.4rem; }
.content h2 { font-size: 1.2rem; }
.content h3 { font-size: 1.05rem; }
.content p { margin: 0.6rem 0; }
.content p:first-child { margin-top: 0; }
.content p:last-child { margin-bottom: 0; }
.content ul, .content ol {
padding-inline-start: 1.5rem;
margin: 0.5rem 0;
}
.content li { margin: 0.25rem 0; }
.content strong { font-weight: 700; }
.content em { font-style: italic; }
.content del { text-decoration: line-through; color: #9ca3af; }
.content code {
font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', Consolas, monospace;
font-size: 0.85em;
background: rgba(0,0,0,0.07);
padding: 0.15em 0.35em;
border-radius: 4px;
}
.content pre {
background: #1e1e2e;
color: #cdd6f4;
padding: 1rem 1.2rem;
border-radius: 6px;
overflow-x: auto;
margin: 0.75rem 0;
font-size: 0.82rem;
line-height: 1.55;
}
.content pre code {
background: transparent;
padding: 0;
font-size: inherit;
}
.content blockquote {
border-inline-start: 3px solid #d1d5db;
margin: 0.6rem 0;
padding: 0.3rem 0.9rem;
color: #6b7280;
font-style: italic;
}
.content hr {
border: none;
border-top: 1px solid #e5e7eb;
margin: 1rem 0;
}
/* ── Dark mode ── */
@media (prefers-color-scheme: dark) {
body { color: #e4e4e7; background: #09090b; }
#page { background: #18181b; box-shadow: 0 2px 20px rgba(0,0,0,0.4); }
.doc-header { border-bottom-color: #3f3f46; }
.doc-header h1 { color: #fafafa; }
.meta { color: #a1a1aa; }
.message.user { background: #1e1e3a; }
.message.assistant { background: #14291f; }
.content code { background: rgba(255,255,255,0.1); }
.content blockquote { border-inline-start-color: #52525b; color: #a1a1aa; }
.content hr { border-top-color: #3f3f46; }
}
/* ── Print overrides ── */
@media print {
body { background: none; padding: 0; }
#page {
box-shadow: none;
border-radius: 0;
padding: 0;
max-width: none;
}
.message { break-inside: avoid; }
.content pre { white-space: pre-wrap; word-break: break-all; }
}
</style>
</head>
<body>
<div id="page">
<p style="color:#888;font-style:italic" data-i18n="printLoading">Loading conversation…</p>
</div>
<script src="src/i18n.js"></script>
<script src="print.js"></script>
</body>
</html>