From 8cda9dd16614d208ecebd13855e4a40da6ff2375 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Sun, 1 Aug 2021 08:46:10 +0200 Subject: [PATCH] css --- compilecss.py | 4 ++-- drama/templates/submission.html | 10 ++++++---- drama/templates/submission_listing.html | 10 ++++++---- 3 files changed, 14 insertions(+), 10 deletions(-) diff --git a/compilecss.py b/compilecss.py index 245dfabbd..95ecdc976 100644 --- a/compilecss.py +++ b/compilecss.py @@ -1,7 +1,7 @@ for theme in ['dark', 'light', 'coffee', 'tron', '4chan']: - with open(f"D:/#D/drama/assets/style/{theme}_ff66ac.css", encoding='utf-8') as t: + with open(f"./drama/assets/style/{theme}_ff66ac.css", encoding='utf-8') as t: text = t.read() for color in ['805ad5','62ca56','38a169','80ffff','2a96f3','62ca56','eb4963','ff0000','f39731','30409f','3e98a7','e4432d','7b9ae4','ec72de','7f8fa6', 'f8db58']: newtext = text.replace("ff66ac", color).replace("ff4097", color).replace("ff1a83", color).replace("ff3390", color).replace("rgba(255, 102, 172, 0.25)", color) - with open(f"D:/#D/drama/assets/style/{theme}_{color}.css", encoding='utf-8', mode='w') as nt: + with open(f"./drama/assets/style/{theme}_{color}.css", encoding='utf-8', mode='w') as nt: nt.write(newtext) \ No newline at end of file diff --git a/drama/templates/submission.html b/drama/templates/submission.html index 73172d117..b69be84ab 100644 --- a/drama/templates/submission.html +++ b/drama/templates/submission.html @@ -319,10 +319,12 @@
  • Copy link
  • - {% if v and p.id in v.subscribed_idlist() %} -
  • Unsubscribe
  • - {% elif v %} -
  • Subscribe
  • + {% if v and not (v.admin_level == 6 and v.id == p.author_id) %} + {% if p.id in v.subscribed_idlist() %} +
  • Unsubscribe
  • + {% else %} +
  • Subscribe
  • + {% endif %} {% endif %} {% if v and p.id in v.saved_idlist() %} diff --git a/drama/templates/submission_listing.html b/drama/templates/submission_listing.html index d4b086559..f5cc22b41 100644 --- a/drama/templates/submission_listing.html +++ b/drama/templates/submission_listing.html @@ -139,10 +139,12 @@
  • Copy link
  • - {% if v and p.id in v.subscribed_idlist() %} -
  • Unsubscribe
  • - {% elif v %} -
  • Subscribe
  • + {% if v and not (v.admin_level == 6 and v.id == p.author_id) %} + {% if p.id in v.subscribed_idlist() %} +
  • Unsubscribe
  • + {% else %} +
  • Subscribe
  • + {% endif %} {% endif %} {% if v and p.id in v.saved_idlist() %}