Run as HTML These are Avery 8395 name tag labels. It contains Name, Medical Notes, Grade, Phone Number and a random security code. These were designed as a vbs backup in case label printers stop working. You can print these and keep them on hand in case they are needed. If you print two sets you can give one to the parent. This version prints a logo. The logo can be changed by changing the url of the image at the top of the report. You can also turn off the logo and it will print the organization name. This also includes phone number and medical notes at the bottom of the logo if they exist. Thanks to www.4.Church for sponsoring this recipe!
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
174
175
176
177
178
179
{% assign organizationImage = "https://pcochef-static.s3.us-east-1.amazonaws.com/media/2024-VBS-lifeway.png" %}
{% assign UseOrganizationImage = true %}
{% assign showGrade = true %}
<!DOCTYPE html>
<html>
<head>
<title>Avery 88395 Name Tags</title>
<style>
/* Page Setup */
@media print {
body .label {
page-break-inside: avoid;
}
body .sheet {
page-break-after: always;
}
}
@page {
size: 8.5in 11in; /* Standard US Letter */
margin: 0;
}
body {
width: 8.5in;
height: 11in;
margin: 0;
padding: 0;
position: relative;
font-family: Arial, sans-serif; /* Example font */
}
.sheet {
display: grid;
grid-template-columns: repeat(2, 1fr);
grid-template-rows: repeat(4, 1fr);
grid-column-gap: 0.356in;
grid-row-gap: 0.243in;
padding-left: 0.6in; /* Left margin */
padding-right: 0.7in; /* Right margin */
padding-top: 0.5in; /* Top margin */
padding-bottom: 0.6in; /* Bottom margin */
box-sizing: border-box;
height: 100%;
}
.label {
width: calc((8.5in - 1.1in - 0.356in) / 2); /* Calculate label width */
height: calc((11in - 1.1in - 0.429in) / 4); /* Calculate label height */
display: flex;
justify-content: center;
align-items: center;
text-align: center;
flex-direction: column;
}
.organization {
font-size: 16px; /* Smaller font size for organization */
margin-bottom: .2in;
}
.first_name {
font-size: 3.5vw; /* Adjust value according to your need */
max-width: 100%;
white-space: nowrap;
text-overflow: clip;
overflow: hidden;
}
.last_name {
font-size: 18px; /* Larger font size for name */
font-size: 2vw;
max-width: 100%;
}
.phone {
font-size: 14px; /* Smaller font size for phone number */
margin-top: 5px;
text-align: left;
width: 100%; /* Ensure full width for proper alignment */
}
.content {
display: flex;
margin-top: 20px;
justify-content: space-between;
width: 100%;
}
.name {
display: flex;
flex-direction: column;
align-items: flex-start;
padding-right: 10px;
width: 100%;
}
.organization-image {
align-self: center;
width: 150px;
border-left: 1px solid black;
padding-left: 10px;
}
.organization-image img {
width: 100%;
height: auto;
}
.organization_name {
flex-direction: column;
align-items: flex-start;
font-size: 2vw; /* Adjust value according to your need */
max-width: 100%;
white-space: nowrap;
text-overflow: clip;
overflow: hidden;
border-left: 1px solid black;
padding-left: 10px;
margin-bottom: .2in;
}
.code {
text-align: left;
}
.code img {
max-width: 140px;
margin-top: 0px;
padding-top: 5px;
}
</style>
</head>
<body>
<div class="sheet">
{% for person in people %}
<div class="label">
<div class="content"> <!-- content div starting point -->
<div class="name">
<div class="first_name">{{ person.first_name }}</div>
<div class="last_name">{{ person.last_name }}</div>
<div class="code">
<img src="https://pcochef.com/plusapi/random_code?id={{ person.id }}">
</div>
</div>
{% if UseOrganizationImage %}
<div class="organization-image">
<img src="{{ organizationImage }}" alt="Organization Image">
</div>
{% else %}
<div class="organization_name">
{{ organization.name }}
</div>
{% endif %}
</div> <!-- content div ending point -->
<div class="phone">
<div>Phone: {{ person.primary_phone_number }}</div>
{% if person.medical_notes != "" %}
<div>Medical: {{ person.medical_notes }}</div>
{% endif %}
{% if showGrade %}
<div>Grade: {{ person.grade_name }}</div>
{% endif %}
</div>
</div>
{% endfor %}
</div>
</body>
</html>