diff --git a/server.js b/server.js index 552ebc02..189da1c0 100644 --- a/server.js +++ b/server.js @@ -43,10 +43,20 @@ app.prepare().then(() => { // server.use(async (ctx, next) => { - if ('/' === ctx.path) { - await send(ctx, './static/index.html'); - } else { - await next(); + switch (ctx.path) { + case '/': { + const lang = ctx.acceptsLanguages(['zh', 'en']).replace('zh', 'tw'); + await send(ctx, `./static/index-${lang}.html`); + break; + } + case '/en': + await send(ctx, './static/index-en.html'); + break; + case '/tw': + await send(ctx, './static/index-tw.html'); + break; + default: + await next(); } }); diff --git a/static/index.css b/static/index-en.css similarity index 100% rename from static/index.css rename to static/index-en.css diff --git a/static/index.html b/static/index-en.html similarity index 62% rename from static/index.html rename to static/index-en.html index 34d23c25..28252633 100644 --- a/static/index.html +++ b/static/index-en.html @@ -1,5 +1,4 @@ - -

Are you aware that your mom is helping the spread of internet hoaxes?

Follow our LINE bot or join as one of our Cofacts editor.
Local moms need your protection!


Start busting hoaxes now

Follow our LINE@, and send any suspected hoax, scam, rumor, or urban legend to verify its truth.

Search by ID “@cofacts” or scan our QR Code to follow our Cofacts LINE@ account, forward any possible hoax, scam, rumor, or urban legend sources to it, then our chatbot will help you check the credibility of the source!

TUTORIAL

Write your own response and share your wisdom!

The responses a user see are also submitted by other users. Here we do not have all-knowing judges, only citizens who cooperate and contribute. Think others’ response not good enough? Is there something you’d like to find out but it has not been requested yet? Write your own response and help others!

Every suspicious source is sent from an user, which is open to public for examination and response. One single request can be responded by different people, allowing each response to take a step closer to unravelling its truth.

HOAX SEARCH

A war between hoaxes and facts.

The difficulties we face...

About
250
new messages entering our database each week.
About
210
people forwarding new messages to our database each week.
But less than
12
active editors can help us respond each week.
Every
2
months we hold a gathering of editors.

Features

Cofacts program encourages people to become part of a chatbot for helping others. With your research, you can add your hoax busting responses into our database to help people acknowledge its lies.


Crowdsourcing

Anyone can verify and respond to other’s requests on possible hoax and upload it into our database. We encourage citizens to join our program, even invite your mom and dad to join.

Real-Time Response

Once someone respond to your pending request, the chatbot will answer you through LINE. It’s fast and immediate, you don’t even have to wait. Better yet, you don’t even need to say ‘thank you’. Ask the bot to verify for you, no need to feel uncomfortable asking it for favors.

Different Views

Knowing what’s fact and what’s an opinion. Seeing different sides of the story makes you realize your own blindspot, allowing everyone to respect each other’s perspectives.

Open Source Authorization

Codes of different patches, meeting records and database statistics are all opened to public. We encourage more open source data; work and share with others in a transparent environment, create different possibilities.

See what others have to say.

Join our open source community.

Cofacts needs all of you to help our current program to be more efficient and complete. This collaborate program cannot be completed by a small community, we need everyone to contribute, write codes, bust hoaxes and research. Self-motivated researching and responding is the way to transcend this program into something great.

We welcome everyone to join us, here is what we’re looking for.


\ No newline at end of file +document.getElementById('long-name').innerHTML = chosenCharacter.long;

Follow our LINE@, and send any suspected hoax, scam, rumor, or urban legend to verify its truth.

Search by ID “@cofacts” or scan our QR Code to follow our Cofacts LINE@ account, forward any possible hoax, scam, rumor, or urban legend sources to it, then our chatbot will help you check the credibility of the source!

TUTORIAL

Write your own response and share your wisdom!

The responses a user see are also submitted by other users. Here we do not have all-knowing judges, only citizens who cooperate and contribute. Think others’ response not good enough? Is there something you’d like to find out but it has not been requested yet? Write your own response and help others!

Every suspicious source is sent from an user, which is open to public for examination and response. One single request can be responded by different people, allowing each response to take a step closer to unravelling its truth.

HOAX SEARCH

A war between hoaxes and facts.

The difficulties we face...

About
250
new messages entering our database each week.
About
210
people forwarding new messages to our database each week.
But less than
12
active editors can help us respond each week.
Every
2
months we hold a gathering of editors.

Features

Cofacts program encourages people to become part of a chatbot for helping others. With your research, you can add your hoax busting responses into our database to help people acknowledge its lies.


Crowdsourcing

Anyone can verify and respond to other’s requests on possible hoax and upload it into our database. We encourage citizens to join our program, even invite your mom and dad to join.

Real-Time Response

Once someone respond to your pending request, the chatbot will answer you through LINE. It’s fast and immediate, you don’t even have to wait. Better yet, you don’t even need to say ‘thank you’. Ask the bot to verify for you, no need to feel uncomfortable asking it for favors.

Different Views

Knowing what’s fact and what’s an opinion. Seeing different sides of the story makes you realize your own blindspot, allowing everyone to respect each other’s perspectives.

Open Source Authorization

Codes of different patches, meeting records and database statistics are all opened to public. We encourage more open source data; work and share with others in a transparent environment, create different possibilities.

See what others have to say.

Join our open source community.

Cofacts needs all of you to help our current program to be more efficient and complete. This collaborate program cannot be completed by a small community, we need everyone to contribute, write codes, bust hoaxes and research. Self-motivated researching and responding is the way to transcend this program into something great.

We welcome everyone to join us, here is what we’re looking for.


\ No newline at end of file diff --git a/static/index-tw.css b/static/index-tw.css new file mode 100644 index 00000000..bd17113c --- /dev/null +++ b/static/index-tw.css @@ -0,0 +1,163 @@ +html, +body { + width: 100%; + height: 100%; + margin: 0; + padding: 0; + font-size: 22px; + font-family: wt011, Helvetica, Arial, sans-serif; +} +h1, +h2, +h3, +h4, +h5 { + font-weight: 900; +} +nav { + text-shadow: 0 0 2px rgba(0,0,0,0.3); + font-size: 0.9em; +} +.jumbotron { + height: 100%; + max-height: 640px; + margin-bottom: 0; + position: relative; + background: url("img/jumbotron.jpg") center center no-repeat #222; + background-size: cover; + border-radius: 0; +} +.jumbotron .text-center { + position: absolute; + top: 0; + left: 0; + right: 0; + bottom: 0; + margin: auto; + height: 210px; +} +.jumbotron .emphasis { + font-style: normal; + color: #ffc107; +} +.section { + padding: 80px 20px; +} +.section .inner { + margin: 0 auto; + max-width: 1024px; +} +h2 { + margin-bottom: 50px; +} +.huge { + font-size: 3em; + font-weight: 900; +} +.section-line { + padding: 0 40px; +} +.section-line .inner { + display: flex; + flex-flow: wrap; + justify-content: center; + align-items: flex-end; +} +.section-line .content { + padding: 40px 0; + min-width: 50%; + -webkit-flex: 1; + flex: 1; +} +.phone-container { + margin: 0 20px; + max-width: 100%; + width: 360px; + overflow: hidden; +} +.phone-container .phone-img { + width: 100%; + padding-bottom: 150%; + background: url("img/phone.png") top left; + background-size: cover; + position: relative; +} +.phone-container video { + position: absolute; + width: 78%; + left: 11%; + top: 14%; +} +.section-why { + background: #fff url("img/cofacts-db-bg.jpg") bottom left no-repeat; +} +.section-why p { + background: rgba(255,255,255,0.6); +} +.section-photos { + padding: 0; +} +.section-photos .inner { + display: flex; + -webkit-flex-wrap: wrap; + flex-wrap: wrap; + width: 100%; + max-width: 100%; +} +.section-photos .photo { + -webkit-flex: 1 1 auto; + flex: 1 1 auto; + width: 33%; + height: 270px; + background-color: #000; + background-position: center center; + background-size: cover; + box-shadow: inset 0 0 0 1px rgba(255,255,255,0.2); +} +.section-photos .photo .mask { + content: " "; + width: 100%; + height: 100%; + display: block; + background: #000; + opacity: 0.5; +} +.section-photos .photo:hover .mask { + opacity: 0; +} +.section-features { + padding-top: 90px; +} +.section-features .icon { + font-size: 90px; + margin-bottom: 40px; +} +.section-features p { + font-size: 0.9em; + color: #555; +} +.section-contribute { + background: #fff url("img/giraffe.jpg") bottom right no-repeat; + background-size: 150px auto; +} +.section-footer a { + color: #9be; +} +.sep.gap-sm { + margin: 15px 0; +} +.sep.gap { + margin: 30px 0; +} +.sep.gap-lg { + margin: 60px 0; +} +.sep.light { + border-bottom: 1px solid rgba(255,255,255,0.5); +} +.sep.dark { + border-bottom: 1px solid rgba(0,0,0,0.5); +} +.sep.light-dark { + border-bottom: 1px solid rgba(0,0,0,0.1); +} diff --git a/static/index-tw.html b/static/index-tw.html new file mode 100644 index 00000000..40122899 --- /dev/null +++ b/static/index-tw.html @@ -0,0 +1,15 @@ +

你知道你轉傳謠言嗎?

現在就加入 LINE bot 與 Cofacts 編輯
地方的媽媽需要你來闢謠!


立刻開始闢謠

開 LINE 加好友,謠言隨手查!

id 搜尋 @cofacts 或是掃描 QR Code 成為真的假的 Cofacts 的 LINE 好友後,轉傳可疑的謠言訊息給他,就可以讓機器人幫你查謠言囉!

使用教學

自己的回應自己寫

使用者所看到的回應,是由其他同樣是使用者的人所寫出來的喔。我們沒有全知全能的判斷者,只有互相貢獻的公民協作。覺得別人的回應回得不夠好嗎?你想知道的事情還沒有人查證過嗎?自己寫出新回應,一起幫助更多人。

資料庫裡每一則可疑的轉傳文章都是來自某位使用者,公開檢索,讓你查證後給予回應。一則文章也可以有不同人分別給予各自的回應,讓新的回應比舊的回應更好。

謠言資料庫檢索

謠言與回應的追逐戰

這是我們目前在面對的事情

每週有
250
則新訊息進入資料庫
每週有
210
人發新訊息至資料庫
每週僅
12
名編輯上線闢謠
2
個月舉辦編輯小聚

Cofacts 特色

Cofacts 謠言查證專案 致力於鼓勵所有人都一起成為別人的聊天機器人。只要主動查證謠言訊息,把你查到的回應加入資料庫,就能進而幫助更多人。


群眾協作

任何人都可以查證且回應別人的謠言或訊息,並寫在資料庫裡。我們鼓勵公眾參與,最好把你爸爸媽媽都一起找來闢謠。

即時回應

只要資料庫裡有回應,機器人就透過程式找答案給你,即時方便不用等。連問候答謝都省了,聊天機器人讓你查謠言都不用不好意思。

意見交鋒

了解事實與評論的差異,同時看見不同立場的意見,覺察自己的盲點,互相尊重。你聽你的鳥鳴,但也可以湊過去看她的日出。

開源授權

過往的程式碼、會議紀錄、數據資料都完全公開,鼓勵更多的開放資料,透明化地與每個人分享合作,創造不同的可能性。

媒體報導

一起來開源

Cofacts 需要大家一起來幫忙讓目前的專案做得更好更完整。協作專案無法由少數人來完成,我們需要每一個人都一起付出、寫程式、闢謠、仔細研究查資料,自發性的查證與寫回應才能成就背後龐大的資料庫。

這裡列出我們需要的協助,歡迎每一個朋友加入我們。


\ No newline at end of file