From 35ef11d3d20d2e2c09e2dfec4e57a04730e0834d Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sun, 28 Jul 2019 12:35:57 +0100 Subject: [PATCH] Shared item duration on web interface --- epicyon-profile.css | 16 ++++++++++++++++ webinterface.py | 11 ++++++++--- 2 files changed, 24 insertions(+), 3 deletions(-) diff --git a/epicyon-profile.css b/epicyon-profile.css index 64fb1d14..c43f719e 100644 --- a/epicyon-profile.css +++ b/epicyon-profile.css @@ -240,6 +240,22 @@ input[type=text], select, textarea { font-size: 18px; } +input[type=number] { + width: 10%; + padding: 12px; + border: 1px solid #ccc; + border-radius: 4px; + box-sizing: border-box; + margin-top: 6px; + margin-bottom: 16px; + resize: vertical; + font-size: 18px; +} + +.labels { + font-size: 18px; +} + input[type=submit] { background-color: #555; color: white; diff --git a/webinterface.py b/webinterface.py index 4b24f3f1..a912fe8a 100644 --- a/webinterface.py +++ b/webinterface.py @@ -75,7 +75,11 @@ def htmlLogin(baseDir: str) -> str: return loginForm def htmlNewPost(baseDir: str,path: str) -> str: - newPostText='

Enter your post text below.

' + if not path.endswith('/newshare'): + newPostText='

Enter your post text below.

' + else: + newPostText='

Enter the details for your shared item below.

' + if os.path.isfile(baseDir+'/accounts/newpost.txt'): with open(baseDir+'/accounts/newpost.txt', 'r') as file: newPostText = '

'+file.read()+'

' @@ -111,8 +115,9 @@ def htmlNewPost(baseDir: str,path: str) -> str: endpoint='newshare' extraFields= \ '
' \ - ' ' \ - ' ' \ + ' ' \ + ' ' \ + ' ' \ '
' \ ''