From aa4e98d47512b0f70678f91a5f4a4cba11e7e886 Mon Sep 17 00:00:00 2001 From: Lynne Date: Mon, 12 Nov 2018 17:18:53 +1000 Subject: [PATCH] more work on the home page --- static/style.css | 20 +++++++++++++++++--- templates/home.html | 8 ++++---- web.py | 36 ++++++++++++++++++------------------ 3 files changed, 39 insertions(+), 25 deletions(-) diff --git a/static/style.css b/static/style.css index 389148b..e9050e4 100644 --- a/static/style.css +++ b/static/style.css @@ -30,13 +30,21 @@ h2 { height:300px; width:300px; } -form { +form, .profilecard { background-color: #444b5d; display:inline-block; padding:50px; border-radius:5px; font-size:1.4em; } +.profilecard { + padding: 30px; + margin: 20px; + width: 300px; + overflow:hidden; + white-space: nowrap; + text-overflow:ellipsis; +} input { margin:20px; font-size:1.2em; @@ -57,13 +65,19 @@ button:hover, .button:hover{ background-color:#2b90d9; color:white; } -#form-avi { +#form-avi, .pc-avi { height: 128px; width:128px; margin:0 auto 15px; background-size:cover; border-radius:16px; } -#form-avi-label { +#form-avi-label, .pc-avi-label { font-size:0.6em; + text-overflow:ellipsis; } +.pc-title { + margin: 20px auto; + font-size:1.8em; + font-weight:300; +} \ No newline at end of file diff --git a/templates/home.html b/templates/home.html index da51c06..c3fb83f 100644 --- a/templates/home.html +++ b/templates/home.html @@ -9,13 +9,13 @@
Mastodon
-
- {{ session['acct'] }}

+
+ {{ session['acct'] }}

Curious Cat
-
- {{ session['cc'] }}

+
+ {{ session['cc'] }}

{% include 'footer.html' %} diff --git a/web.py b/web.py index 706841e..408d901 100755 --- a/web.py +++ b/web.py @@ -21,24 +21,24 @@ db = mysql.connector.connect(user=cfg['dbuser'], password=cfg['dbpass'], databas c = db.cursor() dc = db.cursor(dictionary=True) # MariaDB [curiousgreg]> DESCRIBE data; -# +---------------------+--------------+------+-----+-------------------------------------------+-----------------------------+ -# | Field | Type | Null | Key | Default | Extra | -# +---------------------+--------------+------+-----+-------------------------------------------+-----------------------------+ -# | username | varchar(64) | NO | PRI | NULL | | -# | instance | varchar(128) | NO | PRI | NULL | | -# | password | tinytext | NO | | NULL | | -# | avi | text | NO | | NULL | | -# | secret | tinytext | NO | | NULL | | -# | client_id | varchar(128) | NO | | NULL | | -# | client_secret | tinytext | NO | | NULL | | -# | cc | tinytext | YES | | NULL | | -# | ccavi | varchar(128) | YES | | https://lynnesbian.space/res/ceres/cc.png | | -# | latest_post | tinytext | YES | | NULL | | -# | latest_timestamp | timestamp | NO | | CURRENT_TIMESTAMP | on update CURRENT_TIMESTAMP | -# | time_between_checks | int(11) | YES | | NULL | | -# | settings | longtext | YES | | NULL | | -# +---------------------+--------------+------+-----+-------------------------------------------+-----------------------------+ -c.execute("CREATE TABLE IF NOT EXISTS `data` (username VARCHAR(64) NOT NULL, instance VARCHAR(128) NOT NULL, password TINYTEXT NOT NULL, avi TEXT NOT NULL, secret TINYTEXT NOT NULL, client_id VARCHAR(128) NOT NULL, client_secret TINYTEXT NOT NULL, cc TINYTEXT, ccavi VARCHAR(128) DEFAULT 'https://lynnesbian.space/res/ceres/cc.png', latest_post TINYTEXT, latest_timestamp TIMESTAMP, time_between_checks INT, settings LONGTEXT, PRIMARY KEY(username, instance))") +# +---------------------+--------------+------+-----+------------------------------------------------+-----------------------------+ +# | Field | Type | Null | Key | Default | Extra | +# +---------------------+--------------+------+-----+------------------------------------------------+-----------------------------+ +# | username | varchar(64) | NO | PRI | NULL | | +# | instance | varchar(128) | NO | PRI | NULL | | +# | password | tinytext | NO | | NULL | | +# | avi | text | NO | | NULL | | +# | secret | tinytext | NO | | NULL | | +# | client_id | varchar(128) | NO | | NULL | | +# | client_secret | tinytext | NO | | NULL | | +# | cc | tinytext | YES | | NULL | | +# | ccavi | varchar(128) | YES | | https://lynnesbian.space/res/ceres/cc-smol.png | | +# | latest_post | tinytext | YES | | NULL | | +# | latest_timestamp | timestamp | NO | | CURRENT_TIMESTAMP | on update CURRENT_TIMESTAMP | +# | time_between_checks | int(11) | YES | | NULL | | +# | settings | longtext | YES | | NULL | | +# +---------------------+--------------+------+-----+------------------------------------------------+-----------------------------+ +c.execute("CREATE TABLE IF NOT EXISTS `data` (username VARCHAR(64) NOT NULL, instance VARCHAR(128) NOT NULL, password TINYTEXT NOT NULL, avi TEXT NOT NULL, secret TINYTEXT NOT NULL, client_id VARCHAR(128) NOT NULL, client_secret TINYTEXT NOT NULL, cc TINYTEXT, ccavi VARCHAR(128) DEFAULT 'https://lynnesbian.space/res/ceres/cc-smol.png', latest_post TINYTEXT, latest_timestamp TIMESTAMP, time_between_checks INT, settings LONGTEXT, PRIMARY KEY(username, instance))") app = Flask(cfg['name']) app.secret_key = cfg['flask_key']