• R/O
  • HTTP
  • SSH
  • HTTPS

pybbs: Commit

無料の掲示板


Commit MetaInfo

Revisãof5ae5fc5b825ac8415d04f0e5bec8fa4db8979a4 (tree)
Hora2020-02-07 13:46:26
Autoryamat0jp <terukohietori@gmai...>
Commiteryamat0jp

Mensagem de Log

不安と楽しみ

Mudança Sumário

Diff

--- a/pybbs.py
+++ b/pybbs.py
@@ -73,7 +73,7 @@ class IndexHandler(BaseHandler):
7373 else:
7474 self.render_admin(dbname)
7575
76- def render_admin(self,dbname,title='',com='',er='',img='',ch='checked'):
76+ def render_admin(self,dbname,title='',com='',er='',img='',ch='checked',pw=''):
7777 t = self.get_argument('img','')
7878 params = self.application.db['params'].find_one({'app':'bbs'})
7979 if self.current_user == b'admin':
@@ -81,7 +81,7 @@ class IndexHandler(BaseHandler):
8181 else:
8282 s = '<input type=hidden>'
8383 self.render('modules/index.htm',position=self.pos,records=self.rec,data=params,username=self.na,title=title,
84- comment=com,db=dbname,aikotoba=self.rule,error=er+img,check=ch,admin=s)
84+ comment=com,db=dbname,aikotoba=self.rule,error=er+img,ch=ch,admin=s,pw=pw)
8585
8686 class LoginHandler(BaseHandler):
8787 def get(self):
@@ -290,7 +290,7 @@ class RegistHandler(IndexHandler):
290290 self.na = na
291291 self.rule = rule
292292 self.pos = 0
293- self.render_admin(dbname,title=sub,com=com,er=error,ch=ch,img=img)
293+ self.render_admin(dbname,title=sub,com=com,er=error,ch=ch,img=img,pw=pw)
294294
295295 def link(self,command,database):
296296 i = 0
--- a/static/css/main.css
+++ b/static/css/main.css
@@ -43,15 +43,6 @@ header p {
4343 display:inline
4444 }
4545
46-input[type=password] {
47- width:55px
48-}
49-
50-form#search input {
51- height:22px;
52- width:55px
53-}
54-
5546 span {
5647 color:#ff0000
5748 }
--- a/templates/modules/index.htm
+++ b/templates/modules/index.htm
@@ -11,9 +11,10 @@
1111 {% block style %}
1212 <link rel="stylesheet" href={{static_url('css/main.css')}}>
1313 {% end %}
14- <script type=text/javascript src={{static_url('js/jquery-live-preview.js')}}></script>
14+ <script type=text/javascript src=//ajax.googleapis.com/ajax/libs/jquery/1.8.1/jquery.min.js></script>
15+ <script type=text/javascript src={{static_url('js/jquery-live-preview.js')}}></script>
1516 <link rel=stylesheet href={{static_url('css/livepreview-demo.css')}}>
16- <script src=//cdn.rawgit.com/google/code-prettify/master/loader/run_prettify.js></script>
17+ <script src=//cdn.rawgit.com/google/code-prettify/master/loader/run_prettify.js></script>
1718 <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.2.1/css/bootstrap.min.css" integrity="sha384-GJzZqFGwb1QTTN6wy59ffF1BuGJpLSa9DkKMp0DgiMDm4iYMj70gZWKYbI706tWS" crossorigin="anonymous">
1819 </head>
1920 <body>
@@ -26,44 +27,89 @@
2627 <a name=top></a>
2728 <form action=/{{db}}/regist method="post">
2829 {% module xsrf_form_html() %}
29- <table>
30- <tr><td>
31- <label><p>お名前</p><input name="name" class=name value={{username}}></label>
32- <label><p>タイトル</p><input name="title" class=title value="{{title}}" placeholder="タイトルなし."></label>
33- <input type="submit" value="送信">
34- </td></tr>
35- <tr><td>
36- <label><p>本文<span>必須</span><br></p>
37- <textarea style="font-size:1.75em" name="comment" cols=30
38- required placeholder="コメントなどを入力してください.">{{comment}}</textarea></label>
39- </td></tr>
40- <tr><td>
41- <label><p>パスワード</p><input name="password" type="password" placeholder="削除用">
42- </label> / <input type="checkbox" name="show" value="true" {{check}}><p>プレビュー</p>
43- <tr><td>
44- <label><p>合言葉をひらがなで入力してください: genki <input name=aikotoba type=text value={{aikotoba}}></label>
45- </td></tr>
46- <tr><td>
47- {% raw admin %}
48- </td></tr>
49- </table>
30+ <p><br></p>
31+ <div class="row justify-content-center"><div class="col-10">
32+ <div class="container">
33+ <div class="form-row">
34+ <div class="form-inline p-3">
35+ <div class="input-group col-6">
36+ <div class=input-group-prepend><span class=input-group-text>お名前</span></div>
37+ <input name="name" id=name1 class="form-control mr-50" value={{username}}>
38+ </div>
39+ <div class="input-group col-6">
40+ <div class=input-group-prepend><span class=input-group-text>タイトル</span></div>
41+ <input name="title" id=title1 class=form-control placeholder="タイトルなし." value={{title}}>
42+ <input class="btn btn-primary ml-3" type="submit" value="送信">
43+ </div>
44+ </div>
45+ </div>
46+ <div class="form-row">
47+ <div class="form-group align-self-center w-100">
48+ <label for=text1>本文<span style=color:red>必須</span></label>
49+ <textarea id=text1 style="font-size:1.75em" name="comment" rows=4
50+ class="form-control w-100 sjadpw-lg" required placeholder="コメントなどを入力してください.">{{comment}}</textarea>
51+ </div>
52+ </div>
53+ <div class="form-row">
54+ <div class="form-inline w-50">
55+ <div class=input-group>
56+ <div class=input-group-prepend><span class=input-group-text>パスワード</span></div>
57+ <input id=password1 name="password" class="form-control col-4" type="password" placeholder="削除用" value={{pw}}>
58+ </div>
59+ </div>
60+ <div class="form-group w-50">
61+ <div class="custom-control custom-checkbox">
62+ <input type="checkbox" id=check1 name="show" class=custom-control-input value="true" {{ch}}>
63+ <label class=custom-control-label for=check1>プレビュー</label>
64+ </div>
65+ </div>
66+ </div>
67+ <div class="form-row justify-content-end">
68+ <div class="form-inline">
69+ <label for=aikotoba1>合言葉をひらがなで入力してください: genki </label><input name=aikotoba id=aikotoba1 class="form-control col-2" type=text value={{aikotoba}}>
70+ </div>
71+ </div>
72+ </div>
73+ </div></div>
5074 </form>
51- </header>
75+ </header>
5276 {% raw error %}
53- <hr size="1" width="100%">
54- <form action=/{{db}}/userdel method="post" id=search>
55- {% module xsrf_form_html() %}
56- <label><p>記事No</p><input name="number"></label>
57- <label><p>Pass</p><input type="password" name="password"></label>
58- <input type="submit" value="削除">
59- </form>
60- <form action=/{{db}}/userdel method=post id=search>
77+
78+ <div class="container pt-5">
79+ <button class="btn shadow" data-toggle=collapse data-target=.item1
80+ aria-expanded=false aria-controls="item1-a item1-b">
81+ ひらく</button>
82+ <div class="container pt-3">
83+ <div class="row col-5 p-0">
84+ <div class="col-4 p-0">
85+ <div class="collapse item1" id=item1-a><div class="card card-body">
86+ <form action=/{{db}}/userdel method="post" id=search>
87+ {% module xsrf_form_html() %}
88+ <label for=id1>記事No</label><input id=id1 class="form-control" name="number">
89+ <label for=pass1>Pass</label><input id=pass1 class="form-control mb-3" type="password" name="password">
90+ <button type="submit">削除</button>
91+ </form>
92+ </div></div>
93+ </div>
94+ <div class="col-8">
95+ <div class="collapse item1" id=item1-b><div class="card card-body">
96+ <form action=/{{db}}/userdel method=post id=search>
6197 {% module xsrf_form_html() %}
62- <label><p>記事No</p><input name=number></label>
63- <input type=submit value=移動>
64- </form>
65- <p><a href=/{{db}}/search>検索ページ</a></p>
66- <p style=text-align:center>{{db}}</p>
98+ <div class="input-group">
99+ <div class=input-group-prepend><span class=input-group-text>記事No</span></div>
100+ <input id=number1 class="form-control" name=number>
101+ <div class=input-group-append><button type=submit>移動</button></div>
102+ </div>
103+ </form>
104+ </div></div>
105+ </div>
106+ </div>
107+ </div>
108+ </div>
109+ <p><br></p>
110+ <p><a href=/{{db}}/search>検索ページ</a></p>
111+ <p style=text-align:center>{{db}}</p>
112+
67113 {% module Footer(position,'/'+db,'#top') %}
68114 {% end %}
69115 {% block body %}
Show on old repository browser