File tree Expand file tree Collapse file tree 4 files changed +17
-35
lines changed Expand file tree Collapse file tree 4 files changed +17
-35
lines changed Original file line number Diff line number Diff line change @@ -3,14 +3,14 @@ name: Check
3
3
on :
4
4
push :
5
5
branches :
6
- - main
6
+ - master
7
7
pull_request :
8
8
types :
9
9
- opened
10
10
- reopened
11
11
- synchronize
12
12
branches :
13
- - main
13
+ - master
14
14
15
15
workflow_dispatch :
16
16
Original file line number Diff line number Diff line change 5
5
types :
6
6
- closed
7
7
branches :
8
- - main
8
+ - master
9
9
10
10
jobs :
11
11
publish :
12
- if : github.event.pull_request.merged == true && github.head_ref == 'changeset-release/main '
12
+ if : github.event.pull_request.merged == true && github.head_ref == 'changeset-release/master '
13
13
name : Publish
14
14
runs-on : ubuntu-latest
15
15
steps :
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ name: Version
3
3
on :
4
4
push :
5
5
branches :
6
- - main
6
+ - master
7
7
8
8
jobs :
9
9
version :
Original file line number Diff line number Diff line change 1
1
---
2
2
import { currentLocale } from " astro-nanostores-i18n:runtime" ;
3
3
import Image from " astro/components/Image.astro" ;
4
+ import { getCollection } from " astro:content" ;
4
5
import { getEntry } from " astro:content" ;
5
6
6
7
type Props = {
7
8
class? : string ;
8
- gallery : string ;
9
+ title : string ;
9
10
};
10
11
11
- const { class : className, gallery } = Astro .props ;
12
+ const { class : className, title } = Astro .props ;
12
13
const locale = currentLocale .get ();
13
- const galleryEntry = await getEntry (" galleries" , ` ${gallery }/${locale } ` );
14
- if (! galleryEntry ) {
15
- throw new Error (` Gallery not found: ${gallery } (${locale }) ` );
14
+ console .log (className );
15
+ console .log (await getCollection (" galleries" ));
16
+ const gallery = await getEntry (" galleries" , ` ${title }/${locale } ` );
17
+ if (! gallery ) {
18
+ throw new Error (` Gallery not found: ${title } (${locale }) ` );
16
19
}
17
20
---
18
21
19
22
<section class:list ={ [className ]} >
20
23
<slot name =" title" />
21
24
<div >
22
25
{
23
- galleryEntry .data .items .map ((item ) => (
24
- <Image src = { item .photo } width = { 800 } alt = { typeof item .label === " string" ? item .label : " " } />
26
+ gallery .data .items .map ((item ) => (
27
+ <div >
28
+ <Image src = { item .photo } alt = { typeof item .label === " string" ? item .label : " " } />
29
+ </div >
25
30
))
26
31
}
27
32
</div >
28
33
</section >
29
-
30
- <style >
31
- section {
32
- & > div {
33
- display: grid;
34
- grid-template-columns: repeat(2, 1fr);
35
- justify-items: center;
36
-
37
- img {
38
- height: auto;
39
- width: 100%;
40
- object-fit: cover;
41
- border-radius: var(--size-border-radius);
42
- filter: saturate(0.2);
43
- transition: 1s;
44
-
45
- &:hover {
46
- filter: saturate(1);
47
- }
48
- }
49
- }
50
- }
51
- </style >
You can’t perform that action at this time.
0 commit comments