SNSカードを治ったと思った
このコミットが含まれているのは:
コミット
e634b2576c
|
@ -3,7 +3,7 @@ hostname = "twitter.owacon.moe"
|
||||||
title = "オワコンTwitter"
|
title = "オワコンTwitter"
|
||||||
address = "0.0.0.0"
|
address = "0.0.0.0"
|
||||||
port = 8088
|
port = 8088
|
||||||
https = false # disable to enable cookies when not using https
|
https = true # disable to enable cookies when not using https
|
||||||
httpMaxConnections = 100
|
httpMaxConnections = 100
|
||||||
staticDir = "./public"
|
staticDir = "./public"
|
||||||
|
|
||||||
|
|
|
@ -139,10 +139,10 @@ proc pageDesc*(user: User): string =
|
||||||
if user.bio.len > 0:
|
if user.bio.len > 0:
|
||||||
stripHtml(user.bio)
|
stripHtml(user.bio)
|
||||||
else:
|
else:
|
||||||
"The latest tweets from " & user.fullname
|
user.fullname & "さんから最新のツイート"
|
||||||
|
|
||||||
proc getJoinDate*(user: User): string =
|
proc getJoinDate*(user: User): string =
|
||||||
user.joinDate.format("'Joined' MMMM YYYY")
|
user.joinDate.format("YYYY'年'MM'月に参加'")
|
||||||
|
|
||||||
proc getJoinDateFull*(user: User): string =
|
proc getJoinDateFull*(user: User): string =
|
||||||
user.joinDate.format("h:mm tt - d MMM YYYY")
|
user.joinDate.format("h:mm tt - d MMM YYYY")
|
||||||
|
|
|
@ -50,7 +50,7 @@ macro genPrefs*(prefDsl: untyped) =
|
||||||
const `name`*: PrefList = toOrderedTable(`table`)
|
const `name`*: PrefList = toOrderedTable(`table`)
|
||||||
|
|
||||||
genPrefs:
|
genPrefs:
|
||||||
Display:
|
"表示":
|
||||||
theme(select, "Nitter"):
|
theme(select, "Nitter"):
|
||||||
"テーマ"
|
"テーマ"
|
||||||
|
|
||||||
|
@ -58,10 +58,10 @@ genPrefs:
|
||||||
"無限スクロール(JS必須)"
|
"無限スクロール(JS必須)"
|
||||||
|
|
||||||
stickyProfile(checkbox, true):
|
stickyProfile(checkbox, true):
|
||||||
"Make profile sidebar stick to top"
|
"プロフィールサイドバーはページ上に付く"
|
||||||
|
|
||||||
bidiSupport(checkbox, false):
|
bidiSupport(checkbox, false):
|
||||||
"Support bidirectional text (makes clicking on tweets harder)"
|
"両方向文字対応(ツイートをクリックしにくくなる)"
|
||||||
|
|
||||||
hideTweetStats(checkbox, false):
|
hideTweetStats(checkbox, false):
|
||||||
"ツイートの詳細(返事、RT、いいね)を隠す"
|
"ツイートの詳細(返事、RT、いいね)を隠す"
|
||||||
|
@ -76,9 +76,9 @@ genPrefs:
|
||||||
"ツイートに返事を隠す"
|
"ツイートに返事を隠す"
|
||||||
|
|
||||||
squareAvatars(checkbox, false):
|
squareAvatars(checkbox, false):
|
||||||
"Square profile pictures"
|
"四角形プロフィールアイコン"
|
||||||
|
|
||||||
Media:
|
"メディア":
|
||||||
mp4Playback(checkbox, true):
|
mp4Playback(checkbox, true):
|
||||||
"MP4再生(GIFのみ)"
|
"MP4再生(GIFのみ)"
|
||||||
|
|
||||||
|
@ -94,7 +94,7 @@ genPrefs:
|
||||||
autoplayGifs(checkbox, true):
|
autoplayGifs(checkbox, true):
|
||||||
"自動的にGIFの再生"
|
"自動的にGIFの再生"
|
||||||
|
|
||||||
"Link replacements (blank to disable)":
|
"リンクの変換(無効にするには、かっこにして下さい)":
|
||||||
replaceTwitter(input, "twitter.owacon.moe"):
|
replaceTwitter(input, "twitter.owacon.moe"):
|
||||||
"ツイッター → Nitter"
|
"ツイッター → Nitter"
|
||||||
placeholder: "twitter.owacon.moe"
|
placeholder: "twitter.owacon.moe"
|
||||||
|
|
|
@ -90,8 +90,10 @@ proc renderHead*(prefs: Prefs; cfg: Config; req: Request; titleText=""; desc="";
|
||||||
meta(property="og:type", content=ogType)
|
meta(property="og:type", content=ogType)
|
||||||
meta(property="og:title", content=(if ogTitle.len > 0: ogTitle else: titleText))
|
meta(property="og:title", content=(if ogTitle.len > 0: ogTitle else: titleText))
|
||||||
meta(property="og:description", content=stripHtml(desc))
|
meta(property="og:description", content=stripHtml(desc))
|
||||||
meta(property="og:site_name", content="Nitter")
|
meta(property="og:site_name", content="オワコンTwitter")
|
||||||
meta(property="og:locale", content="en_US")
|
meta(property="og:locale", content="ja_JP")
|
||||||
|
meta(property="twitter:title", content=(if ogTitle.len > 0: ogTitle else: titleText))
|
||||||
|
meta(property="twitter:description", content=stripHtml(desc))
|
||||||
|
|
||||||
if banner.len > 0 and not banner.startsWith('#'):
|
if banner.len > 0 and not banner.startsWith('#'):
|
||||||
let bannerUrl = getPicUrl(banner)
|
let bannerUrl = getPicUrl(banner)
|
||||||
|
@ -104,7 +106,7 @@ proc renderHead*(prefs: Prefs; cfg: Config; req: Request; titleText=""; desc="";
|
||||||
|
|
||||||
let image = getUrlPrefix(cfg) & getPicUrl(url)
|
let image = getUrlPrefix(cfg) & getPicUrl(url)
|
||||||
meta(property="og:image", content=image)
|
meta(property="og:image", content=image)
|
||||||
meta(property="twitter:image:src", content=image)
|
meta(property="twitter:image", content=image)
|
||||||
|
|
||||||
if rss.len > 0:
|
if rss.len > 0:
|
||||||
meta(property="twitter:card", content="summary")
|
meta(property="twitter:card", content="summary")
|
||||||
|
|
|
@ -41,7 +41,7 @@ proc renderPreferences*(prefs: Prefs; path: string; themes: seq[string]): VNode
|
||||||
renderPrefs()
|
renderPrefs()
|
||||||
|
|
||||||
h4(class="note"):
|
h4(class="note"):
|
||||||
text "Preferences are stored client-side using cookies without any personal information."
|
text "設定は個人情報無しのクッキーとしてクライエントサイドで保存されます。"
|
||||||
|
|
||||||
button(`type`="submit", class="pref-submit"):
|
button(`type`="submit", class="pref-submit"):
|
||||||
text "保存"
|
text "保存"
|
||||||
|
|
|
@ -68,11 +68,11 @@ proc renderPhotoRail(profile: Profile): VNode =
|
||||||
buildHtml(tdiv(class="photo-rail-card")):
|
buildHtml(tdiv(class="photo-rail-card")):
|
||||||
tdiv(class="photo-rail-header"):
|
tdiv(class="photo-rail-header"):
|
||||||
a(href=(&"/{profile.user.username}/media")):
|
a(href=(&"/{profile.user.username}/media")):
|
||||||
icon "picture", count & " Photos and videos"
|
icon "picture", count & "枚画像や動画"
|
||||||
|
|
||||||
input(id="photo-rail-grid-toggle", `type`="checkbox")
|
input(id="photo-rail-grid-toggle", `type`="checkbox")
|
||||||
label(`for`="photo-rail-grid-toggle", class="photo-rail-header-mobile"):
|
label(`for`="photo-rail-grid-toggle", class="photo-rail-header-mobile"):
|
||||||
icon "picture", count & " Photos and videos"
|
icon "picture", count & "枚画像や動画"
|
||||||
icon "down"
|
icon "down"
|
||||||
|
|
||||||
tdiv(class="photo-rail-grid"):
|
tdiv(class="photo-rail-grid"):
|
||||||
|
|
|
@ -4,8 +4,8 @@ from parameterized import parameterized
|
||||||
profiles = [
|
profiles = [
|
||||||
['mobile_test', 'Test account',
|
['mobile_test', 'Test account',
|
||||||
'Test Account. test test Testing username with @mobile_test_2 and a #hashtag',
|
'Test Account. test test Testing username with @mobile_test_2 and a #hashtag',
|
||||||
'San Francisco, CA', 'example.com/foobar', 'Joined October 2009', '100'],
|
'San Francisco, CA', 'example.com/foobar', '2009年10月に参加', '100'],
|
||||||
['mobile_test_2', 'mobile test 2', '', '', '', 'Joined January 2011', '13']
|
['mobile_test_2', 'mobile test 2', '', '', '', '2011年1月に参加', '13']
|
||||||
]
|
]
|
||||||
|
|
||||||
verified = [['jack'], ['elonmusk']]
|
verified = [['jack'], ['elonmusk']]
|
||||||
|
@ -34,7 +34,7 @@ class ProfileTest(BaseTestCase):
|
||||||
(location, Profile.location),
|
(location, Profile.location),
|
||||||
(website, Profile.website),
|
(website, Profile.website),
|
||||||
(joinDate, Profile.joinDate),
|
(joinDate, Profile.joinDate),
|
||||||
(mediaCount + " Photos and videos", Profile.mediaCount)
|
(mediaCount + "枚画像や動画", Profile.mediaCount)
|
||||||
]
|
]
|
||||||
|
|
||||||
for text, selector in tests:
|
for text, selector in tests:
|
||||||
|
|
新しいイシューから参照