File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ /** Serialize an object for safe embedding in {@html `<script type="application/ld+json">`} */
2+ export function safeJsonLd ( obj : unknown ) : string {
3+ // Escape '<' to prevent </script> from closing the tag
4+ return JSON . stringify ( obj ) . replaceAll ( "<" , "\\u003c" ) ;
5+ }
Original file line number Diff line number Diff line change 88 import SponsorsSection from " $lib/components/home/SponsorsSection.svelte" ;
99 import StatsSection from " $lib/components/home/StatsSection.svelte" ;
1010 import { UTCODE_FOUNDING_YEAR } from " $lib/shared/constants" ;
11+ import { safeJsonLd } from " $lib/shared/logic/json-ld" ;
1112 import type { PageData } from " ./$types" ;
1213
1314 const { data }: { data: PageData } = $props ();
2122 <meta property =" og:title" content =" ut.code(); - 東京大学ソフトウェアエンジニアリングサークル" />
2223 <meta name =" description" content =" ut.code();は東京大学のソフトウェアエンジニアリングサークルです。学習・交流・開発を通じてプログラミングの魅力を届けます。" />
2324 <meta property =" og:description" content =" ut.code();は東京大学のソフトウェアエンジニアリングサークルです。学習・交流・開発を通じてプログラミングの魅力を届けます。" />
24- {@html ` <script type="application/ld+json">${JSON . stringify ({
25+ {@html ` <script type="application/ld+json">${safeJsonLd ({
2526 " @context" : " https://schema.org" ,
2627 " @type" : " Organization" ,
2728 name: " ut.code();" ,
Original file line number Diff line number Diff line change 11<script lang =" ts" >
22 import { HelpCircle } from " lucide-svelte" ;
3+ import { safeJsonLd } from " $lib/shared/logic/json-ld" ;
34
45 type FAQ = {
56 question: string ;
7374 content =" ut.code(); についてよくある質問とその回答をまとめました。入部方法、活動内容、参加条件などについてご確認いただけます。"
7475 />
7576 <meta property =" og:description" content =" ut.code(); についてよくある質問とその回答をまとめました。入部方法、活動内容、参加条件などについてご確認いただけます。" />
76- {@html ` <script type="application/ld+json">${JSON . stringify ({
77+ {@html ` <script type="application/ld+json">${safeJsonLd ({
7778 " @context" : " https://schema.org" ,
7879 " @type" : " FAQPage" ,
7980 mainEntity: faqs .map ((faq ) => ({
Original file line number Diff line number Diff line change 124124 >
125125 <p >
126126 プロジェクトは、ut.code();
127- 内のチームにより開発されるソフトウェアの単位で、多くはそれぞれ独立した Slack
127+ 内のチームにより開発されるソフトウェアの単位で、多くはそれぞれ独立した Discord
128128 チャンネル、Notion ページ、Google Drive
129129 フォルダを持っています。成果物はすべてオープンソースであり、GitHub 上で公開されています。
130130 </p >
Original file line number Diff line number Diff line change 11<script lang =" ts" >
22 import Markdown from " $lib/components/Markdown.svelte" ;
3+ import { safeJsonLd } from " $lib/shared/logic/json-ld" ;
34 import type { PageData } from " ./$types" ;
45
56 const { data }: { data: PageData } = $props ();
6-
7+
78 </script >
89
910<svelte:head >
2425 {#if data .article .publishedAt }
2526 <meta property ="article:published_time" content ={data .article .publishedAt .toISOString ()} />
2627 {/if }
27- {@html ` <script type="application/ld+json">${JSON . stringify ({
28+ {@html ` <script type="application/ld+json">${safeJsonLd ({
2829 " @context" : " https://schema.org" ,
2930 " @type" : " Article" ,
3031 headline: data .article .title ,
Original file line number Diff line number Diff line change 9797 ut.code();
9898 の新歓イベントとしては一番大きなものになります!部員や他の新入生とも交流できるいい機会になります!ぜひご参加ください!
9999 </p >
100- <a
101- href =" https://forms.gle/m2BV6YbAPkw4yXLq7"
102- target =" _blank"
103- rel =" noopener noreferrer"
104- class =" mt-3 inline-flex items-center gap-1 rounded-lg bg-primary px-4 py-2 text-sm font-medium text-zinc-900 hover:bg-primary/90"
105- >
106- 参加登録はこちら →
107- </a >
100+ <p class =" mt-3 text-sm text-zinc-400" >※ 参加登録は締め切りました</p >
108101 </div >
109102 <div >
110103 <h3 class =" mb-2 font-semibold" >新歓ハッカソン</h3 >
Original file line number Diff line number Diff line change 11<script lang =" ts" >
22 import { Github , Globe , Twitter } from " lucide-svelte" ;
33 import Markdown from " $lib/components/Markdown.svelte" ;
4+ import { safeJsonLd } from " $lib/shared/logic/json-ld" ;
45 import type { PageData } from " ./$types" ;
56
67 const { data }: { data: PageData } = $props ();
2425 <meta property ="og:image" content ={data .member .imageUrl } />
2526 <meta name ="twitter:image" content ={data .member .imageUrl } />
2627 {/if }
27- {@html ` <script type="application/ld+json">${JSON . stringify ({
28+ {@html ` <script type="application/ld+json">${safeJsonLd ({
2829 " @context" : " https://schema.org" ,
2930 " @type" : " Person" ,
3031 name: data .member .name ,
Original file line number Diff line number Diff line change 8282 <Markdown content ={data .project .content } />
8383 {/if }
8484
85+ {#if data .project .projectMembers .length > 0 }
8586 <section class =" mt-8 border-t border-zinc-200 pt-6 sm:mt-12 sm:pt-8" >
8687 <h2 class =" mb-3 text-lg font-semibold sm:mb-4 sm:text-xl" >メンバー</h2 >
8788 <div class =" flex flex-col gap-3 sm:flex-row sm:flex-wrap sm:gap-4" >
114115 {/each }
115116 </div >
116117 </section >
118+ {/if }
117119 </article >
118120{:else }
119121 <div class =" mx-auto max-w-3xl px-6 py-16 text-center" >
You can’t perform that action at this time.
0 commit comments