Skip to content

Commit b2cc7e1

Browse files
committed
feat: add callforpapers page
1 parent 3f7ceb9 commit b2cc7e1

File tree

13 files changed

+297
-98
lines changed

13 files changed

+297
-98
lines changed

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ export interface Event {
7373
isRemote: boolean;
7474
isOnsite: boolean;
7575
callForPapers: string | null;
76-
callForPapersEndDate: string | null;
76+
callForPapersDueDate: string | null;
7777
}
7878
```
7979

angular-hub/src/app/components/navigation/navigation.component.html

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,14 @@
4040
>Podcasts</a
4141
>
4242
</li>
43+
<li>
44+
<a
45+
class="p-button p-button-secondary p-button-text hover:bg-gray-500 py-1"
46+
routerLinkActive="routerLinkActive"
47+
routerLink="/callforpapers"
48+
>Call for papers</a
49+
>
50+
</li>
4351
</ul>
4452
</div>
4553
@if (isInstallButtonVisible()) {
@@ -94,6 +102,15 @@
94102
>Podcasts</a
95103
>
96104
</li>
105+
<li>
106+
<a
107+
class="hover:text-primary"
108+
routerLinkActive="sidebarActive"
109+
routerLink="/callforpapers"
110+
(click)="sidebarVisible = false"
111+
>Call for papers</a
112+
>
113+
</li>
97114
<p-divider />
98115
<li>
99116
<a
Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
import { Component } from '@angular/core';
2+
import { load } from './index.server';
3+
import { toSignal } from '@angular/core/rxjs-interop';
4+
import { injectLoad } from '@analogjs/router';
5+
import { DividerModule } from 'primeng/divider';
6+
7+
@Component({
8+
selector: 'app-callforpapers',
9+
standalone: true,
10+
template: `
11+
<aside
12+
class="h-36 w-full flex flex-col justify-center items-center mb-4 md:mb-8 bg-no-repeat bg-auto md:bg-cover px-4"
13+
style="background-image: url(/assets/images/hero.webp);"
14+
>
15+
<h1 class="title text-4xl sm:text-5xl">ANGULAR HUB</h1>
16+
<h2 class="text-2xl text-center">Curated list of Call for Papers</h2>
17+
</aside>
18+
19+
<h3 class="text-2xl font-bold mb-6">Events</h3>
20+
<ul
21+
class="grid grid-cols-1 md:grid-cols-2 xl:grid-cols-3 justify-center gap-8"
22+
>
23+
@for (event of callForPapers().events; track event.name) {
24+
<li class="group min-w-80">
25+
<a
26+
class="flex flex-col bg-gray-800 p-4 rounded-xl"
27+
[href]="event.callForPapersUrl"
28+
target="_blank"
29+
>
30+
<h4 class="text-xl font-bold mb-4 group-hover:text-secondary">
31+
{{ event.name }}
32+
</h4>
33+
<div class="flex items-start gap-4">
34+
<img
35+
class="rounded-xl"
36+
[src]="event.logo"
37+
height="100"
38+
width="100"
39+
alt=""
40+
/>
41+
<div>
42+
<dl>
43+
<dt><i class="pi pi-calendar-clock"></i> Start date</dt>
44+
<dd class="ml-5 opacity-65">{{ event.date }}</dd>
45+
<dt><i class="pi pi-calendar-clock"></i> End date</dt>
46+
<dd class="ml-5 opacity-65">{{ event.date }}</dd>
47+
<dt><i class="pi pi-map-marker"></i> Location</dt>
48+
<dd class="ml-5 opacity-65">
49+
{{ event.location ?? 'Online' }}
50+
</dd>
51+
</dl>
52+
</div>
53+
</div>
54+
<p-divider />
55+
<div class="text-center">
56+
<div class="opacity-65">CFP due date</div>
57+
<div class="text-2xl font-bold">
58+
{{ event.callForPapersDueDate }}
59+
</div>
60+
</div>
61+
</a>
62+
</li>
63+
} @empty {
64+
<li>No open call for papers found</li>
65+
}
66+
</ul>
67+
<p-divider />
68+
<h3 class="text-2xl font-bold my-6">Communities</h3>
69+
<ul
70+
class="grid grid-cols-1 md:grid-cols-2 xl:grid-cols-3 justify-center gap-8"
71+
>
72+
@for (community of callForPapers().communities; track community.name) {
73+
<li class="group min-w-80">
74+
<a
75+
class="flex flex-col bg-gray-800 p-4 rounded-xl"
76+
[href]="community.callForPapersUrl"
77+
target="_blank"
78+
>
79+
<h4 class="text-xl font-bold mb-4 group-hover:text-secondary">
80+
{{ community.name }}
81+
</h4>
82+
<div class="flex items-start gap-4">
83+
<img
84+
class="rounded-xl"
85+
[src]="community.logo"
86+
height="100"
87+
width="100"
88+
alt=""
89+
/>
90+
<div class="flex items-center gap-2">
91+
<i class="pi pi-map-marker"></i>
92+
<div class="opacity-65">
93+
{{ community.location ?? 'Online' }}
94+
</div>
95+
</div>
96+
</div>
97+
</a>
98+
</li>
99+
} @empty {
100+
<li>No open call for papers found</li>
101+
}
102+
</ul>
103+
`,
104+
styles: [
105+
`
106+
:host {
107+
display: flex;
108+
flex-direction: column;
109+
align-items: center;
110+
}
111+
`,
112+
],
113+
imports: [DividerModule],
114+
})
115+
export default class CallForPapersComponent {
116+
callForPapers = toSignal(injectLoad<typeof load>(), { requireSync: true });
117+
}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import { PageServerLoad } from '@analogjs/router';
2+
import {
3+
CallForPapers,
4+
EventCallForPapers,
5+
} from '../../../models/call-for-papers.model';
6+
7+
export const load = async ({
8+
fetch,
9+
}: PageServerLoad): Promise<{
10+
events: EventCallForPapers[];
11+
communities: CallForPapers[];
12+
}> => {
13+
return await Promise.all([
14+
fetch<EventCallForPapers[]>('/api/v1/events/callforpapers'),
15+
fetch<CallForPapers[]>('/api/v1/communities/callforpapers'),
16+
]).then(([events, communities]) => ({ events, communities }));
17+
};
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
export interface CallForPapers {
2+
name: string;
3+
type: 'workshop' | 'conference' | 'meetup' | 'other';
4+
logo: string | null;
5+
location: string | null;
6+
url: string;
7+
callForPapersUrl: string;
8+
}
9+
10+
export type EventCallForPapers = CallForPapers & {
11+
date: string;
12+
callForPapersDueDate: string | null;
13+
isRemote: boolean;
14+
isOnsite: boolean;
15+
};

angular-hub/src/models/event.model.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@ export interface Event {
1111
isRemote: boolean;
1212
isOnsite: boolean;
1313
callForPapers: string | null;
14-
callForPapersEndDate: string | null;
14+
callForPapersDueDate: string | null;
1515
community?: Community;
1616
}

0 commit comments

Comments
 (0)