Skip to content

Commit 43bbb67

Browse files
committed
[plugins] Makes plugin page responsive
1 parent 3a61206 commit 43bbb67

File tree

5 files changed

+39
-37
lines changed

5 files changed

+39
-37
lines changed

src/pages/desktop/index.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ import Layout from "../../layouts/Layout.astro";
2828

2929
<DownloadGephiDesktop withAlternativeLinks />
3030
</div>
31-
<div class="banner-image">
31+
<div class="banner-image banner-logo">
3232
<Image src="/icons/gephi-desktop-logo-inverted.svg" alt="Gephi logo" width="400" height="400" />
3333
</div>
3434
</div>

src/pages/desktop/plugins/[id].astro

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import { marked } from "marked";
55
66
import Layout from "../../../layouts/Layout.astro";
77
import type { Plugin } from "./type";
8+
import { Image } from "astro:assets";
89
910
interface Props {
1011
plugin: Plugin;
@@ -33,30 +34,31 @@ try {
3334
---
3435

3536
<Layout class="plugin-page">
36-
<header class="banner">
37+
<header class="banner py-4">
3738
<div class="container">
38-
<div class="py-3">
39+
<div class="banner-top">
3940
<a class="text-white" href="/desktop">Gephi</a> > <a class="text-white" href="/desktop/plugins">Gephi plugins</a
4041
> > <a class="text-white" href={`/desktop/plugins?categories=${plugin.category}`}>{plugin.category} plugins</a>
4142
</div>
4243

43-
<div class="content my-3 pb-5 pt-3">
44+
<div class="banner-contents">
45+
<div class="banner-texts gap-3">
46+
<h1 class="fs-2">{plugin.name}</h1>
47+
48+
<p class="fs-4">{plugin.short_description}</p>
49+
<p class="fs-5 opacity-75">last updated on {plugin.last_update}</p>
50+
</div>
4451
{
4552
!!plugin.images?.length && (
46-
<img
47-
class="flex-shrink-0"
48-
src={`https://raw.githubusercontent.com/gephi/gephi-plugins/refs/heads/gh-pages/plugins/${plugin.images[0].image}`}
49-
/>
53+
<div class="banner-image">
54+
<img
55+
class="flex-shrink-0 bg-white"
56+
src={`https://raw.githubusercontent.com/gephi/gephi-plugins/refs/heads/gh-pages/plugins/${plugin.images[0].image}`}
57+
alt=""
58+
/>
59+
</div>
5060
)
5161
}
52-
53-
<section class="flex-grow-1">
54-
<div class="">
55-
<h1>{plugin.name}</h1>
56-
<div class="fs-4">last updated on {plugin.last_update}</div>
57-
<p class="fs-4 mt-3">{plugin.short_description}</p>
58-
</div>
59-
</section>
6062
</div>
6163
</div>
6264
</header>

src/pages/lite/index.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ import Layout from "../../layouts/Layout.astro";
3434
<div class="fs-5 pt-2">Works on desktop, tablets and mobiles</div>
3535
</div>
3636
</div>
37-
<div class="banner-image">
37+
<div class="banner-image banner-logo">
3838
<Image src="/icons/gephi-lite-logo-inverted.svg" alt="Gephi logo" width="400" height="400" />
3939
</div>
4040
</div>

src/styles/_contents.scss

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,21 +7,31 @@
77
background-color: $gray-800;
88
@extend .text-light;
99

10+
.banner-top {
11+
padding-bottom: $spacer-3;
12+
}
13+
1014
.banner-contents {
11-
@extend .row;
15+
display: flex;
16+
gap: $spacer-5;
1217
}
1318

1419
.banner-texts {
15-
@extend .col-12;
16-
@extend .col-md-7;
17-
1820
display: flex;
1921
flex-direction: column;
22+
flex-grow: 1;
2023
gap: $spacer-4;
24+
25+
& > * {
26+
margin: 0;
27+
}
2128
}
2229
.banner-image {
23-
@extend .col-12;
24-
@extend .col-md-5;
30+
width: 28%;
31+
32+
&.banner-logo {
33+
width: 40%;
34+
}
2535

2636
text-align: end;
2737
img {
@@ -185,11 +195,15 @@
185195
gap: $spacer-3;
186196
}
187197
.banner-image {
198+
width: 100% !important;
188199
display: flex;
189200
justify-content: center;
190201

191202
img {
192203
height: auto;
204+
width: 100%;
205+
}
206+
&.banner-logo img {
193207
width: 80%;
194208
}
195209
}

src/styles/_plugins.scss

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -139,20 +139,6 @@
139139
}
140140

141141
.plugin-page {
142-
.banner .content {
143-
display: flex;
144-
flex-direction: row;
145-
align-items: center;
146-
@extend .gap-5;
147-
148-
img {
149-
background: $white;
150-
max-width: 30%;
151-
max-height: 300px;
152-
height: auto;
153-
}
154-
}
155-
156142
.thumbnails {
157143
display: flex;
158144
flex-direction: row;

0 commit comments

Comments
 (0)