feat: parte hartzerako informazio gehigarria sartzen du
This commit is contained in:
1 parent
6d66f137d5
commit
5691871ab7
5 files changed
+37
-4
No files matched your search
@@ -21,6 +21,11 @@
|
||||
"options": {
|
||||
"output": "svg"
|
||||
}
|
||||
},
|
||||
"estekak": {
|
||||
"type": "component",
|
||||
"component": "hasiera.url",
|
||||
"repeatable": true
|
||||
}
|
||||
},
|
||||
"config": {}
|
||||
|
||||
Vendored
+1
@@ -65,6 +65,7 @@ export interface HasieraParteHartzea extends Struct.ComponentSchema {
|
||||
attributes: {
|
||||
deskribapena: Schema.Attribute.Text;
|
||||
email: Schema.Attribute.String;
|
||||
estekak: Schema.Attribute.Component<'hasiera.url', true>;
|
||||
ikonoa: Schema.Attribute.Text &
|
||||
Schema.Attribute.CustomField<
|
||||
'plugin::icons-field.icon',
|
||||
|
||||
@@ -8,6 +8,12 @@ export interface Partehartzea {
|
||||
izenburua: string;
|
||||
deskribapena: string;
|
||||
email: string;
|
||||
estekak: Url[];
|
||||
}
|
||||
|
||||
interface Url {
|
||||
label: string;
|
||||
url: string;
|
||||
}
|
||||
|
||||
export interface Hasiera {
|
||||
@@ -16,10 +22,7 @@ export interface Hasiera {
|
||||
izanLabazkide: {
|
||||
izenburua: string;
|
||||
deskribapena: Markdown;
|
||||
url: {
|
||||
label: string;
|
||||
url: string;
|
||||
};
|
||||
url: Url;
|
||||
};
|
||||
parteHartu: {
|
||||
izenburua: string;
|
||||
|
||||
@@ -27,6 +27,10 @@ const response = await fetch(`${import.meta.env.STRAPI_URL}/graphql`, {
|
||||
izenburua
|
||||
deskribapena
|
||||
email
|
||||
estekak {
|
||||
url
|
||||
label
|
||||
}
|
||||
}
|
||||
}
|
||||
mosaikoa (pagination: {
|
||||
|
||||
@@ -7,6 +7,8 @@ interface Props {
|
||||
}
|
||||
|
||||
const { partehartzea } = Astro.props;
|
||||
|
||||
const hasEstekak = partehartzea.estekak?.length > 0;
|
||||
---
|
||||
|
||||
<li>
|
||||
@@ -15,6 +17,16 @@ const { partehartzea } = Astro.props;
|
||||
<h3>{partehartzea.izenburua}</h3>
|
||||
<p>{partehartzea.deskribapena}</p>
|
||||
|
||||
{
|
||||
hasEstekak && (
|
||||
<div class="estekak">
|
||||
{partehartzea.estekak.map(({ url, label }) => (
|
||||
<a href={url}>{label}</a>
|
||||
))}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
<a href={`mailto:${partehartzea.email}`}>{partehartzea.email}</a>
|
||||
</li>
|
||||
|
||||
@@ -73,4 +85,12 @@ const { partehartzea } = Astro.props;
|
||||
|
||||
@include displayFonts.display6;
|
||||
}
|
||||
|
||||
.estekak {
|
||||
margin-bottom: var(--space-04-mobile);
|
||||
|
||||
@include mediaQueries.aboveTablet {
|
||||
margin-bottom: var(--space-05-desktop);
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Reference in new issue
Block a user