summaryrefslogtreecommitdiffstats
path: root/contrib/template.jninja
blob: e8bf6fce2e3cde904bceab2bb8bdda8a624aff69 (plain) (blame)
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
{# jobs is a list of dicts with the fields you specified #}
<!doctype html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <title>Job Export</title>
</head>
<body style="font-family:system-ui,Segoe UI,Roboto,Arial,sans-serif;line-height:1.4;color:#111;padding:18px;">

{% for job in jobs %}
  <div style="padding:14px 0;">
    <!-- Header row -->
    <div style="display:flex;justify-content:space-between;align-items:baseline;gap:12px;">
      <div>
        <a href="{{ job.job_url }}" style="font-size:18px;font-weight:600;color:#0b66c2;text-decoration:none;">
          {{ job.title | e }}
        </a>
        <div style="font-size:13px;color:#444;margin-top:2px;">
          <a href="{{ job.company_url }}" style="color:#444;text-decoration:none;">{{ job.company | e }}</a>
          {% if job.location %}
            — {{ job.location.city|default('') }}{% if job.location.city and job.location.state %}, {% endif %}{{ job.location.state|default('') }}{% if job.location.city or job.location.state %} • {% endif %}{{ job.location.country|default('') }}
          {% endif %}
          {% if job.is_remote %}
            • Remote
          {% endif %}
        </div>
      </div>

      <div style="text-align:right;font-size:13px;color:#666;">
        <div>{{ job.job_type | capitalize }}</div>
        <div style="margin-top:6px;color:#333;font-weight:500;">
          {% if job.job_function %}
            {% set jf = job.job_function %}
            {% if jf.min_amount or jf.max_amount %}
              {{ jf.currency|default('') }}
              {% if jf.min_amount %}{{ jf.min_amount }}{% endif %}
              {% if jf.min_amount and jf.max_amount %}–{% endif %}
              {% if jf.max_amount %}{{ jf.max_amount }}{% endif %}
              <span style="font-size:12px;color:#666;">/ {{ jf.interval }}</span>
            {% endif %}
            <div style="font-size:12px;color:#666;margin-top:4px;">
              Source: {{ jf.salary_source | replace('_',' ') }}
            </div>
          {% endif %}
        </div>
        <div style="font-size:12px;color:#888;margin-top:6px;">Posted: {{ job.date_posted }}</div>
      </div>
    </div>

    <!-- Description -->
    <div style="margin-top:10px;color:#222;">
      <div style="white-space:pre-wrap;">{{ job.description | e }}</div>
    </div>

    <!-- Emails & Links -->
    <div style="margin-top:10px;font-size:13px;color:#333;">
      {% if job.emails %}
        <div><strong>Contact:</strong> {{ job.emails | join(', ') }}</div>
      {% endif %}
      <div style="margin-top:6px;font-size:13px;"><a href="{{ job.job_url }}" style="color:#0b66c2;text-decoration:none;">View posting</a></div>
    </div>

    <!-- Program summary box -->
    <div style="margin-top:12px;padding:10px;background:#f7f9fb;border:1px solid #e3e7ea;border-radius:6px;font-size:13px;color:#222;">
      <strong style="display:block;margin-bottom:6px;">Program notes</strong>
      <div style="white-space:pre-wrap;">{{ job.summary | default('—') | e }}</div>
    </div>

  </div>

  <!-- Delimiter between jobs -->
  <hr style="border:none;border-top:1px solid #e0e6ea;margin:12px 0;">
{% endfor %}

</body>
</html>