01-26-26 pcochef: Make a difference 3 by 3
Imports: 1

A short explanation. . .

Preview

Report Preview


 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
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>3x3 Profile Photo Cards</title>

  <style>
    /* Use a normal page size so Planning Center PDF works */
    @page {
      size: letter;
      margin: 0;
    }

    body {
      margin: 0;
      padding: 0;
      background-color: #ffffff;
    }

    /* Center a 3x3 card on each page */
    .profile-page {
      width: 3in;
      height: 3in;
      margin: auto;
      position: relative;
      page-break-after: always;
    }

    .profile-photo {
      width: 100%;
      height: 100%;
      overflow: hidden;
      position: relative;
    }

    /* Fill the square without distortion */
    .profile-photo img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      display: block;
    }

    /* Name bar at bottom */
    .name-box {
      position: absolute;
      bottom: 0;
      width: 100%;
      background-color: #2D4C9B;
      color: #ffffff;
      text-align: center;
      padding: 0.2in 0;
      font-size: 18px;
      font-family: Avenir, Helvetica, Arial, sans-serif;
      line-height: 1.1;
      box-sizing: border-box;
    }
  </style>
</head>

<body>
  {% for person in people %}
    {% if person.photo_url and person.photo_url != '' %}
      <div class="profile-page">
        <div class="profile-photo">
          <img src="{{ person.photo_url }}" alt="{{ person.first_name }} {{ person.last_name }}">
          <div class="name-box">
            {{ person.first_name }} {{ person.last_name }}
          </div>
        </div>
      </div>
    {% endif %}
  {% endfor %}
</body>
</html>