Skip to content

Commit c63eb14

Browse files
afborabastianallgeier
authored andcommitted
New archived label for the plugins
1 parent 85870a5 commit c63eb14

File tree

4 files changed

+21
-2
lines changed

4 files changed

+21
-2
lines changed

assets/css/framework/buttons.css

+4
Original file line numberDiff line numberDiff line change
@@ -43,3 +43,7 @@ button {
4343
.btn--filled svg {
4444
color: var(--color-yellow-600);
4545
}
46+
.btn--yellow {
47+
background: var(--color-yellow-400) !important;
48+
color: var(--color-black); !important;
49+
}

content/plugins/oblik/entity-field/plugin.txt

+6-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ Title: Entity Field
22

33
----
44

5-
Text:
5+
Text:
66

77
----
88

@@ -22,4 +22,8 @@ Description: Allows you to add other fields to it with the intention of scoping
2222

2323
----
2424

25-
Versions: 3
25+
Archived: 2024-02-04
26+
27+
----
28+
29+
Versions: 3

site/snippets/templates/plugins/versions.php

+4
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,8 @@
22
<?php foreach($plugin->versions()->split() as $version): ?>
33
<li class="px-1 rounded bg-<?= $version === '4' ? 'yellow' : $bg ?? 'light' ?>" title="This plugin supports Kirby <?= $version ?>">K<?= $version ?></li>
44
<?php endforeach ?>
5+
6+
<?php if($plugin->archived()->isNotEmpty()): ?>
7+
<li class="px-1 rounded bg-dark color-white" title="This plugin is archived and no longer maintained">Archived</li>
8+
<?php endif ?>
59
</ul>

site/templates/plugin.php

+7
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,13 @@
242242
Supports <?= implode(', ', array_map(fn ($item) => 'K' . $item, explode(',', $page->versions()))) ?>
243243
</a>
244244

245+
<?php if($page->archived()->isNotEmpty()): ?>
246+
<a class="btn btn--yellow" href="<?= url('releases') ?>" title="This plugin is archived and no longer maintained">
247+
<span><?= icon('alert') ?></span>
248+
The plugin is archived
249+
</a>
250+
<?php endif ?>
251+
245252
</nav>
246253
</div>
247254

0 commit comments

Comments
 (0)