From c79a282e8bea77be0eb19d4c76c94748f2a32df3 Mon Sep 17 00:00:00 2001 From: jiro4989 Date: Thu, 2 Jul 2020 21:37:39 +0000 Subject: [PATCH] =?UTF-8?q?=E3=83=8F=E3=83=83=E3=82=B7=E3=83=A5=E3=82=BF?= =?UTF-8?q?=E3=82=B0=E3=82=92=E5=88=87=E3=82=8A=E6=9B=BF=E3=81=88=E3=82=89?= =?UTF-8?q?=E3=82=8C=E3=82=8B=E3=82=88=E3=81=86=E3=81=AB=E5=A4=89=E6=9B=B4?= =?UTF-8?q?=20#171?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- websh_front/src/index.nim | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/websh_front/src/index.nim b/websh_front/src/index.nim index 43745f7..653d015 100644 --- a/websh_front/src/index.nim +++ b/websh_front/src/index.nim @@ -48,6 +48,7 @@ var outputElapsedTime = cstring"0milsec" isProgress: bool ## シェルの実行中表示を切り替えるためのフラグ + hashTag = cstring"シェル芸" proc respCb(httpStatus: int, response: cstring) = let resp = fromJson[ResponseResult](response) @@ -181,10 +182,17 @@ proc createDom(): VNode = tdiv(class = "buttons"): button(class="button is-primary", onclick = sendShellButtonOnClick): text "Run (Ctrl + Enter)" - a(href = &"""https://twitter.com/intent/tweet?hashtags=シェル芸&text={encodeUrl($inputShell, false)}&ref_src=twsrc%5Etfw""", + a(href = &"""https://twitter.com/intent/tweet?hashtags={encodeUrl($hashTag, false)}&text={encodeUrl($inputShell, false)}&ref_src=twsrc%5Etfw""", class = "button twitter-share-button is-link", `data-show-count` = "false"): text "Tweet" + tdiv(class = "select"): + select: + proc onchange(ev: Event, n: VNode) = + hashTag = $n.value + for elem in @[cstring"シェル芸", cstring"shellgei", cstring"ゆるシェル", cstring"危険シェル芸", ]: + option(value = $elem): + text $elem tdiv(class = "column"): tdiv(class = "tile is-ancestor"): tdiv(class = "tile is-parent is-vertical"):