changeset 1558:0ade63d63e9c

rogin
author Minoru Konno <c113069@e.koeki-u.ac.jp>
date Fri, 29 Jul 2016 19:33:28 +0900
parents 271d7c58d6bb
children b32c2f77a801
files event/oasis2016/rogin.rb
diffstat 1 files changed, 17 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/event/oasis2016/rogin.rb	Fri Jul 29 19:29:27 2016 +0900
+++ b/event/oasis2016/rogin.rb	Fri Jul 29 19:33:28 2016 +0900
@@ -26,7 +26,7 @@
 # 変数の期限を24時間に設定し、expire変数に入れる
 expire = (Time.now+24*3600).gmtime.strftime("%a, %d %b %Y %H:%M:%S GMT")
 printf("Content-type: text/html; charset=UTF-8\n")
-printf("Set-Cookie: id=%s; expires=%s\n\n", id, expire)
+printf("Set-Cookie: id=%s; expires=%s path=/tori\n\n", id, expire)
 
 
 db = YAML::Store.new(file)
@@ -40,36 +40,45 @@
     info[id]["bingo"] = Hash.new # 正解した単語保存用のハッシュも作成
   end
  if !info[id]["name"]      # もしユーザのプレイ名が未設定なら
-   umi = '<img src="./don/umi.png" width="800px" height="600px">'
+   umi = '<img src="./img/umi.png" class="umi">'
    title = "ようこそ!"
    hello = "QRコードを読みこんで間違い探しをしましょう!"
-   guide = "まずはあなたのプレイ名を決めます"
+   guide = "まずはあなたのプレイ名を決めましょう"
    input = '<input name="playname">'
    submit = '<input type="submit" value="送信">'
    reset = '<input type="reset" value="リセット">'
  else            # プレイ名設定済みならキーワード入力
    title = "登録完了!"
    hello = sprintf("%s さんの登録は完了しました!", info[id]["name"])
-   guide = "QRコードを読みこんで楽しみましょう♪"
+   guide = "QRコードを読みこんで絵を完成させて間違いを探そう♪"
  end
 
 printf(<<-EOF,
 <!DOCTYPE html>
 <html lang="ja">
 <head>
+
+<meta name="viewport"
+content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no">
+<meta name="format-detection" content="telephone=no">
+<link media="only screen and (max-device-width:480px)"
+href="smart.css" type="text/css" rel="stylesheet" />
+
+<link media="screen and (min-device-width:481px)" 
+href="attack.css"type="text/css" rel="stylesheet" />
+
 <title>まちがいみつけでみっちゃ</title>
-<link rel="stylesheet" type="text/css" href="attack.css">
 </head>
 
 <body>
-<img src="./img/logo.png" width="900px" height="100px">
+<img src="./img/logo.png" class="logo">
 <p>%s</p>    
 <h1>%s</h1>  
 <h2>%s</h2>  
 <h2>%s</h2>  
 <form action="?" method="GET">
-<p class=jyama> %s<br>
-%s: %s</p>    
+<p>%s</p>
+<p>%s %s</p>    
 </body></html>
 EOF
         umi, title, hello, guide, input, submit, reset,)

yatex.org