Skip to content

Commit 6d8a007

Browse files
committed
filter button styling, new "add package" button
Signed-off-by: Jurj-Bogdan <jurj@dotkernel.com>
1 parent 4c5fd00 commit 6d8a007

File tree

3 files changed

+47
-40
lines changed

3 files changed

+47
-40
lines changed

ADD_ECOSYSTEM_PACKAGE.md

Lines changed: 10 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,20 @@
11
# Adding your entry to the Laminas Ecosystem
22

3-
You can add packages **available via composer** to the `data/ecosystem/ecosystem-packages.json` file by following the steps below:
3+
You can list your packages on the Laminas third party packages page by following the steps below:
4+
> Note that all packages **must** be listed on [Packagist](https://packagist.org/)
45
5-
- Entries must use the [template](#new-entry-template) as a guide.
6-
- Submit a PR.
6+
- Add your entries as JSON objects to the `data/ecosystem/ecosystem-packages.json` file.
7+
- Each package **must** be added as a single object.
8+
- Entries **must** use the [template](#new-entry-template) for submission.
9+
- Submit a PR against the default branch.
710

8-
> Use the following command to make sure your submission will be correctly built:
11+
Use the following command to make sure your submission will be correctly built:
912

1013
```bash
11-
composer build
14+
./vendor/bin/laminas ecosystem:create-db --github-token=<github_token> [--force-rebuild]
1215
```
1316

14-
> The following command can be run individually for testing:
15-
16-
```bash
17-
./vendor/bin/laminas ecosystem:create-db --github-token=<github_token> [--force-rebuild]
18-
```
19-
20-
> the optional "--force-rebuild" flag will regenerate the database completely, not only add and/or remove packages
21-
22-
*Used for creating the database.*
23-
24-
```bash
25-
./vendor/bin/laminas ecosystem:seed-db --github-token=<github_token>
26-
```
27-
28-
*Used for updating the package data every X hours.*
17+
The optional "--force-rebuild" flag will regenerate the database completely, not only add and/or remove packages
2918

3019
## New entry template
3120

@@ -50,4 +39,4 @@ composer build
5039
**string** - optional URL to package homepage, will overwrite "homepage" field from Packagist Api data
5140

5241
- `category`
53-
**string** - package category must be one of "skeleton", "integration", "tool"
42+
**string** - must be one of "skeleton", "integration", "tool"

bootstrap/scss/_custom-styles.scss

Lines changed: 23 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -606,12 +606,15 @@ article {
606606
}
607607

608608
#ecosystem-section {
609-
.keyword {
610-
--filter-button-color: #678799;
609+
$filter-color: #678799;
610+
611+
#clear-filters-button:hover {
612+
color: white;
611613
}
612614

613615
#ecosystem-pagination {
614616
margin-top: 1em;
617+
min-height: 60px;
615618
}
616619

617620
a.package-button {
@@ -719,12 +722,17 @@ article {
719722
margin-bottom: .5em;
720723

721724
.package-button {
722-
border: 2px solid var(--filter-button-color);
725+
border: 2px solid $filter-color;
723726
border-radius: 5px;
724727
padding: 0 .25em;
725-
color: var(--filter-button-color);
728+
color: $filter-color;
726729
font-weight: bold;
727730
background-color: white;
731+
732+
&:hover {
733+
color: white;
734+
background-color: $filter-color;
735+
}
728736
}
729737
}
730738

@@ -733,12 +741,18 @@ article {
733741
flex-direction: row;
734742
gap: .5em;
735743
margin: .5em 0;
744+
}
736745

737-
.ecosystem-filter {
738-
border-radius: 5px;
739-
color: white;
740-
background-color: var(--filter-button-color);
741-
padding: 0 .5em;
746+
.ecosystem-filter {
747+
color: white;
748+
background-color: $filter-color;
749+
border: 2px solid $filter-color;
750+
border-radius: 5px;
751+
padding: 0 .5em;
752+
753+
&:hover {
754+
background-color: darken($filter-color, 10%);
755+
border-color: darken($filter-color, 10%);
742756
}
743757
}
744758

src/Ecosystem/templates/list.phtml

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ declare(strict_types=1);
1515
use GetLaminas\Ecosystem\Enums\EcosystemCategoryEnum;
1616
use GetLaminas\Ecosystem\Enums\EcosystemTypeEnum;
1717

18-
$this->layout('layout::default', ['title' => 'Laminas Ecosystem']);
18+
$this->layout('layout::default', ['title' => 'Laminas third party packages']);
1919

2020
function formatDownloads(int $downloads): string {
2121
if ($downloads >= 1_000_000_000) {
@@ -32,9 +32,9 @@ function formatDownloads(int $downloads): string {
3232
}
3333
?>
3434
<section id="ecosystem-section" class="container">
35-
<div class="mt-5">
36-
<div>
37-
<h1>Laminas Ecosystem</h1>
35+
<div>
36+
<div class="my-5">
37+
<h1>Laminas third party packages</h1>
3838
<h5>Third party packages which provide explicit support for Laminas packages</h5>
3939
</div>
4040

@@ -52,8 +52,8 @@ function formatDownloads(int $downloads): string {
5252
</div>
5353
<div class="col-lg-8 collapse d-lg-flex gap-2" data-bs-parent="#packageSearchBar" id="packageSearchBar">
5454
<div class="btn-group mt-2 mt-lg-0">
55-
<button type="button" class="btn border-primary pe-none">Type</button>
56-
<button type="button" class="btn btn-primary dropdown-toggle dropdown-toggle-split" data-bs-toggle="dropdown" aria-expanded="false">
55+
<button type="button" class="btn btn-primary dropdown-toggle" data-bs-toggle="dropdown" aria-expanded="false">
56+
Type:
5757
<span class=""><?= $type ?? 'All' ?></span>
5858
</button>
5959
<ul class="dropdown-menu">
@@ -69,8 +69,8 @@ function formatDownloads(int $downloads): string {
6969
</div>
7070

7171
<div class="btn-group mt-2 mt-lg-0">
72-
<button type="button" class="btn border-primary pe-none">Category</button>
73-
<button type="button" class="btn btn-primary dropdown-toggle dropdown-toggle-split" data-bs-toggle="dropdown" aria-expanded="false">
72+
<button type="button" class="btn btn-primary dropdown-toggle" data-bs-toggle="dropdown" aria-expanded="false">
73+
Category:
7474
<span class=""><?= $category ?? 'All' ?></span>
7575
</button>
7676
<ul class="dropdown-menu">
@@ -86,7 +86,7 @@ function formatDownloads(int $downloads): string {
8686
</ul>
8787
</div>
8888

89-
<?php if ($type || $category || $search) : ?>
89+
<?php if ($type || $category || $search || $keywords !== []) : ?>
9090
<div class="btn-group mt-2 mt-lg-0">
9191
<button id="clear-filters-button" type="button" class="btn btn-outline-danger">Clear <i class="bi bi-x-circle"></i></button>
9292
</div>
@@ -113,7 +113,7 @@ function formatDownloads(int $downloads): string {
113113
<?php endif?>
114114
<div class="card-header">
115115
<h5 class="card-title col-md-9">
116-
<a href="<?= $package->packagistUrl ?>" target="_blank">
116+
<a href="https://packagist.org/packages/<?= $package->packagistUrl ?>" target="_blank">
117117
<p class="details-item"><?= $package->name ?></p>
118118
</a>
119119
</h5>
@@ -184,4 +184,8 @@ function formatDownloads(int $downloads): string {
184184
<div id="ecosystem-pagination">
185185
<?php $this->insert('partials::pagination', ['pagination' => $pagination]) ?>
186186
</div>
187+
188+
<a class="gradient-background rounded-4 text-primary text-decoration-none p-2" target="_blank" href="https://github.com/laminas/getlaminas.org/blob/master/ADD_ECOSYSTEM_PACKAGE.md">
189+
Add a package
190+
</a>
187191
</section>

0 commit comments

Comments
 (0)