Skip to content

Commit

Permalink
Merge branch 'master' into community_insights
Browse files Browse the repository at this point in the history
  • Loading branch information
SeanGau committed Dec 12, 2024
2 parents 15db795 + d34de8a commit 95c15e0
Show file tree
Hide file tree
Showing 30 changed files with 322 additions and 293 deletions.
6 changes: 3 additions & 3 deletions data/project.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@
- link: https://cofacts.g0v.tw/
slug: cofacts
zh:
name: 「真的假的」LINE Bot
name: Cofacts 真的假的
description: |
用聊天機器人和群眾協作查核澄清 LINE 封閉群組中的不實資訊。
真的假的 LINE Bot」讓不擅於使用 Google,資訊搜尋能力較低的使用者,可以在加入「真的假的 LINE Bot」之後,遇上任何 LINE 上不知真假的訊息時,直接轉發給機器人,接著就會收到回覆,判斷訊息的真假。
Cofacts 真的假的」讓不擅於使用 Google,資訊搜尋能力較低的使用者,可以在加入「Cofacts 真的假的」之後,遇上任何 LINE 上不知真假的訊息時,直接轉發給機器人,接著就會收到回覆,判斷訊息的真假。
en:
name: Cofacts LINE Bot
name: Cofacts 真的假的
description: |
A LINE chat bot to help separate misinformation from fact.
Expand Down
16 changes: 16 additions & 0 deletions staging
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/usr/bin/env bash
# Test Build

