x
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
<div class="tw:p-6 tw:max-w-7xl tw:mx-auto tw:space-y-8">
<!-- Intro callout -->
<div class="callout">
<p class="tw:mb-1 tw:text-sm tw:font-mono">
<strong>PATTERN: school-photo</strong><br>
<strong>SIZES:</strong> Default (110px) · sm (90px) · lg (150px)<br>
<strong>OVERLAYS:</strong> school-photo-badge (top-left) · school-photo-bookmark (top-right)
</p>
<p class="tw:mb-0 tw:text-sm">
110px-tall rounded cover-photo block for school and provider cards. Falls back
to a sky-gradient when no image is available. Supports an absolute-positioned
badge overlay (top-left) and a bookmark overlay (top-right). Caller drops
either an <code><img></code> or leaves the block empty for the gradient fallback.
</p>
</div>
<!-- 1. Default — sky gradient fallback, no overlays -->
<div class="tw:border-t tw:pt-6">
<h2 class="h4 tw:mb-4">1. Default — sky gradient fallback</h2>
<div class="callout tw:mb-4">
<p class="tw:mb-0 tw:text-sm">
<strong>No image, no overlays:</strong> The sky gradient (<code>#ACCCF8 → #CCECFF</code>)
is the CSS background fallback. No child elements needed.
</p>
</div>
<div class="tw:max-w-sm">
<div class="school-photo"></div>
</div>
<div class="tw:mt-4 tw:text-sm tw:text-gray-600">
<code><div class="school-photo"></div></code>
</div>
</div>
<!-- 2. With badge and bookmark overlays -->
<div class="tw:border-t tw:pt-6">
<h2 class="h4 tw:mb-4">2. With badge (top-left) and bookmark (top-right)</h2>
<div class="callout tw:mb-4">
<p class="tw:mb-0 tw:text-sm">
<strong>Overlays:</strong> A <code>school-photo-badge</code> sits at top-left
(absolute 8px/8px). A <code>school-photo-bookmark</code> sits at top-right
(absolute 6px/6px). The badge uses the existing <code>ofsted-tag</code>
component; the bookmark is a raw FA icon.
</p>
</div>
<div class="tw:max-w-sm">
<div class="school-photo">
<div class="school-photo-badge">
<span class="ofsted-tag ofsted-tag-outstanding">Outstanding</span>
</div>
<div class="school-photo-bookmark">
<i class="fa-solid fa-bookmark" aria-label="Saved" role="img"></i>
</div>
</div>
</div>
<div class="tw:mt-4 tw:text-sm tw:text-gray-600">
<code><div class="school-photo"><br>
  <div class="school-photo-badge"><span class="ofsted-tag ofsted-tag-outstanding">Outstanding</span></div><br>
  <div class="school-photo-bookmark"><i class="fa-solid fa-bookmark" aria-label="Saved" role="img"></i></div><br>
</div></code>
</div>
</div>
<!-- 3. Small variant (90px) -->
<div class="tw:border-t tw:pt-6">
<h2 class="h4 tw:mb-4">3. Small variant (90px)</h2>
<div class="callout tw:mb-4">
<p class="tw:mb-0 tw:text-sm">
<strong>school-photo-sm:</strong> Reduces height to 90px. Used in compact
school-card variants where vertical space is tight.
</p>
</div>
<div class="tw:max-w-sm">
<div class="school-photo school-photo-sm"></div>
</div>
<div class="tw:mt-4 tw:text-sm tw:text-gray-600">
<code><div class="school-photo school-photo-sm"></div></code>
</div>
</div>
<!-- 4. Large variant (150px) -->
<div class="tw:border-t tw:pt-6">
<h2 class="h4 tw:mb-4">4. Large variant (150px)</h2>
<div class="callout tw:mb-4">
<p class="tw:mb-0 tw:text-sm">
<strong>school-photo-lg:</strong> Increases height to 150px. Used on school
detail/profile pages where the cover photo is more prominent.
</p>
</div>
<div class="tw:max-w-sm">
<div class="school-photo school-photo-lg"></div>
</div>
<div class="tw:mt-4 tw:text-sm tw:text-gray-600">
<code><div class="school-photo school-photo-lg"></div></code>
</div>
</div>
<!-- 5. With a real photo via <img> -->
<div class="tw:border-t tw:pt-6">
<h2 class="h4 tw:mb-4">5. With a photo via <img></h2>
<div class="callout tw:mb-4">
<p class="tw:mb-0 tw:text-sm">
<strong>With image:</strong> Drop an <code><img></code> inside the wrapper.
The <code>school-photo img</code> rule applies <code>object-cover</code>
to fill the frame. The gradient background remains as a loading fallback while
the image loads.
</p>
</div>
<div class="tw:max-w-sm">
<div class="school-photo school-photo-lg">
<img src="https://picsum.photos/seed/aoneschool/800/450" alt="Greenford High School campus" width="800" height="450">
<div class="school-photo-badge">
<span class="ofsted-tag ofsted-tag-good">Good</span>
</div>
<div class="school-photo-bookmark">
<i class="fa-solid fa-bookmark" aria-label="Saved" role="img"></i>
</div>
</div>
</div>
<div class="tw:mt-4 tw:text-sm tw:text-gray-600">
<code><div class="school-photo school-photo-lg"><br>
  <img src="..." alt="School campus"><br>
  <div class="school-photo-badge">...</div><br>
  <div class="school-photo-bookmark">...</div><br>
</div></code>
</div>
</div>
<!-- Size comparison -->
<div class="tw:border-t tw:pt-6">
<h2 class="h4 tw:mb-4">Size comparison</h2>
<div class="tw:flex tw:flex-col tw:gap-3 tw:max-w-sm">
<div>
<p class="tw:text-xs text-muted tw:mb-1">sm (90px)</p>
<div class="school-photo school-photo-sm"></div>
</div>
<div>
<p class="tw:text-xs text-muted tw:mb-1">default (110px)</p>
<div class="school-photo"></div>
</div>
<div>
<p class="tw:text-xs text-muted tw:mb-1">lg (150px)</p>
<div class="school-photo school-photo-lg"></div>
</div>
</div>
</div>
</div>
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
<div class="tw:p-6 tw:max-w-7xl tw:mx-auto tw:space-y-8">
<!-- Intro callout -->
<div class="callout">
<p class="tw:mb-1 tw:text-sm tw:font-mono">
<strong>PATTERN: school-photo</strong><br>
<strong>SIZES:</strong> Default (110px) · sm (90px) · lg (150px)<br>
<strong>OVERLAYS:</strong> school-photo-badge (top-left) · school-photo-bookmark (top-right)
</p>
<p class="tw:mb-0 tw:text-sm">
110px-tall rounded cover-photo block for school and provider cards. Falls back
to a sky-gradient when no image is available. Supports an absolute-positioned
badge overlay (top-left) and a bookmark overlay (top-right). Caller drops
either an <code><img></code> or leaves the block empty for the gradient fallback.
</p>
</div>
<!-- 1. Default — sky gradient fallback, no overlays -->
<div class="tw:border-t tw:pt-6">
<h2 class="h4 tw:mb-4">1. Default — sky gradient fallback</h2>
<div class="callout tw:mb-4">
<p class="tw:mb-0 tw:text-sm">
<strong>No image, no overlays:</strong> The sky gradient (<code>#ACCCF8 → #CCECFF</code>)
is the CSS background fallback. No child elements needed.
</p>
</div>
<div class="tw:max-w-sm">
<div class="school-photo"></div>
</div>
<div class="tw:mt-4 tw:text-sm tw:text-gray-600">
<code><div class="school-photo"></div></code>
</div>
</div>
<!-- 2. With badge and bookmark overlays -->
<div class="tw:border-t tw:pt-6">
<h2 class="h4 tw:mb-4">2. With badge (top-left) and bookmark (top-right)</h2>
<div class="callout tw:mb-4">
<p class="tw:mb-0 tw:text-sm">
<strong>Overlays:</strong> A <code>school-photo-badge</code> sits at top-left
(absolute 8px/8px). A <code>school-photo-bookmark</code> sits at top-right
(absolute 6px/6px). The badge uses the existing <code>ofsted-tag</code>
component; the bookmark is a raw FA icon.
</p>
</div>
<div class="tw:max-w-sm">
<div class="school-photo">
<div class="school-photo-badge">
<span class="ofsted-tag ofsted-tag-outstanding">Outstanding</span>
</div>
<div class="school-photo-bookmark">
<i class="fa-solid fa-bookmark" aria-label="Saved" role="img"></i>
</div>
</div>
</div>
<div class="tw:mt-4 tw:text-sm tw:text-gray-600">
<code><div class="school-photo"><br>
  <div class="school-photo-badge"><span class="ofsted-tag ofsted-tag-outstanding">Outstanding</span></div><br>
  <div class="school-photo-bookmark"><i class="fa-solid fa-bookmark" aria-label="Saved" role="img"></i></div><br>
</div></code>
</div>
</div>
<!-- 3. Small variant (90px) -->
<div class="tw:border-t tw:pt-6">
<h2 class="h4 tw:mb-4">3. Small variant (90px)</h2>
<div class="callout tw:mb-4">
<p class="tw:mb-0 tw:text-sm">
<strong>school-photo-sm:</strong> Reduces height to 90px. Used in compact
school-card variants where vertical space is tight.
</p>
</div>
<div class="tw:max-w-sm">
<div class="school-photo school-photo-sm"></div>
</div>
<div class="tw:mt-4 tw:text-sm tw:text-gray-600">
<code><div class="school-photo school-photo-sm"></div></code>
</div>
</div>
<!-- 4. Large variant (150px) -->
<div class="tw:border-t tw:pt-6">
<h2 class="h4 tw:mb-4">4. Large variant (150px)</h2>
<div class="callout tw:mb-4">
<p class="tw:mb-0 tw:text-sm">
<strong>school-photo-lg:</strong> Increases height to 150px. Used on school
detail/profile pages where the cover photo is more prominent.
</p>
</div>
<div class="tw:max-w-sm">
<div class="school-photo school-photo-lg"></div>
</div>
<div class="tw:mt-4 tw:text-sm tw:text-gray-600">
<code><div class="school-photo school-photo-lg"></div></code>
</div>
</div>
<!-- 5. With a real photo via <img> -->
<div class="tw:border-t tw:pt-6">
<h2 class="h4 tw:mb-4">5. With a photo via <img></h2>
<div class="callout tw:mb-4">
<p class="tw:mb-0 tw:text-sm">
<strong>With image:</strong> Drop an <code><img></code> inside the wrapper.
The <code>school-photo img</code> rule applies <code>object-cover</code>
to fill the frame. The gradient background remains as a loading fallback while
the image loads.
</p>
</div>
<div class="tw:max-w-sm">
<div class="school-photo school-photo-lg">
<img src="https://picsum.photos/seed/aoneschool/800/450" alt="Greenford High School campus" width="800" height="450">
<div class="school-photo-badge">
<span class="ofsted-tag ofsted-tag-good">Good</span>
</div>
<div class="school-photo-bookmark">
<i class="fa-solid fa-bookmark" aria-label="Saved" role="img"></i>
</div>
</div>
</div>
<div class="tw:mt-4 tw:text-sm tw:text-gray-600">
<code><div class="school-photo school-photo-lg"><br>
  <img src="..." alt="School campus"><br>
  <div class="school-photo-badge">...</div><br>
  <div class="school-photo-bookmark">...</div><br>
</div></code>
</div>
</div>
<!-- Size comparison -->
<div class="tw:border-t tw:pt-6">
<h2 class="h4 tw:mb-4">Size comparison</h2>
<div class="tw:flex tw:flex-col tw:gap-3 tw:max-w-sm">
<div>
<p class="tw:text-xs text-muted tw:mb-1">sm (90px)</p>
<div class="school-photo school-photo-sm"></div>
</div>
<div>
<p class="tw:text-xs text-muted tw:mb-1">default (110px)</p>
<div class="school-photo"></div>
</div>
<div>
<p class="tw:text-xs text-muted tw:mb-1">lg (150px)</p>
<div class="school-photo school-photo-lg"></div>
</div>
</div>
</div>
</div>