Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(liff): embed mgp award #388

Merged
merged 3 commits into from
Mar 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/liff/App.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,15 @@
import Comment from './pages/Comment.svelte';
import UserSetting from './pages/UserSetting.svelte';
import Feedback from './pages/Feedback.svelte';
import Mgp from './pages/Mgp.svelte';

const routes = {
article: Article,
articles: Articles,
setting: UserSetting,
comment: Comment,
feedback: Feedback,
mgp: Mgp,
};

// Send pageview with correct path on each page change.
Expand Down
18 changes: 18 additions & 0 deletions src/liff/pages/Mgp.svelte
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<script>
const userId = liff.getDecodedIDToken().sub;
let iframeUrl = `https://www.surveycake.com/s/eqNpB?ssn0=${userId}&ssn58=cofacts`
</script>

<style>
iframe {
width: 100vw;
height: 100vh;
border: 0;
}
</style>

<svelte:head>
<title>Cofacts x 第四屆 MyGoPen 謠言惑眾獎</title>
</svelte:head>

<iframe title="謠言惑眾獎" src={iframeUrl} />
Loading