git checkout master
REV=`git describe --always`
rm -rf _public
git clone [email protected]:g0v/landing-page --depth 1 -b staging-pages _public
cd _public
git rm -rf *
cp -R ../web/static/* ./
git add *
git commit -m "regen for $REV"
git push
cd ..
rm -rf _public
echo "Done."
6 changes: 3 additions & 3 deletions web/locales/en/index.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ grantsDescription: 'Organized by <a href="https://jothon.g0v.tw" target="_blank"

## How to Join
getInvolved_title: "How to get involved?"
getInvolved_description: 'The best way to get to know g0v is to come participate. Whether online or offline, there are many channels to interact with members of the community. If you would like to learn more about open-source collaboration, you can take a look at <a href="https://g0v.hackmd.io/@jothon/g0v-cowork-guideline" target="_blank">g0v open-source collaboration guide</a>.'
getInvolved_description: 'The best way to get to know g0v is to come participate. Whether online or offline, there are many channels to interact with members of the community.'

## Offline
events: "Offline: Bimonthly g0v hackathons and smaller community hackathons"
Expand Down Expand Up @@ -79,6 +79,6 @@ organize: "Organize Related Events"
organizeBlurb: "Currently, g0v hackathons only take place in Taiwan, but civic hackers in other countries are beginning to take notice. Does your country have a g0v movement? Why not consider starting a g0v hackathon where you are?"
organizeLink: "Organize"
moreInfo: "More information"
callToAction: 'If you want to participate in g0v, but are unsure how, check out our'
callToAction: 'If you want to participate in g0v, but are unsure how, check out our Newcomers Guide'
newcomersGuideLinkText: 'Newcomers Guide'
baam: '!'
baam: '!'
3 changes: 2 additions & 1 deletion web/locales/en/nav.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@ contact: "Contact"
donate: "Donate"
coc: "COC"
g0vernance: "Governance"
about: "About"
about: "About"
portfolio: "Portfolio"
3 changes: 2 additions & 1 deletion web/locales/ja/index.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ organize: "関連するイベントを始める"
organizeBlurb: "現在、g0v ハッカソンは台湾を中心に開催されていますが、海外のいくつかの国が注目し始めています。あなたの国にまだありませんか? あなたの国で g0v ハッカソンを始めることを考えてみませんか?"
organizeLink: "今すぐ始める"
moreInfo: "もっと詳しく"
callToAction: "g0v に参加したいけど、どうすればいいのかわからないという方は、こちらをご覧ください"
callToAction: "g0v に参加したいけど、どうすればいいのかわからないという方は、こちらをご覧ください"
newcomersGuideLinkText: 'ビギナーズガイド'
baam: ''
qandaIntro: ""
3 changes: 2 additions & 1 deletion web/locales/ja/nav.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@ contact: "お問い合わせ"
donate: "寄付について"
coc: "行動規範"
governance: "ガバナンス"
about: "概要"
about: "概要"
portfolio: "プロジェクトポートフォリオ"
6 changes: 3 additions & 3 deletions web/locales/zh-TW/index.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ grantsDescription: '由「<a href="https://jothon.g0v.tw" target="_blank">g0v

# How to Join
getInvolved_title: "如何參與?"
getInvolved_description: '了解 g0v 最快的方式就是實際來參與一次。無論線上或線下,你都可以找得到各種管道與社群參與者互動。想要更了解開源協作的模式,可以參考 <a href="https://g0v.hackmd.io/@jothon/g0v-cowork-guideline" target="_blank">g0v 開源協作手冊</a>。'
getInvolved_description: '了解 g0v 最快的方式就是實際來參與一次。無論線上或線下,你都可以找得到各種管道與社群參與者互動。'

## Offline
events: "線下:大小黑客松雙月黑客松與社群小松"
Expand Down Expand Up @@ -79,6 +79,6 @@ organize: "發起相關活動"
organizeBlurb: "目前 g0v 黑客松主要仍在台灣舉行,但海外已有若干國家響應。在你的國家沒有嗎?何不考慮在你的國家發起 g0v 黑客松呢?"
organizeLink: "現在就發起"
moreInfo: "更多資訊"
callToAction: '若你想參與 g0v 卻仍不得其門而入,就來看看'
callToAction: '若你想參與 g0v 卻仍不得其門而入,就來看看新手指南'
newcomersGuideLinkText: '新手指南'
baam: ''
baam: ''
3 changes: 2 additions & 1 deletion web/locales/zh-TW/nav.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@ contact: "聯絡我們"
donate: "小額捐款"
coc: "社群守則"
g0vernance: "禮貌大師"
about: "關於我們"
about: "關於我們"
portfolio: "社群成果"
16 changes: 16 additions & 0 deletions web/src/ls/community99.ls
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
RSS_URL = "https://api.g0v.tw/community99/"

newsDom = document.getElementById("community99")
fetch(RSS_URL)
.then (response) ->
response.json()
.then !(data) ->
items = data.notes
for i from 0 to 2
el = items[i]
sections = el.sections
ss = ""
for j from 1 to sections.length - 1
ss += "<span class='tag'>#{sections[j]}</span>"
pp = "<div class='mb-2'><a href=\"#{el.url}\" target=\"\_blank\">#{el.title}</a><div>#{ss}</div></div>"
newsDom.insertAdjacentHTML('beforeend',pp)
27 changes: 15 additions & 12 deletions web/src/ls/dashboard.ls
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@
window.addEventListener 'load', ->
xhr = new XMLHttpRequest!
xhr.open 'GET', 'https://dashboard.g0v.tw/', true
xhr.onreadystatechange = ->
if xhr.readyState == 4 and xhr.status == 200
data = JSON.parse xhr.responseText
document.addEventListener 'DOMContentLoaded', ->
fetch 'https://dashboard.g0v.tw/'
.then (response) -> response.json!
.then (data) ->
document.getElementById('loading-text').style.display = 'none'
# console.log data
date = new Date data.create_at
document.getElementById('update-time').querySelector('span').textContent = date.toLocaleString!
document.querySelector('#update-time span').textContent = date.toLocaleString!

titles = Object.keys data.data
titles.forEach (_title) ->
_data = data.data[_title]
titles.forEach (title) ->
_data = data.data[title]
subtitles = Object.keys _data
subtitles.forEach (_subtitle) ->
document.getElementById(_title + '-' + _subtitle).querySelector('.card-text span').textContent = _data[_subtitle]
xhr.send!
subtitles.forEach (subtitle) ->
# console.log "#{title}-#{subtitle}: #{_data[subtitle]}"
element = document.querySelector "##{title}-#{subtitle} .card-text span"
element?.textContent = _data[subtitle]
.catch (error) ->
console.error 'Error fetching data:', error
15 changes: 0 additions & 15 deletions web/src/ls/news.ls

This file was deleted.

1 change: 1 addition & 0 deletions web/src/pug/base.pug
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ html(lang="en")
base(href="/")
include /modules/library.pug
//-+css("https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css")
+css("https://cdn.jsdelivr.net/npm/[email protected]/font/bootstrap-icons.min.css")
+css("/assets/lib/bootstrap/4.3.1/bootstrap.min.css")
+css("/assets/lib/ldui/ldui.min.css")
+css("/css/index.css")
Expand Down
92 changes: 2 additions & 90 deletions web/src/pug/dashboard/index.pug
Original file line number Diff line number Diff line change
@@ -1,92 +1,4 @@
extends /base.pug
block head
+css("/css/dashboard.css")
block body
.w-1024.px-2.px-lg-4.mx-auto.rwd.typeset.heading-contrast
.text-center.my-4.py-4
img(src="/assets/img/g0v-only.svg",style="width:3em")
h1.display-4.font-weight-bold g0v #[:i18n dashboard:dashboard]
.text-muted g0v dashboard
hr
.text-center
a#update-time.btn.btn-outline-dark(role="button" href="https://dashboard.g0v.tw/all" target="_blank"): :i18n dashboard:current
span n/a
p.text-center#loading-text: :i18n dashboard:loading
.container.py-4
.row
.col-12.col-sm-6.col-lg-4.p-2: .card#slack-users
.card-body.text-center
p.card-text
span 0
a(style='font-size: 2em;') +
br
a(href='https://join.g0v.tw/', target='_blank'): :i18n dashboard:slack_user
.col-12.col-sm-6.col-lg-4.p-2: .card#slack-channels
.card-body.text-center
p.card-text
span 0
:i18n dashboard:quantifier_1
br
:i18n dashboard:slack_channels
.col-12.col-sm-6.col-lg-4.p-2: .card#slack-messages
.card-body.text-center
p.card-text
span 0
a(style='font-size: 2em;') +
br
a(href='https://g0v-slack-archive.g0v.ronny.tw/', target='_blank'): :i18n dashboard:slack_message
.col-12.col-sm-6.col-lg-4.p-2: .card#summit-count
.card-body.text-center
p.card-text
span 0
:i18n dashboard:quantifier_2
br
a(href='https://summit.g0v.tw/', target='_blank'): :i18n dashboard:summit
.col-12.col-sm-6.col-lg-4.p-2: .card#hackathon-count
.card-body.text-center
p.card-text
span 0
:i18n dashboard:quantifier_2
br
a(href='https://jothon.g0v.tw/events/', target='_blank'): :i18n dashboard:hackathon
.col-12.col-sm-6.col-lg-4.p-2: .card#hackathon-proposals
.card-body.text-center
p.card-text
span 0
:i18n dashboard:quantifier_1
br
a(href='https://docs.google.com/spreadsheets/d/1C9-g1pvkfqBJbfkjPB0gvfBbBxVlWYJj6tTVwaI5_x8/', target='_blank'): :i18n dashboard:proposal
.col-12.col-sm-6.col-lg-4.p-2: .card#fanpage-like
.card-body.text-center
p.card-text
span 0
:i18n dashboard:quantifier_3
br
a(href='https://www.facebook.com/g0v.tw', target='_blank'): :i18n dashboard:likes
.col-12.col-sm-6.col-lg-4.p-2: .card#fanpage-follow
.card-body.text-center
p.card-text
span 0
:i18n dashboard:quantifier_3
br
a: :i18n dashboard:follows
.col-12.col-sm-6.col-lg-4.p-2: .card#github-repos
.card-body.text-center
p.card-text
span 0
a(style='font-size: 2em;') +
br
a(href='https://github.com/g0v', target='_blank'): :i18n dashboard:repo
.col-12.col-sm-6.col-lg-4.p-2: .card#10th-count
.card-body.text-center
p.card-text
span 1
:i18n dashboard:quantifier_2
br
a(href='https://10th.g0v.tw/', target='_blank'): :i18n dashboard:10th
p.text-center
| #[a(href="https://github.com/g0v/g0v-dashboard" target="_blank") g0v dashboard]
:i18n dashboard:is_opensource
block script
script(src='https://code.jquery.com/jquery-3.6.1.min.js' integrity='sha256-o88AwQnZB+VDvE9tvIXrMQaPlFFSUTR+nldQm1LuPXQ=' crossorigin='anonymous')
script(src='/js/dashboard.js')
script.
window.location.replace("/portfolio");
2 changes: 1 addition & 1 deletion web/src/pug/data/all.pug

Large diffs are not rendered by default.

Loading

0 comments on commit 95c15e0

Please sign in to comment.