diff --git a/.gitignore b/.gitignore index ca61bf9..61af8f8 100644 --- a/.gitignore +++ b/.gitignore @@ -22,3 +22,5 @@ hugo.linux node_modules .envrc cdk.out + +.ideas diff --git a/src/data/mockPackages.json b/src/data/mockPackages.json new file mode 100644 index 0000000..a9b2b75 --- /dev/null +++ b/src/data/mockPackages.json @@ -0,0 +1,34 @@ +[ + { + "name": "sqlite", + "thumb_image_url": "/Images/package-thumb-nolabel.jpg", + "version": "V 2.4", + "installs": "12", + "maintainer": "axoel", + "slug": "sqlite" + }, + { + "name": "unicode.org", + "thumb_image_url": "/Images/package-thumb-nolabel.jpg", + "version": "V 2.4", + "installs": "432", + "maintainer": "pascal", + "slug": "unicode" + }, + { + "name": "tukaani.org/xz", + "thumb_image_url": "/Images/package-thumb-nolabel.jpg", + "version": "V 2.4", + "installs": "23", + "maintainer": "pascal", + "slug": "xz" + }, + { + "name": "bytereef.org/mpdecimal", + "thumb_image_url": "/Images/package-thumb-nolabel.jpg", + "version": "V 2.4", + "installs": "125673", + "maintainer": "pascal", + "slug": "mpdecimal" + } +] \ No newline at end of file diff --git a/src/layouts/index.html b/src/layouts/index.html index 8051fb0..cd49cdc 100644 --- a/src/layouts/index.html +++ b/src/layouts/index.html @@ -162,7 +162,7 @@ align-items: center; } - .swiper-slide img { + .swiper-slide figure > img { display: block; width: 100%; height: 100%; diff --git a/src/layouts/partials/detail-btn.html b/src/layouts/partials/detail-btn.html index c5081d9..a3807cd 100644 --- a/src/layouts/partials/detail-btn.html +++ b/src/layouts/partials/detail-btn.html @@ -34,4 +34,7 @@ - + + + + \ No newline at end of file diff --git a/src/layouts/partials/package-grid.html b/src/layouts/partials/package-grid.html index 7db8dc7..f76c8f3 100644 --- a/src/layouts/partials/package-grid.html +++ b/src/layouts/partials/package-grid.html @@ -13,30 +13,32 @@
-
- {{- partial "package-thumbnail.html" . -}} - {{- partial "package-thumbnail.html" . -}} - {{- partial "package-thumbnail.html" . -}} - {{- partial "package-thumbnail.html" . -}} -
-
- {{- partial "package-thumbnail.html" . -}} - {{- partial "package-thumbnail.html" . -}} - {{- partial "package-thumbnail.html" . -}} - {{- partial "package-thumbnail.html" . -}} -
-
- {{- partial "package-thumbnail.html" . -}} - {{- partial "package-thumbnail.html" . -}} - {{- partial "package-thumbnail.html" . -}} - {{- partial "package-thumbnail.html" . -}} -
-
- {{- partial "package-thumbnail.html" . -}} - {{- partial "package-thumbnail.html" . -}} - {{- partial "package-thumbnail.html" . -}} - {{- partial "package-thumbnail.html" . -}} +
+ {{ range $.Site.Data.mockPackages }} + {{- partial "package-thumbnail.html" .}} + {{ end }}
+ + \ No newline at end of file diff --git a/src/layouts/partials/package-thumbnail.html b/src/layouts/partials/package-thumbnail.html index fa5343c..0bba839 100644 --- a/src/layouts/partials/package-thumbnail.html +++ b/src/layouts/partials/package-thumbnail.html @@ -1,17 +1,58 @@
- ... +
+ {{- .name -}} +
+ tea +

{{- .name -}}

+

• {{- .maintainer -}}

+
+
-

V2.35
>45 installs

+

+ {{- .version -}} +
+ >{{- .installs -}} installs +

{{- partial "detail-btn.html" . -}}
- + + +
\ No newline at end of file