@@ -9,6 +9,7 @@ import { formatPlural, getDevtools } from "../../lib/helpers.tsx";
99import  {  Submission  }  from  "../../lib/types.d.tsx" ; 
1010import  {  Submission  as  SubmissionComponent  }  from  "../../components/Submission.tsx" ; 
1111import  {  FullCreditsGeneration  }  from  "../../islands/CopyButton.tsx" ; 
12+ import  {  Head  }  from  "$fresh/runtime.ts" ; 
1213
1314export  default  async  function  Submissions ( _req : Request ,  ctx : RouteContext )  { 
1415  const  event  =  await  fetchEvent ( fetch ,  ctx . params . event ) ; 
@@ -36,58 +37,73 @@ export default async function Submissions(_req: Request, ctx: RouteContext) {
3637  const  devtools  =  getDevtools ( _req ) ; 
3738
3839  return  ( 
39-     < div 
40-       class = "flex flex-col gap-4 mb-16" 
41-       style = { `--color-mf-link: #${ event . colors . primary } ${ event . colors . secondary }  } 
42-     > 
43-       < a 
44-         href = { `/${ event . id }  } 
45-         class = "card flex flex-row gap-4 clickable" 
46-         style = { `background-color: #${ event . colors . secondary }  } 
40+     < > 
41+       < Head > 
42+         < title > { event . name }  Submissions - ModFest</ title > 
43+         < meta 
44+           property = "og:title" 
45+           content = { `${ event . name }  } 
46+         /> 
47+         < meta 
48+           property = "og:description" 
49+           content = { `All submissions to ${ event . name }  } 
50+         /> 
51+         < meta  property = "og:image"  content = { event . images . background }  /> 
52+         < meta  name = "twitter:card"  content = "summary_large_image"  /> 
53+       </ Head > 
54+       < div 
55+         class = "flex flex-col gap-4 mb-16" 
56+         style = { `--color-mf-link: #${ event . colors . primary } ${ event . colors . secondary }  } 
4757      > 
48-         < div  class = "icon" > 
49-           < img 
50-             alt = { `Transparent icon for to ${ event . name }  } 
51-             class = "h-16" 
52-             src = { event . images . transparent } 
53-           /> 
58+         < a 
59+           href = { `/${ event . id }  } 
60+           class = "card flex flex-row gap-4 clickable" 
61+           style = { `background-color: #${ event . colors . secondary }  } 
62+         > 
63+           < div  class = "icon" > 
64+             < img 
65+               alt = { `Transparent icon for to ${ event . name }  } 
66+               class = "h-16" 
67+               src = { event . images . transparent } 
68+             /> 
69+           </ div > 
70+           < div > 
71+             < h1 
72+               style = { { 
73+                 color : ( event . id  !==  "bc23" 
74+                   ? "var(--color-mf-heading)" 
75+                   : "var(--color-mf-card)" ) , 
76+               } } 
77+             > 
78+               { event . name } 
79+             </ h1 > 
80+             < p > 
81+               { `${ event . name } ${  
82+                 event . phase  ==  "modding"  ? "has"  : "had"  
83+               }   a total of ${ 
84+                 formatPlural ( "submission" ,  submissions . length )  
85+               }   created by ${ 
86+                 formatPlural (  
87+                   "modder" ,  
88+                   participants . size ,  
89+                 )  
90+               }  ${ event . phase  ===  "modding"  ? " so far"  : "" } } 
91+             </ p > 
92+           </ div > 
93+         </ a > 
94+         { devtools  && 
95+           < FullCreditsGeneration  submissions = { submissions }  users = { users }  /> } 
96+         < div  class = "grid grid-cols-1 sm:grid-cols-2 gap-4" > 
97+           { submissions . map ( ( submission : Submission ,  submissionIndex )  =>  ( 
98+             < SubmissionComponent 
99+               submission = { submission } 
100+               users = { users } 
101+               key = { submissionIndex } 
102+               devtools = { devtools } 
103+             /> 
104+           ) ) } 
54105        </ div > 
55-         < div > 
56-           < h1 
57-             style = { { 
58-               color : ( event . id  !==  "bc23" 
59-                 ? "var(--color-mf-heading)" 
60-                 : "var(--color-mf-card)" ) , 
61-             } } 
62-           > 
63-             { event . name } 
64-           </ h1 > 
65-           < p > 
66-             { `${ event . name } ${  
67-               event . phase  ==  "modding"  ? "has"  : "had"  
68-             }   a total of ${ 
69-               formatPlural ( "submission" ,  submissions . length )  
70-             }   created by ${ 
71-               formatPlural (  
72-                 "modder" ,  
73-                 participants . size ,  
74-               )  
75-             }  ${ event . phase  ===  "modding"  ? " so far"  : "" } } 
76-           </ p > 
77-         </ div > 
78-       </ a > 
79-       { devtools  && 
80-         < FullCreditsGeneration  submissions = { submissions }  users = { users }  /> } 
81-       < div  class = "grid grid-cols-1 sm:grid-cols-2 gap-4" > 
82-         { submissions . map ( ( submission : Submission ,  submissionIndex )  =>  ( 
83-           < SubmissionComponent 
84-             submission = { submission } 
85-             users = { users } 
86-             key = { submissionIndex } 
87-             devtools = { devtools } 
88-           /> 
89-         ) ) } 
90106      </ div > 
91-     </ div > 
107+     </ > 
92108  ) ; 
93109} 
0 commit comments