diff --git a/app/__init__.py b/app/__init__.py index 0d96686..db40dc5 100644 --- a/app/__init__.py +++ b/app/__init__.py @@ -2,7 +2,6 @@ from flask import Flask, session, request, render_template from dotenv import load_dotenv from .models import Avatars, Users, PostHistory, Posts, MOTD, BadgeUploads, Sessions from .auth import digest -from .routes.users import is_logged_in, get_active_user, get_prefers_theme from .constants import ( PermissionLevel, permission_level_string, InfoboxKind, InfoboxHTMLClass, @@ -196,36 +195,6 @@ def create_app(): cache.init_app(app) - css_dir = 'data/static/css/' - allowed_themes = [] - for f in os.listdir(css_dir): - if not os.path.isfile(os.path.join(css_dir, f)): - continue - theme_name = os.path.splitext(os.path.basename(f))[0] - allowed_themes.append(theme_name) - - allowed_themes.sort(key=(lambda x: (x != 'style', x))) - app.config['allowed_themes'] = allowed_themes - - from app.routes.app import bp as app_bp - from app.routes.topics import bp as topics_bp - from app.routes.threads import bp as threads_bp - from app.routes.users import bp as users_bp - from app.routes.mod import bp as mod_bp - from app.routes.api import bp as api_bp - from app.routes.posts import bp as posts_bp - from app.routes.hyperapi import bp as hyperapi_bp - from app.routes.guides import bp as guides_bp - app.register_blueprint(app_bp) - app.register_blueprint(topics_bp) - app.register_blueprint(threads_bp) - app.register_blueprint(users_bp) - app.register_blueprint(mod_bp) - app.register_blueprint(api_bp) - app.register_blueprint(posts_bp) - app.register_blueprint(hyperapi_bp) - app.register_blueprint(guides_bp) - with app.app_context(): from .schema import create as create_tables from .migrations import run_migrations @@ -265,16 +234,9 @@ def create_app(): "SIG_BANNED_TAGS": SIG_BANNED_TAGS, } - @app.context_processor - def inject_auth(): - return {"is_logged_in": is_logged_in, "get_active_user": get_active_user, "active_user": get_active_user()} - @app.context_processor def inject_funcs(): - from .routes.threads import get_post_url return { - 'get_post_url': get_post_url, - 'get_prefers_theme': get_prefers_theme, 'get_motds': MOTD.get_all, 'get_time_now': lambda: int(time.time()), } @@ -302,16 +264,6 @@ def create_app(): def babycode_strict_filter(markup, nofrag=False): return babycode_to_html(markup, banned_tags=STRICT_BANNED_TAGS, fragment=not nofrag).result - @app.template_filter('extract_h2') - def extract_h2(content): - import re - pattern = r']*>(.*?)<\/h2>' - matches = re.findall(pattern, content, re.IGNORECASE | re.DOTALL) - return [ - {'id': id_.strip(), 'text': text.strip()} - for id_, text in matches - ] - @app.template_filter('basename_noext') def basename_noext(subj): return os.path.splitext(os.path.basename(subj))[0] diff --git a/app/models.py b/app/models.py index 5c08f27..25a6b6d 100644 --- a/app/models.py +++ b/app/models.py @@ -30,23 +30,6 @@ class Users(Model): def is_default_avatar(self): return self.avatar_id == 1 - def get_latest_posts(self): - q = """SELECT - posts.id, posts.created_at, post_history.content, post_history.edited_at, threads.title AS thread_title, topics.name as topic_name, threads.slug as thread_slug - FROM - posts - JOIN - post_history ON posts.current_revision_id = post_history.id - JOIN - threads ON posts.thread_id = threads.id - JOIN - topics ON threads.topic_id = topics.id - WHERE - posts.user_id = ? - ORDER BY posts.created_at DESC - LIMIT 10""" - return db.query(q, self.id) - def get_post_stats(self): q = """SELECT COUNT(DISTINCT posts.id) AS post_count, @@ -148,47 +131,6 @@ class Topics(Model): topics.sort_order ASC""" return db.query(q) - @classmethod - def get_active_threads(cls): - q = """ - WITH ranked_threads AS ( - SELECT - threads.topic_id, threads.id AS thread_id, threads.title AS thread_title, threads.slug AS thread_slug, - posts.id AS post_id, posts.created_at AS post_created_at, - users.username, users.display_name, - ROW_NUMBER() OVER (PARTITION BY threads.topic_id ORDER BY posts.created_at DESC) AS rn - FROM - threads - JOIN - posts ON threads.id = posts.thread_id - LEFT JOIN - users ON posts.user_id = users.id - ) - SELECT - topic_id, - thread_id, thread_title, thread_slug, - post_id, post_created_at, - username, display_name - FROM - ranked_threads - WHERE - rn = 1 - ORDER BY - topic_id""" - - active_threads_raw = db.query(q) - active_threads = {} - for thread in active_threads_raw: - active_threads[int(thread['topic_id'])] = { - 'thread_title': thread['thread_title'], - 'thread_slug': thread['thread_slug'], - 'post_id': thread['post_id'], - 'username': thread['username'], - 'display_name': thread['display_name'], - 'post_created_at': thread['post_created_at'] - } - return active_threads - def get_threads(self, per_page, page, sort_by = "activity"): order_clause = "" if sort_by == "thread": diff --git a/app/routes/api.py b/app/routes/api.py deleted file mode 100644 index 0b5eca6..0000000 --- a/app/routes/api.py +++ /dev/null @@ -1,228 +0,0 @@ -from flask import Blueprint, request, url_for, make_response -from ..lib.babycode import babycode_to_html -from ..constants import REACTION_EMOJI -from .users import is_logged_in, get_active_user -from ..models import APIRateLimits, Threads, Reactions, Users, BookmarkCollections, BookmarkedThreads, BookmarkedPosts, BadgeUploads -from ..db import db - -bp = Blueprint("api", __name__, url_prefix="/api/") - - -@bp.post('/thread-updates/') -def thread_updates(thread_id): - thread = Threads.find({'id': thread_id}) - if not thread: - return {'error': 'no such thread'}, 404 - target_time = request.json.get('since') - if not target_time: - return {'error': 'missing parameter "since"'}, 400 - try: - target_time = int(target_time) - except: - return {'error': 'parameter "since" is not/cannot be converted to a number'}, 400 - - q = 'SELECT id FROM posts WHERE thread_id = ? AND posts.created_at > ? ORDER BY posts.created_at ASC LIMIT 1' - new_post = db.fetch_one(q, thread_id, target_time) - if not new_post: - return {'status': 'none'} - - url = url_for('threads.thread', slug=thread.slug, after=new_post['id'], _anchor=f"post-{new_post['id']}") - return {'status': 'new_post', 'url': url} - - -@bp.post('/babycode-preview') -def babycode_preview(): - if not is_logged_in(): - return {'error': 'not authorized'}, 401 - user = get_active_user() - if not APIRateLimits.is_allowed(user.id, 'babycode_preview', 5): - return {'error': 'too many requests'}, 429 - markup = request.json.get('markup') - if not markup or not isinstance(markup, str): - return {'error': 'markup field missing or invalid type'}, 400 - banned_tags = request.json.get('banned_tags', []) - rendered = babycode_to_html(markup, banned_tags).result - return {'html': rendered} - - -@bp.post('/add-reaction/') -def add_reaction(post_id): - if not is_logged_in(): - return {'error': 'not authorized', 'error_code': 401}, 401 - user = get_active_user() - reaction_text = request.json.get('emoji') - if not reaction_text or not isinstance(reaction_text, str): - return {'error': 'emoji field missing or invalid type', 'error_code': 400}, 400 - if reaction_text not in REACTION_EMOJI: - return {'error': 'unsupported reaction', 'error_code': 400}, 400 - - reaction = Reactions.find({ - 'user_id': user.id, - 'post_id': int(post_id), - 'reaction_text': reaction_text, - }) - - if reaction: - return {'error': 'reaction already exists', 'error_code': 409}, 409 - - reaction = Reactions.create({ - 'user_id': user.id, - 'post_id': int(post_id), - 'reaction_text': reaction_text, - }) - - return {'status': 'added'} - - -@bp.post('/remove-reaction/') -def remove_reaction(post_id): - if not is_logged_in(): - return {'error': 'not authorized'}, 401 - user = get_active_user() - reaction_text = request.json.get('emoji') - if not reaction_text or not isinstance(reaction_text, str): - return {'error': 'emoji field missing or invalid type'}, 400 - if reaction_text not in REACTION_EMOJI: - return {'error': 'unsupported reaction'}, 400 - - reaction = Reactions.find({ - 'user_id': user.id, - 'post_id': int(post_id), - 'reaction_text': reaction_text, - }) - - if not reaction: - return {'error': 'reaction does not exist'}, 404 - - reaction.delete() - - return {'status': 'removed'} - -@bp.post('/manage-bookmark-collections/') -def manage_bookmark_collections(user_id): - if not is_logged_in(): - return {'error': 'not authorized', 'error_code': 401}, 401 - - target_user = Users.find({'id': user_id}) - if target_user.id != get_active_user().id: - return {'error': 'forbidden', 'error_code': 403}, 403 - - if target_user.is_guest(): - return {'error': 'forbidden', 'error_code': 403}, 403 - - collections_data = request.json - for idx, coll_data in enumerate(collections_data.get('collections')): - if coll_data['is_new']: - collection = BookmarkCollections.create({ - 'name': coll_data['name'], - 'user_id': target_user.id, - 'sort_order': idx, - }) - else: - collection = BookmarkCollections.find({'id': coll_data['id']}) - if not collection: - continue - - update = {'name': coll_data['name']} - if not collection.is_default: - update['sort_order'] = idx - collection.update(update) - - for removed_id in collections_data.get('removed_collections'): - collection = BookmarkCollections.find({'id': removed_id}) - if not collection: - continue - - if collection.is_default: - continue - - collection.delete() - - - return {'status': 'ok'}, 200 - - -@bp.post('/bookmark-post/') -def bookmark_post(post_id): - if not is_logged_in(): - return {'error': 'not authorized', 'error_code': 401}, 401 - - operation = request.json.get('operation') - if operation == 'remove' and request.json.get('collection_id', '') == '': - return {'status': 'not modified'}, 304 - collection_id = int(request.json.get('collection_id')) - post_id = int(post_id) - memo = request.json.get('memo', '') - - if operation == 'move': - bm = BookmarkedPosts.find({'post_id': post_id}) - if not bm: - BookmarkedPosts.create({ - 'post_id': post_id, - 'collection_id': collection_id, - 'note': memo, - }) - else: - bm.update({ - 'collection_id': collection_id, - 'note': memo, - }) - elif operation == 'remove': - bm = BookmarkedPosts.find({'post_id': post_id}) - if bm: - bm.delete() - else: - return {'error': 'bad request'}, 400 - - return {'status': 'ok'}, 200 - - -@bp.post('/bookmark-thread/') -def bookmark_thread(thread_id): - if not is_logged_in(): - return {'error': 'not authorized', 'error_code': 401}, 401 - - operation = request.json.get('operation') - if operation == 'remove' and request.json.get('collection_id', '') == '': - return {'status': 'not modified'}, 304 - collection_id = int(request.json.get('collection_id')) - thread_id = int(thread_id) - memo = request.json.get('memo', '') - - if operation == 'move': - bm = BookmarkedThreads.find({'thread_id': thread_id}) - if not bm: - BookmarkedThreads.create({ - 'thread_id': thread_id, - 'collection_id': collection_id, - 'note': memo, - }) - else: - bm.update({ - 'collection_id': collection_id, - 'note': memo, - }) - elif operation == 'remove': - bm = BookmarkedThreads.find({ - 'thread_id': thread_id, - 'note': memo, - }) - if bm: - bm.delete() - else: - return {'error': 'bad request'}, 400 - - return {'status': 'ok'}, 200 - -@bp.get('/current-user') -def get_current_user_info(): - if not is_logged_in(): - return {'user': None} - - user = get_active_user() - return { - 'user': { - 'username': user.username, - 'display_name': user.display_name, - } - } diff --git a/app/routes/app.py b/app/routes/app.py deleted file mode 100644 index 0992cf7..0000000 --- a/app/routes/app.py +++ /dev/null @@ -1,8 +0,0 @@ -from flask import Blueprint, redirect, url_for, render_template -from datetime import datetime - -bp = Blueprint("app", __name__, url_prefix = "/") - -@bp.route("/") -def index(): - return redirect(url_for("topics.all_topics")) diff --git a/app/routes/guides.py b/app/routes/guides.py deleted file mode 100644 index 56097d3..0000000 --- a/app/routes/guides.py +++ /dev/null @@ -1,111 +0,0 @@ -from flask import Blueprint, render_template, render_template_string, current_app, abort -from pathlib import Path -import re - -bp = Blueprint('guides', __name__, url_prefix='/guides/') - - -def parse_guide_title(content: str): - lines = content.strip().split('\n', 1) - fline = lines[0].strip() - if fline.startswith('#'): - title = fline[2:].strip() - content = lines[1] if len(lines) > 1 else '' - return title, content.strip() - - return None, content.strip() - - -def get_guides_by_category(): - guides_dir = Path(current_app.root_path) / 'templates' / 'guides' - categories = {} - - for item in guides_dir.iterdir(): - if item.is_dir() and not item.name.startswith('_'): - category = item.name - categories[category] = [] - for guide_file in sorted(item.glob('*.html')): - if guide_file.name.startswith('_'): - continue - - m = re.match(r'(\d+)-(.+)\.html', guide_file.name) - if not m: - continue - - sort_num = int(m.group(1)) - slug = m.group(2) - - try: - with open(guide_file, 'r') as f: - content = f.read() - - title, template = parse_guide_title(content) - if not title: - title = slug.replace('-', ' ').title() - - categories[category].append(({ - 'sort': sort_num, - 'slug': slug, - 'filename': guide_file.name, - 'title': title, - 'path': f'{category}/{guide_file.name}', - 'url': f'/guides/{category}/{slug}', - 'template': template, - })) - except Exception as e: - current_app.logger.warning(f'failed to read {guide_file}: {e}') - continue - - categories[category].sort(key=lambda x: x['sort']) - - return categories - - -@bp.get('/babycode') -def babycode(): - # print(get_guides_by_category()) - return '

no

' - - -@bp.get('//') -def guide_page(category, slug): - categories = get_guides_by_category() - if category not in categories: - abort(404) - return - - for i, guide in enumerate(categories[category]): - if guide['slug'] != slug: - continue - - next_guide = None - prev_guide = None - if i != 0: - prev_guide = categories[category][i - 1] - - if i + 1 < len(categories[category]): - next_guide = categories[category][i + 1] - - return render_template_string(guide['template'], next_guide=next_guide, prev_guide=prev_guide, category=category, guide=guide) - - abort(404) - - -@bp.get('//') -def category_index(category): - categories = get_guides_by_category() - if category not in categories: - abort(404) - return - - return render_template('guides/category_index.html', category=category, pages=categories[category]) - - -@bp.get('/') -def guides_index(): - return render_template('guides/guides_index.html', categories=get_guides_by_category()) - - -@bp.get('/contact') -def contact(): - return render_template('guides/contact.html') diff --git a/app/routes/hyperapi.py b/app/routes/hyperapi.py deleted file mode 100644 index 26a9d8b..0000000 --- a/app/routes/hyperapi.py +++ /dev/null @@ -1,62 +0,0 @@ -from flask import Blueprint, render_template, abort, request -from .users import get_active_user, is_logged_in -from ..models import BookmarkCollections, BookmarkedPosts, BookmarkedThreads, BadgeUploads, Badges -from functools import wraps - -bp = Blueprint('hyperapi', __name__, url_prefix='/hyperapi/') - -def login_required(view_func): - @wraps(view_func) - def dec(*args, **kwargs): - if not is_logged_in(): - abort(403) - return view_func(*args, **kwargs) - return dec - -def account_required(view_func): - @wraps(view_func) - def dec(*args, **kwargs): - if get_active_user().is_guest(): - abort(403) - return view_func(*args, **kwargs) - return dec - -@bp.errorhandler(403) -def handle_403(e): - return "

forbidden

", 403 - - -@bp.get('/bookmarks-dropdown/') -@login_required -@account_required -def bookmarks_dropdown(bookmark_type): - collections = BookmarkCollections.findall({'user_id': get_active_user().id}) - concept_id = request.args.get('id') - require_reload = bool(int(request.args.get('require_reload', default=0))) - if bookmark_type.lower() == 'thread': - selected = next(filter(lambda bc: bc.has_thread(concept_id), collections), None) - elif bookmark_type.lower() == 'post': - selected = next(filter(lambda bc: bc.has_post(concept_id), collections), None) - else: - abort(400) - return - - if selected: - if bookmark_type.lower() == 'thread': - memo = BookmarkedThreads.find({'collection_id': selected.id, 'thread_id': int(concept_id)}).note - else: - memo = BookmarkedPosts.find({'collection_id': selected.id, 'post_id': int(concept_id)}).note - else: - memo = '' - - - return render_template('components/bookmarks_dropdown.html', collections=collections, id=concept_id, selected=selected, type=bookmark_type, memo=memo, require_reload=require_reload) - - -@bp.get('/badge-editor') -@login_required -@account_required -def get_badges(): - uploads = BadgeUploads.get_for_user(get_active_user().id) - badges = sorted(Badges.findall({'user_id': int(get_active_user().id)}), key=lambda x: x['sort_order']) - return render_template('components/badge_editor_badges.html', uploads=uploads, badges=badges) diff --git a/app/routes/mod.py b/app/routes/mod.py deleted file mode 100644 index b563430..0000000 --- a/app/routes/mod.py +++ /dev/null @@ -1,106 +0,0 @@ -from flask import ( - Blueprint, render_template, request, redirect, url_for, - flash - ) -from .users import get_active_user, is_logged_in -from ..models import Users, PasswordResetLinks, MOTD -from ..constants import InfoboxKind, MOTD_BANNED_TAGS -from ..lib.babycode import babycode_to_html, BABYCODE_VERSION -from ..db import db -import secrets -import time - -bp = Blueprint("mod", __name__, url_prefix = "/mod/") - -@bp.before_request -def _before_request(): - if not is_logged_in(): - return redirect(url_for("users.log_in")) - - if not get_active_user().is_mod(): - return redirect(url_for("topics.all_topics")) - - -@bp.get("/sort-topics") -def sort_topics(): - topics = db.query("SELECT * FROM topics ORDER BY sort_order ASC") - return render_template("mod/sort-topics.html", topics = topics) - - -@bp.post("/sort-topics") -def sort_topics_post(): - topics_list = request.form.getlist('topics[]') - print(topics_list) - with db.transaction(): - for new_order, topic_id in enumerate(topics_list): - db.execute("UPDATE topics SET sort_order = ? WHERE id = ?", new_order, topic_id) - - return redirect(url_for(".sort_topics")) - - -@bp.get("/user-list") -def user_list(): - users = Users.select() - return render_template("mod/user-list.html", users = users) - - -@bp.post("/reset-pass/") -def create_reset_pass(user_id): - now = int(time.time()) - key = secrets.token_urlsafe(20) - reset_link = PasswordResetLinks.create({ - 'user_id': int(user_id), - 'expires_at': now + 24 * 60 * 60, - 'key': key, - }) - - return redirect(url_for('users.reset_link_login', key=key)) - - -@bp.get('/panel') -def panel(): - return render_template('mod/panel.html') - - -@bp.get('/motd') -def motd_editor(): - current = MOTD.get_all()[0] if MOTD.has_motd() else None - return render_template('mod/motd.html', current=current) - - -@bp.post('/motd') -def motd_editor_form(): - orig_body = request.form.get('body', default='') - title = request.form.get('title', default='') - data = { - 'title': title, - 'body_original_markup': orig_body, - 'body_rendered': babycode_to_html(orig_body, banned_tags=MOTD_BANNED_TAGS).result, - 'format_version': BABYCODE_VERSION, - 'edited_at': int(time.time()), - } - - if MOTD.has_motd(): - motd = MOTD.get_all()[0] - motd.update(data) - message = 'MOTD updated.' - else: - data['created_at'] = int(time.time()) - data['user_id'] = get_active_user().id - motd = MOTD.create(data) - message = 'MOTD created.' - - flash(message, InfoboxKind.INFO) - return redirect(url_for('.motd_editor')) - - -@bp.post('/motd/delete') -def motd_delete(): - if not MOTD.has_motd(): - flash('No MOTD to delete.', InfoboxKind.WARN) - return redirect(url_for('.motd_editor')) - - current = MOTD.get_all()[0] - current.delete() - flash('MOTD deleted.', InfoboxKind.INFO) - return redirect(url_for('.motd_editor')) diff --git a/app/routes/posts.py b/app/routes/posts.py deleted file mode 100644 index 964d0d8..0000000 --- a/app/routes/posts.py +++ /dev/null @@ -1,153 +0,0 @@ -from flask import ( - Blueprint, redirect, url_for, flash, render_template, request - ) -from .users import login_required, get_active_user -from ..lib.babycode import babycode_to_html, babycode_to_rssxml, BABYCODE_VERSION -from ..constants import InfoboxKind -from ..db import db -from ..models import Posts, PostHistory, Threads, Topics, Mentions - -bp = Blueprint("posts", __name__, url_prefix = "/post") - - -def create_post(thread_id, user_id, content, markup_language="babycode"): - parsed_content = babycode_to_html(content) - parsed_rss = babycode_to_rssxml(content) - with db.transaction(): - post = Posts.create({ - "thread_id": thread_id, - "user_id": user_id, - "current_revision_id": None, - }) - - revision = PostHistory.create({ - "post_id": post.id, - "content": parsed_content.result, - "content_rss": parsed_rss, - "is_initial_revision": True, - "original_markup": content, - "markup_language": markup_language, - "format_version": BABYCODE_VERSION, - }) - - for mention in parsed_content.mentions: - Mentions.create({ - 'revision_id': revision.id, - 'mentioned_user_id': mention['mentioned_user_id'], - 'original_mention_text': mention['mention_text'], - 'start_index': mention['start'], - 'end_index': mention['end'], - }) - - post.update({"current_revision_id": revision.id}) - return post - - -def update_post(post_id, new_content, markup_language='babycode'): - parsed_content = babycode_to_html(new_content) - parsed_rss = babycode_to_rssxml(new_content) - with db.transaction(): - post = Posts.find({'id': post_id}) - new_revision = PostHistory.create({ - 'post_id': post.id, - 'content': parsed_content.result, - "content_rss": parsed_rss, - 'is_initial_revision': False, - 'original_markup': new_content, - 'markup_language': markup_language, - 'format_version': BABYCODE_VERSION, - }) - - for mention in parsed_content.mentions: - Mentions.create({ - 'revision_id': new_revision.id, - 'mentioned_user_id': mention['mentioned_user_id'], - 'original_mention_text': mention['mention_text'], - 'start_index': mention['start'], - 'end_index': mention['end'], - }) - - post.update({'current_revision_id': new_revision.id}) - - -@bp.post("//delete") -@login_required -def delete(post_id): - post = Posts.find({'id': post_id}) - if not post: - abort(404) - return - - thread = Threads.find({'id': post.thread_id}) - user = get_active_user() - if not user: - return redirect(url_for('threads.thread', slug=thread.slug)) - - if user.is_mod() or post.user_id == user.id: - post.delete() - - post_count = Posts.count({ - 'thread_id': thread.id, - }) - - if post_count == 0: - topic = Topics.find({ - 'id': thread.topic_id, - }) - thread.delete() - flash('Thread deleted.', InfoboxKind.INFO) - return redirect(url_for('topics.topic', slug=topic.slug)) - - flash('Post deleted.', InfoboxKind.INFO) - - return redirect(url_for('threads.thread', slug=thread.slug)) - - -@bp.get("//edit") -@login_required -def edit(post_id): - post = Posts.find({'id': post_id}) - if not post: - abort(404) - return - - user = get_active_user() - q = f"{Posts.FULL_POSTS_QUERY} WHERE posts.id = ?" - editing_post = db.fetch_one(q, post_id) - if not editing_post: - abort(404) - return - if editing_post['user_id'] != user.id: - return redirect(url_for('topics.all_topics')) - - thread = Threads.find({'id': editing_post['thread_id']}) - - thread_predicate = f'{Posts.FULL_POSTS_QUERY} WHERE posts.thread_id = ?' - - context_prev_q = f'{thread_predicate} AND posts.created_at < ? ORDER BY posts.created_at DESC LIMIT 2' - context_next_q = f'{thread_predicate} AND posts.created_at > ? ORDER BY posts.created_at ASC LIMIT 2' - prev_context = db.query(context_prev_q, thread.id, editing_post['created_at']) - next_context = db.query(context_next_q, thread.id, editing_post['created_at']) - - return render_template('posts/edit.html', - editing_post = editing_post, - thread = thread, - prev_context = prev_context, - next_context = next_context, - ) - - -@bp.post("//edit") -@login_required -def edit_form(post_id): - user = get_active_user() - post = Posts.find({'id': post_id}) - if not post: - abort(404) - return - if post.user_id != user.id: - return redirect(url_for('topics.all_topics')) - - update_post(post.id, request.form.get('new_content', default='')) - thread = Threads.find({'id': post.thread_id}) - return redirect(url_for('threads.thread', slug=thread.slug, after=post.id, _anchor=f'post-{post.id}')) diff --git a/app/routes/threads.py b/app/routes/threads.py deleted file mode 100644 index 0f6f933..0000000 --- a/app/routes/threads.py +++ /dev/null @@ -1,267 +0,0 @@ -from flask import ( - Blueprint, render_template, request, redirect, url_for, flash, - abort, current_app, - ) -from .users import login_required, mod_only, get_active_user, is_logged_in -from ..db import db -from ..models import Threads, Topics, Posts, Subscriptions, Reactions -from ..constants import InfoboxKind -from ..lib.render_atom import render_atom_template -from .posts import create_post -from slugify import slugify -from app import cache -import math -import time - -bp = Blueprint("threads", __name__, url_prefix = "/threads/") - - -def get_post_url(post_id, _anchor=False, external=False): - post = Posts.find({'id': post_id}) - if not post: - return "" - - thread = Threads.find({'id': post.thread_id}) - - anchor = None if not _anchor else f'post-{post_id}' - - return url_for('threads.thread', slug=thread.slug, after=post_id, _external=external, _anchor=anchor) - # if not _anchor: - # return res - - # return f"{res}#post-{post_id}" - - -@bp.get("/") -def thread(slug): - POSTS_PER_PAGE = 10 - thread = Threads.find({"slug": slug}) - if not thread: - abort(404) - return - - post_count = Posts.count({"thread_id": thread.id}) - page_count = max(math.ceil(post_count / POSTS_PER_PAGE), 1) - - page = 1 - after = request.args.get("after", default=None) - if after is not None: - after_id = int(after) - post_position = Posts.count([ - ("thread_id", "=", thread.id), - ("id", "<=", after_id), - ]) - page = math.ceil((post_position) / POSTS_PER_PAGE) - else: - page = max(1, min(page_count, int(request.args.get("page", default = 1)))) - posts = thread.get_posts(POSTS_PER_PAGE, (page - 1) * POSTS_PER_PAGE) - topic = Topics.find({"id": thread.topic_id}) - other_topics = Topics.select() - - is_subscribed = False - unread_count = None - if is_logged_in(): - subscription = Subscriptions.find({ - 'thread_id': thread.id, - 'user_id': get_active_user().id, - }) - if subscription: - unread_count = subscription.get_unread_count() - if int(posts[-1]['created_at']) > int(subscription.last_seen): - subscription.update({ - 'last_seen': int(posts[-1]['created_at']) - }) - is_subscribed = True - - return render_template( - "threads/thread.html", - thread = thread, - current_page = page, - page_count = page_count, - posts = posts, - topic = topic, - topics = other_topics, - is_subscribed = is_subscribed, - Reactions = Reactions, - unread_count = unread_count, - __feedlink = url_for('.thread_atom', slug=slug, _external=True), - __feedtitle = f'replies to {thread.title}', - ) - - -@bp.get("//feed.atom") -@cache.cached(timeout=5 * 60, unless=lambda: current_app.config.get('DEBUG', False)) -def thread_atom(slug): - thread = Threads.find({"slug": slug}) - if not thread: - abort(404) # TODO throw an atom friendly 404 - return - - topic = Topics.find({'id': thread.topic_id}) - posts = thread.get_posts_rss() - - return render_atom_template('threads/thread.atom', thread=thread, topic=topic, posts=posts, get_post_url=get_post_url) - - -@bp.post("/") -@login_required -def reply(slug): - thread = Threads.find({"slug": slug}) - if not thread: - abort(404) - return - user = get_active_user() - if user.is_guest(): - return redirect(url_for('.thread', slug=slug)) - if thread.locked() and not user.is_mod(): - return redirect(url_for('.thread', slug=slug)) - - post_content = request.form['post_content'] - post = create_post(thread.id, user.id, post_content) - - subscription = Subscriptions.find({'user_id': user.id, 'thread_id': thread.id}) - - if subscription: - subscription.update({'last_seen': int(time.time())}) - elif request.form.get('subscribe', default=None) == 'on': - Subscriptions.create({'user_id': user.id, 'thread_id': thread.id, 'last_seen': int(time.time())}) - - return redirect(url_for(".thread", slug=slug, after=post.id, _anchor="latest-post")) - - -@bp.get("/create") -@login_required -def create(): - all_topics = Topics.select() - return render_template("threads/create.html", all_topics = all_topics) - - -@bp.post("/create") -@login_required -def create_form(): - topic = Topics.find({"id": request.form['topic_id']}) - user = get_active_user() - if not topic: - flash('Invalid topic', InfoboxKind.ERROR) - return redirect(url_for('.create')) - - if topic.is_locked and not get_active_user().is_mod(): - flash(f'Topic "{topic.name}" is locked', InfoboxKind.ERROR) - return redirect(url_for('.create')) - - title = request.form['title'].strip() - now = int(time.time()) - slug = f"{slugify(title)}-{now}" - - post_content = request.form['initial_post'] - thread = Threads.create({ - "topic_id": topic.id, - "user_id": user.id, - "title": title, - "slug": slug, - "created_at": now, - }) - post = create_post(thread.id, user.id, post_content) - return redirect(url_for(".thread", slug = thread.slug)) - - -@bp.post("//lock") -@login_required -def lock(slug): - user = get_active_user() - thread = Threads.find({'slug': slug}) - if not thread: - abort(404) - return - if not ((thread.user_id == user.id) or user.is_mod()): - return redirect(url_for('.thread', slug=slug)) - target_op = request.form.get('target_op') - thread.update({ - 'is_locked': target_op - }) - return redirect(url_for('.thread', slug=slug)) - - -@bp.post("//sticky") -@login_required -@mod_only(".thread", slug = lambda slug: slug) -def sticky(slug): - user = get_active_user() - thread = Threads.find({'slug': slug}) - if not thread: - abort(404) - return - if not ((thread.user_id == user.id) or user.is_mod()): - return redirect(url_for('.thread', slug=slug)) - target_op = request.form.get('target_op') - thread.update({ - 'is_stickied': target_op - }) - return redirect(url_for('.thread', slug=slug)) - - -@bp.post("//move") -@login_required -@mod_only(".thread", slug = lambda slug: slug) -def move(slug): - user = get_active_user() - - new_topic_id = request.form.get('new_topic_id', default=None) - if new_topic_id is None: - flash('Thread is already in this topic.', InfoboxKind.ERROR) - return redirect(url_for('.thread', slug=slug)) - - new_topic = Topics.find({ - 'id': new_topic_id - }) - if not new_topic: - return redirect(url_for('topics.all_topics')) - thread = Threads.find({ - 'slug': slug - }) - if not thread: - return redirect(url_for('topics.all_topics')) - if new_topic.id == thread.topic_id: - flash('Thread is already in this topic.', InfoboxKind.ERROR) - return redirect(url_for('.thread', slug=slug)) - - old_topic = Topics.find({'id': thread.topic_id}) - thread.update({'topic_id': new_topic_id}) - flash(f'Topic moved from "{old_topic.name}" to "{new_topic.name}".', InfoboxKind.INFO) - return redirect(url_for('.thread', slug=slug)) - - -@bp.post("//subscribe") -@login_required -def subscribe(slug): - user = get_active_user() - thread = Threads.find({'slug': slug}) - if not thread: - return redirect(url_for('topics.all_topics')) - subscription = Subscriptions.find({ - 'user_id': user.id, - 'thread_id': thread.id, - }) - if request.form['subscribe'] == 'subscribe': - if subscription: - subscription.delete() - Subscriptions.create({ - 'user_id': user.id, - 'thread_id': thread.id, - 'last_seen': int(time.time()), - }) - elif request.form['subscribe'] == 'unsubscribe': - if not subscription: - return redirect(url_for('.thread', slug=slug)) - subscription.delete() - elif request.form['subscribe'] == 'read': - if not subscription: - return redirect(url_for('.thread', slug=slug)) - subscription.update({ - 'last_seen': int(time.time()) - }) - last_visible_post = request.form.get('last_visible_post', default=None) - if last_visible_post is not None: - return redirect(url_for('.thread', slug=thread.slug, after=last_visible_post)) - else: - return redirect(url_for('users.inbox', username=user.username)) diff --git a/app/routes/topics.py b/app/routes/topics.py deleted file mode 100644 index 729a615..0000000 --- a/app/routes/topics.py +++ /dev/null @@ -1,147 +0,0 @@ -from flask import ( - Blueprint, render_template, request, redirect, url_for, flash, session, - abort, current_app - ) -from .users import login_required, mod_only, get_active_user, is_logged_in -from ..models import Users, Topics, Threads, Subscriptions -from ..constants import InfoboxKind -from ..lib.render_atom import render_atom_template -from slugify import slugify -from app import cache -import time -import math - -bp = Blueprint("topics", __name__, url_prefix = "/topics/") - - -@bp.get("/") -def all_topics(): - return render_template("topics/topics.html", topic_list = Topics.get_list(), active_threads = Topics.get_active_threads()) - - -@bp.get("/create") -@login_required -@mod_only(".all_topics") -def create(): - return render_template("topics/create.html") - - -@bp.post("/create") -@login_required -@mod_only(".all_topics") -def create_post(): - topic_name = request.form['name'].strip() - now = int(time.time()) - slug = f"{slugify(topic_name)}-{now}" - - topic_count = Topics.count() - topic = Topics.create({ - "name": topic_name, - "description": request.form['description'], - "slug": slug, - "sort_order": topic_count + 1, - }) - - flash("Topic created.", InfoboxKind.INFO) - return redirect(url_for("topics.topic", slug = slug)) - - -@bp.get("/") -def topic(slug): - THREADS_PER_PAGE = 10 - target_topic = Topics.find({ - "slug": slug - }) - if not target_topic: - abort(404) - return - - threads_count = Threads.count({ - "topic_id": target_topic.id - }) - - sort_by = session.get('sort_by', default="activity") - - page_count = max(math.ceil(threads_count / THREADS_PER_PAGE), 1) - page = max(1, min(int(request.args.get('page', default=1)), page_count)) - - threads_list = target_topic.get_threads(THREADS_PER_PAGE, page, sort_by) - subscriptions = {} - if is_logged_in(): - for thread in threads_list: - subscription = Subscriptions.find({ - 'user_id': get_active_user().id, - 'thread_id': thread['id'], - }) - if subscription: - subscriptions[thread['id']] = subscription.get_unread_count() - - return render_template( - "topics/topic.html", - threads_list = threads_list, - subscriptions = subscriptions, - topic = target_topic, - current_page = page, - page_count = page_count, - __feedlink = url_for('.topic_atom', slug=slug, _external=True), - __feedtitle = f'latest threads in {target_topic.name}', - ) - - -@bp.get('//feed.atom') -@cache.cached(timeout=10 * 60, unless=lambda: current_app.config.get('DEBUG', False)) -def topic_atom(slug): - target_topic = Topics.find({ - "slug": slug - }) - if not target_topic: - abort(404) # TODO throw an atom friendly 404 - return - - threads_list = target_topic.get_threads_with_op_rss() - - return render_atom_template('topics/topic.atom', threads_list=threads_list, target_topic=target_topic) - - -@bp.get("//edit") -@login_required -@mod_only(".topic", slug = lambda slug: slug) -def edit(slug): - topic = Topics.find({"slug": slug}) - if not topic: - abort(404) - return - return render_template("topics/edit.html", topic=topic) - - -@bp.post("//edit") -@login_required -@mod_only(".topic", slug = lambda slug: slug) -def edit_post(slug): - topic = Topics.find({"slug": slug}) - if not topic: - abort(404) - return - - topic.update({ - "name": request.form.get('name', default = topic.name).strip(), - "description": request.form.get('description', default = topic.description), - "is_locked": int(request.form.get("is_locked", default = topic.is_locked)), - }) - - return redirect(url_for("topics.topic", slug=slug)) - - -@bp.post("//delete") -@login_required -@mod_only(".topic", slug = lambda slug: slug) -def delete(slug): - topic = Topics.find({"slug": slug}) - if not topic: - abort(404) - return - - topic.delete() - - flash("Topic deleted.", InfoboxKind.INFO) - return redirect(url_for("topics.all_topics")) diff --git a/app/routes/users.py b/app/routes/users.py deleted file mode 100644 index 868e8f8..0000000 --- a/app/routes/users.py +++ /dev/null @@ -1,1003 +0,0 @@ -from flask import ( - Blueprint, render_template, request, redirect, url_for, flash, session, current_app, abort - ) -from functools import wraps -from ..db import db -from ..lib.babycode import babycode_to_html, BABYCODE_VERSION -from ..models import ( - Users, Sessions, Subscriptions, - Avatars, PasswordResetLinks, InviteKeys, - BookmarkCollections, BookmarkedThreads, - Mentions, PostHistory, Badges, BadgeUploads, - ) -from ..constants import InfoboxKind, PermissionLevel, SIG_BANNED_TAGS -from ..auth import digest, verify -from wand.image import Image -from wand.exceptions import WandException -from datetime import datetime, timedelta -import secrets -import time -import re -import os - -AVATAR_MAX_SIZE = 1000 * 1000 -BADGE_MAX_SIZE = 1000 * 500 - -bp = Blueprint("users", __name__, url_prefix = "/users/") - - -def validate_and_create_avatar(input_image, filename): - try: - with Image(blob=input_image) as img: - if hasattr(img, 'sequence') and len(img.sequence) > 1: - img = Image(image=img.sequence[0]) - img.strip() - img.gravity = 'center' - - width, height = img.width, img.height - min_dim = min(width, height) - if min_dim > 256: - ratio = 256.0 / min_dim - new_width = int(width * ratio) - new_height = int(height * ratio) - img.resize(new_width, new_height) - - width, height = img.width, img.height - crop_size = min(width, height) - x_offset = (width - crop_size) // 2 - y_offset = (height - crop_size) // 2 - img.crop(left=x_offset, top=y_offset, - width=crop_size, height=crop_size) - - img.resize(256, 256) - img.format = 'webp' - img.compression_quality = 85 - img.save(filename=filename) - return True - except WandException: - return False - -def validate_and_create_badge(input_image, filename): - try: - with Image(blob=input_image) as img: - if img.width != 88 or img.height != 31: - return False - if hasattr(img, 'sequence') and len(img.sequence) > 1: - img = Image(image=img.sequence[0]) - img.strip() - - img.format = 'webp' - img.compression_quality = 90 - img.save(filename=filename) - return True - except WandException: - return False - -def is_logged_in(): - if "pyrom_session_key" not in session: - return False - sess = Sessions.find({"key": session["pyrom_session_key"]}) - if not sess: - return False - if sess.expires_at < int(time.time()): - session.clear() - sess.delete() - flash('Your session expired.;Please log in again.', InfoboxKind.INFO) - return False - return True - - -def get_active_user(): - if not is_logged_in(): - return None - sess = Sessions.find({"key": session["pyrom_session_key"]}) - if not sess: - return None - if sess.expires_at < int(time.time()): - return None - return Users.find({"id": sess.user_id}) - - -def create_session(user_id): - key = secrets.token_hex(16) - expires_at = int(time.time()) + 31 * 24 * 60 * 60 - s = Sessions.create({ - "key": key, - "user_id": user_id, - "expires_at": expires_at, - }) - return s - - -def extend_session(user_id): - session_obj = Sessions.find({'key': session['pyrom_session_key']}) - if not session_obj: - return - new_duration = timedelta(31) - current_app.permanent_session_lifetime = new_duration - session.modified = True - session_obj.update({ - 'expires_at': int(time.time()) + 31 * 24 * 60 * 60 - }) - - -def validate_password(password): - pattern = r'^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[\W_])(?!.*\s).{10,255}$' - return bool(re.fullmatch(pattern, password)) - - -def validate_username(username): - pattern = r'^[a-zA-Z0-9_-]{3,20}$' - return bool(re.fullmatch(pattern, username)) - - -def validate_display_name(display_name): - if not display_name: - return True - - pattern = r'^[\w!#$%^*\(\)\-_=+\[\]\{\}\|;:,.?\s]{3,50}$' - display_name = display_name.replace('@', '_') - return bool(re.fullmatch(pattern, display_name)) - - -def redirect_if_logged_in(*args, **kwargs): - def decorator(view_func): - @wraps(view_func) - def wrapper(*view_args, **view_kwargs): - if is_logged_in(): - # resolve callables - processed_kwargs = { - k: v(**view_kwargs) if callable(v) else v - for k, v in kwargs.items() - } - endpoint = args[0] if args else processed_kwargs.get("endpoint") - if endpoint.startswith("."): - blueprint = current_app.blueprints.get(view_func.__name__.split(".")[0]) - if blueprint: - endpoint = endpoint.lstrip(".") - return redirect(url_for(f"{blueprint.name}.{endpoint}", **processed_kwargs)) - return redirect(url_for(*args, **processed_kwargs)) - return view_func(*view_args, **view_kwargs) - return wrapper - return decorator - - -def redirect_to_own(view_func): - @wraps(view_func) - def wrapper(username, *args, **kwargs): - user = get_active_user() - if username.lower() != user.username: - view_args = dict(request.view_args) - view_args.pop('username', None) - new_args = {**view_args, 'username': user.username} - return redirect(url_for(request.endpoint, **new_args)) - return view_func(username, *args, **kwargs) - return wrapper - - -def login_required(view_func): - @wraps(view_func) - def wrapper(*args, **kwargs): - if not is_logged_in(): - return redirect(url_for("users.log_in")) - return view_func(*args, **kwargs) - return wrapper - - -def mod_only(*args, **kwargs): - def decorator(view_func): - @wraps(view_func) - def wrapper(*view_args, **view_kwargs): - if not get_active_user().is_mod(): - # resolve callables - processed_kwargs = { - k: v(**view_kwargs) if callable(v) else v - for k, v in kwargs.items() - } - endpoint = args[0] if args else processed_kwargs.get("endpoint") - if endpoint.startswith("."): - blueprint = current_app.blueprints.get(view_func.__name__.split(".")[0]) - if blueprint: - endpoint = endpoint.lstrip(".") - return redirect(url_for(f"{blueprint.name}.{endpoint}", **processed_kwargs)) - return redirect(url_for(*args, **processed_kwargs)) - return view_func(*view_args, **view_kwargs) - return wrapper - return decorator - - -def admin_only(*args, **kwargs): - def decorator(view_func): - @wraps(view_func) - def wrapper(*view_args, **view_kwargs): - if not get_active_user().is_admin(): - # resolve callables - processed_kwargs = { - k: v(**view_kwargs) if callable(v) else v - for k, v in kwargs.items() - } - endpoint = args[0] if args else processed_kwargs.get("endpoint") - if endpoint.startswith("."): - blueprint = current_app.blueprints.get(view_func.__name__.split(".")[0]) - if blueprint: - endpoint = endpoint.lstrip(".") - return redirect(url_for(f"{blueprint.name}.{endpoint}", **processed_kwargs)) - return redirect(url_for(*args, **processed_kwargs)) - return view_func(*view_args, **view_kwargs) - return wrapper - return decorator - - -def get_prefers_theme(): - if not 'theme' in session: - return 'style' - - if session['theme'] not in current_app.config['allowed_themes']: - return 'style' - - return session['theme'] - - -def anonymize_user(user_id): - deleted_user = Users.find({'username': 'deleteduser'}) - - from ..models import Threads, Posts - from ..lib.babycode import sanitize - threads = Threads.findall({'user_id': user_id}) - posts = Posts.findall({'user_id': user_id}) - - revs_q = """SELECT DISTINCT m.revision_id FROM mentions m - WHERE m.mentioned_user_id = ?""" - - mentioned_revs = db.query(revs_q, int(user_id)) - with db.transaction(): - for thread in threads: - thread.update({'user_id': int(deleted_user.id)}) - for post in posts: - post.update({'user_id': int(deleted_user.id)}) - - revs = {} - for rev in mentioned_revs: - ph = PostHistory.find({'id': int(rev['revision_id'])}) - ms = Mentions.findall({ - 'mentioned_user_id': int(user_id), - 'revision_id': int(rev['revision_id']) - }) - data = { - 'text': sanitize(ph.original_markup), - 'mentions': ms, - } - data['mentions'] = sorted(data['mentions'], key=lambda x: int(x.end_index), reverse=True) - revs[rev['revision_id']] = data - - for rev_id, data in revs.items(): - text = data['text'] - for mention in data['mentions']: - text = text[:mention.start_index] + '@deleteduser' + text[mention.end_index:] - mention.delete() - - res = babycode_to_html(text) - ph = PostHistory.find({'id': int(rev_id)}) - ph.update({ - 'original_markup': text.unescape(), - 'content': res.result, - }) - - -@bp.get("/log_in") -@redirect_if_logged_in(".page", username = lambda: get_active_user().username) -def log_in(): - return render_template("users/log_in.html") - - -@bp.post("/log_in") -@redirect_if_logged_in(".page", username = lambda: get_active_user().username) -def log_in_post(): - target_user = Users.find({ - "username": request.form['username'].lower() - }) - if not target_user: - flash("Incorrect username or password.", InfoboxKind.ERROR) - return redirect(url_for("users.log_in")) - - if not verify(target_user.password_hash, request.form['password']): - flash("Incorrect username or password.", InfoboxKind.ERROR) - return redirect(url_for("users.log_in")) - - session_obj = create_session(target_user.id) - - session['pyrom_session_key'] = session_obj.key - flash("Logged in!", InfoboxKind.INFO) - return redirect(url_for("users.log_in")) - - -@bp.get("/sign_up") -@redirect_if_logged_in(".page", username = lambda: get_active_user().username) -def sign_up(): - if current_app.config['DISABLE_SIGNUP']: - key = request.args.get('key', default=None) - if key is None: - return redirect(url_for('topics.all_topics')) - - invite = InviteKeys.find({'key': key}) - if not invite: - return redirect(url_for('topics.all_topics')) - - inviter = Users.find({'id': invite.created_by}) - return render_template("users/sign_up.html", inviter=inviter, key=key) - - return render_template("users/sign_up.html") - - -@bp.post("/sign_up") -@redirect_if_logged_in(".page", username = lambda: get_active_user().username) -def sign_up_post(): - key = request.form.get('key', default=None) - - if current_app.config['DISABLE_SIGNUP']: - if not key: - return redirect(url_for("topics.all_topics")) - invite_key = InviteKeys.find({'key': key}) - if not invite_key: - return redirect(url_for("topics.all_topics")) - - username = request.form['username'] - password = request.form['password'] - password_confirm = request.form['password-confirm'] - - if not validate_username(username): - flash("Invalid username.", InfoboxKind.ERROR) - return redirect(url_for("users.sign_up", key=key)) - - user_exists = Users.count({"username": username.lower()}) > 0 - if user_exists: - flash(f"Username '{username}' is already taken.", InfoboxKind.ERROR) - return redirect(url_for("users.sign_up", key=key)) - - if not validate_password(password): - flash("Invalid password.", InfoboxKind.ERROR) - return redirect(url_for("users.sign_up", key=key)) - - if password != password_confirm: - flash("Passwords do not match.", InfoboxKind.ERROR) - return redirect(url_for("users.sign_up", key=key)) - - hashed = digest(password) - - if username.lower() != username: - display_name = username - else: - display_name = '' - - with db.transaction(): - new_user = Users.create({ - "username": username.lower(), - 'display_name': display_name, - "password_hash": hashed, - "permission": PermissionLevel.GUEST.value, - }) - - BookmarkCollections.create_default(new_user.id) - - if current_app.config['DISABLE_SIGNUP']: - invite_key = InviteKeys.find({'key': key}) - new_user.update({ - 'invited_by': invite_key.created_by, - 'permission': PermissionLevel.USER.value, - }) - invite_key.delete() - - session_obj = create_session(new_user.id) - - session['pyrom_session_key'] = session_obj.key - flash("Signed up successfully!", InfoboxKind.INFO) - return redirect(url_for("topics.all_topics")) - - -@bp.get("/") -def page(username): - target_user = Users.find({"username": username.lower()}) - if not target_user: - abort(404) - return render_template("users/user.html", target_user = target_user) - - -@bp.get("//settings") -@login_required -@redirect_to_own -def settings(username): - uploads = BadgeUploads.get_for_user(get_active_user().id) - return render_template('users/settings.html', uploads=uploads) - - -@bp.post('//settings') -@login_required -@redirect_to_own -def settings_form(username): - # we silently ignore the passed username - # and grab the correct user from the session - user = get_active_user() - theme = request.form.get('theme', default='style') - if theme == 'style': - if 'theme' in session: - session.pop('theme') - else: - session['theme'] = theme - topic_sort_by = request.form.get('topic_sort_by', default='activity') - if topic_sort_by == 'activity' or topic_sort_by == 'thread': - sort_by = session['sort_by'] = topic_sort_by - status = request.form.get('status', default="")[:100] - original_sig = request.form.get('signature', default='').strip() - if original_sig: - rendered_sig = babycode_to_html(original_sig, SIG_BANNED_TAGS).result - else: - rendered_sig = '' - session['subscribe_by_default'] = request.form.get('subscribe_by_default', default='off') == 'on' - display_name = request.form.get('display_name', default='').replace('@', '_') - if not validate_display_name(display_name): - flash('Invalid display name.', InfoboxKind.ERROR) - return redirect('.settings', username=user.username) - - old_dn = user.display_name - - user.update({ - 'status': status, - 'signature_original_markup': original_sig, - 'signature_rendered': rendered_sig, - 'signature_format_version': BABYCODE_VERSION, - 'signature_markup_language': 'babycode', - 'display_name': display_name, - }) - - if old_dn != display_name: - # re-parse mentions - q = """SELECT DISTINCT m.revision_id FROM mentions m - JOIN post_history ph ON m.revision_id = ph.id - JOIN posts p ON p.current_revision_id = ph.id - WHERE m.mentioned_user_id = ?""" - mentions = db.query(q, int(user.id)) - with db.transaction(): - for mention in mentions: - rev = PostHistory.find({'id': int(mention['revision_id'])}) - parsed_content = babycode_to_html(rev.original_markup).result - rev.update({'content': parsed_content}) - - flash('Settings updated.', InfoboxKind.INFO) - return redirect(url_for('.settings', username=user.username)) - - -@bp.post('//set_avatar') -@login_required -@redirect_to_own -def set_avatar(username): - user = get_active_user() - if user.is_guest(): - flash('You are a guest. Your account must be confirmed by a moderator to perform this action.', InfoboxKind.ERROR) - return redirect(url_for('.settings', username=user.username)) - if 'avatar' not in request.files: - flash('Avatar missing.', InfoboxKind.ERROR) - return redirect(url_for('.settings', username=user.username)) - - file = request.files['avatar'] - - if file.filename == '': - flash('Avatar missing.', InfoboxKind.ERROR) - return redirect(url_for('.settings', username=user.username)) - - file.seek(0, os.SEEK_END) - file_size = file.tell() - file.seek(0, os.SEEK_SET) - - if file_size > AVATAR_MAX_SIZE: - flash('Avatar image is over 1MB.', InfoboxKind.ERROR) - return redirect(url_for('.settings', username=user.username)) - - file_bytes = file.read() - - now = int(time.time()) - filename = f"u{user.id}d{now}.webp" - output_path = os.path.join(current_app.config['AVATAR_UPLOAD_PATH'], filename) - proxied_filename = f"/static/avatars/{filename}" - res = validate_and_create_avatar(file_bytes, output_path) - if res: - flash('Avatar updated.', InfoboxKind.INFO) - avatar = Avatars.create({ - 'file_path': proxied_filename, - 'uploaded_at': now, - }) - old_avatar = Avatars.find({'id': user.avatar_id}) - user.update({'avatar_id': avatar.id}) - if int(old_avatar.id) != 1: - # delete old avi, but not default - filename = os.path.join(current_app.config['AVATAR_UPLOAD_PATH'], os.path.basename(old_avatar.file_path)) - os.remove(filename) - old_avatar.delete() - return redirect(url_for('.settings', username=user.username)) - else: - flash('Something went wrong. Please try again later.', InfoboxKind.WARN) - return redirect(url_for('.settings', username=user.username)) - - -@bp.post('//change_password') -@login_required -@redirect_to_own -def change_password(username): - user = get_active_user() - password = request.form.get('new_password') - password2 = request.form.get('new_password2') - - if not validate_password(password): - flash("Invalid password.", InfoboxKind.ERROR) - return redirect(url_for('.settings', username=user.username)) - - if password != password2: - flash("Passwords do not match.", InfoboxKind.ERROR) - return redirect(url_for('.settings', username=user.username)) - - hashed = digest(password) - user.update({'password_hash': hashed}) - extend_session(user.id) - flash('Password updated.', InfoboxKind.INFO) - return redirect(url_for('.settings', username=user.username)) - - -@bp.post('//clear_avatar') -@login_required -@redirect_to_own -def clear_avatar(username): - user = get_active_user() - if user.is_default_avatar(): - return redirect(url_for('.settings', user.username)) - - old_avatar = Avatars.find({'id': user.avatar_id}) - user.update({'avatar_id': 1}) - # delete old avi - filename = os.path.join(current_app.config['AVATAR_UPLOAD_PATH'], os.path.basename(old_avatar.file_path)) - os.remove(filename) - old_avatar.delete() - return redirect(url_for('.settings', username=user.username)) - - -@bp.post("/log_out") -@login_required -def log_out(): - user = get_active_user() - session_obj = Sessions.find({"key": session['pyrom_session_key']}) - session_obj.delete() - - session.clear() - return redirect(url_for(".log_in")) - - -@bp.post("/confirm_user/") -@login_required -@mod_only("topics.all_topics") -def confirm_user(user_id): - target_user = Users.find({"id": user_id}) - if not target_user: - return redirect(url_for('.all_topics')) - if int(target_user.permission) > PermissionLevel.GUEST.value: - return redirect(url_for('.page', username=target_user.username)) - - target_user.update({ - "permission": PermissionLevel.USER.value, - "confirmed_on": int(time.time()), - }) - return redirect(url_for(".page", username=target_user.username)) - - -@bp.post("/mod_user/") -@login_required -@admin_only("topics.all_topics") -def mod_user(user_id): - target_user = Users.find({"id": user_id}) - if not target_user: - return redirect(url_for('.all_topics')) - if target_user.is_mod(): - return redirect(url_for('.page', username=target_user.username)) - - target_user.update({ - "permission": PermissionLevel.MODERATOR.value, - }) - return redirect(url_for(".page", username=target_user.username)) - - -@bp.post("/demod_user/") -@login_required -@admin_only("topics.all_topics") -def demod_user(user_id): - target_user = Users.find({"id": user_id}) - if not target_user: - return redirect(url_for('.all_topics')) - if not target_user.is_mod(): - return redirect(url_for('.page', username=target_user.username)) - - target_user.update({ - "permission": PermissionLevel.USER.value, - }) - return redirect(url_for(".page", username=target_user.username)) - - -@bp.post("/guest_user/") -@login_required -@mod_only("topics.all_topics") -def guest_user(user_id): - target_user = Users.find({"id": user_id}) - if not target_user: - return redirect(url_for('.all_topics')) - if get_active_user().is_mod_only() and target_user.is_mod(): - return redirect(url_for('.page', username=target_user.username)) - - target_user.update({ - "permission": PermissionLevel.GUEST.value, - }) - return redirect(url_for(".page", username=target_user.username)) - - -@bp.get("//inbox") -@login_required -@redirect_to_own -def inbox(username): - user = get_active_user() - new_posts = [] - subscription = Subscriptions.find({"user_id": user.id}) - all_subscriptions = None - total_unreads_count = None - if subscription: - all_subscriptions = user.get_all_subscriptions() - q = """ - WITH thread_metadata AS ( - SELECT - posts.thread_id, threads.slug AS thread_slug, threads.title AS thread_title, COUNT(*) AS unread_count, MAX(posts.created_at) AS newest_post_time - FROM - posts - LEFT JOIN - threads ON threads.id = posts.thread_id - LEFT JOIN - subscriptions ON subscriptions.thread_id = posts.thread_id - WHERE subscriptions.user_id = ? AND posts.created_at > subscriptions.last_seen - GROUP BY posts.thread_id - ), - user_badges AS ( - SELECT - b.user_id, - json_group_array( - json_object( - 'label', b.label, - 'link', b.link, - 'sort_order', b.sort_order, - 'file_path', bu.file_path - ) - ) AS badges_json - FROM badges b - LEFT JOIN badge_uploads bu ON b.upload = bu.id - GROUP BY b.user_id - ORDER BY b.sort_order - ) - - SELECT - tm.thread_id, tm.thread_slug, tm.thread_title, tm.unread_count, tm.newest_post_time, - - posts.id, posts.created_at, post_history.content, post_history.edited_at, users.username, users.status, avatars.file_path AS avatar_path, posts.thread_id, users.id AS user_id, post_history.original_markup, users.signature_rendered, - COALESCE(user_badges.badges_json, '[]') AS badges_json - FROM - thread_metadata tm - JOIN - posts ON posts.thread_id = tm.thread_id - JOIN - post_history ON posts.current_revision_id = post_history.id - JOIN - users ON posts.user_id = users.id - LEFT JOIN - threads ON threads.id = posts.thread_id - LEFT JOIN - avatars ON users.avatar_id = avatars.id - LEFT JOIN - subscriptions ON subscriptions.thread_id = posts.thread_id - LEFT JOIN - user_badges ON users.id = user_badges.user_id - WHERE - subscriptions.user_id = ? AND posts.created_at > subscriptions.last_seen - ORDER BY - tm.newest_post_time DESC, posts.created_at ASC""" - new_posts_raw = db.query(q, user.id, user.id) - current_thread_id = None - current_thread_group = None - total_unreads_count = 0 - for row in new_posts_raw: - if row['thread_id'] != current_thread_id: - current_thread_group = { - 'thread_id': row['thread_id'], - 'thread_title': row['thread_title'], - 'unread_count': row['unread_count'], - 'thread_slug': row['thread_slug'], - 'newest_post_time': row['newest_post_time'], - 'posts': [], - } - total_unreads_count += int(row['unread_count']) - new_posts.append(current_thread_group) - current_thread_id = row['thread_id'] - current_thread_group['posts'].append({ - 'id': row['id'], - 'created_at': row['created_at'], - 'content': row['content'], - 'edited_at': row['edited_at'], - 'username': row['username'], - 'status': row['status'], - 'avatar_path': row['avatar_path'], - 'thread_id': row['thread_id'], - 'user_id': row['user_id'], - 'original_markup': row['original_markup'], - 'signature_rendered': row['signature_rendered'], - 'badges_json': row['badges_json'], - - 'thread_slug': row['thread_slug'], - }) - - return render_template("users/inbox.html", new_posts = new_posts, total_unreads_count = total_unreads_count, all_subscriptions = all_subscriptions) - - -@bp.get('/reset-link/') -def reset_link_login(key): - reset_link = PasswordResetLinks.find({ - 'key': key - }) - if not reset_link: - return redirect(url_for('topics.all_topics')) - - if int(time.time()) > int(reset_link.expires_at): - reset_link.delete() - return redirect(url_for('topics.all_topics')) - - target_user = Users.find({ - 'id': reset_link.user_id - }) - - return render_template('users/reset_link_login.html', username = target_user.username) - - -@bp.post('/reset-link/') -def reset_link_login_form(key): - reset_link = PasswordResetLinks.find({ - 'key': key - }) - if not reset_link: - return redirect('topics.all_topics') - - if int(time.time()) > int(reset_link.expires_at): - reset_link.delete() - return redirect('topics.all_topics') - - password = request.form.get('password') - password2 = request.form.get('password2') - - if not validate_password(password): - flash("Invalid password.", InfoboxKind.ERROR) - return redirect(url_for('.reset_link_login', key=key)) - - if password != password2: - flash("Passwords do not match.", InfoboxKind.ERROR) - return redirect(url_for('.reset_link_login', key=key)) - - target_user = Users.find({ - 'id': reset_link.user_id - }) - reset_link.delete() - - hashed = digest(password) - target_user.update({'password_hash': hashed}) - session_obj = create_session(target_user.id) - - session['pyrom_session_key'] = session_obj.key - flash("Logged in!", InfoboxKind.INFO) - - return redirect(url_for('.page', username=target_user.username)) - - -@bp.get('//invite-links/') -@login_required -@redirect_to_own -def invite_links(username): - target_user = Users.find({ - 'username': username.lower() - }) - if not target_user or not target_user.can_invite(): - return redirect(url_for('.page', username=username)) - - invites = InviteKeys.findall({ - 'created_by': target_user.id - }) - - return render_template('users/invite_links.html', invites=invites) - - -@bp.post('//invite-links/create') -@login_required -@redirect_to_own -def create_invite_link(username): - target_user = Users.find({ - 'username': username.lower() - }) - if not target_user or not target_user.can_invite(): - return redirect(url_for('.page', username=username.lower())) - - invite = InviteKeys.create({ - 'created_by': target_user.id, - 'key': secrets.token_urlsafe(20), - }) - - return redirect(url_for('.invite_links', username=target_user.username)) - - -@bp.post('//invite-links/revoke') -@login_required -@redirect_to_own -def revoke_invite_link(username): - target_user = Users.find({ - 'username': username.lower() - }) - if not target_user or not target_user.can_invite(): - return redirect(url_for('.page', username=username.lower())) - - invite = InviteKeys.find({ - 'key': request.form.get('key'), - }) - - if not invite: - return redirect(url_for('.invite_links', username=target_user.username)) - - if invite.created_by != target_user.id: - return redirect(url_for('.invite_links', username=target_user.username)) - - invite.delete() - - return redirect(url_for('.invite_links', username=target_user.username)) - - -@bp.get('//bookmarks') -@login_required -@redirect_to_own -def bookmarks(username): - target_user = get_active_user() - - collections = target_user.get_bookmark_collections() - - return render_template('users/bookmarks.html', collections=collections) - - -@bp.get('//bookmarks/collections') -@login_required -@redirect_to_own -def bookmark_collections(username): - target_user = get_active_user() - - collections = target_user.get_bookmark_collections() - return render_template('users/bookmark_collections.html', collections=collections) - - -@bp.get('//delete-account') -@login_required -@redirect_to_own -def delete_page(username): - target_user = get_active_user() - - return render_template('users/delete_page.html') - - -@bp.post('//delete-account') -@login_required -@redirect_to_own -def delete_page_confirm(username): - target_user = get_active_user() - - password = request.form.get('password', default='') - - if not verify(target_user.password_hash, password): - flash('Incorrect password.', InfoboxKind.ERROR) - return redirect(url_for('.delete_page', username=username)) - - if target_user.is_admin(): - flash('You cannot delete the admin account.', InfoboxKind.ERROR) - return redirect(url_for('.delete_page', username=username)) - - anonymize_user(target_user.id) - sessions = Sessions.findall({'user_id': int(target_user.id)}) - for session_obj in sessions: - session_obj.delete() - - session.clear() - target_user.delete() - return redirect(url_for('topics.all_topics')) - - -@bp.post('//save-badges') -@login_required -@redirect_to_own -def save_badges(username): - user = get_active_user() - badge_choices = request.form.getlist('badge_choice[]') - badge_files = request.files.getlist('badge_file[]') - badge_labels = request.form.getlist('badge_label[]') - badge_links = request.form.getlist('badge_link[]') - - if not (len(badge_choices) == len(badge_files) == len(badge_labels) == len(badge_links)): - return 'nope' - pending_badges = [] - rejected_filenames = [] - - # lack of file can be checked with a simple `if not file` - - for i in range(len(badge_choices)): - is_custom = badge_choices[i] == 'custom' - file = badge_files[i] - pending_badge = { - 'upload': badge_choices[i], - 'is_custom': is_custom, - 'label': badge_labels[i], - 'link': badge_links[i], - 'sort_order': i, - } - if is_custom: - file.seek(0, os.SEEK_END) - file_size = file.tell() - file.seek(0, os.SEEK_SET) - - if file_size >= BADGE_MAX_SIZE: - rejected_filenames.append(file.filename) - continue - - file_bytes = file.read() - - pending_badge['original_filename'] = file.filename - - now = int(time.time()) - filename = f'u{user.id}d{now}s{i}.webp' - output_path = os.path.join(current_app.config['BADGES_UPLOAD_PATH'], filename) - proxied_filename = f'/static/badges/user/{filename}' - res = validate_and_create_badge(file_bytes, output_path) - if not res: - rejected_filenames.append(file.filename) - continue - - pending_badge['proxied_filename'] = proxied_filename - pending_badge['uploaded_at'] = now - - pending_badges.append(pending_badge) - - if rejected_filenames: - flash(f'Invalid badges.;Some of your uploaded badges are incorrect: {", ".join(rejected_filenames)}. Your badges have not been modified.', InfoboxKind.ERROR) - return redirect(url_for('.settings', username=user.username)) - - with db.transaction(): - existing_badges = Badges.findall({'user_id': int(user.id)}) - for badge in existing_badges: - badge.delete() - - with db.transaction(): - for pending_badge in pending_badges: - if pending_badge['is_custom']: - bu = BadgeUploads.create({ - 'file_path': pending_badge['proxied_filename'], - 'uploaded_at': pending_badge['uploaded_at'], - 'original_filename': pending_badge['original_filename'], - 'user_id': int(user.id), - }) - else: - bu = BadgeUploads.find({ - 'id': int(pending_badge['upload']) - }) - badge = Badges.create({ - 'user_id': int(user.id), - 'upload': int(bu.id), - 'label': pending_badge['label'], - 'link': pending_badge['link'], - 'sort_order': pending_badge['sort_order'] - }) - - for stale_upload in BadgeUploads.get_unused_for_user(user.id): - filename = os.path.join(current_app.config['BADGES_UPLOAD_PATH'], os.path.basename(stale_upload.file_path)) - os.remove(filename) - stale_upload.delete() - - flash('Badges saved.', InfoboxKind.INFO) - return redirect(url_for('.settings', username=user.username)) diff --git a/app/templates/base.atom b/app/templates/base.atom deleted file mode 100644 index 4cf9630..0000000 --- a/app/templates/base.atom +++ /dev/null @@ -1,20 +0,0 @@ - - - {% if self.title() %} - {% block title %}{% endblock %} - {% else %} - {{ config.SITE_NAME }} - {% endif %} - {% if self.feed_updated() %} - {% block feed_updated %}{% endblock %} - {% else %} - {{ get_time_now() | iso8601 }} - {% endif %} - {{ __current_page }} - - - {% if self.feed_author() %} - {% block feed_author %}{% endblock %} - {% endif %} - {% block content %}{% endblock %} - diff --git a/app/templates/base.html b/app/templates/base.html deleted file mode 100644 index c8c0cd1..0000000 --- a/app/templates/base.html +++ /dev/null @@ -1,32 +0,0 @@ -{% from 'common/macros.html' import infobox with context %} - - - - - {% if self.title() %} - {{config.SITE_NAME}} - {% block title %}{% endblock %} - {% else %} - {{config.SITE_NAME}} - {% endif %} - - - - {% if __feedlink %} - - {% endif %} - - - - {% include 'common/topnav.html' %} - {% with messages = get_flashed_messages(with_categories=true) %} - {% if messages %} - {% for category, message in messages %} - {{ infobox(message, category) }} - {% endfor %} - {% endif %} - {% endwith %} - {% block content %}{% endblock %} - {% include 'common/footer.html' %} - - - diff --git a/app/templates/common/404.html b/app/templates/common/404.html deleted file mode 100644 index 06df7ae..0000000 --- a/app/templates/common/404.html +++ /dev/null @@ -1,8 +0,0 @@ -{% extends 'base.html' %} -{% block title %}not found{% endblock %} -{% block content %} -
-

404 Not Found

-

The requested URL does not exist.

-
-{% endblock %} diff --git a/app/templates/common/413.html b/app/templates/common/413.html deleted file mode 100644 index 348c6a9..0000000 --- a/app/templates/common/413.html +++ /dev/null @@ -1,8 +0,0 @@ -{% extends 'base.html' %} -{% block title %}request entity too large{% endblock %} -{% block content %} -
-

413 Request Entity Too Large

-

The file(s) you tried to upload are too large.

-
-{% endblock %} diff --git a/app/templates/common/footer.html b/app/templates/common/footer.html deleted file mode 100644 index be09725..0000000 --- a/app/templates/common/footer.html +++ /dev/null @@ -1,7 +0,0 @@ - diff --git a/app/templates/common/icons.html b/app/templates/common/icons.html deleted file mode 100644 index 48fe083..0000000 --- a/app/templates/common/icons.html +++ /dev/null @@ -1,67 +0,0 @@ -{# https://www.figma.com/community/file/1136337054881623512/iconcino-v2-0-0-free-icons-cc0-1-0-license #} - -{% macro icn_bookmark(width=24) -%} - - - -{%- endmacro %} - -{% macro icn_error(width=60) -%} - - - -{%- endmacro %} - -{% macro icn_info(width=60) -%} - - - -{%- endmacro %} - -{% macro icn_lock(width=60) -%} - - - -{%- endmacro %} - -{% macro icn_warn(width=60) -%} - - - -{%- endmacro %} - -{% macro icn_image(width=24) -%} - - - -{%- endmacro %} - -{% macro icn_spoiler(width=24) -%} - - - -{%- endmacro %} - -{% macro icn_sticky(width=24) -%} - - - -{%- endmacro %} - -{% macro icn_megaphone(width=60) -%} - - - -{%- endmacro %} - -{% macro icn_rss(width=24) %} - - - -{% endmacro %} - -{% macro icn_drag(width=24) %} - - - -{% endmacro %} diff --git a/app/templates/common/macros.html b/app/templates/common/macros.html deleted file mode 100644 index 381dac8..0000000 --- a/app/templates/common/macros.html +++ /dev/null @@ -1,393 +0,0 @@ -{% from 'common/icons.html' import icn_image, icn_spoiler, icn_info, icn_lock, icn_warn, icn_error, icn_bookmark, icn_megaphone, icn_rss, icn_drag %} -{%- macro dict_to_attr(attrs) -%} - {%- for key, value in attrs.items() if value is not none -%}{{' '}}{{key}}="{{value}}"{%- endfor -%} -{%- endmacro -%} - -{% macro pager(current_page, page_count) %} -{% set left_start = [1, current_page - 5] | max %} -{% set right_end = [page_count, current_page + 5] | min %} -
- Page: - {% if current_page > 5 %} - 1 - {% if left_start > 2 %} - - {% endif %} - {% endif %} - {% for i in range(left_start, current_page) %} - {{i}} - {% endfor %} - {% if page_count > 0 %} - {{current_page}} - {% endif %} - {% for i in range(current_page + 1, right_end + 1) %} - {{i}} - {% endfor %} - {% if right_end < page_count %} - {% if right_end < page_count - 1 %} - - {% endif %} - {{page_count}} - {% endif %} -
-{% endmacro %} - -{% macro bookmark_button(type, id, message = "Bookmark…", require_reload=false) %} -{% set bid = type[0] + id | string %} -
- -
-
-{% endmacro %} - -{% macro infobox(message, kind=InfoboxKind.INFO) %} -
- -
- {%- if kind == InfoboxKind.INFO -%} - {{- icn_info() -}} - {%- elif kind == InfoboxKind.LOCK -%} - {{- icn_lock() -}} - {%- elif kind == InfoboxKind.WARN -%} - {{- icn_warn() -}} - {%- elif kind == InfoboxKind.ERROR -%} - {{- icn_error() -}} - {%- endif -%} -
- - {% set m = message.split(';', maxsplit=1) %} - {{ m[0] }} - {%- if m[1] %} - {{ m[1] -}} - {%- endif -%} - -
-
-{% endmacro %} - -{% macro motd(motd_obj) %} -
-
- {{ icn_megaphone(80) }} - MOTD -
-
-
{{ motd_obj.title }}
-
{{ motd_obj.body_rendered | safe}}
-
-
-{% endmacro %} - -{% macro timestamp(unix_ts) -%} -{{ unix_ts | ts_datetime('%Y-%m-%d %H:%M')}} ST -{%- endmacro %} - -{% macro babycode_editor_component(ta_name, ta_placeholder="Post body", optional=False, prefill="", banned_tags=[]) %} -
- -
- - -
-
- - - - - - - - - - - - - - babycode guide - {% if banned_tags %} -
Forbidden tags:
-
-
    - {% for tag in banned_tags | unique %} -
  • {{ tag }}
  • - {% endfor %} -
-
- {% endif %} -
-
-
Type something!
-
-
-
- -{% endmacro %} - -{% macro babycode_editor_form(ta_name, prefill = "", cancel_url="", endpoint="") %} -{% set save_button_text = "Post reply" if not cancel_url else "Save" %} -
- {{babycode_editor_component(ta_name, prefill = prefill)}} - {% if not cancel_url %} - - - - - {% endif %} - - - {% if cancel_url %} - Cancel - {% endif %} - -
-{% endmacro %} - -{% macro badge_button(badge) %} -{% set img_url = badge.file_path if badge.file_path else badge.get_image_url() %} -{% if badge.link %} - -{% endif %} -{{badge.label}} -{% if badge.link %} - -{% endif %} -{% endmacro %} - -{% macro full_post( - post, render_sig = True, is_latest = False, - editing = False, active_user = None, no_reply = false, - Reactions = none, show_thread_title = false, - show_bookmark = false, memo = None, bookmark_message = "Bookmark…", - reload_after_bookmark = false -) %} -{% set postclass = "post" %} -{% if editing %} - {% set postclass = postclass + " editing" %} -{% endif %} -{% set post_permalink = url_for("threads.thread", slug = post['thread_slug'], after = post['id'], _anchor = ("post-" + (post['id'] | string))) %} -
-
-
- - - - {{ post['display_name'] or post['username'] }} - @{{ post.username }} - {% if post['status'] %} - {{ post['status'] }} - {% endif %} -
- {% for badge_data in (post.badges_json | fromjson) %} - {{ badge_button(badge_data) }} - {% endfor %} -
-
-
- -
- -
- {% if not editing %} -
{{ post['content'] | safe }}
- {% if render_sig and post['signature_rendered'] %} -
- {{ post['signature_rendered'] | safe }} -
- {% endif %} - {% else %} - {{ babycode_editor_form(cancel_url = post_permalink, prefill = post['original_markup'], ta_name = "new_content") }} - {% endif %} -
- {% if Reactions -%} - {% set can_react = true -%} - - {% if not active_user -%} - {% set can_react = false -%} - {% elif post['thread_is_locked'] and not active_user.is_mod() -%} - {% set can_react = false -%} - {% elif active_user.is_guest() -%} - {% set can_react = false -%} - {% elif editing -%} - {% set can_react = false -%} - {% endif -%} - - {% set reactions = Reactions.for_post(post.id) -%} -
- {% for reaction in reactions %} - {% set reactors = Reactions.get_users(post.id, reaction.reaction_text) | map(attribute='username') | list %} - {% set reactors_trimmed = reactors[:10] %} - {% set reactors_str = reactors_trimmed | join (',\n') %} - {% if reactors | count > 10 %} - {% set reactors_str = reactors_str + '\n...and many others' %} - {% endif %} - {% set has_reacted = active_user is not none and active_user.username in reactors %} - - - {% endfor %} - {% if can_react %} - - {% endif %} -
- {% endif %} -
-
-{% endmacro %} - -{% macro accordion(hidden=false, disabled=false) %} -{% if disabled %} -{% set hidden = true %} -{% endif %} - -{% endmacro %} - -{% macro guide_sections() %} -
-
- {% set sections %}{{ caller() }}{% endset %} - {{ sections | safe }} -
-
-

Table of contents

- (top) - {% set toc = sections | extract_h2 %} - -
-
-{% endmacro %} - -{% macro badge_editor_single(options={}, selected=none, fp_hidden=true, badge=none) %} -{% set defaults = options | selectattr('user_id', 'none') | list | sort(attribute='file_path') %} -{% set uploads = options | selectattr('user_id') | list %} -{% if selected is not none %} - {% set selected_href = (options | selectattr('id', 'equalto', selected) | list)[0].file_path %} -{% else %} - {% set selected_href = defaults[0].file_path %} -{% endif %} -
  • {# breaking convention on purpose since this one is special #} -{{ icn_drag(24) }} - -
    -
    - - -
    -
    - - -
    - - - -
    -
    -
  • -{% endmacro %} - -{% macro rss_html_content(html) %} -{{ html }} -{% endmacro %} - -{% macro rss_button(feed) %} -{{ icn_rss(20) }} Subscribe via RSS -{% endmacro %} - -{% macro sortable_list(attr=none) %} -
      -{% if caller %} -{{ caller() }} -{% endif %} -
    -{% endmacro %} - -{% macro sortable_list_item(key, immovable=false, attr=none) %} -
  • - {{ icn_drag(24) }} -
    - {{ caller() }} -
    -
  • -{% endmacro %} diff --git a/app/templates/common/topnav.html b/app/templates/common/topnav.html deleted file mode 100644 index 80dbeec..0000000 --- a/app/templates/common/topnav.html +++ /dev/null @@ -1,31 +0,0 @@ - diff --git a/app/templates/components/badge_editor_badges.html b/app/templates/components/badge_editor_badges.html deleted file mode 100644 index af9c4bc..0000000 --- a/app/templates/components/badge_editor_badges.html +++ /dev/null @@ -1,4 +0,0 @@ -{% from 'common/macros.html' import badge_editor_single %} -{% for badge in badges %} - {{ badge_editor_single(options=uploads, selected=badge.upload, badge=badge) }} -{% endfor %} diff --git a/app/templates/components/badge_editor_template.html b/app/templates/components/badge_editor_template.html deleted file mode 100644 index 032f86e..0000000 --- a/app/templates/components/badge_editor_template.html +++ /dev/null @@ -1,2 +0,0 @@ -{% from 'common/macros.html' import badge_editor_single %} -{{ badge_editor_single(options=uploads) }} diff --git a/app/templates/components/bookmarks_dropdown.html b/app/templates/components/bookmarks_dropdown.html deleted file mode 100644 index ab67ca9..0000000 --- a/app/templates/components/bookmarks_dropdown.html +++ /dev/null @@ -1,28 +0,0 @@ -{% set bookmark_url = None %} -{% if type == 'post' %} - {% set bookmark_url = url_for('api.bookmark_post', post_id=id) %} -{% else %} - {% set bookmark_url = url_for('api.bookmark_thread', thread_id=id) %} -{% endif %} -
    -
    - Bookmark collections - {% if not require_reload %} - View bookmarks - {% endif %} -
    -
    - {%- for collection in collections -%} - {%- set pc = collection.get_posts_count() -%} - {%- set tc = collection.get_threads_count() -%} -
    - {{collection.name}} - {{ pc }}p, {{ tc }}t -
    - {%- endfor -%} -
    - - - - -
    diff --git a/app/templates/guides/_layout.html b/app/templates/guides/_layout.html deleted file mode 100644 index f55e35f..0000000 --- a/app/templates/guides/_layout.html +++ /dev/null @@ -1,21 +0,0 @@ -{% extends 'base.html' %} -{% from 'common/macros.html' import guide_sections with context %} -{% block title %}guide - {{ guide.title }}{% endblock %} -{% block content %} -
    -

    Guide: {{ guide.title }}

    - -
    -{% call() guide_sections() %} - {% block guide_content %} - {% endblock %} -{% endcall %} -{% endblock %} diff --git a/app/templates/guides/category_index.html b/app/templates/guides/category_index.html deleted file mode 100644 index f0e4886..0000000 --- a/app/templates/guides/category_index.html +++ /dev/null @@ -1,15 +0,0 @@ -{% extends 'base.html' %} -{% block title %}guides - {{ category | title }}{% endblock %} -{% block content %} -
    -

    All guides in category "{{ category | replace('-', ' ') | title }}"

    - - -
    -{% endblock %} diff --git a/app/templates/guides/contact.html b/app/templates/guides/contact.html deleted file mode 100644 index ad5b8a0..0000000 --- a/app/templates/guides/contact.html +++ /dev/null @@ -1,13 +0,0 @@ -{% extends 'base.html' %} -{% block title %}contact us{% endblock %} -{% block content %} -
    -

    Contact

    - {% if config.ADMIN_CONTACT_INFO %} -

    The administrators of {{ config.SITE_NAME }} provide the following contact information:

    -
    {{ config.ADMIN_CONTACT_INFO | babycode_strict | safe }}
    - {% else %} -

    The administrators of {{ config.SITE_NAME }} did not provide any contact information.

    - {% endif %} -
    -{% endblock %} diff --git a/app/templates/guides/guides_index.html b/app/templates/guides/guides_index.html deleted file mode 100644 index d4fbe95..0000000 --- a/app/templates/guides/guides_index.html +++ /dev/null @@ -1,19 +0,0 @@ -{% extends 'base.html' %} -{% block title %}guides{% endblock %} -{% block content %} -
    -

    Guides index

    - -
    -{% endblock %} diff --git a/app/templates/guides/user-guides/01-introduction.html b/app/templates/guides/user-guides/01-introduction.html deleted file mode 100644 index d11e001..0000000 --- a/app/templates/guides/user-guides/01-introduction.html +++ /dev/null @@ -1,75 +0,0 @@ -# Introduction -{% extends 'guides/_layout.html' %} -{% block guide_content %} -
    -

    What is {{config.SITE_NAME}}?

    - {% if config.GUIDE_DESCRIPTION %} -
    {{ config.GUIDE_DESCRIPTION | babycode_strict | safe }}
    - {% endif %} -

    {{ config.SITE_NAME }} is powered by Pyrom, a home-grown forum software for the indie web. This guide will help you get started, from creating an account to understanding how discussions are organized.

    -
    -
    -

    Signing up

    -

    Most interactive features on {{ config.SITE_NAME }} such as creating threads or posting replies require a user account. While browsing is open to all, you must be signed in to participate.

    - {% if config.DISABLE_SIGNUP %} -

    {{ config.SITE_NAME }} uses an invite-only sign-up system. You cannot sign up directly. Instead, {% if config.USERS_CAN_INVITE %}an existing user{% elif config.MODS_CAN_INVITE %}a moderator{% endif %} can generate an invite link containing an invite key. Using that link will take you to the sign up page.

    - {% else %} -

    You can create an account on the sign-up page. After you create your account, a moderator will need to manually approve your account before you can post. This may take some time.

    - {% endif %} -

    To create an account, you will need to provide:

    -
      -
    • A username: -
        -
      • Your username must be 3-20 characters long and only include lowercase letters (a-z), numbers (0-9), hyphens (-) and underscores (_).
      • -
      • If your username includes uppercase characters, the system will automatically convert them to lowercase. Your original capitalization will be preserved as part of your display name.
      • -
      -
    • -
    • A strong password: -
        -
      • Your password must be at least 10 characters long and include at least one uppercase letter, at least one lowercase letter, at least one number, at least one special character, and no spaces.
      • -
      -
    • -
    -

    Once your account is {% if not config.DISABLE_SIGNUP %}confirmed and{% endif %} active, you will have full access to create threads, post replies, and use other features.

    -
    -
    -

    Topics

    -

    The front page of {{ config.SITE_NAME }} is an overview of topics that you can create threads in. A topic is a broad category created by moderators to organize discussions.

    -

    Topics usually have a description that is shown under its name. Use it as guidance for where to post a thread. The order topics show up in is chosen by moderators.

    -

    A topic may be locked by a moderator. This will prevent threads from being created or moved into it by non-moderators. These topics are usually used for forum-wide information, but it is of course up to the moderators.

    -

    By default, threads in a topic are sorted by activity, but this can be changed in your user settings.

    -
    -
    -

    Threads

    -

    Threads are where discussion happens. A thread is started by a user with a name and an initial post, and other users may add their own posts to it (known as replying to the thread).

    -

    When drafting a thread, you have to choose which topic to post it under. Be sure to follow the posting rules. If you created a thread under the wrong topic, you may move it when viewing replies. Moderators have the option to move any thread.

    -

    A thread may be locked by the original poster (OP) or a moderator. When a thread is locked, nobody except moderators can reply to it.

    -

    A thread may also be stickied by a moderator. Stickied threads show above all other threads in the topic it's under. If a thread is stickied, it is likely important.

    -

    You can subscribe to any thread. When subscribed, you will receive an overview of posts you missed for that thread in your inbox.

    -
    -
    -

    Posts

    -

    Posts are the individual messages that make up a thread. The first post starts the thread, and every subsequent message is a post in reply.

    -

    A post is split up into five sections:

    -
      -
    1. Usercard -
      • The post author's information shows up to the left of the post. This includes their avatar, display name, mention, status, and badges.
      -
    2. -
    3. Post actions -
      • This shows the time and date when the post has been made (or edited), and buttons for actions you can perform on the post, such as quoting or editing.
      -
    4. -
    5. Post content -
      • The actual message of the post.
      -
    6. -
    7. Signature (sig) -
      • If the user has a signature set, it will show under each of their posts.
      -
    8. -
    9. Reactions -
      • This shows the emoji reactions users have added to the post, and you can add your own.
      -
    10. -
    -

    You may edit or delete your posts after creating them. Edited posts will show when they were edited instead of when they were posted.

    -

    You can quote another user's post by pressing the button on that post. This will copy the contents of it into the reply box and mention the user.

    -

    Posts are written in a markup language called Babycode. More information on it can be found in a separate guide.

    -
    -{% endblock %} diff --git a/app/templates/guides/user-guides/02-profiles.html b/app/templates/guides/user-guides/02-profiles.html deleted file mode 100644 index 68937e9..0000000 --- a/app/templates/guides/user-guides/02-profiles.html +++ /dev/null @@ -1,25 +0,0 @@ -# User profiles -{% extends 'guides/_layout.html' %} -{% block guide_content %} -
    -

    User profiles

    -

    Each user on {{ config.SITE_NAME }} has a profile.

    -

    A user's profile shows:

    -
      -
    • Their avatar;
    • -
    • Their username and display name;
    • -
    • Their status;
    • -
    • Their signature;
    • -
    • Their badges;
    • -
    • Their stats: -
        -
      • Their permission level (regular user, moderator, etc);
      • -
      • The number of posts they've created;
      • -
      • The number of threads they've started;
      • -
      • A link to their latest started thread;
      • -
      • A few of their latest posts.
      • -
      -
    • -
    -
    -{% endblock %} diff --git a/app/templates/guides/user-guides/03-settings.html b/app/templates/guides/user-guides/03-settings.html deleted file mode 100644 index 7e78d00..0000000 --- a/app/templates/guides/user-guides/03-settings.html +++ /dev/null @@ -1,92 +0,0 @@ -# User settings -{% extends 'guides/_layout.html' %} -{% block guide_content %} -
    -

    Settings

    -

    You can access your settings by following the "Settings" link in the top navigation bar or from the button in your profile.

    -

    The settings page lets you set your avatar, change your personalization options, and change your password.

    -
    -
    -

    Avatar

    -

    When you upload an avatar, keep in mind that it will be cropped to a square and resized to fit 256 by 256 pixels. It's best to upload an image that is already square. Avatars must be no more than 1 MB in size. You can also clear your avatar, resetting it to the default one.

    -

    To change your avatar, first press the button and select a file from your device, then press the button to upload it.

    -
    -
    -

    Personalization

    -

    The personalization section of the settings lets you change the following settings:

    -
      -
    • Theme -
        -
      • Set the appearance of the forum. This feature is still in beta and themes may change unexpectedly.
      • -
      -
    • -
    • Thread sorting -
        -
      • Set the sorting of threads when viewing a single topic. "Latest activity" will put threads which had a response more recently closer to the top. "Thread creation date" will put threads which were created more recently closer to the top.
      • -
      -
    • -
    • Display name -
        -
      • If set, your display name will show up instead of your username in most places. In a post's usercard, the display name will show up above your username/mention. In posts that have mentioned you, your display name will be shown instead of your @username.
      • -
      • Display names have fewer restrictions than usernames, and most characters are allowed.
      • -
      • If you do not wish to use a display name, you can leave the field blank.
      • -
      -
    • -
    • Status -
        -
      • If set, your status will show up below your @mention in a post's usercard. 100 characters limit, no Babycodes.
      • -
      -
    • -
    • Subscribe by default -
        -
      • If checked, you will automatically add the thread to your subscriptions when replying to it. You can override this setting by checking or unchecking "Subscribe to thread" before posting your reply in the reply box.
      • -
      -
    • -
    • Signature -
        -
      • If set, this signature will appear under all of your posts. Babycode is allowed (except @mentions).
      • -
      -
    • -
    -
    -
    -

    Changing your password

    -

    You can change your password by typing your desired new password in the "New password" field and again in the "Confirm new password" field, then pressing the button. The passwords in the two fields must match.

    -
    -
    -

    Badges

    -

    Badges, also known as buttons, are 88x31 images that you can use to add more flair to your profile or link to other websites.

    -

    Badges you set will be shown on the usercard in threads and on your profile page. You can have up to 10 badges.

    -

    To add a badge, press the "Add badge" button. A badge editor will be added. A badge consists of three parts:

    -
      -
    1. Image -
        -
      • {{ config.SITE_NAME }} provides a selection of default badges that you can use. You may select one by using the dropdown, under the "Default" category.
      • -
      • Alternatively, you may upload your own image. To do so, select the "Upload…" option in the dropdown, under the "Your uploads" category. A button will appear, letting you select a file. The image must be exactly 88x31 pixels and may not be over 500KB in size.
        - Custom badge images that you have uploaded before can be reused and will appear under "Your uploads". If a badge image you've uploaded before is not used by any of your badges, it will be deleted and you will have to upload it again if you wish to reuse it.
        - Other users can not use images you've uploaded as part of their badges unless they download it manually.
      • -
      -
    2. -
    3. Label -
        -
      • The label will be shown when the badge is hovered over. It will also be the badge image's alt text.
      • -
      -
    4. -
    5. Link -
        -
      • Optionally, you may turn the badge into a clickable button by providing a link. The link will open in a new tab when pressed, and will use rel="me" so you can use your profile as verification on platforms like Mastodon.
      • -
      -
    6. -
    -

    If a badge is not valid, its editor and any invalid fields will have a dashed border.

    -

    You can delete a badge by pressing the button. Your changes are not saved until you press the button.

    -
    -
    -

    Deleting your account

    -

    If you no longer wish to participate in {{ config.SITE_NAME }}, you may delete your account. To do so, press the button in your settings, which will take you to a confirmation page.

    -

    Deleting your account is an irreversible action. Once you delete your account, you will not be able to log back in to it.

    -

    Deleting your account does not delete your threads and posts. They will be kept intact to preserve history. They will be altered to show up as if a system user authored them.

    -

    If you want your posts and threads to be deleted as well, you may either delete them yourself or contact the administrators for help.

    -

    If you're sure you want to delete your account, you will need to type your password on the confirmation page before pressing the button.

    -
    -{% endblock %} diff --git a/app/templates/guides/user-guides/04-inbox.html b/app/templates/guides/user-guides/04-inbox.html deleted file mode 100644 index 220b975..0000000 --- a/app/templates/guides/user-guides/04-inbox.html +++ /dev/null @@ -1,29 +0,0 @@ -# Inbox/subscriptions -{% extends 'guides/_layout.html' %} -{% block guide_content %} -
    -

    Subscriptions

    -

    You can subscribe to any thread. When subscribed, you will receive an overview of posts you missed for that thread in your inbox.

    -

    Additionally, when browsing a topic, threads you've subscribed to will show the number of posts you haven't read in it next to the thread's name.

    -
    -
    -

    Inbox

    -

    You can access your Inbox by following the "Inbox" link in the top navigation bar.

    -

    The Inbox is split into two parts:

    -
      -
    1. Subscriptions -
        -
      • A table of all threads that you've subscribed to. You can unsubscribe from each thread by pressing the button for that thread's row.
      • -
      • This section is collapsible, like a Babycode spoiler - press the "-" button to collapse it.
      • -
      -
    2. -
    3. Unread posts -
        -
      • These are the posts you missed in each thread, if any. They are sorted in reverse chronological order and are grouped by thread. Each thread is collapsible.
      • -
      • You can mark an entire thread as read by pressing the button, or unsubscribe from it by pressing the button.
      • -
      -
    4. -
    -

    Your inbox is updated automatically when you browse a subscribed thread. Once you've seen the posts you missed, they will disappear from your Inbox.

    -
    -{% endblock %} diff --git a/app/templates/guides/user-guides/05-bookmarks.html b/app/templates/guides/user-guides/05-bookmarks.html deleted file mode 100644 index cdacee6..0000000 --- a/app/templates/guides/user-guides/05-bookmarks.html +++ /dev/null @@ -1,39 +0,0 @@ -# Bookmarks -{% from 'common/icons.html' import icn_bookmark %} -{% extends 'guides/_layout.html' %} -{% block guide_content %} -
    -

    Bookmarks

    -

    You can bookmark whole threads or individual posts to save them for later reading. Bookmarks are split into collections.

    -

    Each post or thread you bookmark (collectively bookmarks) can only belong to one collection.

    -

    Each bookmark can have a short memo that you can add to it, for example to help you remember why you saved it.

    -
    -
    -

    Bookmark collections

    -

    Bookmarks are organized into collections. There is always at least one collection you have access to, called "Bookmarks" by default.

    -

    You can add any number of collections by pressing the button on the your bookmarks page.

    -

    On the "Manage bookmark collections" page, you can add, delete, rename, and reorder your collections.

    -

    To add a new collection, press the button. A new item will be added.

    -

    You can name any collection by using the input box.

    -

    You can reorder collections by dragging and dropping it above or below others. The default collection is always at the top and can not be moved.

    -

    You can delete a collection by pressing the button on that collection. Deleting a collection will remove all bookmarks from it. If you delete a collection by accident, simply refresh the page. Your changes are not saved until you press the button.

    -
    -
    -

    Bookmarking posts and threads

    -
      -
    • To bookmark a thread, press the button at the top of the thread.
    • -
    • To bookmark a post, press the button on that post.
    • -
    -

    Both will bring up a popup with your bookmark collections. You can select the collection to save the bookmark into by pressing its name and add an optional memo. To save the bookmark, press the button. Each bookmark can only belong to one collection.

    -

    If the post or thread is already bookmarked, the name of the collection will be highlighed and the box to its name will be filled. If you wish to remove the bookmark, press the name of the collection it's in and press the button.

    -
    -
    -

    Browsing and managing bookmarks

    -

    You can access your bookmarks by following the "Bookmarks" link in the top navigation bar.

    -

    On the Bookmarks page, each collection will show up as a collapsible section. If a collection is empty, it will be collapsed.

    -

    If a collection has any bookmarks, it will have two collapsibe sections nested inside it: one for threads and one for posts.

    -

    Bookmarked threads are shown as a table with their title, the memo, and a button. Pressing this button will show the same popup, letting you move or remove the bookmark.

    -

    Bookmarked posts are shown in the same way they're shown in a thread. The memo will be shown before the post's time stamp. To the right of the post is the same button.

    -

    If you made changes to bookmarked threads or posts on this page, you will have to refresh to save those changes.

    -
    -{% endblock %} diff --git a/app/templates/guides/user-guides/99-babycode.html b/app/templates/guides/user-guides/99-babycode.html deleted file mode 100644 index ec538d7..0000000 --- a/app/templates/guides/user-guides/99-babycode.html +++ /dev/null @@ -1,193 +0,0 @@ -# Babycode -{% extends 'guides/_layout.html' %} -{% block guide_content %} -
    -

    What is babycode?

    -

    You may be familiar with BBCode, a loosely related family of markup languages popular on forums. Babycode is another, simplified, dialect of those languages. It is a way of formatting text by enclosing parts of it in special tags.

    -

    A tag is a short name enclosed in square brackets. Tags can be opening tags, like [b] or closing tags, like [/b]. Anything inserted between matching opening and closing tags is known as the tag's content.

    -

    Some tags can provide more specific instructions using an attribute. An attribute is added to the opening tag with an equals sign (=). This allows you to specify details like a particular color or a link's address.

    -

    Babycode is used in posts, user signatures, and MOTDs.

    -
    -
    -

    Text formatting tags

    -
      -
    • To make some text bold, enclose it in [b][/b]:
      - [b]Hello World[/b]
      - Will become
      - Hello World -
    • -
    -
      -
    • To italicize text, enclose it in [i][/i]:
      - [i]Hello World[/i]
      - Will become
      - Hello World -
    • -
    -
      -
    • To make some text strikethrough, enclose it in [s][/s]:
      - [s]Hello World[/s]
      - Will become
      - Hello World -
    • -
    -
      -
    • To underline some text, enclose it in [u][/u]:
      - [u]Hello World[/u]
      - Will become
      - Hello World -
    • -
    -
      -
    • To make some text {{ "[big]big[/big]" | babycode | safe }}, enclose it in [big][/big]:
      - [big]Hello World[/big]
      - Will become
      - {{ "[big]Hello World[/big]" | babycode | safe }} -
    • Similarly, you can make text {{ "[small]small[/small]" | babycode | safe }} with [small][/small]:
      - [small]Hello World[/small]
      - Will become
      - {{ "[small]Hello World[/small]" | babycode | safe }} -
    • -
    -
      -
    • You can change the text color by using [color][/color]:
      - [color=red]Red text[/color]
      - [color=white]White text[/color]
      - [color=#3b08f0]Blueish text[/color]
      - Will become
      - {{ "[color=red]Red text[/color]" | babycode | safe }}
      - {{ "[color=white]White text[/color]" | babycode | safe }}
      - {{ "[color=#3b08f0]Blueish text[/color]" | babycode | safe }}
      -
    • -
    -
      -
    • You can center text by enclosing it in [center][/center]:
      - [center]Hello World[/center]
      - Will become
      - {{ "[center]Hello World[/center]" | babycode | safe }} -
    • -
    • You can right-align text by enclosing it in [right][/right]:
      - [right]Hello World[/right]
      - Will become
      - {{ "[right]Hello World[/right]" | babycode | safe }} -
    • - Note: the center and right tags will break the paragraph. See Paragraph rules for more details. -
    -
    -
    -

    Emoji

    -

    There are a few emoji in the style of old forum emotes:

    - - - - - - {% for emoji in __emoji %} - - - - - {% endfor %} -
    Short codeEmoji result
    {{ ("[code]:%s:[/code]" % emoji) | babycode | safe }}{{ __emoji[emoji] | safe }}
    -

    Special thanks to the Forumoji project and its contributors for these graphics.

    -
    -
    -

    Paragraph rules

    -

    Line breaks in babycode work like Markdown: to start a new paragraph, use two line breaks:

    - {{ '[code]paragraph 1\n\nparagraph 2[/code]' | babycode | safe }} - Will produce: - {{ 'paragraph 1\n\nparagraph 2' | babycode(true) | safe }} -

    To break a line without starting a new paragraph, end a line with two spaces:

    - {{ '[code]paragraph 1 \nstill paragraph 1[/code]' | babycode | safe }} - That will produce:
    - {{ 'paragraph 1 \nstill paragraph 1' | babycode(true) | safe }} -

    Additionally, the following tags will break into a new paragraph:

    -
      -
    • [code] (code block, not inline);
    • -
    • [img];
    • -
    • [center];
    • -
    • [right];
    • -
    • [ul] and [ol];
    • -
    • [quote].
    • -
    -
    -
    - -

    Loose links (starting with http:// or https://) will automatically get converted to clickable links. To add a label to a link, use [url=https://example.com]Link label[/url]:
    - Link label

    -
    -
    -

    Attaching an image

    -

    To add an image to your post, use the [img] tag:
    - [img=https://forum.poto.cafe/avatars/default.webp]the Python logo with a cowboy hat[/img]

    - {{ '[img=/static/avatars/default.webp]the Python logo with a cowboy hat[/img]' | babycode | safe }} -

    The attribute is the image URL. The text inside the tag will become the image's alt text.

    -

    Images will always break up a paragraph and will get scaled down to a maximum of 400px. However, consecutive image tags will try to stay in one line, wrapping if necessary. Break the paragraph if you wish to keep images on their own paragraph.

    -

    Multiple images attached to a post can be clicked to open a dialog to view them.

    -
    -
    -

    Adding code blocūs

    - {% set code = 'func _ready() -> void:\n\tprint("hello world!")' %} -

    There are two kinds of code blocks recognized by babycode: inline and block. Inline code blocks do not break a paragraph. They can be added with [code]your code here[/code]. As long as there are no line breaks inside the code block, it is considered inline. If there are any, it will produce this:

    - {{ ('[code]%s[/code]' % code) | babycode | safe }} -

    Optionally, you can enable syntax highlighting by specifying the language in the attribute like this: [code=gdscript]

    - {{ ('[code=gdscript]%s[/code]' % code) | babycode | safe}} -

    A full list of languages that can be highlighted is available here (the short names column).

    -

    Inline code tags look like this: {{ '[code]Inline code[/code]' | babycode | safe }}

    -

    Babycodes are not parsed inside code blocks.

    -
    -
    -

    Quoting

    -

    Text enclosed within [quote][/quote] will look like a quote:

    -
    A man provided with paper, pencil, and rubber, and subject to strict discipline, is in effect a universal machine.
    -
    -
    -

    Lists

    - {% set list = '[ul]\nitem 1\n\nitem 2\n\nitem 3 \nstill item 3 (break line without inserting a new item by using two spaces at the end of a line)\n[/ul]' %} -

    There are two kinds of lists, ordered (1, 2, 3, ...) and unordered (bullet points). Ordered lists are made with [ol][/ol] tags, and unordered with [ul][/ul]. Every new paragraph according to the usual paragraph rules will create a new list item. For example:

    - {{ ('[code]%s[/code]' % list) | babycode | safe }} - Will produce the following list: - {{ list | babycode | safe }} -
    -
    -

    Spoilers

    - {% set spoiler = "[spoiler=Major Metal Gear Spoilers]Snake dies[/spoiler]" %} -

    You can make a section collapsible by using the [spoiler] tag:

    - {{ ("[code]\n%s[/code]" % spoiler) | babycode | safe }} - Will produce: - {{ spoiler | babycode | safe }} - All other tags are supported inside spoilers. -
    -
    -

    Mentioning users

    -

    You can mention users by their username (not their display name) by using @username. A user's username is always shown below their avatar and display name on their posts and their user page.

    -

    A mention will show up on your post as a clickable box with the user's display name if they have one set or their username with an @ symbol if they don't:

    - @user-without-display-name - User with display name - Your display name -

    Mentioning a user does not notify them. It is simply a way to link to their profile in your posts.

    -
    -
    - {% set hr_example = "some section\n---\nanother section" %} -

    Horizontal rules

    -

    The special --- markup inserts a horizontal separator, also known as a horizontal rule:

    - {{ ("[code]%s[/code]" % hr_example) | babycode | safe }} - Will become - {{ hr_example | babycode(true) | safe}} -

    Horizontal rules will always break the current paragraph.

    -
    -
    -

    Void tags

    -

    The special void tags [lb], [rb], [d] and [at] will appear as the literal characters [, ], -, and @ respectively. Unlike other tags, they are self-contained and have no closing equivalent.

    -
      - {% set lbrb = "[color=red]This text will be red[/color]\n\n[lb]color=red[rb]This text won't be red[lb]/color[rb]" %} -
    • [lb] and [rb] allow you to use square brackets without them being interpreted as Babycode: - {{ ("[code]" + lbrb + "[/code]") | babycode | safe }} - Will result in:
      - {{ lbrb | babycode | safe }} -
    • -
    • The [at] tag allows you to use the @ symbol without it being turned into a mention.
    • -
    • The [d] tag allows you to use the - (dash) symbol without it being turned into a rule.
    • -
    -
    -{% endblock %} diff --git a/app/templates/mod/motd.html b/app/templates/mod/motd.html deleted file mode 100644 index 7ec2978..0000000 --- a/app/templates/mod/motd.html +++ /dev/null @@ -1,17 +0,0 @@ -{% from 'common/macros.html' import babycode_editor_component %} -{% extends 'base.html' %} -{% block title %}editing MOTD{% endblock %} -{% block content %} -
    -

    Edit Message of the Day

    -

    The Message of the Day will show up on the main page and in every topic.

    -
    - -
    - - {{ babycode_editor_component('body', ta_placeholder='MOTD body (required)', banned_tags=MOTD_BANNED_TAGS, prefill=current.body_original_markup) }} - - -
    -
    -{% endblock %} diff --git a/app/templates/mod/panel.html b/app/templates/mod/panel.html deleted file mode 100644 index c6651ef..0000000 --- a/app/templates/mod/panel.html +++ /dev/null @@ -1,12 +0,0 @@ -{% extends "base.html" %} -{% block title %}moderation{% endblock %} -{% block content %} -
    -

    Moderation actions

    - -
    -{% endblock %} diff --git a/app/templates/mod/sort-topics.html b/app/templates/mod/sort-topics.html deleted file mode 100644 index babb91f..0000000 --- a/app/templates/mod/sort-topics.html +++ /dev/null @@ -1,20 +0,0 @@ -{% extends "base.html" %} -{% from 'common/macros.html' import sortable_list, sortable_list_item %} -{% block content %} -
    -

    Change topics order

    -

    Drag topic titles to reoder them. Press "Save order" when done. The topics will appear to users in the order set here.

    -
    - - {% call() sortable_list() %} - {% for topic in topics %} - {% call() sortable_list_item(key="topics") %} -
    {{ topic.name }}
    -
    {{ topic.description }}
    - - {% endcall %} - {% endfor %} - {% endcall %} -
    -
    -{% endblock %} diff --git a/app/templates/mod/user-list.html b/app/templates/mod/user-list.html deleted file mode 100644 index 7b17a75..0000000 --- a/app/templates/mod/user-list.html +++ /dev/null @@ -1,69 +0,0 @@ -{% from "common/macros.html" import timestamp, accordion %} -{% extends "base.html" %} -{% block content %} -
    - {% set guests = (users | selectattr('permission', 'eq', PermissionLevel.GUEST.value) | list) %} - {% set not_guests = (users | selectattr('permission', 'gt', PermissionLevel.GUEST.value) | list) %} - {% call(section) accordion(disabled=(guests | count==0)) %} - {% if section == "header" %} - Unconfirmed guests - {% elif section == "content" %} - - - - - - {% for user in guests %} - - - - - {% endfor %} -
    UsernameSigned up on
    - {{user['username']}} - - - {{ timestamp(user.created_at) }} -
    - {% endif %} - {% endcall %} - - {% call(section) accordion() %} - {% if section == "header" %} - Other users - {% elif section == "content" %} - - - - - - {% if active_user.is_admin() %} - - {% endif %} - - {% for user in not_guests %} - - - - - {% if active_user.is_admin() %} - - {% endif %} - - {% endfor %} -
    UsernamePermissionSigned up onCreate password reset link
    - {{user['username']}} - - - {{ user.permission | permission_string }} - - {{ timestamp(user.created_at) }} - -
    - -
    -
    - {% endif %} - {% endcall %} -
    -{% endblock %} diff --git a/app/templates/posts/edit.html b/app/templates/posts/edit.html deleted file mode 100644 index 2949fe0..0000000 --- a/app/templates/posts/edit.html +++ /dev/null @@ -1,18 +0,0 @@ -{% from 'common/macros.html' import full_post %} -{% extends 'base.html' %} -{% block title %}editing a post{% endblock %} -{% block content %} -{% for post in prev_context | reverse %} - {{ full_post(post=post, no_reply=true, active_user=active_user) }} -{% endfor %} - - ↑↑↑Context↑↑↑ - -{{ full_post(post=editing_post, editing=true, no_reply=true, active_user=active_user) }} - - ↓↓↓Context↓↓↓ - -{% for post in next_context %} - {{ full_post(post=post, no_reply=true, active_user=active_user) }} -{% endfor %} -{% endblock %} diff --git a/app/templates/threads/create.html b/app/templates/threads/create.html deleted file mode 100644 index 6213fe6..0000000 --- a/app/templates/threads/create.html +++ /dev/null @@ -1,22 +0,0 @@ -{% from "common/macros.html" import babycode_editor_component %} -{% extends "base.html" %} -{% block title %}drafting a thread{% endblock %} -{% block content %} -
    -

    New thread

    -
    - -
    - - -
    - {{ babycode_editor_component("initial_post") }} - -
    -
    -{% endblock %} diff --git a/app/templates/threads/thread.atom b/app/templates/threads/thread.atom deleted file mode 100644 index 607c5d4..0000000 --- a/app/templates/threads/thread.atom +++ /dev/null @@ -1,19 +0,0 @@ -{% extends 'base.atom' %} -{% from 'common/macros.html' import rss_html_content %} -{% block title %}replies to {{thread.title}}{% endblock %} -{% block canonical_link %}{{url_for('threads.thread', slug=thread.slug, _external=true)}}{% endblock %} -{% block content %} - {% for post in posts %} - {% set post_url = get_post_url(post.id, _anchor=true, external=true) %} - - Re: {{ thread.title }} - - {{ post_url }} - {{ post.edited_at | iso8601 }} - {{rss_html_content(post.content_rss)}} - - {{ post.display_name }} @{{ post.username }} - - - {% endfor %} -{% endblock %} diff --git a/app/templates/threads/thread.html b/app/templates/threads/thread.html deleted file mode 100644 index 641ae4e..0000000 --- a/app/templates/threads/thread.html +++ /dev/null @@ -1,95 +0,0 @@ -{% from 'common/macros.html' import pager, babycode_editor_form, full_post, bookmark_button, rss_button %} -{% from 'common/icons.html' import icn_bookmark %} -{% extends "base.html" %} -{% block title %}{{ thread.title }}{% endblock %} -{% block content %} -{% set can_post = false %} -{% set can_lock = false %} -{% set can_subscribe = false %} -{% set can_bookmark = false %} -{% if active_user %} - {% set can_subscribe = true %} - {% set can_bookmark = not active_user.is_guest() %} - {% set can_post = (not thread.is_locked and not active_user.is_guest()) or active_user.is_mod() %} - {% set can_lock = ((active_user.id | int) == (thread.user_id | int)) or active_user.is_mod() %} -{% endif %} -
    - - {% for post in posts %} - {{ full_post(post = post, active_user = active_user, is_latest = loop.index == (posts | length), Reactions = Reactions, show_bookmark = can_bookmark) }} - {% endfor %} -
    - - - -{% if can_post %} -

    Respond to "{{ thread.title }}"

    - {{ babycode_editor_form(ta_name = "post_content")}} -{% endif %} - -
    - Are you sure you want to delete the highlighted post? - - - -
    -
    -
    -
    - - - - -{% endblock %} diff --git a/app/templates/topics/create.html b/app/templates/topics/create.html deleted file mode 100644 index 2f466c9..0000000 --- a/app/templates/topics/create.html +++ /dev/null @@ -1,14 +0,0 @@ -{% extends "base.html" %} -{% block title %}creating a topic{% endblock %} -{% block content %} -
    -

    Create topic

    -
    - -
    - -
    - -
    -
    -{% endblock %} diff --git a/app/templates/topics/edit.html b/app/templates/topics/edit.html deleted file mode 100644 index a3498bb..0000000 --- a/app/templates/topics/edit.html +++ /dev/null @@ -1,16 +0,0 @@ -{% extends "base.html" %} -{% block title %}creating a topic{% endblock %} -{% block content %} -
    -

    Editing topic {{ topic['name'] }}

    -
    - -
    - -
    - - Cancel
    - Note: to preserve history, you cannot change the topic URL. -
    -
    -{% endblock %} diff --git a/app/templates/topics/topic.atom b/app/templates/topics/topic.atom deleted file mode 100644 index 53d4cbf..0000000 --- a/app/templates/topics/topic.atom +++ /dev/null @@ -1,20 +0,0 @@ -{% extends 'base.atom' %} -{% from 'common/macros.html' import rss_html_content %} -{% block title %}latest threads in {{target_topic.name}}{% endblock %} -{% block canonical_link %}{{url_for('topics.topic', slug=target_topic.slug, _external=true)}}{% endblock %} -{% block content %} -{{ target_topic.description }} - {% for thread in threads_list %} - - [new thread] {{ thread.title | escape }} - - - {{ url_for('threads.thread', slug=thread.slug, _external=true)}} - {{ thread.created_at | iso8601 }} - {{rss_html_content(thread.original_post_content)}} - - {{thread.started_by_display_name}} @{{ thread.started_by }} - - - {% endfor %} -{% endblock %} diff --git a/app/templates/topics/topic.html b/app/templates/topics/topic.html deleted file mode 100644 index b114e63..0000000 --- a/app/templates/topics/topic.html +++ /dev/null @@ -1,97 +0,0 @@ -{% from 'common/macros.html' import pager, timestamp, motd, rss_button %} -{% from 'common/icons.html' import icn_lock, icn_sticky %} -{% extends "base.html" %} -{% block title %}browsing topic {{ topic['name'] }}{% endblock %} -{% block content %} - - -{% if topic['is_locked'] %} - {{ infobox("This topic is locked.;Only moderators can create new threads.", InfoboxKind.INFO) }} -{% endif %} - -{%- with motds = get_motds() -%} - {%- if motds -%} - {%- for motd_obj in motds -%} - {{- motd(motd_obj) -}} - {%- endfor -%} - {%- endif -%} -{%- endwith -%} - -{% if threads_list | length == 0 %} -

    There are no threads in this topic.

    -{% else %} - {% for thread in threads_list %} -
    -
    - {% if thread['is_stickied'] %} - {{ icn_sticky(48) }} - Stickied - {% endif %} -
    -
    - - - {{thread['title']}} - {% if thread['id'] in subscriptions %} - ({{ subscriptions[thread['id']] }} unread) - {% endif %} - - • - - Started by {{ thread['started_by_display_name'] or thread['started_by'] }} on {{ timestamp(thread['created_at']) }} - - - - - Latest post by {{ thread['latest_post_display_name'] or thread['latest_post_username'] }} - on on {{ timestamp(thread['latest_post_created_at']) }}: - - - {{ thread['latest_post_content'] | safe }} - -
    -
    - {% if thread['is_locked'] %} - {{ icn_lock(48) }} - Locked - {% endif %} -
    -
    - {% endfor %} -{% endif %} - - - -
    - Are you sure you want to delete this topic? - - - -
    -
    -
    -
    - - -{% endblock %} diff --git a/app/templates/topics/topics.html b/app/templates/topics/topics.html deleted file mode 100644 index 7de5130..0000000 --- a/app/templates/topics/topics.html +++ /dev/null @@ -1,51 +0,0 @@ -{% from 'common/icons.html' import icn_lock %} -{% from 'common/macros.html' import timestamp, motd %} -{% extends "base.html" %} -{% block content %} - -{%- with motds = get_motds() -%} - {%- if motds -%} - {%- for motd_obj in motds -%} - {{- motd(motd_obj) -}} - {%- endfor -%} - {%- endif -%} -{%- endwith -%} -{% if topic_list | length == 0 %} -

    There are no topics.

    -{% else %} - {% for topic in topic_list %} -
    -
    - {{ topic['name'] }} - {{ topic['description'] }} - {% if topic['latest_thread_username'] %} - - Latest thread: {{topic['latest_thread_title']}} by {{topic['latest_thread_display_name'] or topic['latest_thread_username']}} on {{ timestamp(topic['latest_thread_created_at']) }} - - {% if topic['id'] in active_threads %} - {% with thread=active_threads[topic['id']] %} - - Latest post in: {{ thread['thread_title'] }} by {{ thread['display_name'] or thread['username'] }} at {{ timestamp(thread['post_created_at']) }} - - {% endwith %} - {% endif %} - {% else %} - No threads yet. - {% endif %} -
    -
    - {% if topic['is_locked'] %} - {{ icn_lock(48) }} - Locked - {% endif %} -
    -
    - {% endfor %} -{% endif %} -{% endblock %} diff --git a/app/templates/users/bookmark_collections.html b/app/templates/users/bookmark_collections.html deleted file mode 100644 index f5372f4..0000000 --- a/app/templates/users/bookmark_collections.html +++ /dev/null @@ -1,41 +0,0 @@ -{% extends "base.html" %} -{% from 'common/macros.html' import sortable_list, sortable_list_item %} -{% block title %}managing bookmark collections{% endblock %} -{% block content %} -
    -

    Manage bookmark collections

    -

    Drag collections to reoder them. You cannot move or remove the default collection, but you can rename it.

    - - - {% set sorted_collections = collections | sort(attribute='sort_order') %} - {% macro collection_inner(collection) %} - -
    {{ collection.get_threads_count() }} {{ "thread" | pluralize(num=collection.get_threads_count()) }}, {{ collection.get_posts_count() }} {{ "post" | pluralize(num=collection.get_posts_count()) }}
    - {% if collection.is_default %} - Default collection - {% else %} - - {% endif %} - {% endmacro %} - {% call() sortable_list(attr={'data-receive': 'addCollection' }) %} - {% call() sortable_list_item(key='collections', immovable=true, attr={'data-collection-id': sorted_collections[0].id, 'data-receive': 'deleteCollection getCollectionData testValidity'}) %} - {{ collection_inner(sorted_collections[0]) }} - {% endcall %} - {% for collection in sorted_collections[1:] %} - {% call() sortable_list_item(key='collections', attr={'data-collection-id': collection.id, 'data-receive': 'deleteCollection getCollectionData testValidity'}) %} - {{ collection_inner(collection) }} - {% endcall %} - {% endfor %} - {% endcall %} - -
    - - -{##} -{% endblock %} diff --git a/app/templates/users/bookmarks.html b/app/templates/users/bookmarks.html deleted file mode 100644 index 507b9ff..0000000 --- a/app/templates/users/bookmarks.html +++ /dev/null @@ -1,52 +0,0 @@ -{% from "common/macros.html" import accordion, full_post, bookmark_button %} -{% from "common/icons.html" import icn_bookmark %} -{% extends "base.html" %} -{% block title %}bookmarks{% endblock %} -{% block content %} -
    - Manage collections - {% for collection in collections | sort(attribute='sort_order') %} - {% call(section) accordion(disabled=collection.is_empty()) %} - {% if section == 'header' %} -

    {{ collection.name }}

    {{" (no bookmarks)" if collection.is_empty() else ""}} - {% else %} - {% call(inner_section) accordion(disabled=not collection.has_threads()) %} - {% if inner_section == 'header' %} - Threads{{" (no bookmarks)" if not collection.has_threads() else ""}} - {% else %} - - - - - - - {% for thread in collection.get_threads() %} - - - - - - {% endfor %} -
    TitleMemoManage
    - {{ thread.get_thread().title }} - - {{ thread.note }} - - {{ bookmark_button(type='thread', id=thread.thread_id, message='Manage…', require_reload=true) }} -
    - {% endif %} - {% endcall %} - {% call(inner_section) accordion(disabled=not collection.has_posts()) %} - {% if inner_section == 'header' %} - Posts{{" (no bookmarks)" if not collection.has_posts() else ""}} - {% else %} - {% for post in collection.get_posts() %} - {{ full_post(post.get_post().get_full_post_view(), no_reply=false, render_sig=false, show_thread_title=true, show_bookmark=true, memo=post.note, bookmark_message="Manage…", reload_after_bookmark=true) }} - {% endfor %} - {% endif %} - {% endcall %} - {% endif %} - {% endcall %} - {% endfor %} -
    -{% endblock %} diff --git a/app/templates/users/delete_page.html b/app/templates/users/delete_page.html deleted file mode 100644 index 0b1099c..0000000 --- a/app/templates/users/delete_page.html +++ /dev/null @@ -1,15 +0,0 @@ -{% extends 'base.html' %} -{% block title %}delete confirmation{% endblock %} -{% block content %} -
    -

    Confirm account deletion

    -

    Are you sure you want to delete your account on {{ config.SITE_NAME }}? This action is irreversible. Your posts and threads will remain accessible to preserve history but will be de-personalized, showing up as authored by a system user. Posts that @mention you will also mention the system user instead.

    -

    If you wish for any and all content relating to you to be removed, you will have to contact {{ config.SITE_NAME }}'s administrators separately.

    -

    If you are sure, please confirm your current password below.

    -
    - - - -
    -
    -{% endblock %} diff --git a/app/templates/users/inbox.html b/app/templates/users/inbox.html deleted file mode 100644 index 7900505..0000000 --- a/app/templates/users/inbox.html +++ /dev/null @@ -1,65 +0,0 @@ -{% from "common/macros.html" import timestamp, full_post, accordion %} -{% extends "base.html" %} -{% block title %}inbox{% endblock %} -{% block content %} -
    - {% set has_subscriptions = all_subscriptions is not none %} - {% call(section) accordion(disabled=not has_subscriptions) %} - {% if section == "header" %} - {% if not has_subscriptions %} - (You have no subscriptions) - {% else %} - Your subscriptions - {% endif %} - {% elif section == "content" and has_subscriptions %} - - - - - - {% for sub in all_subscriptions %} - - - - - {% endfor %} -
    ThreadUnsubscribe
    - {{ sub.thread_title }} - -
    - - -
    -
    - {% endif %} - {% endcall %} - {% if has_subscriptions %} - {% if not new_posts %} - You have no unread posts. - {% else %} - You have {{ total_unreads_count }} total unread {{("post" | pluralize(num=total_unreads_count))}}: - {% for thread in new_posts %} - {% call(section) accordion() %} - {% if section == "header" %} - {% set latest_post_id = thread.posts[-1].id %} - {% set unread_posts_text = " (" + (thread.unread_count | string) + (" unread post" | pluralize(num=thread.unread_count)) %} - {{thread.thread_title + unread_posts_text}}, latest at {{ timestamp(thread.newest_post_time) }}) -
    - - -
    -
    - - -
    - {% elif section == "content" %} - {% for post in thread.posts %} - {{ full_post(post, no_reply = true) }} - {% endfor %} - {% endif %} - {% endcall %} - {% endfor %} - {% endif %} - {% endif %} -
    -{% endblock %} diff --git a/app/templates/users/invite_links.html b/app/templates/users/invite_links.html deleted file mode 100644 index cff1638..0000000 --- a/app/templates/users/invite_links.html +++ /dev/null @@ -1,36 +0,0 @@ -{% from 'common/macros.html' import accordion %} -{% extends 'base.html' %} -{% block title %}invites{% endblock %} -{% block content %} -
    -

    To manage growth, {{ config.SITE_NAME }} disallows direct sign ups. Instead, users already with an account may invite people they know. You can create invite links here. Once an invite link is used to sign up, it can no longer be used.

    - {% call(section) accordion(disabled=invites | length == 0) %} - {% if section == 'header' %} - Your invites - {% else %} - {% if invites %} - - - - - - {% for invite in invites %} - - - - - {% endfor %} -
    LinkRevoke
    Link -
    - - -
    -
    - {% endif %} - {% endif %} - {% endcall %} -
    - -
    -
    -{% endblock %} diff --git a/app/templates/users/log_in.html b/app/templates/users/log_in.html deleted file mode 100644 index 18750c6..0000000 --- a/app/templates/users/log_in.html +++ /dev/null @@ -1,14 +0,0 @@ -{% extends 'base.html' %} -{% block title %}Log in{% endblock %} -{% block content %} -
    -

    Log in

    -
    -
    -
    -
    -
    - -
    -
    -{% endblock %} diff --git a/app/templates/users/reset_link_login.html b/app/templates/users/reset_link_login.html deleted file mode 100644 index 5e0ac5e..0000000 --- a/app/templates/users/reset_link_login.html +++ /dev/null @@ -1,15 +0,0 @@ -{% extends 'base.html' %} -{% block title %}Reset password{% endblock %} -{% block content %} -
    -

    Reset password for {{username}}

    -

    Send this link to {{username}} to allow them to reset their password.

    -
    -
    -
    -
    -
    - -
    -
    -{% endblock %} diff --git a/app/templates/users/settings.html b/app/templates/users/settings.html deleted file mode 100644 index 884d0f5..0000000 --- a/app/templates/users/settings.html +++ /dev/null @@ -1,79 +0,0 @@ -{% from 'common/macros.html' import babycode_editor_component, badge_editor_single, sortable_list %} -{% extends 'base.html' %} -{% block title %}settings{% endblock %} -{% block content %} -{% set disable_avatar = not is_logged_in() %} -
    -

    User settings

    -
    -
    - Set avatar -
    - - -
    - - -
    - 1MB maximum size. Avatar will be cropped to square. -
    -
    -
    - Change password -
    -
    -
    -
    -
    - -
    -
    -
    - Personalization -
    - - - - - - - - - -
    - - {{ babycode_editor_component(ta_name='signature', prefill=active_user.signature_original_markup, ta_placeholder='Will be shown under each of your posts', optional=true, banned_tags=SIG_BANNED_TAGS) }} - -
    -
    -
    - Badges - Badges help - -
    -
    Loading badges…
    -
    If badges fail to load, JS may be disabled.
    -
    -
    -
    -
    - -
    - - - - -{% endblock %} diff --git a/app/templates/users/sign_up.html b/app/templates/users/sign_up.html deleted file mode 100644 index 7002e81..0000000 --- a/app/templates/users/sign_up.html +++ /dev/null @@ -1,25 +0,0 @@ -{% extends 'base.html' %} -{% block title %}Sign up{% endblock %} -{% block content %} -
    -

    Sign up

    - {% if inviter %} -

    You have been invited by {{ inviter.get_readable_name() }} to join {{ config.SITE_NAME }}. Create an identity below.

    - {% endif %} -
    - {% if key %} - - {% endif %} -
    -
    - -
    - -
    - -
    - {% if not inviter %} - After you sign up, a moderator will need to confirm your account before you will be allowed to post. - {% endif %} -
    -{% endblock %} diff --git a/app/templates/users/user.html b/app/templates/users/user.html deleted file mode 100644 index 06032ea..0000000 --- a/app/templates/users/user.html +++ /dev/null @@ -1,101 +0,0 @@ -{% from 'common/macros.html' import timestamp, badge_button %} -{% extends 'base.html' %} -{% block title %}{{ target_user.get_readable_name() }}'s profile{% endblock %} -{% block content %} -
    -

    {{ target_user.get_readable_name() }}'s profile

    - {% if active_user.id == target_user.id %} - - {% if active_user.is_guest() %} -

    You are a guest. A Moderator needs to approve your account before you will be able to post.

    - {% endif %} - {% endif %} - {% if active_user and active_user.is_mod() and not target_user.is_system() %} -

    Moderation controls

    - {% if target_user.is_guest() %} -

    This user is a guest. They signed up on {{ timestamp(target_user['created_at']) }}

    -
    - -
    - {% else %} -

    This user signed up on {{ timestamp(target_user['created_at']) }} and was confirmed on {{ timestamp(target_user['confirmed_on']) }}

    - {% if (target_user.permission | int) < (active_user.permission | int) %} -
    - -
    - {% endif %} - {% if active_user.is_admin() and not target_user.is_mod() %} -
    - -
    - {% elif target_user.is_mod() and (target_user.permission | int) < (active_user.permission | int) %} -
    - -
    - {% endif %} - {% endif %} - {% endif %} -
    - -{% endblock %} diff --git a/build-themes.sh b/build-themes.sh deleted file mode 100755 index 3d36ed7..0000000 --- a/build-themes.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/bash -set -e - -sass_dir="sass" -css_dir="data/static/css" - -if [[ "$1" == "--watch" && -n "$2" ]]; then - file="$2" - [[ $(basename "$file") = _* ]] && exit 1 - sass --no-source-map --watch "$file" "$css_dir/theme-$(basename "$file" .scss).css" -else - set -u - rm -r "$css_dir/" - #build default first - sass --no-source-map "$sass_dir/_default.scss" "$css_dir/style.css" - for file in "$sass_dir"/*.scss; do - [[ $(basename "$file") = _* ]] && continue - sass --no-source-map "$file" "$css_dir/theme-$(basename "$file" .scss).css" - done -fi diff --git a/data/static/css/style.css b/data/static/css/style.css deleted file mode 100644 index b53c312..0000000 --- a/data/static/css/style.css +++ /dev/null @@ -1,1578 +0,0 @@ -@font-face { - font-family: "site-title"; - src: url("/static/fonts/ChicagoFLF.woff2"); -} -@font-face { - font-family: "Cadman"; - src: url("/static/fonts/Cadman_Roman.woff2"); - font-weight: normal; - font-style: normal; -} -@font-face { - font-family: "Cadman"; - src: url("/static/fonts/Cadman_Bold.woff2"); - font-weight: bold; - font-style: normal; -} -@font-face { - font-family: "Cadman"; - src: url("/static/fonts/Cadman_Italic.woff2"); - font-weight: normal; - font-style: italic; -} -@font-face { - font-family: "Cadman"; - src: url("/static/fonts/Cadman_BoldItalic.woff2"); - font-weight: bold; - font-style: italic; -} -@font-face { - font-family: "Atkinson Hyperlegible Mono"; - src: url("/static/fonts/AtkinsonHyperlegibleMono-VariableFont_wght.ttf"); - font-weight: 125 950; - font-style: normal; -} -@font-face { - font-family: "Atkinson Hyperlegible Mono"; - src: url("/static/fonts/AtkinsonHyperlegibleMono-Italic-VariableFont_wght.ttf"); - font-weight: 125 950; - font-style: italic; -} -*, ::before, ::after { - box-sizing: border-box; -} - -.reaction-button.active, .tab-button, .currentpage, .pagebutton, input[type=file]::file-selector-button, button.warn, input[type=submit].warn, .linkbutton.warn, button.critical, input[type=submit].critical, .linkbutton.critical, button, input[type=submit], .linkbutton { - cursor: default; - font-size: 1em; - font-family: "Cadman", sans-serif; - text-decoration: none; - border: 1px solid black; - border-radius: 4px; - padding: 5px 20px; - margin: 5px 0; -} - -body { - font-family: "Cadman", sans-serif; - margin: 20px 100px; - background-color: rgb(173.5214173228, 183.6737007874, 161.0262992126); - color: black; -} - -:where(a:link) { - color: #c11c1c; -} - -:where(a:visited) { - color: #730c0c; -} - -.big { - font-size: 1.8em; -} - -#topnav { - padding: 10px; - margin: 0; - display: flex; - justify-content: end; - background-color: #c1ceb1; - justify-content: space-between; - align-items: baseline; -} - -#bottomnav { - padding: 10px; - margin: 0; - display: flex; - justify-content: end; - background-color: rgb(143.7039271654, 144.3879625984, 142.8620374016); -} - -#footer { - padding: 10px; - margin: 0; - display: flex; - justify-content: end; - background-color: rgb(143.7039271654, 144.3879625984, 142.8620374016); - justify-content: space-between; - align-items: baseline; -} - -.darkbg { - padding-bottom: 10px; - padding-left: 10px; - padding-right: 10px; - background-color: rgb(143.7039271654, 144.3879625984, 142.8620374016); -} - -.user-actions { - display: flex; - column-gap: 15px; -} - -.site-title { - font-family: "site-title"; - font-size: 3em; - margin: 0 20px; - text-decoration: none; - color: black; -} - -.thread-title { - margin: 0; - font-size: 1.5em; - font-weight: bold; -} - -.thread-actions { - display: flex; - align-items: center; - gap: 0 5px; - flex-wrap: wrap; -} - -.post { - display: grid; - grid-template-columns: 230px 1fr; - grid-template-rows: 1fr; - gap: 0; - grid-auto-flow: row; - grid-template-areas: "usercard post-content-container"; - border: 2px outset rgb(135.1928346457, 145.0974015748, 123.0025984252); -} - -.usercard { - grid-area: usercard; - padding: 20px 10px; - border: 4px outset rgb(217.26, 220.38, 213.42); - background-color: rgb(143.7039271654, 144.3879625984, 142.8620374016); - border-right: solid 2px; -} - -.usercard-inner { - display: flex; - flex-direction: column; - align-items: center; - top: 10px; - position: sticky; -} - -.post-content-container { - display: grid; - grid-template-columns: 1fr; - grid-template-rows: min-content 1fr min-content; - gap: 0; - grid-auto-flow: row; - grid-template-areas: "post-info" "post-content" "post-reactions"; - grid-area: post-content-container; - min-height: 100%; -} - -.post-info { - grid-area: post-info; - display: flex; - min-height: 70px; - justify-content: space-between; - padding: 5px 20px; - align-items: center; - border-top: 1px solid black; - border-bottom: 1px solid black; - background-color: rgb(173.5214173228, 183.6737007874, 161.0262992126); -} - -.post-content { - grid-area: post-content; - padding: 20px; - display: flex; - flex-direction: column; - overflow: hidden; - background-color: #c1ceb1; -} - -.post-reactions { - grid-area: post-reactions; - min-height: 50px; - display: flex; - padding: 5px 20px; - align-items: center; - flex-wrap: wrap; - gap: 5px; - background-color: rgb(173.5214173228, 183.6737007874, 161.0262992126); - border-top: 2px dotted gray; -} - -.post-inner { - height: 100%; - padding-right: 25%; -} -.post-inner.wider { - padding-right: 12.5%; -} - -.signature-container { - border-top: 2px dotted gray; - padding: 10px 0; -} - -code { - font-family: "Atkinson Hyperlegible Mono", monospace; -} - -pre code { - display: block; - background-color: rgb(38.5714173228, 40.9237007874, 35.6762992126); - font-size: 1em; - color: white; - border-bottom-right-radius: 8px; - border-bottom-left-radius: 8px; - border-left: 10px solid rgb(229.84, 231.92, 227.28); - padding: 20px; - overflow: scroll; - tab-size: 4; -} -pre code .hll { - background-color: #6e7681; -} -pre code .c { - color: #8B949E; - font-style: italic; -} -pre code { /* Comment */ } -pre code .err { - color: #F85149; -} -pre code { /* Error */ } -pre code .esc { - color: #E6EDF3; -} -pre code { /* Escape */ } -pre code .g { - color: #E6EDF3; -} -pre code { /* Generic */ } -pre code .k { - color: #FF7B72; -} -pre code { /* Keyword */ } -pre code .l { - color: #A5D6FF; -} -pre code { /* Literal */ } -pre code .n { - color: #E6EDF3; -} -pre code { /* Name */ } -pre code .o { - color: #FF7B72; - font-weight: bold; -} -pre code { /* Operator */ } -pre code .x { - color: #E6EDF3; -} -pre code { /* Other */ } -pre code .p { - color: #E6EDF3; -} -pre code { /* Punctuation */ } -pre code .ch { - color: #8B949E; - font-style: italic; -} -pre code { /* Comment.Hashbang */ } -pre code .cm { - color: #8B949E; - font-style: italic; -} -pre code { /* Comment.Multiline */ } -pre code .cp { - color: #8B949E; - font-weight: bold; - font-style: italic; -} -pre code { /* Comment.Preproc */ } -pre code .cpf { - color: #8B949E; - font-style: italic; -} -pre code { /* Comment.PreprocFile */ } -pre code .c1 { - color: #8B949E; - font-style: italic; -} -pre code { /* Comment.Single */ } -pre code .cs { - color: #8B949E; - font-weight: bold; - font-style: italic; -} -pre code { /* Comment.Special */ } -pre code .gd { - color: #FFA198; - background-color: #490202; -} -pre code { /* Generic.Deleted */ } -pre code .ge { - color: #E6EDF3; - font-style: italic; -} -pre code { /* Generic.Emph */ } -pre code .ges { - color: #E6EDF3; - font-weight: bold; - font-style: italic; -} -pre code { /* Generic.EmphStrong */ } -pre code .gr { - color: #FFA198; -} -pre code { /* Generic.Error */ } -pre code .gh { - color: #79C0FF; - font-weight: bold; -} -pre code { /* Generic.Heading */ } -pre code .gi { - color: #56D364; - background-color: #0F5323; -} -pre code { /* Generic.Inserted */ } -pre code .go { - color: #8B949E; -} -pre code { /* Generic.Output */ } -pre code .gp { - color: #8B949E; -} -pre code { /* Generic.Prompt */ } -pre code .gs { - color: #E6EDF3; - font-weight: bold; -} -pre code { /* Generic.Strong */ } -pre code .gu { - color: #79C0FF; -} -pre code { /* Generic.Subheading */ } -pre code .gt { - color: #FF7B72; -} -pre code { /* Generic.Traceback */ } -pre code .g-Underline { - color: #E6EDF3; - text-decoration: underline; -} -pre code { /* Generic.Underline */ } -pre code .kc { - color: #79C0FF; -} -pre code { /* Keyword.Constant */ } -pre code .kd { - color: #FF7B72; -} -pre code { /* Keyword.Declaration */ } -pre code .kn { - color: #FF7B72; -} -pre code { /* Keyword.Namespace */ } -pre code .kp { - color: #79C0FF; -} -pre code { /* Keyword.Pseudo */ } -pre code .kr { - color: #FF7B72; -} -pre code { /* Keyword.Reserved */ } -pre code .kt { - color: #FF7B72; -} -pre code { /* Keyword.Type */ } -pre code .ld { - color: #79C0FF; -} -pre code { /* Literal.Date */ } -pre code .m { - color: #A5D6FF; -} -pre code { /* Literal.Number */ } -pre code .s { - color: #A5D6FF; -} -pre code { /* Literal.String */ } -pre code .na { - color: #E6EDF3; -} -pre code { /* Name.Attribute */ } -pre code .nb { - color: #E6EDF3; -} -pre code { /* Name.Builtin */ } -pre code .nc { - color: #F0883E; - font-weight: bold; -} -pre code { /* Name.Class */ } -pre code .no { - color: #79C0FF; - font-weight: bold; -} -pre code { /* Name.Constant */ } -pre code .nd { - color: #D2A8FF; - font-weight: bold; -} -pre code { /* Name.Decorator */ } -pre code .ni { - color: #FFA657; -} -pre code { /* Name.Entity */ } -pre code .ne { - color: #F0883E; - font-weight: bold; -} -pre code { /* Name.Exception */ } -pre code .nf { - color: #D2A8FF; - font-weight: bold; -} -pre code { /* Name.Function */ } -pre code .nl { - color: #79C0FF; - font-weight: bold; -} -pre code { /* Name.Label */ } -pre code .nn { - color: #FF7B72; -} -pre code { /* Name.Namespace */ } -pre code .nx { - color: #E6EDF3; -} -pre code { /* Name.Other */ } -pre code .py { - color: #79C0FF; -} -pre code { /* Name.Property */ } -pre code .nt { - color: #7EE787; -} -pre code { /* Name.Tag */ } -pre code .nv { - color: #79C0FF; -} -pre code { /* Name.Variable */ } -pre code .ow { - color: #FF7B72; - font-weight: bold; -} -pre code { /* Operator.Word */ } -pre code .pm { - color: #E6EDF3; -} -pre code { /* Punctuation.Marker */ } -pre code .w { - color: #6E7681; -} -pre code { /* Text.Whitespace */ } -pre code .mb { - color: #A5D6FF; -} -pre code { /* Literal.Number.Bin */ } -pre code .mf { - color: #A5D6FF; -} -pre code { /* Literal.Number.Float */ } -pre code .mh { - color: #A5D6FF; -} -pre code { /* Literal.Number.Hex */ } -pre code .mi { - color: #A5D6FF; -} -pre code { /* Literal.Number.Integer */ } -pre code .mo { - color: #A5D6FF; -} -pre code { /* Literal.Number.Oct */ } -pre code .sa { - color: #79C0FF; -} -pre code { /* Literal.String.Affix */ } -pre code .sb { - color: #A5D6FF; -} -pre code { /* Literal.String.Backtick */ } -pre code .sc { - color: #A5D6FF; -} -pre code { /* Literal.String.Char */ } -pre code .dl { - color: #79C0FF; -} -pre code { /* Literal.String.Delimiter */ } -pre code .sd { - color: #A5D6FF; -} -pre code { /* Literal.String.Doc */ } -pre code .s2 { - color: #A5D6FF; -} -pre code { /* Literal.String.Double */ } -pre code .se { - color: #79C0FF; -} -pre code { /* Literal.String.Escape */ } -pre code .sh { - color: #79C0FF; -} -pre code { /* Literal.String.Heredoc */ } -pre code .si { - color: #A5D6FF; -} -pre code { /* Literal.String.Interpol */ } -pre code .sx { - color: #A5D6FF; -} -pre code { /* Literal.String.Other */ } -pre code .sr { - color: #79C0FF; -} -pre code { /* Literal.String.Regex */ } -pre code .s1 { - color: #A5D6FF; -} -pre code { /* Literal.String.Single */ } -pre code .ss { - color: #A5D6FF; -} -pre code { /* Literal.String.Symbol */ } -pre code .bp { - color: #E6EDF3; -} -pre code { /* Name.Builtin.Pseudo */ } -pre code .fm { - color: #D2A8FF; - font-weight: bold; -} -pre code { /* Name.Function.Magic */ } -pre code .vc { - color: #79C0FF; -} -pre code { /* Name.Variable.Class */ } -pre code .vg { - color: #79C0FF; -} -pre code { /* Name.Variable.Global */ } -pre code .vi { - color: #79C0FF; -} -pre code { /* Name.Variable.Instance */ } -pre code .vm { - color: #79C0FF; -} -pre code { /* Name.Variable.Magic */ } -pre code .il { - color: #A5D6FF; -} -pre code { /* Literal.Number.Integer.Long */ } - -.copy-code-container { - display: flex; - justify-content: space-between; - align-items: baseline; - font-family: "Cadman", sans-serif; - border-top-right-radius: 8px; - border-top-left-radius: 8px; - background-color: #c1ceb1; - border-left: 2px solid black; - border-right: 2px solid black; - border-top: 2px solid black; -} - -.code-language-identifier { - font-style: italic; - margin-left: 10px; -} - -.copy-code { - margin-right: 10px; -} - -.inline-code { - background-color: rgb(38.5714173228, 40.9237007874, 35.6762992126); - color: white; - padding: 5px 10px; - display: inline-block; - margin: 4px; - border-radius: 4px; - font-size: 1em; - white-space: pre; -} - -#delete-dialog, .lightbox-dialog { - padding: 0; - border-radius: 4px; - border: 2px solid black; - box-shadow: 0 0 30px rgba(0, 0, 0, 0.25); -} - -.delete-dialog-inner { - display: flex; - flex-direction: column; - align-items: center; - padding: 20px; -} - -.lightbox-inner { - display: flex; - flex-direction: column; - padding: 20px; - min-width: 400px; - background-color: #c1ceb1; - color: black; - gap: 10px; -} - -.lightbox-image { - max-width: 70vw; - max-height: 70vh; - object-fit: scale-down; -} - -.lightbox-nav { - display: flex; - justify-content: space-between; - align-items: center; -} - -blockquote { - padding: 10px 20px; - margin: 10px; - border-radius: 4px; - border-left: 10px solid rgb(229.84, 231.92, 227.28); - background-color: rgba(0, 0, 0, 0.1490196078); -} - -.user-info { - display: grid; - grid-template-columns: 300px 1fr; - grid-template-rows: 1fr; - gap: 0; - grid-template-areas: "user-page-usercard user-page-stats"; -} - -.user-page-usercard { - grid-area: user-page-usercard; - padding: 20px 10px; - border: 4px outset rgb(217.26, 220.38, 213.42); - background-color: rgb(143.7039271654, 144.3879625984, 142.8620374016); - border-right: solid 2px; -} - -.user-page-stats { - grid-area: user-page-stats; - padding: 20px 30px; - border: 1px solid black; -} - -.user-stats-list { - list-style: none; - margin: 0 0 10px 0; -} - -.user-page-posts { - border-left: 1px solid black; - border-right: 1px solid black; - border-bottom: 1px solid black; - background-color: #c1ceb1; -} - -.user-page-post-preview { - max-height: 200px; - mask-image: linear-gradient(180deg, #000 60%, transparent); -} - -.avatar { - width: 90%; - height: 90%; - object-fit: contain; - margin-bottom: 10px; -} - -.username-link { - overflow-wrap: anywhere; -} - -.user-status { - text-align: center; -} - -button, input[type=submit], .linkbutton { - display: inline-block; - background-color: rgb(177, 206, 204.5); - color: black; -} -button:hover, input[type=submit]:hover, .linkbutton:hover { - background-color: rgb(192.6, 215.8, 214.6); -} -button:active, input[type=submit]:active, .linkbutton:active { - background-color: rgb(166.6881496063, 178.0118503937, 177.4261417323); -} -button:disabled, input[type=submit]:disabled, .linkbutton:disabled { - background-color: rgb(209.535, 211.565, 211.46); -} -button.reduced, input[type=submit].reduced, .linkbutton.reduced { - margin: 0; - padding: 5px; -} -button.icon, input[type=submit].icon, .linkbutton.icon { - padding-left: 16px; - flex-direction: row; -} -button.critical, input[type=submit].critical, .linkbutton.critical { - background-color: red; - color: white; -} -button.critical:hover, input[type=submit].critical:hover, .linkbutton.critical:hover { - background-color: #ff3333; -} -button.critical:active, input[type=submit].critical:active, .linkbutton.critical:active { - background-color: rgb(149.175, 80.325, 80.325); -} -button.critical:disabled, input[type=submit].critical:disabled, .linkbutton.critical:disabled { - background-color: rgb(174.675, 156.825, 156.825); -} -button.critical.reduced, input[type=submit].critical.reduced, .linkbutton.critical.reduced { - margin: 0; - padding: 5px; -} -button.critical.icon, input[type=submit].critical.icon, .linkbutton.critical.icon { - padding-left: 16px; - flex-direction: row; -} -button.warn, input[type=submit].warn, .linkbutton.warn { - background-color: #fbfb8d; - color: black; -} -button.warn:hover, input[type=submit].warn:hover, .linkbutton.warn:hover { - background-color: rgb(251.8, 251.8, 163.8); -} -button.warn:active, input[type=submit].warn:active, .linkbutton.warn:active { - background-color: rgb(198.3813559322, 198.3813559322, 154.4186440678); -} -button.warn:disabled, input[type=submit].warn:disabled, .linkbutton.warn:disabled { - background-color: rgb(217.55, 217.55, 209.85); -} -button.warn.reduced, input[type=submit].warn.reduced, .linkbutton.warn.reduced { - margin: 0; - padding: 5px; -} -button.warn.icon, input[type=submit].warn.icon, .linkbutton.warn.icon { - padding-left: 16px; - flex-direction: row; -} - -input[type=file]::file-selector-button { - background-color: rgb(177, 206, 204.5); - color: black; -} -input[type=file]::file-selector-button:hover { - background-color: rgb(192.6, 215.8, 214.6); -} -input[type=file]::file-selector-button:active { - background-color: rgb(166.6881496063, 178.0118503937, 177.4261417323); -} -input[type=file]::file-selector-button:disabled { - background-color: rgb(209.535, 211.565, 211.46); -} -input[type=file]::file-selector-button.reduced { - margin: 0; - padding: 5px; -} -input[type=file]::file-selector-button.icon { - padding-left: 16px; - flex-direction: row; -} -input[type=file]::file-selector-button { - margin: 10px; -} - -p { - margin: 10px 0; -} - -.pagebutton { - background-color: rgb(177, 206, 204.5); - color: black; -} -.pagebutton:hover { - background-color: rgb(192.6, 215.8, 214.6); -} -.pagebutton:active { - background-color: rgb(166.6881496063, 178.0118503937, 177.4261417323); -} -.pagebutton:disabled { - background-color: rgb(209.535, 211.565, 211.46); -} -.pagebutton.reduced { - margin: 0; - padding: 5px; -} -.pagebutton.icon { - padding-left: 16px; - flex-direction: row; -} -.pagebutton { - padding: 5px 5px; - margin: 0; - display: inline-block; - min-width: 20px; - text-align: center; -} - -.currentpage { - border: none; - padding: 5px 5px; - margin: 0; - display: inline-block; - min-width: 20px; - text-align: center; -} - -.modform { - display: inline; -} - -.avatar-form { - display: flex; - flex-direction: column; - align-items: center; - padding: 20px 0; -} - -input[type=text], input[type=password], textarea, select { - border: 1px solid black; - border-radius: 4px; - padding: 7px 10px; - width: 100%; - resize: vertical; - color: black; - background-color: rgb(217.8, 225.6, 208.2); - font-size: 1em; - font-family: inherit; -} -input[type=text]:focus, input[type=password]:focus, textarea:focus, select:focus { - background-color: rgb(230.2, 235.4, 223.8); -} - -input:not(form input):invalid { - border: 2px dashed red; -} - -textarea { - font-family: "Atkinson Hyperlegible Mono", monospace; -} - -.infobox { - border: 2px solid black; - background-color: #81a3e6; - padding: 20px 15px; - color: black; -} -.infobox.critical { - background-color: #ed8181; - color: black; -} -.infobox.warn { - background-color: #fbfb8d; - color: black; -} - -.infobox > span { - display: flex; - align-items: center; -} - -.infobox-icon-container { - min-width: 60px; - padding-right: 15px; -} - -.thread { - display: grid; - grid-template-columns: 96px 1.6fr 96px; - grid-template-rows: 1fr; - gap: 0; - grid-auto-flow: row; - min-height: 96px; - grid-template-areas: "thread-sticky-container thread-info-container thread-locked-container"; -} - -.thread-sticky-container { - grid-area: thread-sticky-container; - border: 2px outset rgb(217.26, 220.38, 213.42); - background-color: none; -} - -.thread-locked-container { - grid-area: thread-locked-container; - border: 2px outset rgb(217.26, 220.38, 213.42); - background-color: none; -} - -.contain-svg { - display: flex; - align-items: center; - justify-content: center; - flex-direction: column; -} -.contain-svg.inline { - display: inline-flex; -} - -.post-img-container { - display: flex; - flex-wrap: wrap; - gap: 5px; -} - -.post-image { - object-fit: contain; - max-width: 400px; - max-height: 400px; - min-width: 200px; - min-height: 200px; - flex: 1 1 0%; - width: auto; - height: auto; -} - -.thread-info-container { - grid-area: thread-info-container; - background-color: #c1ceb1; - padding: 5px 20px; - border-top: 1px solid black; - border-bottom: 1px solid black; - display: flex; - flex-direction: column; - overflow: hidden; - max-height: 110px; - mask-image: linear-gradient(180deg, #000 60%, transparent); -} - -.thread-info-header { - display: flex; - align-items: baseline; - justify-content: space-between; - gap: 5px; -} - -.thread-info-post-preview { - overflow: hidden; - text-overflow: ellipsis; - display: inline; - margin-right: 25%; -} - -.guide-section { - background-color: #c1ceb1; - padding: 5px 20px; - border: 1px solid black; - padding-right: 25%; -} - -.guide-container { - display: grid; - grid-template-columns: 1.5fr 300px; - grid-template-rows: 1fr; - gap: 0; - grid-auto-flow: row; - grid-template-areas: "guide-topics guide-toc"; -} - -.guide-topics { - grid-area: guide-topics; - overflow: hidden; -} - -.guide-toc { - grid-area: guide-toc; - position: sticky; - top: 100px; - align-self: start; - padding: 10px; - border-bottom-right-radius: 8px; - background-color: rgb(177, 206, 204.5); - border-right: 1px solid black; - border-top: 1px solid black; - border-bottom: 1px solid black; -} - -.emoji-table tr td { - text-align: center; -} - -.emoji-table tr th { - padding-left: 50px; - padding-right: 50px; -} - -.emoji-table { - margin: auto; -} - -.emoji-table, th, td { - border: 1px solid black; - border-collapse: collapse; -} - -.colorful-table { - border-collapse: collapse; - width: 100%; - margin: 10px 0; -} - -.colorful-table tr th { - background-color: #beb1ce; - padding: 5px 0; -} - -.colorful-table tr td { - background-color: rgb(177, 206, 204.5); - padding: 5px 0; - text-align: center; -} - -.colorful-table .small { - width: 250px; -} - -.topic { - display: grid; - grid-template-columns: 1.5fr 96px; - grid-template-rows: 1fr; - gap: 0; - grid-auto-flow: row; - grid-template-areas: "topic-info-container topic-locked-container"; -} - -.topic-info-container { - grid-area: topic-info-container; - background-color: #c1ceb1; - padding: 5px 20px; - border: 1px solid black; - display: flex; - flex-direction: column; -} - -.topic-locked-container { - grid-area: topic-locked-container; - border: 2px outset rgb(217.26, 220.38, 213.42); - background-color: none; -} - -.editing { - background-color: rgb(217.26, 220.38, 213.42); -} - -.context-explain { - margin: 20px 0; - display: flex; - justify-content: space-evenly; -} - -.post-edit-form { - display: flex; - flex-direction: column; - align-items: baseline; - height: 100%; -} - -.babycode-editor { - height: 150px; -} - -.babycode-editor-container { - width: 100%; -} - -.babycode-preview-errors-container { - font-size: 0.8em; -} - -.tab-button { - background-color: rgb(177, 206, 204.5); - color: black; -} -.tab-button:hover { - background-color: rgb(192.6, 215.8, 214.6); -} -.tab-button:active { - background-color: rgb(166.6881496063, 178.0118503937, 177.4261417323); -} -.tab-button:disabled { - background-color: rgb(209.535, 211.565, 211.46); -} -.tab-button.reduced { - margin: 0; - padding: 5px; -} -.tab-button.icon { - padding-left: 16px; - flex-direction: row; -} -.tab-button { - border-bottom: none; - border-bottom-left-radius: 0; - border-bottom-right-radius: 0; - margin-bottom: 0; -} -.tab-button.active { - background-color: #beb1ce; - padding-top: 8px; -} - -.tab-content { - display: none; -} -.tab-content.active { - min-height: 250px; - display: block; - background-color: rgb(191.3137931034, 189.7, 193.3); - border: 1px solid black; - padding: 10px; - border-top-right-radius: 4px; - border-bottom-right-radius: 4px; - border-bottom-left-radius: 4px; -} - -ul, ol { - margin: 10px 0 10px 30px; - padding: 0; -} - -ul.horizontal, ol.horizontal { - display: inline; - margin-left: 0; -} -ul.horizontal li, ol.horizontal li { - display: inline list-item; -} - -.new-concept-notification.hidden { - display: none; -} - -.new-concept-notification { - position: fixed; - bottom: 80px; - right: 80px; - border: 1px solid black; - background-color: #81a3e6; - padding: 20px 15px; - border-radius: 4px; - box-shadow: 0 0 30px rgba(0, 0, 0, 0.25); -} - -.emoji { - max-width: 15px; - max-height: 15px; -} - -.accordion { - border-top-right-radius: 4px; - border-top-left-radius: 4px; - border: 1px solid black; - margin: 10px 5px; - overflow: hidden; -} - -.accordion.hidden { - border-bottom: none; -} - -.accordion-header { - display: flex; - align-items: center; - background-color: rgb(159.0271653543, 162.0727712915, 172.9728346457); - padding: 0 10px; - gap: 10px; - border-bottom: 1px solid black; -} - -.accordion-toggle { - padding: 0; - width: 36px; - height: 36px; - min-width: 36px; - min-height: 36px; -} - -.accordion-title { - margin-right: auto; - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; -} - -.accordion-content { - padding: 0 15px; -} - -.accordion-content.hidden { - display: none; -} - -.post-accordion-content { - padding-top: 10px; - padding-bottom: 10px; - background-color: rgb(173.5214173228, 183.6737007874, 161.0262992126); -} - -.inbox-container { - padding: 10px; -} - -.babycode-button-container { - display: flex; - gap: 5px; - flex-wrap: wrap; -} - -.babycode-button { - padding: 5px 10px; - min-width: 36px; -} - -.quote-popover { - position: absolute; - transform: translateX(-50%); - margin: 0; - border: none; - border-radius: 4px; - background-color: rgba(0, 0, 0, 0.5019607843); - padding: 5px 10px; -} - -footer { - border-top: 1px solid black; -} - -.reaction-button.active { - background-color: #beb1ce; - color: black; -} -.reaction-button.active:hover { - background-color: rgb(203, 192.6, 215.8); -} -.reaction-button.active:active { - background-color: rgb(171.7642913386, 166.6881496063, 178.0118503937); -} -.reaction-button.active:disabled { - background-color: rgb(210.445, 209.535, 211.565); -} -.reaction-button.active.reduced { - margin: 0; - padding: 5px; -} -.reaction-button.active.icon { - padding-left: 16px; - flex-direction: row; -} - -.reaction-popover { - position: relative; - margin: 0; - border: none; - border-radius: 4px; - background-color: rgba(0, 0, 0, 0.5019607843); - padding: 5px 10px; - width: 250px; -} - -.reaction-popover-inner { - display: flex; - flex-wrap: wrap; - overflow: scroll; - margin: auto; - justify-content: center; -} - -.guide-list { - border-bottom: 1px dashed; -} - -.bookmark-dropdown-inner { - position: relative; -} - -.bookmarks-dropdown { - background-color: #c1ceb1; - border: 1px solid black; - border-radius: 4px; - box-shadow: 0 0 30px rgba(0, 0, 0, 0.25); - position: absolute; - margin: 0; - min-width: 400px; - max-width: 400px; - padding: 10px; - z-index: 100; - color: unset; -} - -.bookmark-dropdown-item { - display: flex; - justify-content: space-between; - padding: 10px 0; - margin: 10px 0; - cursor: pointer; - border: 1px solid black; - border-radius: 4px; - color: black; - background-color: rgb(177, 206, 204.5); -} -.bookmark-dropdown-item:hover { - background-color: rgb(192.6, 215.8, 214.6); -} -.bookmark-dropdown-item::before { - content: ""; - background-color: currentColor; - mask: url("data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Crect%20x%3D%221.5%22%20y%3D%221.5%22%20width%3D%2221%22%20height%3D%2221%22%20rx%3D%223%22%20stroke%3D%22currentColor%22%20stroke-width%3D%223%22%20fill%3D%22none%22%2F%3E%3C%2Fsvg%3E") center/contain no-repeat; - width: 24px; - height: 24px; - padding: 0 20px; - flex-shrink: 0; -} -.bookmark-dropdown-item.selected { - background-color: #beb1ce; -} -.bookmark-dropdown-item.selected:hover { - background-color: rgb(203, 192.6, 215.8); -} -.bookmark-dropdown-item.selected::before { - mask: url("data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Crect%20x%3D%221.5%22%20y%3D%221.5%22%20width%3D%2221%22%20height%3D%2221%22%20rx%3D%223%22%20stroke%3D%22currentColor%22%20stroke-width%3D%223%22%20fill%3D%22none%22%2F%3E%3Crect%20x%3D%225%22%20y%3D%225%22%20width%3D%2214%22%20height%3D%2214%22%20rx%3D%222%22%20stroke%3D%22none%22%20fill%3D%22currentColor%22%2F%3E%3C%2Fsvg%3E") center/contain no-repeat; -} - -.bookmarks-dropdown-header { - display: flex; - justify-content: space-between; -} - -.bookmark-dropdown-item-name { - overflow: hidden; - text-overflow: ellipsis; -} - -.bookmark-dropdown-item-stats { - padding: 0 10px; - flex-shrink: 0; - margin-left: auto; -} - -.bookmark-dropdown-items-container { - max-height: 300px; - overflow: scroll; -} - -.motd { - display: flex; - background-color: #c1ceb1; - border: 2px outset rgb(217.26, 220.38, 213.42); - padding: 10px 15px; - margin: 10px 0; -} - -.motd-icon-container { - display: flex; - min-width: 80px; - padding-right: 15px; -} - -.motd-content-container { - display: flex; - flex-direction: column; - align-self: center; - flex-grow: 1; - padding-right: 25%; -} - -.motd-title { - font-weight: bold; - font-size: larger; -} - -a.mention, a.mention:visited { - display: inline-block; - color: white; - background-color: rgb(135.1928346457, 145.0974015748, 123.0025984252); - padding: 5px; - border-radius: 4px; - text-decoration: none; -} -a.mention.display, a.mention:visited.display { - text-decoration: underline; - text-decoration-style: dashed; -} -a.mention.me, a.mention:visited.me { - background-color: rgb(123.0025984252, 145.0974015748, 143.9545669291); - border: 1px dashed; -} -a.mention:hover, a.mention:visited:hover { - background-color: rgb(229.84, 231.92, 227.28); - color: black; -} - -.settings-grid { - display: grid; - gap: 10px; - --grid-item-max-width: calc((100% - 10px) / 2); - grid-template-columns: repeat(auto-fill, minmax(max(600px, var(--grid-item-max-width)), 1fr)); -} -.settings-grid fieldset { - border: 1px solid white; - border-radius: 4px; - background-color: rgb(171.527945374, 172.0409719488, 170.8965280512); -} - -.hfc { - height: fit-content; -} - -h1 { - margin: 0; -} - -.settings-badge-container { - display: flex; - align-items: baseline; - gap: 5px; - border: 1px solid black; - border-radius: 4px; - padding: 5px 10px; - margin: 10px 0; -} -.settings-badge-container:has(input:invalid) { - border: 2px dashed red; -} -.settings-badge-container input:invalid { - border: 2px dashed red; -} - -.settings-badge-file-picker { - display: flex; - flex-direction: column; - align-items: center; -} -.settings-badge-file-picker input.hidden[type=file] { - width: 100%; -} -.settings-badge-file-picker input.hidden[type=file]::file-selector-button { - display: none; -} -.settings-badge-file-picker.hidden { - display: none; -} - -.settings-badge-select { - display: flex; - flex-direction: column; - gap: 5px; - align-items: center; - min-width: 200px; -} - -img.badge-button { - min-width: 88px; - min-height: 31px; - max-width: 88px; - max-height: 31px; -} - -.badges-container { - display: flex; - flex-wrap: wrap; - justify-content: center; - gap: 5px; -} - -.rss-button { - background-color: #fba668; - color: black; -} -.rss-button:hover { - background-color: rgb(251.8, 183.8, 134.2); - color: black; -} -.rss-button:active { - background-color: rgb(186.8501612903, 155.5098387097, 132.6498387097); - color: black; -} - -@media (orientation: portrait) { - body { - margin: 20px 0; - } - .guide-container { - grid-template-areas: "guide-toc" "guide-topics"; - grid-template-columns: unset; - } - .guide-toc { - position: unset; - } - .guide-section { - padding-right: 20px; - } -} -ol.sortable-list { - list-style: none; - flex-grow: 1; - margin: 0; -} -ol.sortable-list li { - display: flex; - gap: 10px; - background-color: #c1ceb1; - padding: 20px; - margin: 15px 0; - border-top: 5px outset rgb(217.26, 220.38, 213.42); - border-bottom: 5px outset rgb(135.1928346457, 145.0974015748, 123.0025984252); -} -ol.sortable-list li.dragged { - background-color: rgb(177, 206, 204.5); -} -ol.sortable-list li.immovable { - background-color: #beb1ce; -} -ol.sortable-list li.immovable .dragger { - cursor: not-allowed; -} - -.dragger { - display: flex; - align-items: center; - background-color: rgb(135.1928346457, 145.0974015748, 123.0025984252); - padding: 5px 10px; - cursor: move; -} - -.sortable-item-inner { - display: flex; - gap: 10px; - flex-grow: 1; - flex-direction: column; -} -.sortable-item-inner > * { - flex-grow: 1; -} -.sortable-item-inner.row { - flex-direction: row; -} -.sortable-item-inner:not(.row) > * { - margin-right: auto; -} - -.fg { - flex-grow: 1; -} diff --git a/data/static/css/theme-otomotone.css b/data/static/css/theme-otomotone.css deleted file mode 100644 index b142c37..0000000 --- a/data/static/css/theme-otomotone.css +++ /dev/null @@ -1,1606 +0,0 @@ -@font-face { - font-family: "site-title"; - src: url("/static/fonts/ChicagoFLF.woff2"); -} -@font-face { - font-family: "Cadman"; - src: url("/static/fonts/Cadman_Roman.woff2"); - font-weight: normal; - font-style: normal; -} -@font-face { - font-family: "Cadman"; - src: url("/static/fonts/Cadman_Bold.woff2"); - font-weight: bold; - font-style: normal; -} -@font-face { - font-family: "Cadman"; - src: url("/static/fonts/Cadman_Italic.woff2"); - font-weight: normal; - font-style: italic; -} -@font-face { - font-family: "Cadman"; - src: url("/static/fonts/Cadman_BoldItalic.woff2"); - font-weight: bold; - font-style: italic; -} -@font-face { - font-family: "Atkinson Hyperlegible Mono"; - src: url("/static/fonts/AtkinsonHyperlegibleMono-VariableFont_wght.ttf"); - font-weight: 125 950; - font-style: normal; -} -@font-face { - font-family: "Atkinson Hyperlegible Mono"; - src: url("/static/fonts/AtkinsonHyperlegibleMono-Italic-VariableFont_wght.ttf"); - font-weight: 125 950; - font-style: italic; -} -*, ::before, ::after { - box-sizing: border-box; -} - -.reaction-button.active, .tab-button, .currentpage, .pagebutton, input[type=file]::file-selector-button, button.warn, input[type=submit].warn, .linkbutton.warn, button.critical, input[type=submit].critical, .linkbutton.critical, button, input[type=submit], .linkbutton { - cursor: default; - font-size: 1em; - font-family: "Cadman", sans-serif; - text-decoration: none; - border: 1px solid black; - border-radius: 8px; - padding: 5px 20px; - margin: 5px 0; -} - -body { - font-family: "Cadman", sans-serif; - margin: 20px 100px; - background-color: #220d16; - color: #e6e6e6; -} - -:where(a:link) { - color: #e87fe1; -} - -:where(a:visited) { - color: #ed4fb1; -} - -.big { - font-size: 1.8em; -} - -#topnav { - padding: 10px; - margin: 0; - display: flex; - justify-content: end; - background-color: #303030; - justify-content: space-between; - align-items: baseline; -} - -#bottomnav { - padding: 10px; - margin: 0; - display: flex; - justify-content: end; - background-color: #231c23; -} - -#footer { - padding: 10px; - margin: 0; - display: flex; - justify-content: end; - background-color: #231c23; - justify-content: space-between; - align-items: baseline; -} - -.darkbg { - padding-bottom: 10px; - padding-left: 10px; - padding-right: 10px; - background-color: #502d50; -} - -.user-actions { - display: flex; - column-gap: 15px; -} - -.site-title { - font-family: "site-title"; - font-size: 3em; - margin: 0 20px; - text-decoration: none; - color: white; -} - -.thread-title { - margin: 0; - font-size: 1.5em; - font-weight: bold; -} - -.thread-actions { - display: flex; - align-items: center; - gap: 0 5px; - flex-wrap: wrap; -} - -.post { - display: grid; - grid-template-columns: 230px 1fr; - grid-template-rows: 1fr; - gap: 0; - grid-auto-flow: row; - grid-template-areas: "usercard post-content-container"; - border: 2px outset rgb(96.95, 81.55, 96.95); -} - -.usercard { - grid-area: usercard; - padding: 20px 10px; - border: 4px outset #503250; - background-color: #502d50; - border-right: solid 2px; -} - -.usercard-inner { - display: flex; - flex-direction: column; - align-items: center; - top: 10px; - position: sticky; -} - -.post-content-container { - display: grid; - grid-template-columns: 1fr; - grid-template-rows: min-content 1fr min-content; - gap: 0; - grid-auto-flow: row; - grid-template-areas: "post-info" "post-content" "post-reactions"; - grid-area: post-content-container; - min-height: 100%; -} - -.post-info { - grid-area: post-info; - display: flex; - min-height: 70px; - justify-content: space-between; - padding: 5px 20px; - align-items: center; - border-top: 1px solid black; - border-bottom: 1px solid black; - background-color: #412841; -} - -.post-content { - grid-area: post-content; - padding: 20px; - display: flex; - flex-direction: column; - overflow: hidden; - background-color: #231c23; -} - -.post-reactions { - grid-area: post-reactions; - min-height: 50px; - display: flex; - padding: 5px 20px; - align-items: center; - flex-wrap: wrap; - gap: 5px; - background-color: #503250; - border-top: 2px dotted gray; -} - -.post-inner { - height: 100%; - padding-right: 25%; -} -.post-inner.wider { - padding-right: 12.5%; -} - -.signature-container { - border-top: 2px dotted gray; - padding: 10px 0; -} - -code { - font-family: "Atkinson Hyperlegible Mono", monospace; -} - -pre code { - display: block; - background-color: #302731; - font-size: 1em; - color: white; - border-bottom-right-radius: 8px; - border-bottom-left-radius: 8px; - border-left: 10px solid #ae6bae; - padding: 20px; - overflow: scroll; - tab-size: 4; -} -pre code .hll { - background-color: #6e7681; -} -pre code .c { - color: #8B949E; - font-style: italic; -} -pre code { /* Comment */ } -pre code .err { - color: #F85149; -} -pre code { /* Error */ } -pre code .esc { - color: #E6EDF3; -} -pre code { /* Escape */ } -pre code .g { - color: #E6EDF3; -} -pre code { /* Generic */ } -pre code .k { - color: #FF7B72; -} -pre code { /* Keyword */ } -pre code .l { - color: #A5D6FF; -} -pre code { /* Literal */ } -pre code .n { - color: #E6EDF3; -} -pre code { /* Name */ } -pre code .o { - color: #FF7B72; - font-weight: bold; -} -pre code { /* Operator */ } -pre code .x { - color: #E6EDF3; -} -pre code { /* Other */ } -pre code .p { - color: #E6EDF3; -} -pre code { /* Punctuation */ } -pre code .ch { - color: #8B949E; - font-style: italic; -} -pre code { /* Comment.Hashbang */ } -pre code .cm { - color: #8B949E; - font-style: italic; -} -pre code { /* Comment.Multiline */ } -pre code .cp { - color: #8B949E; - font-weight: bold; - font-style: italic; -} -pre code { /* Comment.Preproc */ } -pre code .cpf { - color: #8B949E; - font-style: italic; -} -pre code { /* Comment.PreprocFile */ } -pre code .c1 { - color: #8B949E; - font-style: italic; -} -pre code { /* Comment.Single */ } -pre code .cs { - color: #8B949E; - font-weight: bold; - font-style: italic; -} -pre code { /* Comment.Special */ } -pre code .gd { - color: #FFA198; - background-color: #490202; -} -pre code { /* Generic.Deleted */ } -pre code .ge { - color: #E6EDF3; - font-style: italic; -} -pre code { /* Generic.Emph */ } -pre code .ges { - color: #E6EDF3; - font-weight: bold; - font-style: italic; -} -pre code { /* Generic.EmphStrong */ } -pre code .gr { - color: #FFA198; -} -pre code { /* Generic.Error */ } -pre code .gh { - color: #79C0FF; - font-weight: bold; -} -pre code { /* Generic.Heading */ } -pre code .gi { - color: #56D364; - background-color: #0F5323; -} -pre code { /* Generic.Inserted */ } -pre code .go { - color: #8B949E; -} -pre code { /* Generic.Output */ } -pre code .gp { - color: #8B949E; -} -pre code { /* Generic.Prompt */ } -pre code .gs { - color: #E6EDF3; - font-weight: bold; -} -pre code { /* Generic.Strong */ } -pre code .gu { - color: #79C0FF; -} -pre code { /* Generic.Subheading */ } -pre code .gt { - color: #FF7B72; -} -pre code { /* Generic.Traceback */ } -pre code .g-Underline { - color: #E6EDF3; - text-decoration: underline; -} -pre code { /* Generic.Underline */ } -pre code .kc { - color: #79C0FF; -} -pre code { /* Keyword.Constant */ } -pre code .kd { - color: #FF7B72; -} -pre code { /* Keyword.Declaration */ } -pre code .kn { - color: #FF7B72; -} -pre code { /* Keyword.Namespace */ } -pre code .kp { - color: #79C0FF; -} -pre code { /* Keyword.Pseudo */ } -pre code .kr { - color: #FF7B72; -} -pre code { /* Keyword.Reserved */ } -pre code .kt { - color: #FF7B72; -} -pre code { /* Keyword.Type */ } -pre code .ld { - color: #79C0FF; -} -pre code { /* Literal.Date */ } -pre code .m { - color: #A5D6FF; -} -pre code { /* Literal.Number */ } -pre code .s { - color: #A5D6FF; -} -pre code { /* Literal.String */ } -pre code .na { - color: #E6EDF3; -} -pre code { /* Name.Attribute */ } -pre code .nb { - color: #E6EDF3; -} -pre code { /* Name.Builtin */ } -pre code .nc { - color: #F0883E; - font-weight: bold; -} -pre code { /* Name.Class */ } -pre code .no { - color: #79C0FF; - font-weight: bold; -} -pre code { /* Name.Constant */ } -pre code .nd { - color: #D2A8FF; - font-weight: bold; -} -pre code { /* Name.Decorator */ } -pre code .ni { - color: #FFA657; -} -pre code { /* Name.Entity */ } -pre code .ne { - color: #F0883E; - font-weight: bold; -} -pre code { /* Name.Exception */ } -pre code .nf { - color: #D2A8FF; - font-weight: bold; -} -pre code { /* Name.Function */ } -pre code .nl { - color: #79C0FF; - font-weight: bold; -} -pre code { /* Name.Label */ } -pre code .nn { - color: #FF7B72; -} -pre code { /* Name.Namespace */ } -pre code .nx { - color: #E6EDF3; -} -pre code { /* Name.Other */ } -pre code .py { - color: #79C0FF; -} -pre code { /* Name.Property */ } -pre code .nt { - color: #7EE787; -} -pre code { /* Name.Tag */ } -pre code .nv { - color: #79C0FF; -} -pre code { /* Name.Variable */ } -pre code .ow { - color: #FF7B72; - font-weight: bold; -} -pre code { /* Operator.Word */ } -pre code .pm { - color: #E6EDF3; -} -pre code { /* Punctuation.Marker */ } -pre code .w { - color: #6E7681; -} -pre code { /* Text.Whitespace */ } -pre code .mb { - color: #A5D6FF; -} -pre code { /* Literal.Number.Bin */ } -pre code .mf { - color: #A5D6FF; -} -pre code { /* Literal.Number.Float */ } -pre code .mh { - color: #A5D6FF; -} -pre code { /* Literal.Number.Hex */ } -pre code .mi { - color: #A5D6FF; -} -pre code { /* Literal.Number.Integer */ } -pre code .mo { - color: #A5D6FF; -} -pre code { /* Literal.Number.Oct */ } -pre code .sa { - color: #79C0FF; -} -pre code { /* Literal.String.Affix */ } -pre code .sb { - color: #A5D6FF; -} -pre code { /* Literal.String.Backtick */ } -pre code .sc { - color: #A5D6FF; -} -pre code { /* Literal.String.Char */ } -pre code .dl { - color: #79C0FF; -} -pre code { /* Literal.String.Delimiter */ } -pre code .sd { - color: #A5D6FF; -} -pre code { /* Literal.String.Doc */ } -pre code .s2 { - color: #A5D6FF; -} -pre code { /* Literal.String.Double */ } -pre code .se { - color: #79C0FF; -} -pre code { /* Literal.String.Escape */ } -pre code .sh { - color: #79C0FF; -} -pre code { /* Literal.String.Heredoc */ } -pre code .si { - color: #A5D6FF; -} -pre code { /* Literal.String.Interpol */ } -pre code .sx { - color: #A5D6FF; -} -pre code { /* Literal.String.Other */ } -pre code .sr { - color: #79C0FF; -} -pre code { /* Literal.String.Regex */ } -pre code .s1 { - color: #A5D6FF; -} -pre code { /* Literal.String.Single */ } -pre code .ss { - color: #A5D6FF; -} -pre code { /* Literal.String.Symbol */ } -pre code .bp { - color: #E6EDF3; -} -pre code { /* Name.Builtin.Pseudo */ } -pre code .fm { - color: #D2A8FF; - font-weight: bold; -} -pre code { /* Name.Function.Magic */ } -pre code .vc { - color: #79C0FF; -} -pre code { /* Name.Variable.Class */ } -pre code .vg { - color: #79C0FF; -} -pre code { /* Name.Variable.Global */ } -pre code .vi { - color: #79C0FF; -} -pre code { /* Name.Variable.Instance */ } -pre code .vm { - color: #79C0FF; -} -pre code { /* Name.Variable.Magic */ } -pre code .il { - color: #A5D6FF; -} -pre code { /* Literal.Number.Integer.Long */ } - -.copy-code-container { - display: flex; - justify-content: space-between; - align-items: baseline; - font-family: "Cadman", sans-serif; - border-top-right-radius: 8px; - border-top-left-radius: 8px; - background-color: #9b649b; - border-left: 2px solid black; - border-right: 2px solid black; - border-top: 2px solid black; -} - -.code-language-identifier { - font-style: italic; - margin-left: 10px; -} - -.copy-code { - margin-right: 10px; -} - -.inline-code { - background-color: #302731; - color: white; - padding: 5px 10px; - display: inline-block; - margin: 4px; - border-radius: 8px; - font-size: 1em; - white-space: pre; -} - -#delete-dialog, .lightbox-dialog { - padding: 0; - border-radius: 8px; - border: 2px solid black; - box-shadow: 0 0 30px rgba(0, 0, 0, 0.25); -} - -.delete-dialog-inner { - display: flex; - flex-direction: column; - align-items: center; - padding: 20px; -} - -.lightbox-inner { - display: flex; - flex-direction: column; - padding: 20px; - min-width: 400px; - background-color: #503250; - color: #e6e6e6; - gap: 10px; -} - -.lightbox-image { - max-width: 70vw; - max-height: 70vh; - object-fit: scale-down; -} - -.lightbox-nav { - display: flex; - justify-content: space-between; - align-items: center; -} - -blockquote { - padding: 10px 20px; - margin: 10px; - border-radius: 8px; - border-left: 10px solid #ae6bae; - background-color: rgba(251, 175, 207, 0.0392156863); -} - -.user-info { - display: grid; - grid-template-columns: 300px 1fr; - grid-template-rows: 1fr; - gap: 0; - grid-template-areas: "user-page-usercard user-page-stats"; -} - -.user-page-usercard { - grid-area: user-page-usercard; - padding: 20px 10px; - border: 4px outset #503250; - background-color: #502d50; - border-right: solid 2px; -} - -.user-page-stats { - grid-area: user-page-stats; - padding: 20px 30px; - border: 1px solid black; -} - -.user-stats-list { - list-style: none; - margin: 0 0 10px 0; -} - -.user-page-posts { - border-left: 1px solid black; - border-right: 1px solid black; - border-bottom: 1px solid black; - background-color: #9b649b; -} - -.user-page-post-preview { - max-height: 200px; - mask-image: linear-gradient(180deg, #000 60%, transparent); -} - -.avatar { - width: 90%; - height: 90%; - object-fit: contain; - margin-bottom: 10px; -} - -.username-link { - overflow-wrap: anywhere; -} - -.user-status { - text-align: center; -} - -button, input[type=submit], .linkbutton { - display: inline-block; - background-color: #3c283c; - color: #e6e6e6; -} -button:hover, input[type=submit]:hover, .linkbutton:hover { - background-color: rgb(109.2, 72.8, 109.2); -} -button:active, input[type=submit]:active, .linkbutton:active { - background-color: rgb(47.7, 42.3, 47.7); -} -button:disabled, input[type=submit]:disabled, .linkbutton:disabled { - background-color: rgb(113.73, 109.27, 113.73); -} -button.reduced, input[type=submit].reduced, .linkbutton.reduced { - margin: 0; - padding: 5px; -} -button.icon, input[type=submit].icon, .linkbutton.icon { - padding-left: 16px; - flex-direction: row; -} -button.critical, input[type=submit].critical, .linkbutton.critical { - background-color: #d53232; - color: #e6e6e6; -} -button.critical:hover, input[type=submit].critical:hover, .linkbutton.critical:hover { - background-color: rgb(221.4, 91, 91); -} -button.critical:active, input[type=submit].critical:active, .linkbutton.critical:active { - background-color: rgb(141.7804251012, 94.9195748988, 94.9195748988); -} -button.critical:disabled, input[type=submit].critical:disabled, .linkbutton.critical:disabled { - background-color: rgb(174.255, 162.845, 162.845); -} -button.critical.reduced, input[type=submit].critical.reduced, .linkbutton.critical.reduced { - margin: 0; - padding: 5px; -} -button.critical.icon, input[type=submit].critical.icon, .linkbutton.critical.icon { - padding-left: 16px; - flex-direction: row; -} -button.warn, input[type=submit].warn, .linkbutton.warn { - background-color: #eaea6a; - color: black; -} -button.warn:hover, input[type=submit].warn:hover, .linkbutton.warn:hover { - background-color: rgb(238.2, 238.2, 135.8); -} -button.warn:active, input[type=submit].warn:active, .linkbutton.warn:active { - background-color: rgb(176.04, 176.04, 129.96); -} -button.warn:disabled, input[type=submit].warn:disabled, .linkbutton.warn:disabled { - background-color: rgb(199.98, 199.98, 191.02); -} -button.warn.reduced, input[type=submit].warn.reduced, .linkbutton.warn.reduced { - margin: 0; - padding: 5px; -} -button.warn.icon, input[type=submit].warn.icon, .linkbutton.warn.icon { - padding-left: 16px; - flex-direction: row; -} - -input[type=file]::file-selector-button { - background-color: #3c283c; - color: #e6e6e6; -} -input[type=file]::file-selector-button:hover { - background-color: rgb(109.2, 72.8, 109.2); -} -input[type=file]::file-selector-button:active { - background-color: rgb(47.7, 42.3, 47.7); -} -input[type=file]::file-selector-button:disabled { - background-color: rgb(113.73, 109.27, 113.73); -} -input[type=file]::file-selector-button.reduced { - margin: 0; - padding: 5px; -} -input[type=file]::file-selector-button.icon { - padding-left: 16px; - flex-direction: row; -} -input[type=file]::file-selector-button { - margin: 10px; -} - -p { - margin: 10px 0; -} - -.pagebutton { - background-color: #3c283c; - color: #e6e6e6; -} -.pagebutton:hover { - background-color: rgb(109.2, 72.8, 109.2); -} -.pagebutton:active { - background-color: rgb(47.7, 42.3, 47.7); -} -.pagebutton:disabled { - background-color: rgb(113.73, 109.27, 113.73); -} -.pagebutton.reduced { - margin: 0; - padding: 5px; -} -.pagebutton.icon { - padding-left: 16px; - flex-direction: row; -} -.pagebutton { - padding: 5px 5px; - margin: 0; - display: inline-block; - min-width: 20px; - text-align: center; -} - -.currentpage { - border: none; - padding: 5px 5px; - margin: 0; - display: inline-block; - min-width: 20px; - text-align: center; -} - -.modform { - display: inline; -} - -.avatar-form { - display: flex; - flex-direction: column; - align-items: center; - padding: 20px 0; -} - -input[type=text], input[type=password], textarea, select { - border: 1px solid black; - border-radius: 8px; - padding: 7px 10px; - width: 100%; - resize: vertical; - color: #e6e6e6; - background-color: #371e37; - font-size: 1em; - font-family: inherit; -} -input[type=text]:focus, input[type=password]:focus, textarea:focus, select:focus { - background-color: #514151; -} - -input:not(form input):invalid { - border: 2px dashed #d53232; -} - -textarea { - font-family: "Atkinson Hyperlegible Mono", monospace; -} - -.infobox { - border: 2px solid black; - background-color: #775891; - padding: 20px 15px; - color: #e6e6e6; -} -.infobox.critical { - background-color: #d53232; - color: #e6e6e6; -} -.infobox.warn { - background-color: #eaea6a; - color: black; -} - -.infobox > span { - display: flex; - align-items: center; -} - -.infobox-icon-container { - min-width: 60px; - padding-right: 15px; -} - -.thread { - display: grid; - grid-template-columns: 96px 1.6fr 96px; - grid-template-rows: 1fr; - gap: 0; - grid-auto-flow: row; - min-height: 96px; - grid-template-areas: "thread-sticky-container thread-info-container thread-locked-container"; -} - -.thread-sticky-container { - grid-area: thread-sticky-container; - border: 2px outset #231c23; - background-color: #503250; -} - -.thread-locked-container { - grid-area: thread-locked-container; - border: 2px outset #231c23; - background-color: #503250; -} - -.contain-svg { - display: flex; - align-items: center; - justify-content: center; - flex-direction: column; -} -.contain-svg.inline { - display: inline-flex; -} - -.post-img-container { - display: flex; - flex-wrap: wrap; - gap: 5px; -} - -.post-image { - object-fit: contain; - max-width: 400px; - max-height: 400px; - min-width: 200px; - min-height: 200px; - flex: 1 1 0%; - width: auto; - height: auto; -} - -.thread-info-container { - grid-area: thread-info-container; - background-color: #231c23; - padding: 5px 20px; - border-top: 1px solid black; - border-bottom: 1px solid black; - display: flex; - flex-direction: column; - overflow: hidden; - max-height: 110px; - mask-image: linear-gradient(180deg, #000 60%, transparent); -} - -.thread-info-header { - display: flex; - align-items: baseline; - justify-content: space-between; - gap: 5px; -} - -.thread-info-post-preview { - overflow: hidden; - text-overflow: ellipsis; - display: inline; - margin-right: 25%; -} - -.guide-section { - background-color: #231c23; - padding: 5px 20px; - border: 1px solid black; - padding-right: 25%; -} - -.guide-container { - display: grid; - grid-template-columns: 1.5fr 300px; - grid-template-rows: 1fr; - gap: 0; - grid-auto-flow: row; - grid-template-areas: "guide-topics guide-toc"; -} - -.guide-topics { - grid-area: guide-topics; - overflow: hidden; -} - -.guide-toc { - grid-area: guide-toc; - position: sticky; - top: 100px; - align-self: start; - padding: 10px; - border-bottom-right-radius: 8px; - background-color: #3c233c; - border-right: 1px solid black; - border-top: 1px solid black; - border-bottom: 1px solid black; -} - -.emoji-table tr td { - text-align: center; -} - -.emoji-table tr th { - padding-left: 50px; - padding-right: 50px; -} - -.emoji-table { - margin: auto; -} - -.emoji-table, th, td { - border: 1px solid black; - border-collapse: collapse; -} - -.colorful-table { - border-collapse: collapse; - width: 100%; - margin: 10px 0; -} - -.colorful-table tr th { - background-color: #503250; - padding: 5px 0; -} - -.colorful-table tr td { - background-color: #231c23; - padding: 5px 0; - text-align: center; -} - -.colorful-table .small { - width: 250px; -} - -.topic { - display: grid; - grid-template-columns: 1.5fr 96px; - grid-template-rows: 1fr; - gap: 0; - grid-auto-flow: row; - grid-template-areas: "topic-info-container topic-locked-container"; -} - -.topic-info-container { - grid-area: topic-info-container; - background-color: #231c23; - padding: 5px 20px; - border: 1px solid black; - display: flex; - flex-direction: column; -} - -.topic-locked-container { - grid-area: topic-locked-container; - border: 2px outset #231c23; - background-color: #503250; -} - -.editing { - background-color: #503250; -} - -.context-explain { - margin: 20px 0; - display: flex; - justify-content: space-evenly; -} - -.post-edit-form { - display: flex; - flex-direction: column; - align-items: baseline; - height: 100%; -} - -.babycode-editor { - height: 150px; -} - -.babycode-editor-container { - width: 100%; -} - -.babycode-preview-errors-container { - font-size: 0.8em; -} - -.tab-button { - background-color: #3c283c; - color: #e6e6e6; -} -.tab-button:hover { - background-color: rgb(109.2, 72.8, 109.2); -} -.tab-button:active { - background-color: rgb(47.7, 42.3, 47.7); -} -.tab-button:disabled { - background-color: rgb(113.73, 109.27, 113.73); -} -.tab-button.reduced { - margin: 0; - padding: 5px; -} -.tab-button.icon { - padding-left: 16px; - flex-direction: row; -} -.tab-button { - border-bottom: none; - border-bottom-left-radius: 0; - border-bottom-right-radius: 0; - margin-bottom: 0; -} -.tab-button.active { - background-color: #8a5584; - padding-top: 8px; -} - -.tab-content { - display: none; -} -.tab-content.active { - min-height: 250px; - display: block; - background-color: #503250; - border: 1px solid black; - padding: 10px; - border-top-right-radius: 8px; - border-bottom-right-radius: 8px; - border-bottom-left-radius: 8px; -} - -ul, ol { - margin: 10px 0 10px 30px; - padding: 0; -} - -ul.horizontal, ol.horizontal { - display: inline; - margin-left: 0; -} -ul.horizontal li, ol.horizontal li { - display: inline list-item; -} - -.new-concept-notification.hidden { - display: none; -} - -.new-concept-notification { - position: fixed; - bottom: 80px; - right: 80px; - border: 1px solid black; - background-color: #775891; - padding: 20px 15px; - border-radius: 8px; - box-shadow: 0 0 30px rgba(0, 0, 0, 0.25); -} - -.emoji { - max-width: 15px; - max-height: 15px; -} - -.accordion { - border-top-right-radius: 8px; - border-top-left-radius: 8px; - border: 1px solid black; - margin: 10px 5px; - overflow: hidden; -} - -.accordion.hidden { - border-bottom: none; -} - -.accordion-header { - display: flex; - align-items: center; - background-color: #7d467d; - padding: 0 10px; - gap: 10px; - border-bottom: 1px solid black; -} - -.accordion-toggle { - padding: 0; - width: 36px; - height: 36px; - min-width: 36px; - min-height: 36px; -} - -.accordion-title { - margin-right: auto; - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; -} - -.accordion-content { - padding: 0 15px; -} - -.accordion-content.hidden { - display: none; -} - -.post-accordion-content { - padding-top: 10px; - padding-bottom: 10px; - background-color: #2d212d; -} - -.inbox-container { - padding: 10px; -} - -.babycode-button-container { - display: flex; - gap: 5px; - flex-wrap: wrap; -} - -.babycode-button { - padding: 5px 10px; - min-width: 36px; -} - -.quote-popover { - position: absolute; - transform: translateX(-50%); - margin: 0; - border: none; - border-radius: 8px; - background-color: rgba(0, 0, 0, 0.5019607843); - padding: 5px 10px; -} - -footer { - border-top: 1px solid black; -} - -.reaction-button.active { - background-color: #8a5584; - color: #e6e6e6; -} -.reaction-button.active:hover { - background-color: rgb(167.4843049327, 112.9156950673, 161.3067264574); -} -.reaction-button.active:active { - background-color: rgb(107.505, 93.195, 105.885); -} -.reaction-button.active:disabled { - background-color: rgb(156.9373766816, 152.1626233184, 156.396838565); -} -.reaction-button.active.reduced { - margin: 0; - padding: 5px; -} -.reaction-button.active.icon { - padding-left: 16px; - flex-direction: row; -} - -.reaction-popover { - position: relative; - margin: 0; - border: none; - border-radius: 8px; - background-color: rgba(0, 0, 0, 0.5019607843); - padding: 5px 10px; - width: 250px; -} - -.reaction-popover-inner { - display: flex; - flex-wrap: wrap; - overflow: scroll; - margin: auto; - justify-content: center; -} - -.guide-list { - border-bottom: 1px dashed; -} - -.bookmark-dropdown-inner { - position: relative; -} - -.bookmarks-dropdown { - background-color: #503250; - border: 1px solid black; - border-radius: 8px; - box-shadow: 0 0 30px rgba(0, 0, 0, 0.25); - position: absolute; - margin: 0; - min-width: 400px; - max-width: 400px; - padding: 10px; - z-index: 100; - color: unset; -} - -.bookmark-dropdown-item { - display: flex; - justify-content: space-between; - padding: 10px 0; - margin: 10px 0; - cursor: pointer; - border: 1px solid black; - border-radius: 8px; - color: #e6e6e6; - background-color: #3c283c; -} -.bookmark-dropdown-item:hover { - background-color: rgb(109.2, 72.8, 109.2); -} -.bookmark-dropdown-item::before { - content: ""; - background-color: currentColor; - mask: url("data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Crect%20x%3D%221.5%22%20y%3D%221.5%22%20width%3D%2221%22%20height%3D%2221%22%20rx%3D%223%22%20stroke%3D%22currentColor%22%20stroke-width%3D%223%22%20fill%3D%22none%22%2F%3E%3C%2Fsvg%3E") center/contain no-repeat; - width: 24px; - height: 24px; - padding: 0 20px; - flex-shrink: 0; -} -.bookmark-dropdown-item.selected { - background-color: #8a5584; -} -.bookmark-dropdown-item.selected:hover { - background-color: rgb(167.4843049327, 112.9156950673, 161.3067264574); -} -.bookmark-dropdown-item.selected::before { - mask: url("data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Crect%20x%3D%221.5%22%20y%3D%221.5%22%20width%3D%2221%22%20height%3D%2221%22%20rx%3D%223%22%20stroke%3D%22currentColor%22%20stroke-width%3D%223%22%20fill%3D%22none%22%2F%3E%3Crect%20x%3D%225%22%20y%3D%225%22%20width%3D%2214%22%20height%3D%2214%22%20rx%3D%222%22%20stroke%3D%22none%22%20fill%3D%22currentColor%22%2F%3E%3C%2Fsvg%3E") center/contain no-repeat; -} - -.bookmarks-dropdown-header { - display: flex; - justify-content: space-between; -} - -.bookmark-dropdown-item-name { - overflow: hidden; - text-overflow: ellipsis; -} - -.bookmark-dropdown-item-stats { - padding: 0 10px; - flex-shrink: 0; - margin-left: auto; -} - -.bookmark-dropdown-items-container { - max-height: 300px; - overflow: scroll; -} - -.motd { - display: flex; - background-color: #503250; - border: 2px outset #503250; - padding: 10px 15px; - margin: 10px 0; -} - -.motd-icon-container { - display: flex; - min-width: 80px; - padding-right: 15px; -} - -.motd-content-container { - display: flex; - flex-direction: column; - align-self: center; - flex-grow: 1; - padding-right: 25%; -} - -.motd-title { - font-weight: bold; - font-size: larger; -} - -a.mention, a.mention:visited { - display: inline-block; - color: #e6e6e6; - background-color: rgb(96.95, 81.55, 96.95); - padding: 5px; - border-radius: 8px; - text-decoration: none; -} -a.mention.display, a.mention:visited.display { - text-decoration: underline; - text-decoration-style: dashed; -} -a.mention.me, a.mention:visited.me { - background-color: rgb(96.95, 89.25, 81.55); - border: 1px dashed; -} -a.mention:hover, a.mention:visited:hover { - background-color: #ae6bae; - color: #e6e6e6; -} - -.settings-grid { - display: grid; - gap: 10px; - --grid-item-max-width: calc((100% - 10px) / 2); - grid-template-columns: repeat(auto-fill, minmax(max(600px, var(--grid-item-max-width)), 1fr)); -} -.settings-grid fieldset { - border: 1px solid black; - border-radius: 8px; - background-color: #503250; -} - -.hfc { - height: fit-content; -} - -h1 { - margin: 0; -} - -.settings-badge-container { - display: flex; - align-items: baseline; - gap: 5px; - border: 1px solid black; - border-radius: 8px; - padding: 5px 10px; - margin: 10px 0; -} -.settings-badge-container:has(input:invalid) { - border: 2px dashed #d53232; -} -.settings-badge-container input:invalid { - border: 2px dashed #d53232; -} - -.settings-badge-file-picker { - display: flex; - flex-direction: column; - align-items: center; -} -.settings-badge-file-picker input.hidden[type=file] { - width: 100%; -} -.settings-badge-file-picker input.hidden[type=file]::file-selector-button { - display: none; -} -.settings-badge-file-picker.hidden { - display: none; -} - -.settings-badge-select { - display: flex; - flex-direction: column; - gap: 5px; - align-items: center; - min-width: 200px; -} - -img.badge-button { - min-width: 88px; - min-height: 31px; - max-width: 88px; - max-height: 31px; -} - -.badges-container { - display: flex; - flex-wrap: wrap; - justify-content: center; - gap: 5px; -} - -.rss-button { - background-color: #fba668; - color: black; -} -.rss-button:hover { - background-color: rgb(251.8, 183.8, 134.2); - color: black; -} -.rss-button:active { - background-color: rgb(186.8501612903, 155.5098387097, 132.6498387097); - color: black; -} - -@media (orientation: portrait) { - body { - margin: 20px 0; - } - .guide-container { - grid-template-areas: "guide-toc" "guide-topics"; - grid-template-columns: unset; - } - .guide-toc { - position: unset; - } - .guide-section { - padding-right: 20px; - } -} -ol.sortable-list { - list-style: none; - flex-grow: 1; - margin: 0; -} -ol.sortable-list li { - display: flex; - gap: 10px; - background-color: #9b649b; - padding: 20px; - margin: 15px 0; - border-top: 5px outset #503250; - border-bottom: 5px outset rgb(96.95, 81.55, 96.95); -} -ol.sortable-list li.dragged { - background-color: #3c283c; -} -ol.sortable-list li.immovable { - background-color: #8a5584; -} -ol.sortable-list li.immovable .dragger { - cursor: not-allowed; -} - -.dragger { - display: flex; - align-items: center; - background-color: rgb(96.95, 81.55, 96.95); - padding: 5px 10px; - cursor: move; -} - -.sortable-item-inner { - display: flex; - gap: 10px; - flex-grow: 1; - flex-direction: column; -} -.sortable-item-inner > * { - flex-grow: 1; -} -.sortable-item-inner.row { - flex-direction: row; -} -.sortable-item-inner:not(.row) > * { - margin-right: auto; -} - -.fg { - flex-grow: 1; -} - -#topnav { - margin-bottom: 10px; - border: 10px solid rgb(40, 40, 40); -} - -#bottomnav { - margin-top: 10px; - border: 10px solid rgb(40, 40, 40); -} - -footer { - margin-top: 10px; -} - -.infobox, .motd { - border-radius: 8px; -} - -.thread-sticky-container { - border-top-left-radius: 8px; - border-bottom-left-radius: 8px; -} - -.thread-locked-container { - border-top-right-radius: 8px; - border-bottom-right-radius: 8px; -} diff --git a/data/static/css/theme-peachy.css b/data/static/css/theme-peachy.css deleted file mode 100644 index 0973f27..0000000 --- a/data/static/css/theme-peachy.css +++ /dev/null @@ -1,1599 +0,0 @@ -@font-face { - font-family: "site-title"; - src: url("/static/fonts/ChicagoFLF.woff2"); -} -@font-face { - font-family: "Cadman"; - src: url("/static/fonts/Cadman_Roman.woff2"); - font-weight: normal; - font-style: normal; -} -@font-face { - font-family: "Cadman"; - src: url("/static/fonts/Cadman_Bold.woff2"); - font-weight: bold; - font-style: normal; -} -@font-face { - font-family: "Cadman"; - src: url("/static/fonts/Cadman_Italic.woff2"); - font-weight: normal; - font-style: italic; -} -@font-face { - font-family: "Cadman"; - src: url("/static/fonts/Cadman_BoldItalic.woff2"); - font-weight: bold; - font-style: italic; -} -@font-face { - font-family: "Atkinson Hyperlegible Mono"; - src: url("/static/fonts/AtkinsonHyperlegibleMono-VariableFont_wght.ttf"); - font-weight: 125 950; - font-style: normal; -} -@font-face { - font-family: "Atkinson Hyperlegible Mono"; - src: url("/static/fonts/AtkinsonHyperlegibleMono-Italic-VariableFont_wght.ttf"); - font-weight: 125 950; - font-style: italic; -} -*, ::before, ::after { - box-sizing: border-box; -} - -.reaction-button.active, .tab-button, .currentpage, .pagebutton, input[type=file]::file-selector-button, button.warn, input[type=submit].warn, .linkbutton.warn, button.critical, input[type=submit].critical, .linkbutton.critical, button, input[type=submit], .linkbutton { - cursor: default; - font-size: 1em; - font-family: "Cadman", sans-serif; - text-decoration: none; - border: 1px solid black; - border-radius: 16px; - padding: 8px 12px; - margin: 3px 0; -} - -body { - font-family: "Cadman", sans-serif; - margin: 12px 50px; - background-color: #c85d45; - color: black; -} - -:where(a:link) { - color: black; -} - -:where(a:visited) { - color: black; -} - -.big { - font-size: 1.8em; -} - -#topnav { - padding: 6px; - margin: 0; - display: flex; - justify-content: end; - background-color: #f27a5a; - justify-content: space-between; - align-items: baseline; -} - -#bottomnav { - padding: 6px; - margin: 0; - display: flex; - justify-content: end; - background-color: #88486d; -} - -#footer { - padding: 6px; - margin: 0; - display: flex; - justify-content: end; - background-color: #88486d; - justify-content: space-between; - align-items: baseline; -} - -.darkbg { - padding-bottom: 6px; - padding-left: 6px; - padding-right: 6px; - background-color: #88486d; -} - -.user-actions { - display: flex; - column-gap: 8px; -} - -.site-title { - font-family: "site-title"; - font-size: 3em; - margin: 0 12px; - text-decoration: none; - color: black; -} - -.thread-title { - margin: 0; - font-size: 1.5em; - font-weight: bold; -} - -.thread-actions { - display: flex; - align-items: center; - gap: 0 3px; - flex-wrap: wrap; -} - -.post { - display: grid; - grid-template-columns: 230px 1fr; - grid-template-rows: 1fr; - gap: 0; - grid-auto-flow: row; - grid-template-areas: "usercard post-content-container"; - border: 2px outset rgb(155.8907865169, 93.2211235955, 76.5092134831); -} - -.usercard { - grid-area: usercard; - padding: 12px 6px; - border: none; - background-color: #88486d; - border-right: none; -} - -.usercard-inner { - display: flex; - flex-direction: column; - align-items: center; - top: 6px; - position: sticky; -} - -.post-content-container { - display: grid; - grid-template-columns: 1fr; - grid-template-rows: min-content 1fr min-content; - gap: 0; - grid-auto-flow: row; - grid-template-areas: "post-info" "post-content" "post-reactions"; - grid-area: post-content-container; - min-height: 100%; -} - -.post-info { - grid-area: post-info; - display: flex; - min-height: 35px; - justify-content: space-between; - padding: 3px 12px; - align-items: center; - border-top: 1px solid black; - border-bottom: 1px solid black; - background-color: #c85d45; -} - -.post-content { - grid-area: post-content; - padding: 12px; - display: flex; - flex-direction: column; - overflow: hidden; - background-color: #f27a5a; -} - -.post-reactions { - grid-area: post-reactions; - min-height: 50px; - display: flex; - padding: 6px 12px; - align-items: center; - flex-wrap: wrap; - gap: 6px; - background-color: #c85d45; - border-top: 2px dotted #f7bfdf; -} - -.post-inner { - height: 100%; - padding-right: 25%; -} -.post-inner.wider { - padding-right: 12.5%; -} - -.signature-container { - border-top: 2px dotted #f7bfdf; - padding: 6px 0; -} - -code { - font-family: "Atkinson Hyperlegible Mono", monospace; -} - -pre code { - display: block; - background-color: rgb(41.7051685393, 28.2759550562, 24.6948314607); - font-size: 1em; - color: white; - border-bottom-right-radius: 16px; - border-bottom-left-radius: 16px; - border-left: 6px solid rgb(231.56, 212.36, 207.24); - padding: 12px; - overflow: scroll; - tab-size: 4; -} -pre code .hll { - background-color: #6e7681; -} -pre code .c { - color: #8B949E; - font-style: italic; -} -pre code { /* Comment */ } -pre code .err { - color: #F85149; -} -pre code { /* Error */ } -pre code .esc { - color: #E6EDF3; -} -pre code { /* Escape */ } -pre code .g { - color: #E6EDF3; -} -pre code { /* Generic */ } -pre code .k { - color: #FF7B72; -} -pre code { /* Keyword */ } -pre code .l { - color: #A5D6FF; -} -pre code { /* Literal */ } -pre code .n { - color: #E6EDF3; -} -pre code { /* Name */ } -pre code .o { - color: #FF7B72; - font-weight: bold; -} -pre code { /* Operator */ } -pre code .x { - color: #E6EDF3; -} -pre code { /* Other */ } -pre code .p { - color: #E6EDF3; -} -pre code { /* Punctuation */ } -pre code .ch { - color: #8B949E; - font-style: italic; -} -pre code { /* Comment.Hashbang */ } -pre code .cm { - color: #8B949E; - font-style: italic; -} -pre code { /* Comment.Multiline */ } -pre code .cp { - color: #8B949E; - font-weight: bold; - font-style: italic; -} -pre code { /* Comment.Preproc */ } -pre code .cpf { - color: #8B949E; - font-style: italic; -} -pre code { /* Comment.PreprocFile */ } -pre code .c1 { - color: #8B949E; - font-style: italic; -} -pre code { /* Comment.Single */ } -pre code .cs { - color: #8B949E; - font-weight: bold; - font-style: italic; -} -pre code { /* Comment.Special */ } -pre code .gd { - color: #FFA198; - background-color: #490202; -} -pre code { /* Generic.Deleted */ } -pre code .ge { - color: #E6EDF3; - font-style: italic; -} -pre code { /* Generic.Emph */ } -pre code .ges { - color: #E6EDF3; - font-weight: bold; - font-style: italic; -} -pre code { /* Generic.EmphStrong */ } -pre code .gr { - color: #FFA198; -} -pre code { /* Generic.Error */ } -pre code .gh { - color: #79C0FF; - font-weight: bold; -} -pre code { /* Generic.Heading */ } -pre code .gi { - color: #56D364; - background-color: #0F5323; -} -pre code { /* Generic.Inserted */ } -pre code .go { - color: #8B949E; -} -pre code { /* Generic.Output */ } -pre code .gp { - color: #8B949E; -} -pre code { /* Generic.Prompt */ } -pre code .gs { - color: #E6EDF3; - font-weight: bold; -} -pre code { /* Generic.Strong */ } -pre code .gu { - color: #79C0FF; -} -pre code { /* Generic.Subheading */ } -pre code .gt { - color: #FF7B72; -} -pre code { /* Generic.Traceback */ } -pre code .g-Underline { - color: #E6EDF3; - text-decoration: underline; -} -pre code { /* Generic.Underline */ } -pre code .kc { - color: #79C0FF; -} -pre code { /* Keyword.Constant */ } -pre code .kd { - color: #FF7B72; -} -pre code { /* Keyword.Declaration */ } -pre code .kn { - color: #FF7B72; -} -pre code { /* Keyword.Namespace */ } -pre code .kp { - color: #79C0FF; -} -pre code { /* Keyword.Pseudo */ } -pre code .kr { - color: #FF7B72; -} -pre code { /* Keyword.Reserved */ } -pre code .kt { - color: #FF7B72; -} -pre code { /* Keyword.Type */ } -pre code .ld { - color: #79C0FF; -} -pre code { /* Literal.Date */ } -pre code .m { - color: #A5D6FF; -} -pre code { /* Literal.Number */ } -pre code .s { - color: #A5D6FF; -} -pre code { /* Literal.String */ } -pre code .na { - color: #E6EDF3; -} -pre code { /* Name.Attribute */ } -pre code .nb { - color: #E6EDF3; -} -pre code { /* Name.Builtin */ } -pre code .nc { - color: #F0883E; - font-weight: bold; -} -pre code { /* Name.Class */ } -pre code .no { - color: #79C0FF; - font-weight: bold; -} -pre code { /* Name.Constant */ } -pre code .nd { - color: #D2A8FF; - font-weight: bold; -} -pre code { /* Name.Decorator */ } -pre code .ni { - color: #FFA657; -} -pre code { /* Name.Entity */ } -pre code .ne { - color: #F0883E; - font-weight: bold; -} -pre code { /* Name.Exception */ } -pre code .nf { - color: #D2A8FF; - font-weight: bold; -} -pre code { /* Name.Function */ } -pre code .nl { - color: #79C0FF; - font-weight: bold; -} -pre code { /* Name.Label */ } -pre code .nn { - color: #FF7B72; -} -pre code { /* Name.Namespace */ } -pre code .nx { - color: #E6EDF3; -} -pre code { /* Name.Other */ } -pre code .py { - color: #79C0FF; -} -pre code { /* Name.Property */ } -pre code .nt { - color: #7EE787; -} -pre code { /* Name.Tag */ } -pre code .nv { - color: #79C0FF; -} -pre code { /* Name.Variable */ } -pre code .ow { - color: #FF7B72; - font-weight: bold; -} -pre code { /* Operator.Word */ } -pre code .pm { - color: #E6EDF3; -} -pre code { /* Punctuation.Marker */ } -pre code .w { - color: #6E7681; -} -pre code { /* Text.Whitespace */ } -pre code .mb { - color: #A5D6FF; -} -pre code { /* Literal.Number.Bin */ } -pre code .mf { - color: #A5D6FF; -} -pre code { /* Literal.Number.Float */ } -pre code .mh { - color: #A5D6FF; -} -pre code { /* Literal.Number.Hex */ } -pre code .mi { - color: #A5D6FF; -} -pre code { /* Literal.Number.Integer */ } -pre code .mo { - color: #A5D6FF; -} -pre code { /* Literal.Number.Oct */ } -pre code .sa { - color: #79C0FF; -} -pre code { /* Literal.String.Affix */ } -pre code .sb { - color: #A5D6FF; -} -pre code { /* Literal.String.Backtick */ } -pre code .sc { - color: #A5D6FF; -} -pre code { /* Literal.String.Char */ } -pre code .dl { - color: #79C0FF; -} -pre code { /* Literal.String.Delimiter */ } -pre code .sd { - color: #A5D6FF; -} -pre code { /* Literal.String.Doc */ } -pre code .s2 { - color: #A5D6FF; -} -pre code { /* Literal.String.Double */ } -pre code .se { - color: #79C0FF; -} -pre code { /* Literal.String.Escape */ } -pre code .sh { - color: #79C0FF; -} -pre code { /* Literal.String.Heredoc */ } -pre code .si { - color: #A5D6FF; -} -pre code { /* Literal.String.Interpol */ } -pre code .sx { - color: #A5D6FF; -} -pre code { /* Literal.String.Other */ } -pre code .sr { - color: #79C0FF; -} -pre code { /* Literal.String.Regex */ } -pre code .s1 { - color: #A5D6FF; -} -pre code { /* Literal.String.Single */ } -pre code .ss { - color: #A5D6FF; -} -pre code { /* Literal.String.Symbol */ } -pre code .bp { - color: #E6EDF3; -} -pre code { /* Name.Builtin.Pseudo */ } -pre code .fm { - color: #D2A8FF; - font-weight: bold; -} -pre code { /* Name.Function.Magic */ } -pre code .vc { - color: #79C0FF; -} -pre code { /* Name.Variable.Class */ } -pre code .vg { - color: #79C0FF; -} -pre code { /* Name.Variable.Global */ } -pre code .vi { - color: #79C0FF; -} -pre code { /* Name.Variable.Instance */ } -pre code .vm { - color: #79C0FF; -} -pre code { /* Name.Variable.Magic */ } -pre code .il { - color: #A5D6FF; -} -pre code { /* Literal.Number.Integer.Long */ } - -.copy-code-container { - display: flex; - justify-content: space-between; - align-items: baseline; - font-family: "Cadman", sans-serif; - border-top-right-radius: 16px; - border-top-left-radius: 16px; - background-color: #f27a5a; - border-left: 2px solid black; - border-right: 2px solid black; - border-top: 2px solid black; -} - -.code-language-identifier { - font-style: italic; - margin-left: 6px; -} - -.copy-code { - margin-right: 6px; -} - -.inline-code { - background-color: rgb(41.7051685393, 28.2759550562, 24.6948314607); - color: white; - padding: 3px 6px; - display: inline-block; - margin: 4px; - border-radius: 16px; - font-size: 1em; - white-space: pre; -} - -#delete-dialog, .lightbox-dialog { - padding: 0; - border-radius: 16px; - border: 2px solid black; - box-shadow: 0 0 30px rgba(0, 0, 0, 0.25); -} - -.delete-dialog-inner { - display: flex; - flex-direction: column; - align-items: center; - padding: 12px; -} - -.lightbox-inner { - display: flex; - flex-direction: column; - padding: 12px; - min-width: 400px; - background-color: #f27a5a; - color: black; - gap: 6px; -} - -.lightbox-image { - max-width: 70vw; - max-height: 70vh; - object-fit: scale-down; -} - -.lightbox-nav { - display: flex; - justify-content: space-between; - align-items: center; -} - -blockquote { - padding: 6px 12px; - margin: 6px; - border-radius: 16px; - border-left: 6px solid rgb(231.56, 212.36, 207.24); - background-color: rgba(0, 0, 0, 0.1333333333); -} - -.user-info { - display: grid; - grid-template-columns: 300px 1fr; - grid-template-rows: 1fr; - gap: 0; - grid-template-areas: "user-page-usercard user-page-stats"; -} - -.user-page-usercard { - grid-area: user-page-usercard; - padding: 12px 6px; - border: none; - background-color: #88486d; - border-right: none; -} - -.user-page-stats { - grid-area: user-page-stats; - padding: 12px 16px; - border: 1px solid black; -} - -.user-stats-list { - list-style: none; - margin: 0 0 6px 0; -} - -.user-page-posts { - border-left: 1px solid black; - border-right: 1px solid black; - border-bottom: 1px solid black; - background-color: #f27a5a; -} - -.user-page-post-preview { - max-height: 200px; - mask-image: linear-gradient(180deg, #000 60%, transparent); -} - -.avatar { - width: 90%; - height: 90%; - object-fit: contain; - margin-bottom: 6px; -} - -.username-link { - overflow-wrap: anywhere; -} - -.user-status { - text-align: center; -} - -button, input[type=submit], .linkbutton { - display: inline-block; - background-color: #f27a5a; - color: black; -} -button:hover, input[type=submit]:hover, .linkbutton:hover { - background-color: rgb(244.6, 148.6, 123); -} -button:active, input[type=submit]:active, .linkbutton:active { - background-color: rgb(176.4525842697, 133.7379775281, 122.3474157303); -} -button:disabled, input[type=submit]:disabled, .linkbutton:disabled { - background-color: rgb(198.02, 189.62, 187.38); -} -button.reduced, input[type=submit].reduced, .linkbutton.reduced { - margin: 0; - padding: 6px; -} -button.icon, input[type=submit].icon, .linkbutton.icon { - padding-left: 8px; - flex-direction: row; -} -button.critical, input[type=submit].critical, .linkbutton.critical { - background-color: #f73030; - color: white; -} -button.critical:hover, input[type=submit].critical:hover, .linkbutton.critical:hover { - background-color: rgb(248.6, 89.4, 89.4); -} -button.critical:active, input[type=submit].critical:active, .linkbutton.critical:active { - background-color: rgb(166.6956976744, 98.8043023256, 98.8043023256); -} -button.critical:disabled, input[type=submit].critical:disabled, .linkbutton.critical:disabled { - background-color: rgb(186.715, 172.785, 172.785); -} -button.critical.reduced, input[type=submit].critical.reduced, .linkbutton.critical.reduced { - margin: 0; - padding: 6px; -} -button.critical.icon, input[type=submit].critical.icon, .linkbutton.critical.icon { - padding-left: 8px; - flex-direction: row; -} -button.warn, input[type=submit].warn, .linkbutton.warn { - background-color: #fbfb8d; - color: black; -} -button.warn:hover, input[type=submit].warn:hover, .linkbutton.warn:hover { - background-color: rgb(251.8, 251.8, 163.8); -} -button.warn:active, input[type=submit].warn:active, .linkbutton.warn:active { - background-color: rgb(198.3813559322, 198.3813559322, 154.4186440678); -} -button.warn:disabled, input[type=submit].warn:disabled, .linkbutton.warn:disabled { - background-color: rgb(217.55, 217.55, 209.85); -} -button.warn.reduced, input[type=submit].warn.reduced, .linkbutton.warn.reduced { - margin: 0; - padding: 6px; -} -button.warn.icon, input[type=submit].warn.icon, .linkbutton.warn.icon { - padding-left: 8px; - flex-direction: row; -} - -input[type=file]::file-selector-button { - background-color: #f27a5a; - color: black; -} -input[type=file]::file-selector-button:hover { - background-color: rgb(244.6, 148.6, 123); -} -input[type=file]::file-selector-button:active { - background-color: rgb(176.4525842697, 133.7379775281, 122.3474157303); -} -input[type=file]::file-selector-button:disabled { - background-color: rgb(198.02, 189.62, 187.38); -} -input[type=file]::file-selector-button.reduced { - margin: 0; - padding: 6px; -} -input[type=file]::file-selector-button.icon { - padding-left: 8px; - flex-direction: row; -} -input[type=file]::file-selector-button { - margin: 6px; -} - -p { - margin: 6px 0; -} - -.pagebutton { - background-color: #f27a5a; - color: black; -} -.pagebutton:hover { - background-color: rgb(244.6, 148.6, 123); -} -.pagebutton:active { - background-color: rgb(176.4525842697, 133.7379775281, 122.3474157303); -} -.pagebutton:disabled { - background-color: rgb(198.02, 189.62, 187.38); -} -.pagebutton.reduced { - margin: 0; - padding: 6px; -} -.pagebutton.icon { - padding-left: 8px; - flex-direction: row; -} -.pagebutton { - padding: 3px 3px; - margin: 0; - display: inline-block; - min-width: 36px; - text-align: center; -} - -.currentpage { - border: none; - padding: 3px 3px; - margin: 0; - display: inline-block; - min-width: 36px; - text-align: center; -} - -.modform { - display: inline; -} - -.avatar-form { - display: flex; - flex-direction: column; - align-items: center; - padding: 12px 0; -} - -input[type=text], input[type=password], textarea, select { - border: 1px solid black; - border-radius: 16px; - padding: 8px; - width: 100%; - resize: vertical; - color: black; - background-color: rgb(247.2, 175.2, 156); - font-size: 1em; - font-family: inherit; -} -input[type=text]:focus, input[type=password]:focus, textarea:focus, select:focus { - background-color: rgb(249.8, 201.8, 189); -} - -input:not(form input):invalid { - border: 2px dashed #f73030; -} - -textarea { - font-family: "Atkinson Hyperlegible Mono", monospace; -} - -.infobox { - border: 2px solid black; - background-color: #81a3e6; - padding: 12px 8px; - color: black; -} -.infobox.critical { - background-color: #f73030; - color: white; -} -.infobox.warn { - background-color: #fbfb8d; - color: black; -} - -.infobox > span { - display: flex; - align-items: center; -} - -.infobox-icon-container { - min-width: 60px; - padding-right: 8px; -} - -.thread { - display: grid; - grid-template-columns: 96px 1.6fr 96px; - grid-template-rows: 1fr; - gap: 0; - grid-auto-flow: row; - min-height: 96px; - grid-template-areas: "thread-sticky-container thread-info-container thread-locked-container"; -} - -.thread-sticky-container { - grid-area: thread-sticky-container; - border: 1px solid black; - background-color: #f27a5a; -} - -.thread-locked-container { - grid-area: thread-locked-container; - border: 1px solid black; - background-color: #f27a5a; -} - -.contain-svg { - display: flex; - align-items: center; - justify-content: center; - flex-direction: column; -} -.contain-svg.inline { - display: inline-flex; -} - -.post-img-container { - display: flex; - flex-wrap: wrap; - gap: 3px; -} - -.post-image { - object-fit: contain; - max-width: 400px; - max-height: 400px; - min-width: 200px; - min-height: 200px; - flex: 1 1 0%; - width: auto; - height: auto; -} - -.thread-info-container { - grid-area: thread-info-container; - background-color: #f27a5a; - padding: 3px 12px; - border-top: 1px solid black; - border-bottom: 1px solid black; - display: flex; - flex-direction: column; - overflow: hidden; - max-height: 110px; - mask-image: linear-gradient(180deg, #000 60%, transparent); -} - -.thread-info-header { - display: flex; - align-items: baseline; - justify-content: space-between; - gap: 3px; -} - -.thread-info-post-preview { - overflow: hidden; - text-overflow: ellipsis; - display: inline; - margin-right: 25%; -} - -.guide-section { - background-color: #f27a5a; - padding: 3px 12px; - border: 1px solid black; - padding-right: 25%; -} - -.guide-container { - display: grid; - grid-template-columns: 1.5fr 300px; - grid-template-rows: 1fr; - gap: 0; - grid-auto-flow: row; - grid-template-areas: "guide-topics guide-toc"; -} - -.guide-topics { - grid-area: guide-topics; - overflow: hidden; -} - -.guide-toc { - grid-area: guide-toc; - position: sticky; - top: 100px; - align-self: start; - padding: 6px; - border-bottom-right-radius: 8px; - background-color: #f27a5a; - border-right: 1px solid black; - border-top: 1px solid black; - border-bottom: 1px solid black; -} - -.emoji-table tr td { - text-align: center; -} - -.emoji-table tr th { - padding-left: 50px; - padding-right: 50px; -} - -.emoji-table { - margin: auto; -} - -.emoji-table, th, td { - border: 1px solid black; - border-collapse: collapse; -} - -.colorful-table { - border-collapse: collapse; - width: 100%; - margin: 6px 0; -} - -.colorful-table tr th { - background-color: #b54444; - padding: 3px 0; -} - -.colorful-table tr td { - background-color: #f27a5a; - padding: 3px 0; - text-align: center; -} - -.colorful-table .small { - width: 250px; -} - -.topic { - display: grid; - grid-template-columns: 1.5fr 96px; - grid-template-rows: 1fr; - gap: 0; - grid-auto-flow: row; - grid-template-areas: "topic-info-container topic-locked-container"; -} - -.topic-info-container { - grid-area: topic-info-container; - background-color: #f27a5a; - padding: 3px 12px; - border: 1px solid black; - display: flex; - flex-direction: column; -} - -.topic-locked-container { - grid-area: topic-locked-container; - border: 1px solid black; - background-color: #f27a5a; -} - -.editing { - background-color: rgb(219.84, 191.04, 183.36); -} - -.context-explain { - margin: 12px 0; - display: flex; - justify-content: space-evenly; -} - -.post-edit-form { - display: flex; - flex-direction: column; - align-items: baseline; - height: 100%; -} - -.babycode-editor { - height: 150px; -} - -.babycode-editor-container { - width: 100%; -} - -.babycode-preview-errors-container { - font-size: 0.8em; -} - -.tab-button { - background-color: #f27a5a; - color: black; -} -.tab-button:hover { - background-color: rgb(244.6, 148.6, 123); -} -.tab-button:active { - background-color: rgb(176.4525842697, 133.7379775281, 122.3474157303); -} -.tab-button:disabled { - background-color: rgb(198.02, 189.62, 187.38); -} -.tab-button.reduced { - margin: 0; - padding: 6px; -} -.tab-button.icon { - padding-left: 8px; - flex-direction: row; -} -.tab-button { - border-bottom: none; - border-bottom-left-radius: 0; - border-bottom-right-radius: 0; - margin-bottom: 0; -} -.tab-button.active { - background-color: #b54444; - padding-top: 8px; -} - -.tab-content { - display: none; -} -.tab-content.active { - min-height: 250px; - display: block; - background-color: rgb(156.1, 92.9, 92.9); - border: 1px solid black; - padding: 6px; - border-top-right-radius: 16px; - border-bottom-right-radius: 16px; - border-bottom-left-radius: 16px; -} - -ul, ol { - margin: 6px 0 6px 16px; - padding: 0; -} - -ul.horizontal, ol.horizontal { - display: inline; - margin-left: 0; -} -ul.horizontal li, ol.horizontal li { - display: inline list-item; -} - -.new-concept-notification.hidden { - display: none; -} - -.new-concept-notification { - position: fixed; - bottom: 80px; - right: 80px; - border: 1px solid black; - background-color: #81a3e6; - padding: 12px 8px; - border-radius: 16px; - box-shadow: 0 0 30px rgba(0, 0, 0, 0.25); -} - -.emoji { - max-width: 15px; - max-height: 15px; -} - -.accordion { - border-top-right-radius: 16px; - border-top-left-radius: 16px; - border: 1px solid black; - margin: 6px 3px; - overflow: hidden; -} - -.accordion.hidden { - border-bottom: none; -} - -.accordion-header { - display: flex; - align-items: center; - background-color: #c6655b; - padding: 0 6px; - gap: 6px; - border-bottom: 1px solid black; -} - -.accordion-toggle { - padding: 0; - width: 36px; - height: 36px; - min-width: 36px; - min-height: 36px; -} - -.accordion-title { - margin-right: auto; - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; -} - -.accordion-content { - padding: 0 8px; -} - -.accordion-content.hidden { - display: none; -} - -.post-accordion-content { - padding-top: 6px; - padding-bottom: 6px; - background-color: #c85d45; -} - -.inbox-container { - padding: 6px; -} - -.babycode-button-container { - display: flex; - gap: 3px; - flex-wrap: wrap; -} - -.babycode-button { - padding: 3px 6px; - min-width: 36px; -} - -.quote-popover { - position: absolute; - transform: translateX(-50%); - margin: 0; - border: none; - border-radius: 16px; - background-color: rgba(0, 0, 0, 0.5019607843); - padding: 3px 6px; -} - -footer { - border-top: 1px solid black; -} - -.reaction-button.active { - background-color: #b54444; - color: white; -} -.reaction-button.active:hover { - background-color: rgb(197.978313253, 103.221686747, 103.221686747); -} -.reaction-button.active:active { - background-color: rgb(127.305, 96.795, 96.795); -} -.reaction-button.active:disabled { - background-color: rgb(167.7956024096, 159.5043975904, 159.5043975904); -} -.reaction-button.active.reduced { - margin: 0; - padding: 6px; -} -.reaction-button.active.icon { - padding-left: 8px; - flex-direction: row; -} - -.reaction-popover { - position: relative; - margin: 0; - border: none; - border-radius: 16px; - background-color: rgba(0, 0, 0, 0.5019607843); - padding: 3px 6px; - width: 250px; -} - -.reaction-popover-inner { - display: flex; - flex-wrap: wrap; - overflow: scroll; - margin: auto; - justify-content: center; -} - -.guide-list { - border-bottom: 1px dashed; -} - -.bookmark-dropdown-inner { - position: relative; -} - -.bookmarks-dropdown { - background-color: #f27a5a; - border: 1px solid black; - border-radius: 16px; - box-shadow: 0 0 30px rgba(0, 0, 0, 0.25); - position: absolute; - margin: 0; - min-width: 400px; - max-width: 400px; - padding: 6px; - z-index: 100; - color: unset; -} - -.bookmark-dropdown-item { - display: flex; - justify-content: space-between; - padding: 6px 0; - margin: 6px 0; - cursor: pointer; - border: 1px solid black; - border-radius: 16px; - color: black; - background-color: #f27a5a; -} -.bookmark-dropdown-item:hover { - background-color: rgb(244.6, 148.6, 123); -} -.bookmark-dropdown-item::before { - content: ""; - background-color: currentColor; - mask: url("data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Crect%20x%3D%221.5%22%20y%3D%221.5%22%20width%3D%2221%22%20height%3D%2221%22%20rx%3D%223%22%20stroke%3D%22currentColor%22%20stroke-width%3D%223%22%20fill%3D%22none%22%2F%3E%3C%2Fsvg%3E") center/contain no-repeat; - width: 24px; - height: 24px; - padding: 0 24px; - flex-shrink: 0; -} -.bookmark-dropdown-item.selected { - background-color: #b54444; -} -.bookmark-dropdown-item.selected:hover { - background-color: rgb(197.978313253, 103.221686747, 103.221686747); -} -.bookmark-dropdown-item.selected::before { - mask: url("data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Crect%20x%3D%221.5%22%20y%3D%221.5%22%20width%3D%2221%22%20height%3D%2221%22%20rx%3D%223%22%20stroke%3D%22currentColor%22%20stroke-width%3D%223%22%20fill%3D%22none%22%2F%3E%3Crect%20x%3D%225%22%20y%3D%225%22%20width%3D%2214%22%20height%3D%2214%22%20rx%3D%222%22%20stroke%3D%22none%22%20fill%3D%22currentColor%22%2F%3E%3C%2Fsvg%3E") center/contain no-repeat; -} - -.bookmarks-dropdown-header { - display: flex; - justify-content: space-between; -} - -.bookmark-dropdown-item-name { - overflow: hidden; - text-overflow: ellipsis; -} - -.bookmark-dropdown-item-stats { - padding: 0 6px; - flex-shrink: 0; - margin-left: auto; -} - -.bookmark-dropdown-items-container { - max-height: 300px; - overflow: scroll; -} - -.motd { - display: flex; - background-color: #f27a5a; - border: 1px solid black; - padding: 6px 8px; - margin: 6px 0; -} - -.motd-icon-container { - display: flex; - min-width: 80px; - padding-right: 8px; -} - -.motd-content-container { - display: flex; - flex-direction: column; - align-self: center; - flex-grow: 1; - padding-right: 25%; -} - -.motd-title { - font-weight: bold; - font-size: larger; -} - -a.mention, a.mention:visited { - display: inline-block; - color: white; - background-color: rgb(155.8907865169, 93.2211235955, 76.5092134831); - padding: 3px; - border-radius: 16px; - text-decoration: none; -} -a.mention.display, a.mention:visited.display { - text-decoration: underline; - text-decoration-style: dashed; -} -a.mention.me, a.mention:visited.me { - background-color: rgb(99.4880898876, 155.8907865169, 76.5092134831); - border: 1px dashed; -} -a.mention:hover, a.mention:visited:hover { - background-color: rgb(231.56, 212.36, 207.24); - color: black; -} - -.settings-grid { - display: grid; - gap: 6px; - --grid-item-max-width: calc((100% - 6px) / 2); - grid-template-columns: repeat(auto-fill, minmax(max(600px, var(--grid-item-max-width)), 1fr)); -} -.settings-grid fieldset { - border: 1px solid white; - border-radius: 16px; - background-color: rgb(176.5961538462, 106.9038461538, 147.1947115385); -} - -.hfc { - height: fit-content; -} - -h1 { - margin: 0; -} - -.settings-badge-container { - display: flex; - align-items: baseline; - gap: 3px; - border: 1px solid black; - border-radius: 16px; - padding: 3px 6px; - margin: 6px 0; -} -.settings-badge-container:has(input:invalid) { - border: 2px dashed #f73030; -} -.settings-badge-container input:invalid { - border: 2px dashed #f73030; -} - -.settings-badge-file-picker { - display: flex; - flex-direction: column; - align-items: center; -} -.settings-badge-file-picker input.hidden[type=file] { - width: 100%; -} -.settings-badge-file-picker input.hidden[type=file]::file-selector-button { - display: none; -} -.settings-badge-file-picker.hidden { - display: none; -} - -.settings-badge-select { - display: flex; - flex-direction: column; - gap: 3px; - align-items: center; - min-width: 200px; -} - -img.badge-button { - min-width: 88px; - min-height: 31px; - max-width: 88px; - max-height: 31px; -} - -.badges-container { - display: flex; - flex-wrap: wrap; - justify-content: center; - gap: 3px; -} - -.rss-button { - background-color: #fba668; - color: black; -} -.rss-button:hover { - background-color: rgb(251.8, 183.8, 134.2); - color: black; -} -.rss-button:active { - background-color: rgb(186.8501612903, 155.5098387097, 132.6498387097); - color: black; -} - -@media (orientation: portrait) { - body { - margin: 12px 0; - } - .guide-container { - grid-template-areas: "guide-toc" "guide-topics"; - grid-template-columns: unset; - } - .guide-toc { - position: unset; - } - .guide-section { - padding-right: 12px; - } -} -ol.sortable-list { - list-style: none; - flex-grow: 1; - margin: 0; -} -ol.sortable-list li { - display: flex; - gap: 6px; - background-color: #f27a5a; - padding: 12px; - margin: 8px 0; - border-top: 5px outset rgb(219.84, 191.04, 183.36); - border-bottom: 5px outset rgb(155.8907865169, 93.2211235955, 76.5092134831); -} -ol.sortable-list li.dragged { - background-color: #f27a5a; -} -ol.sortable-list li.immovable { - background-color: #b54444; -} -ol.sortable-list li.immovable .dragger { - cursor: not-allowed; -} - -.dragger { - display: flex; - align-items: center; - background-color: rgb(155.8907865169, 93.2211235955, 76.5092134831); - padding: 3px 6px; - cursor: move; -} - -.sortable-item-inner { - display: flex; - gap: 6px; - flex-grow: 1; - flex-direction: column; -} -.sortable-item-inner > * { - flex-grow: 1; -} -.sortable-item-inner.row { - flex-direction: row; -} -.sortable-item-inner:not(.row) > * { - margin-right: auto; -} - -.fg { - flex-grow: 1; -} - -#topnav { - border-top-left-radius: 16px; - border-top-right-radius: 16px; -} - -#bottomnav { - color: white; -} - -textarea { - padding: 12px 16px; -} - -#footer { - border-radius: 16px; - border-top-left-radius: 0; - border-top-right-radius: 0; - border: none; - text-align: center; -} diff --git a/data/static/css/theme-snow-white.css b/data/static/css/theme-snow-white.css deleted file mode 100644 index c7b4288..0000000 --- a/data/static/css/theme-snow-white.css +++ /dev/null @@ -1,1578 +0,0 @@ -@font-face { - font-family: "site-title"; - src: url("/static/fonts/ChicagoFLF.woff2"); -} -@font-face { - font-family: "Cadman"; - src: url("/static/fonts/Cadman_Roman.woff2"); - font-weight: normal; - font-style: normal; -} -@font-face { - font-family: "Cadman"; - src: url("/static/fonts/Cadman_Bold.woff2"); - font-weight: bold; - font-style: normal; -} -@font-face { - font-family: "Cadman"; - src: url("/static/fonts/Cadman_Italic.woff2"); - font-weight: normal; - font-style: italic; -} -@font-face { - font-family: "Cadman"; - src: url("/static/fonts/Cadman_BoldItalic.woff2"); - font-weight: bold; - font-style: italic; -} -@font-face { - font-family: "Atkinson Hyperlegible Mono"; - src: url("/static/fonts/AtkinsonHyperlegibleMono-VariableFont_wght.ttf"); - font-weight: 125 950; - font-style: normal; -} -@font-face { - font-family: "Atkinson Hyperlegible Mono"; - src: url("/static/fonts/AtkinsonHyperlegibleMono-Italic-VariableFont_wght.ttf"); - font-weight: 125 950; - font-style: italic; -} -*, ::before, ::after { - box-sizing: border-box; -} - -.reaction-button.active, .tab-button, .currentpage, .pagebutton, input[type=file]::file-selector-button, button.warn, input[type=submit].warn, .linkbutton.warn, button.critical, input[type=submit].critical, .linkbutton.critical, button, input[type=submit], .linkbutton { - cursor: default; - font-size: 1em; - font-family: "Cadman", sans-serif; - text-decoration: none; - border: 1px solid black; - border-radius: 4px; - padding: 5px 20px; - margin: 5px 0; -} - -body { - font-family: "Cadman", sans-serif; - margin: 20px 100px; - background-color: rgb(183.7418181818, 194.7818181818, 215.8581818182); - color: black; -} - -:where(a:link) { - color: #711579; -} - -:where(a:visited) { - color: #4a144f; -} - -.big { - font-size: 1.8em; -} - -#topnav { - padding: 10px; - margin: 0; - display: flex; - justify-content: end; - background-color: #ced9ee; - justify-content: space-between; - align-items: baseline; -} - -#bottomnav { - padding: 10px; - margin: 0; - display: flex; - justify-content: end; - background-color: rgb(165.2127272727, 166.0977272727, 167.7872727273); -} - -#footer { - padding: 10px; - margin: 0; - display: flex; - justify-content: end; - background-color: rgb(165.2127272727, 166.0977272727, 167.7872727273); - justify-content: space-between; - align-items: baseline; -} - -.darkbg { - padding-bottom: 10px; - padding-left: 10px; - padding-right: 10px; - background-color: rgb(165.2127272727, 166.0977272727, 167.7872727273); -} - -.user-actions { - display: flex; - column-gap: 15px; -} - -.site-title { - font-family: "site-title"; - font-size: 3em; - margin: 0 20px; - text-decoration: none; - color: black; -} - -.thread-title { - margin: 0; - font-size: 1.5em; - font-weight: bold; -} - -.thread-actions { - display: flex; - align-items: center; - gap: 0 5px; - flex-wrap: wrap; -} - -.post { - display: grid; - grid-template-columns: 230px 1fr; - grid-template-rows: 1fr; - gap: 0; - grid-auto-flow: row; - grid-template-areas: "usercard post-content-container"; - border: 2px outset rgb(136.0836363636, 149.3636363636, 174.7163636364); -} - -.usercard { - grid-area: usercard; - padding: 20px 10px; - border: 4px outset rgb(231.36, 234, 239.04); - background-color: rgb(165.2127272727, 166.0977272727, 167.7872727273); - border-right: solid 2px; -} - -.usercard-inner { - display: flex; - flex-direction: column; - align-items: center; - top: 10px; - position: sticky; -} - -.post-content-container { - display: grid; - grid-template-columns: 1fr; - grid-template-rows: min-content 1fr min-content; - gap: 0; - grid-auto-flow: row; - grid-template-areas: "post-info" "post-content" "post-reactions"; - grid-area: post-content-container; - min-height: 100%; -} - -.post-info { - grid-area: post-info; - display: flex; - min-height: 70px; - justify-content: space-between; - padding: 5px 20px; - align-items: center; - border-top: 1px solid black; - border-bottom: 1px solid black; - background-color: rgb(183.7418181818, 194.7818181818, 215.8581818182); -} - -.post-content { - grid-area: post-content; - padding: 20px; - display: flex; - flex-direction: column; - overflow: hidden; - background-color: #ced9ee; -} - -.post-reactions { - grid-area: post-reactions; - min-height: 50px; - display: flex; - padding: 5px 20px; - align-items: center; - flex-wrap: wrap; - gap: 5px; - background-color: rgb(183.7418181818, 194.7818181818, 215.8581818182); - border-top: 2px dotted gray; -} - -.post-inner { - height: 100%; - padding-right: 25%; -} -.post-inner.wider { - padding-right: 12.5%; -} - -.signature-container { - border-top: 2px dotted gray; - padding: 10px 0; -} - -code { - font-family: "Atkinson Hyperlegible Mono", monospace; -} - -pre code { - display: block; - background-color: rgb(37.9418181818, 42.3818181818, 50.8581818182); - font-size: 1em; - color: white; - border-bottom-right-radius: 8px; - border-bottom-left-radius: 8px; - border-left: 10px solid rgb(239.24, 241, 244.36); - padding: 20px; - overflow: scroll; - tab-size: 4; -} -pre code .hll { - background-color: #6e7681; -} -pre code .c { - color: #8B949E; - font-style: italic; -} -pre code { /* Comment */ } -pre code .err { - color: #F85149; -} -pre code { /* Error */ } -pre code .esc { - color: #E6EDF3; -} -pre code { /* Escape */ } -pre code .g { - color: #E6EDF3; -} -pre code { /* Generic */ } -pre code .k { - color: #FF7B72; -} -pre code { /* Keyword */ } -pre code .l { - color: #A5D6FF; -} -pre code { /* Literal */ } -pre code .n { - color: #E6EDF3; -} -pre code { /* Name */ } -pre code .o { - color: #FF7B72; - font-weight: bold; -} -pre code { /* Operator */ } -pre code .x { - color: #E6EDF3; -} -pre code { /* Other */ } -pre code .p { - color: #E6EDF3; -} -pre code { /* Punctuation */ } -pre code .ch { - color: #8B949E; - font-style: italic; -} -pre code { /* Comment.Hashbang */ } -pre code .cm { - color: #8B949E; - font-style: italic; -} -pre code { /* Comment.Multiline */ } -pre code .cp { - color: #8B949E; - font-weight: bold; - font-style: italic; -} -pre code { /* Comment.Preproc */ } -pre code .cpf { - color: #8B949E; - font-style: italic; -} -pre code { /* Comment.PreprocFile */ } -pre code .c1 { - color: #8B949E; - font-style: italic; -} -pre code { /* Comment.Single */ } -pre code .cs { - color: #8B949E; - font-weight: bold; - font-style: italic; -} -pre code { /* Comment.Special */ } -pre code .gd { - color: #FFA198; - background-color: #490202; -} -pre code { /* Generic.Deleted */ } -pre code .ge { - color: #E6EDF3; - font-style: italic; -} -pre code { /* Generic.Emph */ } -pre code .ges { - color: #E6EDF3; - font-weight: bold; - font-style: italic; -} -pre code { /* Generic.EmphStrong */ } -pre code .gr { - color: #FFA198; -} -pre code { /* Generic.Error */ } -pre code .gh { - color: #79C0FF; - font-weight: bold; -} -pre code { /* Generic.Heading */ } -pre code .gi { - color: #56D364; - background-color: #0F5323; -} -pre code { /* Generic.Inserted */ } -pre code .go { - color: #8B949E; -} -pre code { /* Generic.Output */ } -pre code .gp { - color: #8B949E; -} -pre code { /* Generic.Prompt */ } -pre code .gs { - color: #E6EDF3; - font-weight: bold; -} -pre code { /* Generic.Strong */ } -pre code .gu { - color: #79C0FF; -} -pre code { /* Generic.Subheading */ } -pre code .gt { - color: #FF7B72; -} -pre code { /* Generic.Traceback */ } -pre code .g-Underline { - color: #E6EDF3; - text-decoration: underline; -} -pre code { /* Generic.Underline */ } -pre code .kc { - color: #79C0FF; -} -pre code { /* Keyword.Constant */ } -pre code .kd { - color: #FF7B72; -} -pre code { /* Keyword.Declaration */ } -pre code .kn { - color: #FF7B72; -} -pre code { /* Keyword.Namespace */ } -pre code .kp { - color: #79C0FF; -} -pre code { /* Keyword.Pseudo */ } -pre code .kr { - color: #FF7B72; -} -pre code { /* Keyword.Reserved */ } -pre code .kt { - color: #FF7B72; -} -pre code { /* Keyword.Type */ } -pre code .ld { - color: #79C0FF; -} -pre code { /* Literal.Date */ } -pre code .m { - color: #A5D6FF; -} -pre code { /* Literal.Number */ } -pre code .s { - color: #A5D6FF; -} -pre code { /* Literal.String */ } -pre code .na { - color: #E6EDF3; -} -pre code { /* Name.Attribute */ } -pre code .nb { - color: #E6EDF3; -} -pre code { /* Name.Builtin */ } -pre code .nc { - color: #F0883E; - font-weight: bold; -} -pre code { /* Name.Class */ } -pre code .no { - color: #79C0FF; - font-weight: bold; -} -pre code { /* Name.Constant */ } -pre code .nd { - color: #D2A8FF; - font-weight: bold; -} -pre code { /* Name.Decorator */ } -pre code .ni { - color: #FFA657; -} -pre code { /* Name.Entity */ } -pre code .ne { - color: #F0883E; - font-weight: bold; -} -pre code { /* Name.Exception */ } -pre code .nf { - color: #D2A8FF; - font-weight: bold; -} -pre code { /* Name.Function */ } -pre code .nl { - color: #79C0FF; - font-weight: bold; -} -pre code { /* Name.Label */ } -pre code .nn { - color: #FF7B72; -} -pre code { /* Name.Namespace */ } -pre code .nx { - color: #E6EDF3; -} -pre code { /* Name.Other */ } -pre code .py { - color: #79C0FF; -} -pre code { /* Name.Property */ } -pre code .nt { - color: #7EE787; -} -pre code { /* Name.Tag */ } -pre code .nv { - color: #79C0FF; -} -pre code { /* Name.Variable */ } -pre code .ow { - color: #FF7B72; - font-weight: bold; -} -pre code { /* Operator.Word */ } -pre code .pm { - color: #E6EDF3; -} -pre code { /* Punctuation.Marker */ } -pre code .w { - color: #6E7681; -} -pre code { /* Text.Whitespace */ } -pre code .mb { - color: #A5D6FF; -} -pre code { /* Literal.Number.Bin */ } -pre code .mf { - color: #A5D6FF; -} -pre code { /* Literal.Number.Float */ } -pre code .mh { - color: #A5D6FF; -} -pre code { /* Literal.Number.Hex */ } -pre code .mi { - color: #A5D6FF; -} -pre code { /* Literal.Number.Integer */ } -pre code .mo { - color: #A5D6FF; -} -pre code { /* Literal.Number.Oct */ } -pre code .sa { - color: #79C0FF; -} -pre code { /* Literal.String.Affix */ } -pre code .sb { - color: #A5D6FF; -} -pre code { /* Literal.String.Backtick */ } -pre code .sc { - color: #A5D6FF; -} -pre code { /* Literal.String.Char */ } -pre code .dl { - color: #79C0FF; -} -pre code { /* Literal.String.Delimiter */ } -pre code .sd { - color: #A5D6FF; -} -pre code { /* Literal.String.Doc */ } -pre code .s2 { - color: #A5D6FF; -} -pre code { /* Literal.String.Double */ } -pre code .se { - color: #79C0FF; -} -pre code { /* Literal.String.Escape */ } -pre code .sh { - color: #79C0FF; -} -pre code { /* Literal.String.Heredoc */ } -pre code .si { - color: #A5D6FF; -} -pre code { /* Literal.String.Interpol */ } -pre code .sx { - color: #A5D6FF; -} -pre code { /* Literal.String.Other */ } -pre code .sr { - color: #79C0FF; -} -pre code { /* Literal.String.Regex */ } -pre code .s1 { - color: #A5D6FF; -} -pre code { /* Literal.String.Single */ } -pre code .ss { - color: #A5D6FF; -} -pre code { /* Literal.String.Symbol */ } -pre code .bp { - color: #E6EDF3; -} -pre code { /* Name.Builtin.Pseudo */ } -pre code .fm { - color: #D2A8FF; - font-weight: bold; -} -pre code { /* Name.Function.Magic */ } -pre code .vc { - color: #79C0FF; -} -pre code { /* Name.Variable.Class */ } -pre code .vg { - color: #79C0FF; -} -pre code { /* Name.Variable.Global */ } -pre code .vi { - color: #79C0FF; -} -pre code { /* Name.Variable.Instance */ } -pre code .vm { - color: #79C0FF; -} -pre code { /* Name.Variable.Magic */ } -pre code .il { - color: #A5D6FF; -} -pre code { /* Literal.Number.Integer.Long */ } - -.copy-code-container { - display: flex; - justify-content: space-between; - align-items: baseline; - font-family: "Cadman", sans-serif; - border-top-right-radius: 8px; - border-top-left-radius: 8px; - background-color: #ced9ee; - border-left: 2px solid black; - border-right: 2px solid black; - border-top: 2px solid black; -} - -.code-language-identifier { - font-style: italic; - margin-left: 10px; -} - -.copy-code { - margin-right: 10px; -} - -.inline-code { - background-color: rgb(37.9418181818, 42.3818181818, 50.8581818182); - color: white; - padding: 5px 10px; - display: inline-block; - margin: 4px; - border-radius: 4px; - font-size: 1em; - white-space: pre; -} - -#delete-dialog, .lightbox-dialog { - padding: 0; - border-radius: 4px; - border: 2px solid black; - box-shadow: 0 0 30px rgba(0, 0, 0, 0.25); -} - -.delete-dialog-inner { - display: flex; - flex-direction: column; - align-items: center; - padding: 20px; -} - -.lightbox-inner { - display: flex; - flex-direction: column; - padding: 20px; - min-width: 400px; - background-color: #ced9ee; - color: black; - gap: 10px; -} - -.lightbox-image { - max-width: 70vw; - max-height: 70vh; - object-fit: scale-down; -} - -.lightbox-nav { - display: flex; - justify-content: space-between; - align-items: center; -} - -blockquote { - padding: 10px 20px; - margin: 10px; - border-radius: 4px; - border-left: 10px solid rgb(239.24, 241, 244.36); - background-color: rgba(0, 0, 0, 0.1490196078); -} - -.user-info { - display: grid; - grid-template-columns: 300px 1fr; - grid-template-rows: 1fr; - gap: 0; - grid-template-areas: "user-page-usercard user-page-stats"; -} - -.user-page-usercard { - grid-area: user-page-usercard; - padding: 20px 10px; - border: 4px outset rgb(231.36, 234, 239.04); - background-color: rgb(165.2127272727, 166.0977272727, 167.7872727273); - border-right: solid 2px; -} - -.user-page-stats { - grid-area: user-page-stats; - padding: 20px 30px; - border: 1px solid black; -} - -.user-stats-list { - list-style: none; - margin: 0 0 10px 0; -} - -.user-page-posts { - border-left: 1px solid black; - border-right: 1px solid black; - border-bottom: 1px solid black; - background-color: #ced9ee; -} - -.user-page-post-preview { - max-height: 200px; - mask-image: linear-gradient(180deg, #000 60%, transparent); -} - -.avatar { - width: 90%; - height: 90%; - object-fit: contain; - margin-bottom: 10px; -} - -.username-link { - overflow-wrap: anywhere; -} - -.user-status { - text-align: center; -} - -button, input[type=submit], .linkbutton { - display: inline-block; - background-color: #eecee9; - color: black; -} -button:hover, input[type=submit]:hover, .linkbutton:hover { - background-color: rgb(241.4, 215.8, 237.4); -} -button:active, input[type=submit]:active, .linkbutton:active { - background-color: rgb(207.8290909091, 191.7709090909, 205.32); -} -button:disabled, input[type=submit]:disabled, .linkbutton:disabled { - background-color: rgb(233.02, 230.78, 232.67); -} -button.reduced, input[type=submit].reduced, .linkbutton.reduced { - margin: 0; - padding: 5px; -} -button.icon, input[type=submit].icon, .linkbutton.icon { - padding-left: 16px; - flex-direction: row; -} -button.critical, input[type=submit].critical, .linkbutton.critical { - background-color: red; - color: white; -} -button.critical:hover, input[type=submit].critical:hover, .linkbutton.critical:hover { - background-color: #ff3333; -} -button.critical:active, input[type=submit].critical:active, .linkbutton.critical:active { - background-color: rgb(149.175, 80.325, 80.325); -} -button.critical:disabled, input[type=submit].critical:disabled, .linkbutton.critical:disabled { - background-color: rgb(174.675, 156.825, 156.825); -} -button.critical.reduced, input[type=submit].critical.reduced, .linkbutton.critical.reduced { - margin: 0; - padding: 5px; -} -button.critical.icon, input[type=submit].critical.icon, .linkbutton.critical.icon { - padding-left: 16px; - flex-direction: row; -} -button.warn, input[type=submit].warn, .linkbutton.warn { - background-color: #fbfb8d; - color: black; -} -button.warn:hover, input[type=submit].warn:hover, .linkbutton.warn:hover { - background-color: rgb(251.8, 251.8, 163.8); -} -button.warn:active, input[type=submit].warn:active, .linkbutton.warn:active { - background-color: rgb(198.3813559322, 198.3813559322, 154.4186440678); -} -button.warn:disabled, input[type=submit].warn:disabled, .linkbutton.warn:disabled { - background-color: rgb(217.55, 217.55, 209.85); -} -button.warn.reduced, input[type=submit].warn.reduced, .linkbutton.warn.reduced { - margin: 0; - padding: 5px; -} -button.warn.icon, input[type=submit].warn.icon, .linkbutton.warn.icon { - padding-left: 16px; - flex-direction: row; -} - -input[type=file]::file-selector-button { - background-color: #eecee9; - color: black; -} -input[type=file]::file-selector-button:hover { - background-color: rgb(241.4, 215.8, 237.4); -} -input[type=file]::file-selector-button:active { - background-color: rgb(207.8290909091, 191.7709090909, 205.32); -} -input[type=file]::file-selector-button:disabled { - background-color: rgb(233.02, 230.78, 232.67); -} -input[type=file]::file-selector-button.reduced { - margin: 0; - padding: 5px; -} -input[type=file]::file-selector-button.icon { - padding-left: 16px; - flex-direction: row; -} -input[type=file]::file-selector-button { - margin: 10px; -} - -p { - margin: 10px 0; -} - -.pagebutton { - background-color: #eecee9; - color: black; -} -.pagebutton:hover { - background-color: rgb(241.4, 215.8, 237.4); -} -.pagebutton:active { - background-color: rgb(207.8290909091, 191.7709090909, 205.32); -} -.pagebutton:disabled { - background-color: rgb(233.02, 230.78, 232.67); -} -.pagebutton.reduced { - margin: 0; - padding: 5px; -} -.pagebutton.icon { - padding-left: 16px; - flex-direction: row; -} -.pagebutton { - padding: 5px 5px; - margin: 0; - display: inline-block; - min-width: 20px; - text-align: center; -} - -.currentpage { - border: none; - padding: 5px 5px; - margin: 0; - display: inline-block; - min-width: 20px; - text-align: center; -} - -.modform { - display: inline; -} - -.avatar-form { - display: flex; - flex-direction: column; - align-items: center; - padding: 20px 0; -} - -input[type=text], input[type=password], textarea, select { - border: 1px solid black; - border-radius: 4px; - padding: 7px 10px; - width: 100%; - resize: vertical; - color: black; - background-color: rgb(225.6, 232.2, 244.8); - font-size: 1em; - font-family: inherit; -} -input[type=text]:focus, input[type=password]:focus, textarea:focus, select:focus { - background-color: rgb(235.4, 239.8, 248.2); -} - -input:not(form input):invalid { - border: 2px dashed red; -} - -textarea { - font-family: "Atkinson Hyperlegible Mono", monospace; -} - -.infobox { - border: 2px solid black; - background-color: #81a3e6; - padding: 20px 15px; - color: black; -} -.infobox.critical { - background-color: #ed8181; - color: black; -} -.infobox.warn { - background-color: #fbfb8d; - color: black; -} - -.infobox > span { - display: flex; - align-items: center; -} - -.infobox-icon-container { - min-width: 60px; - padding-right: 15px; -} - -.thread { - display: grid; - grid-template-columns: 96px 1.6fr 96px; - grid-template-rows: 1fr; - gap: 0; - grid-auto-flow: row; - min-height: 96px; - grid-template-areas: "thread-sticky-container thread-info-container thread-locked-container"; -} - -.thread-sticky-container { - grid-area: thread-sticky-container; - border: 2px outset rgb(231.36, 234, 239.04); - background-color: none; -} - -.thread-locked-container { - grid-area: thread-locked-container; - border: 2px outset rgb(231.36, 234, 239.04); - background-color: none; -} - -.contain-svg { - display: flex; - align-items: center; - justify-content: center; - flex-direction: column; -} -.contain-svg.inline { - display: inline-flex; -} - -.post-img-container { - display: flex; - flex-wrap: wrap; - gap: 5px; -} - -.post-image { - object-fit: contain; - max-width: 400px; - max-height: 400px; - min-width: 200px; - min-height: 200px; - flex: 1 1 0%; - width: auto; - height: auto; -} - -.thread-info-container { - grid-area: thread-info-container; - background-color: #ced9ee; - padding: 5px 20px; - border-top: 1px solid black; - border-bottom: 1px solid black; - display: flex; - flex-direction: column; - overflow: hidden; - max-height: 110px; - mask-image: linear-gradient(180deg, #000 60%, transparent); -} - -.thread-info-header { - display: flex; - align-items: baseline; - justify-content: space-between; - gap: 5px; -} - -.thread-info-post-preview { - overflow: hidden; - text-overflow: ellipsis; - display: inline; - margin-right: 25%; -} - -.guide-section { - background-color: #ced9ee; - padding: 5px 20px; - border: 1px solid black; - padding-right: 25%; -} - -.guide-container { - display: grid; - grid-template-columns: 1.5fr 300px; - grid-template-rows: 1fr; - gap: 0; - grid-auto-flow: row; - grid-template-areas: "guide-topics guide-toc"; -} - -.guide-topics { - grid-area: guide-topics; - overflow: hidden; -} - -.guide-toc { - grid-area: guide-toc; - position: sticky; - top: 100px; - align-self: start; - padding: 10px; - border-bottom-right-radius: 8px; - background-color: #eecee9; - border-right: 1px solid black; - border-top: 1px solid black; - border-bottom: 1px solid black; -} - -.emoji-table tr td { - text-align: center; -} - -.emoji-table tr th { - padding-left: 50px; - padding-right: 50px; -} - -.emoji-table { - margin: auto; -} - -.emoji-table, th, td { - border: 1px solid black; - border-collapse: collapse; -} - -.colorful-table { - border-collapse: collapse; - width: 100%; - margin: 10px 0; -} - -.colorful-table tr th { - background-color: #eee3ce; - padding: 5px 0; -} - -.colorful-table tr td { - background-color: #eecee9; - padding: 5px 0; - text-align: center; -} - -.colorful-table .small { - width: 250px; -} - -.topic { - display: grid; - grid-template-columns: 1.5fr 96px; - grid-template-rows: 1fr; - gap: 0; - grid-auto-flow: row; - grid-template-areas: "topic-info-container topic-locked-container"; -} - -.topic-info-container { - grid-area: topic-info-container; - background-color: #ced9ee; - padding: 5px 20px; - border: 1px solid black; - display: flex; - flex-direction: column; -} - -.topic-locked-container { - grid-area: topic-locked-container; - border: 2px outset rgb(231.36, 234, 239.04); - background-color: none; -} - -.editing { - background-color: rgb(231.36, 234, 239.04); -} - -.context-explain { - margin: 20px 0; - display: flex; - justify-content: space-evenly; -} - -.post-edit-form { - display: flex; - flex-direction: column; - align-items: baseline; - height: 100%; -} - -.babycode-editor { - height: 150px; -} - -.babycode-editor-container { - width: 100%; -} - -.babycode-preview-errors-container { - font-size: 0.8em; -} - -.tab-button { - background-color: #eecee9; - color: black; -} -.tab-button:hover { - background-color: rgb(241.4, 215.8, 237.4); -} -.tab-button:active { - background-color: rgb(207.8290909091, 191.7709090909, 205.32); -} -.tab-button:disabled { - background-color: rgb(233.02, 230.78, 232.67); -} -.tab-button.reduced { - margin: 0; - padding: 5px; -} -.tab-button.icon { - padding-left: 16px; - flex-direction: row; -} -.tab-button { - border-bottom: none; - border-bottom-left-radius: 0; - border-bottom-right-radius: 0; - margin-bottom: 0; -} -.tab-button.active { - background-color: #eee3ce; - padding-top: 8px; -} - -.tab-content { - display: none; -} -.tab-content.active { - min-height: 250px; - display: block; - background-color: rgb(231.4, 224.9375, 212.6); - border: 1px solid black; - padding: 10px; - border-top-right-radius: 4px; - border-bottom-right-radius: 4px; - border-bottom-left-radius: 4px; -} - -ul, ol { - margin: 10px 0 10px 30px; - padding: 0; -} - -ul.horizontal, ol.horizontal { - display: inline; - margin-left: 0; -} -ul.horizontal li, ol.horizontal li { - display: inline list-item; -} - -.new-concept-notification.hidden { - display: none; -} - -.new-concept-notification { - position: fixed; - bottom: 80px; - right: 80px; - border: 1px solid black; - background-color: #81a3e6; - padding: 20px 15px; - border-radius: 4px; - box-shadow: 0 0 30px rgba(0, 0, 0, 0.25); -} - -.emoji { - max-width: 15px; - max-height: 15px; -} - -.accordion { - border-top-right-radius: 4px; - border-top-left-radius: 4px; - border: 1px solid black; - margin: 10px 5px; - overflow: hidden; -} - -.accordion.hidden { - border-bottom: none; -} - -.accordion-header { - display: flex; - align-items: center; - background-color: rgb(216.0886363636, 176.9113636364, 177.3194602273); - padding: 0 10px; - gap: 10px; - border-bottom: 1px solid black; -} - -.accordion-toggle { - padding: 0; - width: 36px; - height: 36px; - min-width: 36px; - min-height: 36px; -} - -.accordion-title { - margin-right: auto; - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; -} - -.accordion-content { - padding: 0 15px; -} - -.accordion-content.hidden { - display: none; -} - -.post-accordion-content { - padding-top: 10px; - padding-bottom: 10px; - background-color: rgb(183.7418181818, 194.7818181818, 215.8581818182); -} - -.inbox-container { - padding: 10px; -} - -.babycode-button-container { - display: flex; - gap: 5px; - flex-wrap: wrap; -} - -.babycode-button { - padding: 5px 10px; - min-width: 36px; -} - -.quote-popover { - position: absolute; - transform: translateX(-50%); - margin: 0; - border: none; - border-radius: 4px; - background-color: rgba(0, 0, 0, 0.5019607843); - padding: 5px 10px; -} - -footer { - border-top: 1px solid black; -} - -.reaction-button.active { - background-color: #eee3ce; - color: black; -} -.reaction-button.active:hover { - background-color: rgb(241.4, 232.6, 215.8); -} -.reaction-button.active:active { - background-color: rgb(207.8290909091, 202.3090909091, 191.7709090909); -} -.reaction-button.active:disabled { - background-color: rgb(233.02, 232.25, 230.78); -} -.reaction-button.active.reduced { - margin: 0; - padding: 5px; -} -.reaction-button.active.icon { - padding-left: 16px; - flex-direction: row; -} - -.reaction-popover { - position: relative; - margin: 0; - border: none; - border-radius: 4px; - background-color: rgba(0, 0, 0, 0.5019607843); - padding: 5px 10px; - width: 250px; -} - -.reaction-popover-inner { - display: flex; - flex-wrap: wrap; - overflow: scroll; - margin: auto; - justify-content: center; -} - -.guide-list { - border-bottom: 1px dashed; -} - -.bookmark-dropdown-inner { - position: relative; -} - -.bookmarks-dropdown { - background-color: #ced9ee; - border: 1px solid black; - border-radius: 4px; - box-shadow: 0 0 30px rgba(0, 0, 0, 0.25); - position: absolute; - margin: 0; - min-width: 400px; - max-width: 400px; - padding: 10px; - z-index: 100; - color: unset; -} - -.bookmark-dropdown-item { - display: flex; - justify-content: space-between; - padding: 10px 0; - margin: 10px 0; - cursor: pointer; - border: 1px solid black; - border-radius: 4px; - color: black; - background-color: #eecee9; -} -.bookmark-dropdown-item:hover { - background-color: rgb(241.4, 215.8, 237.4); -} -.bookmark-dropdown-item::before { - content: ""; - background-color: currentColor; - mask: url("data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Crect%20x%3D%221.5%22%20y%3D%221.5%22%20width%3D%2221%22%20height%3D%2221%22%20rx%3D%223%22%20stroke%3D%22currentColor%22%20stroke-width%3D%223%22%20fill%3D%22none%22%2F%3E%3C%2Fsvg%3E") center/contain no-repeat; - width: 24px; - height: 24px; - padding: 0 20px; - flex-shrink: 0; -} -.bookmark-dropdown-item.selected { - background-color: #eee3ce; -} -.bookmark-dropdown-item.selected:hover { - background-color: rgb(241.4, 232.6, 215.8); -} -.bookmark-dropdown-item.selected::before { - mask: url("data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Crect%20x%3D%221.5%22%20y%3D%221.5%22%20width%3D%2221%22%20height%3D%2221%22%20rx%3D%223%22%20stroke%3D%22currentColor%22%20stroke-width%3D%223%22%20fill%3D%22none%22%2F%3E%3Crect%20x%3D%225%22%20y%3D%225%22%20width%3D%2214%22%20height%3D%2214%22%20rx%3D%222%22%20stroke%3D%22none%22%20fill%3D%22currentColor%22%2F%3E%3C%2Fsvg%3E") center/contain no-repeat; -} - -.bookmarks-dropdown-header { - display: flex; - justify-content: space-between; -} - -.bookmark-dropdown-item-name { - overflow: hidden; - text-overflow: ellipsis; -} - -.bookmark-dropdown-item-stats { - padding: 0 10px; - flex-shrink: 0; - margin-left: auto; -} - -.bookmark-dropdown-items-container { - max-height: 300px; - overflow: scroll; -} - -.motd { - display: flex; - background-color: #ced9ee; - border: 2px outset rgb(231.36, 234, 239.04); - padding: 10px 15px; - margin: 10px 0; -} - -.motd-icon-container { - display: flex; - min-width: 80px; - padding-right: 15px; -} - -.motd-content-container { - display: flex; - flex-direction: column; - align-self: center; - flex-grow: 1; - padding-right: 25%; -} - -.motd-title { - font-weight: bold; - font-size: larger; -} - -a.mention, a.mention:visited { - display: inline-block; - color: white; - background-color: rgb(136.0836363636, 149.3636363636, 174.7163636364); - padding: 5px; - border-radius: 4px; - text-decoration: none; -} -a.mention.display, a.mention:visited.display { - text-decoration: underline; - text-decoration-style: dashed; -} -a.mention.me, a.mention:visited.me { - background-color: rgb(174.7163636364, 136.0836363636, 168.68); - border: 1px dashed; -} -a.mention:hover, a.mention:visited:hover { - background-color: rgb(239.24, 241, 244.36); - color: black; -} - -.settings-grid { - display: grid; - gap: 10px; - --grid-item-max-width: calc((100% - 10px) / 2); - grid-template-columns: repeat(auto-fill, minmax(max(600px, var(--grid-item-max-width)), 1fr)); -} -.settings-grid fieldset { - border: 1px solid white; - border-radius: 4px; - background-color: rgb(187.6595454545, 188.3232954545, 189.5904545455); -} - -.hfc { - height: fit-content; -} - -h1 { - margin: 0; -} - -.settings-badge-container { - display: flex; - align-items: baseline; - gap: 5px; - border: 1px solid black; - border-radius: 4px; - padding: 5px 10px; - margin: 10px 0; -} -.settings-badge-container:has(input:invalid) { - border: 2px dashed red; -} -.settings-badge-container input:invalid { - border: 2px dashed red; -} - -.settings-badge-file-picker { - display: flex; - flex-direction: column; - align-items: center; -} -.settings-badge-file-picker input.hidden[type=file] { - width: 100%; -} -.settings-badge-file-picker input.hidden[type=file]::file-selector-button { - display: none; -} -.settings-badge-file-picker.hidden { - display: none; -} - -.settings-badge-select { - display: flex; - flex-direction: column; - gap: 5px; - align-items: center; - min-width: 200px; -} - -img.badge-button { - min-width: 88px; - min-height: 31px; - max-width: 88px; - max-height: 31px; -} - -.badges-container { - display: flex; - flex-wrap: wrap; - justify-content: center; - gap: 5px; -} - -.rss-button { - background-color: #fba668; - color: black; -} -.rss-button:hover { - background-color: rgb(251.8, 183.8, 134.2); - color: black; -} -.rss-button:active { - background-color: rgb(186.8501612903, 155.5098387097, 132.6498387097); - color: black; -} - -@media (orientation: portrait) { - body { - margin: 20px 0; - } - .guide-container { - grid-template-areas: "guide-toc" "guide-topics"; - grid-template-columns: unset; - } - .guide-toc { - position: unset; - } - .guide-section { - padding-right: 20px; - } -} -ol.sortable-list { - list-style: none; - flex-grow: 1; - margin: 0; -} -ol.sortable-list li { - display: flex; - gap: 10px; - background-color: #ced9ee; - padding: 20px; - margin: 15px 0; - border-top: 5px outset rgb(231.36, 234, 239.04); - border-bottom: 5px outset rgb(136.0836363636, 149.3636363636, 174.7163636364); -} -ol.sortable-list li.dragged { - background-color: #eecee9; -} -ol.sortable-list li.immovable { - background-color: #eee3ce; -} -ol.sortable-list li.immovable .dragger { - cursor: not-allowed; -} - -.dragger { - display: flex; - align-items: center; - background-color: rgb(136.0836363636, 149.3636363636, 174.7163636364); - padding: 5px 10px; - cursor: move; -} - -.sortable-item-inner { - display: flex; - gap: 10px; - flex-grow: 1; - flex-direction: column; -} -.sortable-item-inner > * { - flex-grow: 1; -} -.sortable-item-inner.row { - flex-direction: row; -} -.sortable-item-inner:not(.row) > * { - margin-right: auto; -} - -.fg { - flex-grow: 1; -} diff --git a/sass/_default.scss b/sass/_default.scss deleted file mode 100644 index 02064d5..0000000 --- a/sass/_default.scss +++ /dev/null @@ -1,1583 +0,0 @@ -@use "sass:color"; - -// ************** -// COLORS -// ************** -// these are "base" colors that are used by other variables. -$ACCENT_COLOR: #c1ceb1 !default; - -$DARK_1: color.scale($ACCENT_COLOR, $lightness: -25%, $saturation: -97%) !default; -$DARK_1_LIGHTER: color.scale($DARK_1, $lightness: 25%); -$DARK_2: color.scale($ACCENT_COLOR, $lightness: -30%, $saturation: -60%) !default; -$DARK_3: color.scale($ACCENT_COLOR, $lightness: -80%, $saturation: -70%) !default; - -$LIGHT: color.scale($ACCENT_COLOR, $lightness: 40%, $saturation: -60%) !default; -$LIGHT_2: color.scale($ACCENT_COLOR, $lightness: 60%, $saturation: -60%) !default; - -$MAIN_BG: color.scale($ACCENT_COLOR, $lightness: -10%, $saturation: -40%) !default; - -$BUTTON_COLOR: color.adjust($ACCENT_COLOR, $hue: 90) !default; -$BUTTON_COLOR_2: color.adjust($ACCENT_COLOR, $hue: 180) !default; - -$BUTTON_COLOR_HOVER: color.scale($BUTTON_COLOR, $lightness: 20%) !default; -$BUTTON_COLOR_ACTIVE: color.scale($BUTTON_COLOR, $lightness: -10%, $saturation: -70%) !default; -$BUTTON_COLOR_DISABLED: color.scale($BUTTON_COLOR, $lightness: 30%, $saturation: -90%) !default; - -$BUTTON_COLOR_2_HOVER: color.scale($BUTTON_COLOR_2, $lightness: 20%) !default; -$BUTTON_COLOR_2_ACTIVE: color.scale($BUTTON_COLOR_2, $lightness: -10%, $saturation: -70%) !default; -$BUTTON_COLOR_2_DISABLED: color.scale($BUTTON_COLOR_2, $lightness: 30%, $saturation: -90%) !default; - -$ACCORDION_COLOR: color.adjust($ACCENT_COLOR, $hue: 140, $lightness: -10%, $saturation: -15%) !default; - -$DEFAULT_FONT_COLOR: black !default; -$DEFAULT_FONT_COLOR_INVERSE: white !default; - -$BUTTON_FONT_COLOR: $DEFAULT_FONT_COLOR !default; -$BUTTON_COLOR_WARN: #fbfb8d !default; -$BUTTON_COLOR_CRITICAL: red !default; -$BUTTON_WARN_FONT_COLOR: $DEFAULT_FONT_COLOR !default; -$BUTTON_CRITICAL_FONT_COLOR: $DEFAULT_FONT_COLOR_INVERSE !default; - -// ************** -// UNITS & SIZE -// ************** -// these are used within margins and paddings and other miscellaneous sizing. - -$ZERO_PADDING: 0 !default; -$SMALL_PADDING: 5px !default; -$MEDIUM_PADDING: 10px !default; -$MEDIUM_BIG_PADDING: 15px !default; -$BIG_PADDING: 20px !default; -$BIGGER_PADDING: 30px !default; - -$PAGE_SIDE_MARGIN: 100px !default; - -// ************** -// BORDERS -// ************** -$DEFAULT_BORDER: 1px solid black !default; -$DEFAULT_BORDER_INVALID: 2px dashed $BUTTON_COLOR_CRITICAL !default; -$DEFAULT_BORDER_RADIUS: 4px !default; - -// other variables can be found before the rule that uses them. they are usually constructed from these basic variables. - -@font-face { - font-family: "site-title"; - src: url("/static/fonts/ChicagoFLF.woff2"); -} - -@mixin cadman($var) { - font-family: "Cadman"; - src: url("/static/fonts/Cadman_#{$var}.woff2"); -} - -@font-face { - @include cadman("Roman"); - font-weight: normal; - font-style: normal; -} - -@font-face { - @include cadman("Bold"); - font-weight: bold; - font-style: normal; -} - -@font-face { - @include cadman("Italic"); - font-weight: normal; - font-style: italic; -} - -@font-face { - @include cadman("BoldItalic"); - font-weight: bold; - font-style: italic; -} - -@font-face { - font-family: "Atkinson Hyperlegible Mono"; - src: url("/static/fonts/AtkinsonHyperlegibleMono-VariableFont_wght.ttf"); - font-weight: 125 950; - font-style: normal; -} - -@font-face { - font-family: "Atkinson Hyperlegible Mono"; - src: url("/static/fonts/AtkinsonHyperlegibleMono-Italic-VariableFont_wght.ttf"); - font-weight: 125 950; - font-style: italic; -} - -*, ::before, ::after { - box-sizing: border-box; -} - -$button_border: $DEFAULT_BORDER !default; -$button_padding: $SMALL_PADDING $BIG_PADDING !default; -$button_border_radius: $DEFAULT_BORDER_RADIUS !default; -$button_margin: $SMALL_PADDING $ZERO_PADDING !default; -%button-base { - cursor: default; - font-size: 1em; - font-family: "Cadman", sans-serif; - text-decoration: none; - border: $button_border; - border-radius: $button_border_radius; - padding: $button_padding; - margin: $button_margin; -} - -$reduced_button_margin: $ZERO_PADDING !default; -$reduced_button_padding: $SMALL_PADDING !default; -$icon_button_padding_left: $BIG_PADDING - 4px !default; -@mixin button($color, $font_color) { - @extend %button-base; - background-color: $color; - color: $font_color; - - &:hover { - background-color: color.scale($color, $lightness: 20%); - } - - &:active { - background-color: color.scale($color, $lightness: -10%, $saturation: -70%); - } - - &:disabled { - background-color: color.scale($color, $lightness: 30%, $saturation: -90%); - } - - &.reduced { - margin: $reduced_button_margin; - padding: $reduced_button_padding; - } - - // this is meant to be used with the contain-svg class, hence the flex-direction here - &.icon { - padding-left: $icon_button_padding_left; - flex-direction: row; - } -} - -$navbar_padding: $MEDIUM_PADDING !default; -$navbar_margin: 0 !default; -@mixin navbar($color) { - padding: $navbar_padding; - margin: $navbar_margin; - display: flex; - justify-content: end; - background-color: $color; -} - -$body_margin: $BIG_PADDING $PAGE_SIDE_MARGIN !default; -body { - font-family: "Cadman", sans-serif; - // font-size: 18px; - margin: $body_margin; - background-color: $MAIN_BG; - color: $DEFAULT_FONT_COLOR; -} - -$link_color: #c11c1c !default; -$link_color_visited: #730c0c !default; -:where(a:link){ - color: $link_color; -} -:where(a:visited) { - color: $link_color_visited; -} - -.big { - font-size: 1.8em; -} - -$topnav_color: $ACCENT_COLOR !default; -#topnav { - @include navbar($topnav_color); - justify-content: space-between; - align-items: baseline; -} - -$bottomnav_color: $DARK_1 !default; -#bottomnav { - @include navbar($bottomnav_color); -} - -#footer { - @include navbar($bottomnav_color); - justify-content: space-between; - align-items: baseline; -} - -$darkbg_color: $DARK_1 !default; -.darkbg { - padding-bottom: $MEDIUM_PADDING; - padding-left: $MEDIUM_PADDING; - padding-right: $MEDIUM_PADDING; - background-color: $darkbg_color; -} - -$user_actions_gap: $MEDIUM_BIG_PADDING !default; -.user-actions { - display: flex; - column-gap: $user_actions_gap; -} - -$site_title_margin: $ZERO_PADDING $BIG_PADDING !default; -$site_title_size: 3em !default; -$site_title_color: $DEFAULT_FONT_COLOR !default; -.site-title { - font-family: "site-title"; - font-size: $site_title_size; - margin: $site_title_margin; - text-decoration: none; - color: $site_title_color; -} - -$thread_title_margin: $ZERO_PADDING !default; -$thread_title_size: 1.5em !default; -.thread-title { - margin: $thread_title_margin; - font-size: $thread_title_size; - font-weight: bold; -} - -$thread_actions_gap: $ZERO_PADDING $SMALL_PADDING !default; -.thread-actions { - display: flex; - align-items: center; - gap: $thread_actions_gap; - flex-wrap: wrap; -} - -$post_usercard_width: 230px !default; -$post_border: 2px outset $DARK_2 !default; -.post { - display: grid; - grid-template-columns: $post_usercard_width 1fr; - grid-template-rows: 1fr; - gap: $ZERO_PADDING; - grid-auto-flow: row; - grid-template-areas: - "usercard post-content-container"; - border: $post_border; -} - -$usercard_padding: $BIG_PADDING $MEDIUM_PADDING !default; -$usercard_border: 4px outset $LIGHT !default; -$usercard_border_right: solid 2px !default; -$usercard_background: $DARK_1 !default; -.usercard { - grid-area: usercard; - padding: $usercard_padding; - border: $usercard_border; - background-color: $usercard_background; - border-right: $usercard_border_right; -} - -.usercard-inner { - display: flex; - flex-direction: column; - align-items: center; - top: $MEDIUM_PADDING; - position: sticky; -} - -$post_content_gap: $ZERO_PADDING !default; -.post-content-container { - display: grid; - grid-template-columns: 1fr; - grid-template-rows: min-content 1fr min-content; - gap: $post_content_gap; - grid-auto-flow: row; - grid-template-areas: - "post-info" - "post-content" - "post-reactions"; - grid-area: post-content-container; - - min-height: 100%; -} - -$post_info_min_height: 70px !default; -$post_info_padding: $SMALL_PADDING $BIG_PADDING !default; -$post_info_border_top: $DEFAULT_BORDER !default; -$post_info_border_bottom: $DEFAULT_BORDER !default; -$post_info_background: $MAIN_BG !default; -.post-info { - grid-area: post-info; - display: flex; - min-height: $post_info_min_height; - justify-content: space-between; - padding: $post_info_padding; - align-items: center; - border-top: $post_info_border_top; - border-bottom: $post_info_border_bottom; - background-color: $post_info_background; -} - -$post_content_padding: $BIG_PADDING !default; -$post_content_background: $ACCENT_COLOR !default; -.post-content { - grid-area: post-content; - padding: $post_content_padding; - display: flex; - flex-direction: column; - overflow: hidden; - background-color: $post_content_background; -} - -$post_reactions_min_height: 50px !default; -$post_reactions_padding: $SMALL_PADDING $BIG_PADDING !default; -$post_reactions_gap: $SMALL_PADDING !default; -$post_reactions_background: $MAIN_BG !default; -$post_reactions_border_top: 2px dotted gray !default; -.post-reactions { - grid-area: post-reactions; - min-height: $post_reactions_min_height; - display: flex; - padding: $post_reactions_padding; - align-items: center; - flex-wrap: wrap; - gap: $post_reactions_gap; - background-color: $post_reactions_background; - border-top: $post_reactions_border_top; -} - -$post_inner_padding_right: 25% !default; -$post_inner_padding_right_wider: 12.5% !default; -.post-inner { - height: 100%; - padding-right: $post_inner_padding_right; - - &.wider { - padding-right: $post_inner_padding_right_wider; - } -} - -$signature_container_border_top: $post_reactions_border_top !default; -$signature_container_padding: $MEDIUM_PADDING $ZERO_PADDING !default; -.signature-container { - border-top: $signature_container_border_top; - padding: $signature_container_padding; -} - -code { - font-family: "Atkinson Hyperlegible Mono", monospace; -} - -$code_background_color: $DARK_3 !default; -$code_font_color: white !default; -$code_border_radius: 8px !default; -$code_border_left: $MEDIUM_PADDING solid $LIGHT_2 !default; -pre code { - display: block; - background-color: $code_background_color; - font-size: 1em; - color: $code_font_color; - border-bottom-right-radius: $code_border_radius; - border-bottom-left-radius: $code_border_radius; - border-left: $code_border_left; - padding: $BIG_PADDING; - overflow: scroll; - tab-size: 4; - - .hll { background-color: #6e7681 } - .c { color: #8B949E; font-style: italic } /* Comment */ - .err { color: #F85149 } /* Error */ - .esc { color: #E6EDF3 } /* Escape */ - .g { color: #E6EDF3 } /* Generic */ - .k { color: #FF7B72 } /* Keyword */ - .l { color: #A5D6FF } /* Literal */ - .n { color: #E6EDF3 } /* Name */ - .o { color: #FF7B72; font-weight: bold } /* Operator */ - .x { color: #E6EDF3 } /* Other */ - .p { color: #E6EDF3 } /* Punctuation */ - .ch { color: #8B949E; font-style: italic } /* Comment.Hashbang */ - .cm { color: #8B949E; font-style: italic } /* Comment.Multiline */ - .cp { color: #8B949E; font-weight: bold; font-style: italic } /* Comment.Preproc */ - .cpf { color: #8B949E; font-style: italic } /* Comment.PreprocFile */ - .c1 { color: #8B949E; font-style: italic } /* Comment.Single */ - .cs { color: #8B949E; font-weight: bold; font-style: italic } /* Comment.Special */ - .gd { color: #FFA198; background-color: #490202 } /* Generic.Deleted */ - .ge { color: #E6EDF3; font-style: italic } /* Generic.Emph */ - .ges { color: #E6EDF3; font-weight: bold; font-style: italic } /* Generic.EmphStrong */ - .gr { color: #FFA198 } /* Generic.Error */ - .gh { color: #79C0FF; font-weight: bold } /* Generic.Heading */ - .gi { color: #56D364; background-color: #0F5323 } /* Generic.Inserted */ - .go { color: #8B949E } /* Generic.Output */ - .gp { color: #8B949E } /* Generic.Prompt */ - .gs { color: #E6EDF3; font-weight: bold } /* Generic.Strong */ - .gu { color: #79C0FF } /* Generic.Subheading */ - .gt { color: #FF7B72 } /* Generic.Traceback */ - .g-Underline { color: #E6EDF3; text-decoration: underline } /* Generic.Underline */ - .kc { color: #79C0FF } /* Keyword.Constant */ - .kd { color: #FF7B72 } /* Keyword.Declaration */ - .kn { color: #FF7B72 } /* Keyword.Namespace */ - .kp { color: #79C0FF } /* Keyword.Pseudo */ - .kr { color: #FF7B72 } /* Keyword.Reserved */ - .kt { color: #FF7B72 } /* Keyword.Type */ - .ld { color: #79C0FF } /* Literal.Date */ - .m { color: #A5D6FF } /* Literal.Number */ - .s { color: #A5D6FF } /* Literal.String */ - .na { color: #E6EDF3 } /* Name.Attribute */ - .nb { color: #E6EDF3 } /* Name.Builtin */ - .nc { color: #F0883E; font-weight: bold } /* Name.Class */ - .no { color: #79C0FF; font-weight: bold } /* Name.Constant */ - .nd { color: #D2A8FF; font-weight: bold } /* Name.Decorator */ - .ni { color: #FFA657 } /* Name.Entity */ - .ne { color: #F0883E; font-weight: bold } /* Name.Exception */ - .nf { color: #D2A8FF; font-weight: bold } /* Name.Function */ - .nl { color: #79C0FF; font-weight: bold } /* Name.Label */ - .nn { color: #FF7B72 } /* Name.Namespace */ - .nx { color: #E6EDF3 } /* Name.Other */ - .py { color: #79C0FF } /* Name.Property */ - .nt { color: #7EE787 } /* Name.Tag */ - .nv { color: #79C0FF } /* Name.Variable */ - .ow { color: #FF7B72; font-weight: bold } /* Operator.Word */ - .pm { color: #E6EDF3 } /* Punctuation.Marker */ - .w { color: #6E7681 } /* Text.Whitespace */ - .mb { color: #A5D6FF } /* Literal.Number.Bin */ - .mf { color: #A5D6FF } /* Literal.Number.Float */ - .mh { color: #A5D6FF } /* Literal.Number.Hex */ - .mi { color: #A5D6FF } /* Literal.Number.Integer */ - .mo { color: #A5D6FF } /* Literal.Number.Oct */ - .sa { color: #79C0FF } /* Literal.String.Affix */ - .sb { color: #A5D6FF } /* Literal.String.Backtick */ - .sc { color: #A5D6FF } /* Literal.String.Char */ - .dl { color: #79C0FF } /* Literal.String.Delimiter */ - .sd { color: #A5D6FF } /* Literal.String.Doc */ - .s2 { color: #A5D6FF } /* Literal.String.Double */ - .se { color: #79C0FF } /* Literal.String.Escape */ - .sh { color: #79C0FF } /* Literal.String.Heredoc */ - .si { color: #A5D6FF } /* Literal.String.Interpol */ - .sx { color: #A5D6FF } /* Literal.String.Other */ - .sr { color: #79C0FF } /* Literal.String.Regex */ - .s1 { color: #A5D6FF } /* Literal.String.Single */ - .ss { color: #A5D6FF } /* Literal.String.Symbol */ - .bp { color: #E6EDF3 } /* Name.Builtin.Pseudo */ - .fm { color: #D2A8FF; font-weight: bold } /* Name.Function.Magic */ - .vc { color: #79C0FF } /* Name.Variable.Class */ - .vg { color: #79C0FF } /* Name.Variable.Global */ - .vi { color: #79C0FF } /* Name.Variable.Instance */ - .vm { color: #79C0FF } /* Name.Variable.Magic */ - .il { color: #A5D6FF } /* Literal.Number.Integer.Long */ -} - -$copy_code_header_background: $ACCENT_COLOR !default; -$copy_code_border: 2px solid black !default; -.copy-code-container { - display: flex; - justify-content: space-between; - align-items: baseline; - font-family: "Cadman", sans-serif; - border-top-right-radius: $code_border_radius; - border-top-left-radius: $code_border_radius; - background-color: $copy_code_header_background; - border-left: $copy_code_border; - border-right: $copy_code_border; - border-top: $copy_code_border; -} - -.code-language-identifier { - font-style: italic; - margin-left: $MEDIUM_PADDING; -} - -.copy-code { - margin-right: $MEDIUM_PADDING; -} - -$inline_code_border_radius: $DEFAULT_BORDER_RADIUS !default;$inline_code_margin: 4px !default; -$inline_code_padding: $SMALL_PADDING $MEDIUM_PADDING !default; -.inline-code { - background-color: $code_background_color; - color: $code_font_color; - padding: $inline_code_padding; - display: inline-block; - margin: $inline_code_margin; - border-radius: $inline_code_border_radius; - font-size: 1em; - white-space: pre; -} - -$dialogs_padding: $ZERO_PADDING !default; -$dialogs_border_radius: $DEFAULT_BORDER_RADIUS !default; -$dialog_border: 2px solid black !default; -#delete-dialog, .lightbox-dialog { - padding: $dialogs_padding; - border-radius: $dialogs_border_radius; - border: $dialog_border; - box-shadow: 0 0 30px rgba(0, 0, 0, 0.25); -} - -$delete_dialog_padding: $BIG_PADDING !default; -.delete-dialog-inner { - display: flex; - flex-direction: column; - align-items: center; - padding: $delete_dialog_padding; -} - -$lightbox_background: $ACCENT_COLOR !default; -$lightbox_font_color: $DEFAULT_FONT_COLOR !default; -$lightbox_gap: $MEDIUM_PADDING !default; -$lightbox_inner_padding: $BIG_PADDING !default; -.lightbox-inner { - display: flex; - flex-direction: column; - padding: $lightbox_inner_padding; - min-width: 400px; - background-color: $lightbox_background; - color: $lightbox_font_color; - gap: $lightbox_gap; -} - -.lightbox-image { - max-width: 70vw; - max-height: 70vh; - object-fit: scale-down; -} - -.lightbox-nav { - display: flex; - justify-content: space-between; - align-items: center; -} - -$quote_padding: $MEDIUM_PADDING $BIG_PADDING !default; -$quote_margin: $MEDIUM_PADDING !default; -$quote_background_color: #00000026 !default; -$quote_border_radius: $DEFAULT_BORDER_RADIUS !default; -$quote_border_left: $MEDIUM_PADDING solid $LIGHT_2 !default; -blockquote { - padding: $quote_padding; - margin: $quote_margin; - border-radius: $quote_border_radius; - border-left: $quote_border_left; - background-color: $quote_background_color; -} - -$userpage_usercard_size: 300px !default; -$userpage_column_gap: $ZERO_PADDING !default; -.user-info { - display: grid; - grid-template-columns: $userpage_usercard_size 1fr; - grid-template-rows: 1fr; - gap: $userpage_column_gap; - grid-template-areas: - "user-page-usercard user-page-stats"; -} - -$user_page_usercard_padding: $BIG_PADDING $MEDIUM_PADDING !default; -$user_page_usercard_border: $usercard_border !default; -$user_page_usercard_background: $usercard_background !default; -$user_page_usercard_border_right: $usercard_border_right !default; -.user-page-usercard { - grid-area: user-page-usercard; - padding: $user_page_usercard_padding; - border: $user_page_usercard_border; - background-color: $DARK_1; - border-right: $user_page_usercard_border_right; -} - -$user_page_stats_padding: $BIG_PADDING $BIGGER_PADDING !default; -$user_page_stats_border: $DEFAULT_BORDER !default; -.user-page-stats { - grid-area: user-page-stats; - padding: $user_page_stats_padding; - border: $user_page_stats_border; -} - -$user_stats_list_margin: $ZERO_PADDING $ZERO_PADDING $MEDIUM_PADDING $ZERO_PADDING !default; -.user-stats-list { - list-style: none; - margin: $user_stats_list_margin; -} - -$user_page_posts_border: $DEFAULT_BORDER !default; -$user_page_posts_background: $ACCENT_COLOR !default; -.user-page-posts { - border-left: $user_page_posts_border; - border-right: $user_page_posts_border; - border-bottom: $user_page_posts_border; - background-color: $user_page_posts_background; -} - -$user_page_post_preview_max_height: 200px !default; -$user_page_post_preview_mask_image: linear-gradient(180deg,#000 60%,transparent) !default; -.user-page-post-preview { - max-height: $user_page_post_preview_max_height; - mask-image: $user_page_post_preview_mask_image; -} - -$avatar_width: 90% !default; -$avatar_height: 90% !default; -$avatar_margin_bottom: $MEDIUM_PADDING !default; -.avatar { - width: $avatar_width; - height: $avatar_height; - object-fit: contain; - margin-bottom: $avatar_margin_bottom; -} - -.username-link { - overflow-wrap: anywhere; -} - -.user-status { - text-align: center; -} - -button, input[type="submit"], .linkbutton { - display: inline-block; - @include button($BUTTON_COLOR, $BUTTON_FONT_COLOR); - - &.critical { - @include button($BUTTON_COLOR_CRITICAL, $BUTTON_CRITICAL_FONT_COLOR); - } - - &.warn { - @include button($BUTTON_COLOR_WARN, $BUTTON_WARN_FONT_COLOR); - } -} - -// not sure why this one has to be separate, but if it's included in the rule above everything breaks -input[type="file"]::file-selector-button { - @include button($BUTTON_COLOR, $BUTTON_FONT_COLOR); - margin: $MEDIUM_PADDING; -} - -$para_margin: $MEDIUM_PADDING $ZERO_PADDING !default; -p { - margin: $para_margin; -} - -$pagebutton_padding: $SMALL_PADDING $SMALL_PADDING !default; -$pagebutton_margin: $ZERO_PADDING !default; -$pagebutton_min_width: $BIG_PADDING !default; -.pagebutton { - @include button($BUTTON_COLOR, $BUTTON_FONT_COLOR); - padding: $pagebutton_padding; - margin: $pagebutton_margin; - display: inline-block; - min-width: $pagebutton_min_width; - text-align: center; -} - -.currentpage { - @extend %button-base; - border: none; - padding: $pagebutton_padding; - margin: $pagebutton_margin; - display: inline-block; - min-width: $pagebutton_min_width; - text-align: center; -} - -.modform { - display: inline; -} - -$avatar_form_padding: $BIG_PADDING $ZERO_PADDING !default; -.avatar-form { - display: flex; - flex-direction: column; - align-items: center; - padding: $avatar_form_padding; -} - -$text_input_border: $DEFAULT_BORDER !default; -$text_input_border_radius: $DEFAULT_BORDER_RADIUS !default; -$text_input_padding: 7px $MEDIUM_PADDING !default; -$text_input_background: color.scale($ACCENT_COLOR, $lightness: 40%) !default; -$text_input_background_focus: color.scale($ACCENT_COLOR, $lightness: 60%) !default; -$text_input_font_color: $DEFAULT_FONT_COLOR !default; -input[type="text"], input[type="password"], textarea, select { - border: $text_input_border; - border-radius: $text_input_border_radius; - padding: $text_input_padding; - width: 100%; - resize: vertical; - color: $text_input_font_color; - background-color: $text_input_background; - font-size: 1em; - font-family: inherit; - - &:focus { - background-color: $text_input_background_focus; - } -} - -// lone required inputs managed by js -input:not(form input):invalid { - border: $DEFAULT_BORDER_INVALID; -} - -textarea { - font-family: "Atkinson Hyperlegible Mono", monospace; -} - -$infobox_info_color: #81a3e6 !default; -$infobox_critical_color: #ed8181 !default; -$infobox_warn_color: #fbfb8d !default; -$infobox_border: 2px solid black !default; -$infobox_padding: $BIG_PADDING $MEDIUM_BIG_PADDING !default; -$infobox_info_font_color: $DEFAULT_FONT_COLOR !default; -$infobox_critical_font_color: $DEFAULT_FONT_COLOR !default; -$infobox_warn_font_color: $DEFAULT_FONT_COLOR !default; -.infobox { - border: $infobox_border; - background-color: $infobox_info_color; - padding: $infobox_padding; - color: $infobox_info_font_color; - &.critical { - background-color: $infobox_critical_color; - color: $infobox_critical_font_color; - } - - &.warn { - background-color: $infobox_warn_color; - color: $infobox_warn_font_color; - } -} - -.infobox > span { - display: flex; - align-items: center; -} - -$infobox_icon_min_width: 60px !default; -$infobox_icon_padding_right: $MEDIUM_BIG_PADDING !default; -.infobox-icon-container { - min-width: $infobox_icon_min_width; - padding-right: $infobox_icon_padding_right; -} - -$thread_locked_icon_size: 96px !default; -$thread_column_gap: $ZERO_PADDING !default; -.thread { - display: grid; - grid-template-columns: $thread_locked_icon_size 1.6fr $thread_locked_icon_size; - grid-template-rows: 1fr; - gap: $thread_column_gap; - grid-auto-flow: row; - min-height: $thread_locked_icon_size; - grid-template-areas: - "thread-sticky-container thread-info-container thread-locked-container"; -} - -$thread_locked_border: 2px outset $LIGHT !default; -$thread_locked_background: none !default; -.thread-sticky-container { - grid-area: thread-sticky-container; - border: $thread_locked_border; - background-color: $thread_locked_background; -} - -.thread-locked-container { - grid-area: thread-locked-container; - border: $thread_locked_border; - background-color: $thread_locked_background; -} - -.contain-svg { - display: flex; - align-items: center; - justify-content: center; - flex-direction: column; - - &.inline { - display: inline-flex; - } -} - -svg.icon { - // pointer-events: none; -} - -$post_img_container_gap: $SMALL_PADDING !default; -.post-img-container { - display: flex; - flex-wrap: wrap; - gap: $post_img_container_gap; -} - -.post-image { - object-fit: contain; - max-width: 400px; - max-height: 400px; - min-width: 200px; - min-height: 200px; - flex: 1 1 0%; - width: auto; - height: auto; -} - -$thread_info_background_color: $ACCENT_COLOR !default; -$thread_info_padding: $SMALL_PADDING $BIG_PADDING !default; -$thread_info_border: $DEFAULT_BORDER !default; -$thread_info_max_height: 110px !default; -$thread_info_mask_image: $user_page_post_preview_mask_image !default; -.thread-info-container { - grid-area: thread-info-container; - background-color: $thread_info_background_color; - padding: $thread_info_padding; - border-top: $thread_info_border; - border-bottom: $thread_info_border; - display: flex; - flex-direction: column; - overflow: hidden; - max-height: $thread_info_max_height; - mask-image: $thread_info_mask_image; -} - -$thread_info_header_gap: $SMALL_PADDING !default; -.thread-info-header { - display: flex; - align-items: baseline; - justify-content: space-between; - gap: $thread_info_header_gap; -} - -$thread_info_post_preview_margin_right: $post_inner_padding_right !default; -.thread-info-post-preview { - overflow: hidden; - text-overflow: ellipsis; - display: inline; - margin-right: $thread_info_post_preview_margin_right; -} - -$guide_section_background: $ACCENT_COLOR !default; -$guide_section_padding: $SMALL_PADDING $BIG_PADDING !default; -$guide_section_border: $DEFAULT_BORDER !default; -$guide_section_padding_right: $post_inner_padding_right !default; -.guide-section { - background-color: $guide_section_background; - padding: $guide_section_padding; - border: $guide_section_border; - padding-right: $guide_section_padding_right; -} - -$guide_toc_width: 300px !default; -$guide_column_guide: $ZERO_PADDING !default; -.guide-container { - display: grid; - grid-template-columns: 1.5fr $guide_toc_width; - grid-template-rows: 1fr; - gap: $guide_column_guide; - grid-auto-flow: row; - grid-template-areas: - "guide-topics guide-toc"; -} - -.guide-topics { - grid-area: guide-topics; - overflow: hidden; -} - -$guide_toc_padding: $MEDIUM_PADDING !default; -$guide_toc_background: $BUTTON_COLOR !default; -$guide_toc_border_radius: 8px !default; -$guide_toc_border: $DEFAULT_BORDER !default; -.guide-toc { - grid-area: guide-toc; - position: sticky; - top: 100px; - align-self: start; - padding: $guide_toc_padding; - border-bottom-right-radius: $guide_toc_border_radius; - background-color: $guide_toc_background; - border-right: $guide_toc_border; - border-top: $guide_toc_border; - border-bottom: $guide_toc_border; -} - -.emoji-table tr td { - text-align: center; -} - -.emoji-table tr th { - padding-left: 50px; - padding-right: 50px; -} - -.emoji-table { - margin: auto; -} - -$emoji_table_border: $DEFAULT_BORDER !default; -.emoji-table, th, td { - border: $emoji_table_border; - border-collapse: collapse; -} - -$colorful_table_margin: $MEDIUM_PADDING $ZERO_PADDING !default; -.colorful-table { - border-collapse: collapse; - width: 100%; - margin: $colorful_table_margin; - // overflow: hidden; -} - -$colorful_table_th_color: $BUTTON_COLOR_2 !default; -$colorful_table_tr_padding: $SMALL_PADDING $ZERO_PADDING !default; -.colorful-table tr th { - background-color: $colorful_table_th_color; - padding: $colorful_table_tr_padding; -} - -$colorful_table_td_color: $BUTTON_COLOR !default; -.colorful-table tr td { - background-color: $colorful_table_td_color; - padding: $colorful_table_tr_padding; - text-align: center; -} - -$colorful_table_small_tr_width: 250px !default; -.colorful-table .small { - width: $colorful_table_small_tr_width; -} - -$topic_locked_icon_size: $thread_locked_icon_size !default; -$topic_column_gap: $ZERO_PADDING !default; -.topic { - display: grid; - grid-template-columns: 1.5fr $topic_locked_icon_size; - grid-template-rows: 1fr; - gap: $topic_column_gap; - grid-auto-flow: row; - grid-template-areas: - "topic-info-container topic-locked-container"; -} - -$topic_info_background: $ACCENT_COLOR !default; -$topic_info_padding: $SMALL_PADDING $BIG_PADDING !default; -$topic_info_border: $DEFAULT_BORDER !default; -.topic-info-container { - grid-area: topic-info-container; - background-color: $topic_info_background; - padding: $topic_info_padding; - border: $topic_info_border; - display: flex; - flex-direction: column; -} - -$topic_locked_border: $thread_locked_border !default; -$topic_locked_background: none !default; -.topic-locked-container { - grid-area: topic-locked-container; - border: $topic_locked_border; - background-color: $topic_locked_background; -} - -$post_editing_header_color: $LIGHT !default; -.editing { - background-color: $post_editing_header_color; -} - -$post_editing_context_margin: $BIG_PADDING $ZERO_PADDING !default; -.context-explain { - margin: $post_editing_context_margin; - display: flex; - justify-content: space-evenly; -} - -.post-edit-form { - display: flex; - flex-direction: column; - align-items: baseline; - height: 100%; -} - -.babycode-editor { - height: 150px; -} - -.babycode-editor-container { - width: 100%; -} - -.babycode-preview-errors-container { - font-size: 0.8em; -} - -$tab_button_color: $BUTTON_COLOR !default; -$tab_button_active_color: $BUTTON_COLOR_2 !default; -$tab_button_font_color: $BUTTON_FONT_COLOR !default; -.tab-button { - @include button($tab_button_color, $tab_button_font_color); - border-bottom: none; - border-bottom-left-radius: 0; - border-bottom-right-radius: 0; - margin-bottom: 0; - - &.active { - background-color: $tab_button_active_color; - padding-top: 8px; - } -} - -$tab_content_background: color.adjust($BUTTON_COLOR_2, $saturation: -20%) !default; -$tab_content_border: $DEFAULT_BORDER !default; -$tab_content_padding: $MEDIUM_PADDING !default; -$tab_content_border_radius: $DEFAULT_BORDER_RADIUS !default; -.tab-content { - display: none; - - &.active { - min-height: 250px; - display: block; - background-color: $tab_content_background; - border: $tab_content_border; - padding: $tab_content_padding; - border-top-right-radius: $tab_content_border_radius; - border-bottom-right-radius: $tab_content_border_radius; - border-bottom-left-radius: $tab_content_border_radius; - } -} - -$list_margin: $MEDIUM_PADDING $ZERO_PADDING $MEDIUM_PADDING $BIGGER_PADDING !default; -$list_padding: $ZERO_PADDING !default; -ul, ol { - margin: $list_margin; - padding: $list_padding; -} - -$horizontal_list_margin_left: 0 !default; -ul.horizontal, ol.horizontal { - display: inline; - margin-left: $horizontal_list_margin_left; - & li { - display: inline list-item; - } -} - -.new-concept-notification.hidden { - display: none; -} - -$new_notification_offset: 80px !default; -$new_notification_border: $DEFAULT_BORDER !default; -$new_notification_border_radius: $DEFAULT_BORDER_RADIUS !default; -$new_notification_background: $infobox_info_color !default; -$new_notification_padding: $BIG_PADDING $MEDIUM_BIG_PADDING !default; -.new-concept-notification { - position: fixed; - bottom: $new_notification_offset; - right: $new_notification_offset; - border: $new_notification_border; - background-color: $new_notification_background; - padding: $new_notification_padding; - border-radius: $new_notification_border_radius; - box-shadow: 0 0 30px rgba(0, 0, 0, 0.25); -} - -.emoji { - max-width: 15px; // these are not meant to be themed - max-height: 15px; -} - -$accordion_border_radius: $DEFAULT_BORDER_RADIUS !default; -$accordion_border: $DEFAULT_BORDER !default; -$accordion_margin: $MEDIUM_PADDING $SMALL_PADDING !default; -.accordion { - border-top-right-radius: $accordion_border_radius; - border-top-left-radius: $accordion_border_radius; - border: $accordion_border; - margin: $accordion_margin; - overflow: hidden; // for border-radius clipping -} - -.accordion.hidden { - border-bottom: none; -} - -$accordion_header_background: $ACCORDION_COLOR !default; -$accordion_header_padding: $ZERO_PADDING $MEDIUM_PADDING !default; -$accordion_header_column_gap: $MEDIUM_PADDING !default; -$accordion_header_border_bottom: $DEFAULT_BORDER !default; -.accordion-header { - display: flex; - align-items: center; - background-color: $accordion_header_background; - padding: $accordion_header_padding; - gap: $accordion_header_column_gap; - border-bottom: $accordion_header_border_bottom; -} - -$accordion_button_size: 36px !default; -.accordion-toggle { - padding: 0; - width: $accordion_button_size; - height: $accordion_button_size; - min-width: $accordion_button_size; - min-height: $accordion_button_size; -} - -.accordion-title { - margin-right: auto; - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; -} - -$accordion_content_padding: $ZERO_PADDING $MEDIUM_BIG_PADDING !default; -.accordion-content { - padding: $accordion_content_padding; -} - -.accordion-content.hidden { - display: none; -} - -$post_accordion_content_padding_top: $MEDIUM_PADDING !default; -$post_accordion_content_padding_bottom: $MEDIUM_PADDING !default; -$post_accordion_content_background: $MAIN_BG !default; -.post-accordion-content { - padding-top: $post_accordion_content_padding_top; - padding-bottom: $post_accordion_content_padding_bottom; - background-color: $post_accordion_content_background; -} - -$inbox_padding: $MEDIUM_PADDING !default; -.inbox-container { - padding: $inbox_padding; -} - -$babycode_button_container_column_gap: $SMALL_PADDING !default; -.babycode-button-container { - display: flex; - gap: $babycode_button_container_column_gap; - flex-wrap: wrap; -} - -$babycode_button_padding: $SMALL_PADDING $MEDIUM_PADDING !default; -$babycode_button_min_width: $accordion_button_size !default; -.babycode-button { - padding: $babycode_button_padding; - min-width: $babycode_button_min_width; -} - -$quote_fragment_background_color: #00000080 !default; -$quote_fragment_border_radius: $DEFAULT_BORDER_RADIUS !default; -$quote_fragment_padding: $SMALL_PADDING $MEDIUM_PADDING !default; -.quote-popover { - position: absolute; - transform: translateX(-50%); - margin: 0; - border: none; - border-radius: $quote_fragment_border_radius; - background-color: $quote_fragment_background_color; - padding: $SMALL_PADDING $MEDIUM_PADDING; -} - -$footer_border_top: $DEFAULT_BORDER !default; -footer { - border-top: $footer_border_top; -} - -$reaction_button_active_color: $BUTTON_COLOR_2 !default; -$reaction_button_active_font_color: $BUTTON_FONT_COLOR !default; -.reaction-button.active { - @include button($reaction_button_active_color, $reaction_button_active_font_color); -} - -$reaction_popover_border_radius: $DEFAULT_BORDER_RADIUS !default; -$reaction_popover_background: $quote_fragment_background_color !default; -$reaction_popover_padding: $SMALL_PADDING $MEDIUM_PADDING !default; -.reaction-popover { - position: relative; - margin: 0; - border: none; - border-radius: $reaction_popover_border_radius; - background-color: $reaction_popover_background; - padding: $reaction_popover_padding; - width: 250px; -} - -.reaction-popover-inner { - display: flex; - flex-wrap: wrap; - overflow: scroll; - margin: auto; - justify-content: center; -} - -$guide_list_border: 1px dashed !default; -.guide-list { - border-bottom: $guide_list_border; -} - -.bookmark-dropdown-inner { - position: relative; -} - -$bookmarks_dropdown_background_color: $ACCENT_COLOR !default; -$bookmarks_dropdown_border_radius: $DEFAULT_BORDER_RADIUS !default; -$bookmarks_dropdown_border: $button_border !default; -$bookmarks_dropdown_shadow: 0 0 30px rgba(0, 0, 0, 0.25) !default; -$bookmarks_dropdown_width: 400px !default; -$bookmarks_dropdown_padding: $MEDIUM_PADDING !default; -.bookmarks-dropdown { - background-color: $bookmarks_dropdown_background_color; - border: $bookmarks_dropdown_border; - border-radius: $bookmarks_dropdown_border_radius; - box-shadow: $bookmarks_dropdown_shadow; - position: absolute; - margin: 0; - min-width: $bookmarks_dropdown_width; - max-width: $bookmarks_dropdown_width; - padding: $bookmarks_dropdown_padding; - z-index: 100; - color: unset; -} - -$bookmark_dropdown_item_padding: $MEDIUM_PADDING 0 !default; -$bookmark_dropdown_item_margin: $MEDIUM_PADDING 0 !default; -$bookmark_dropdown_item_font_color: $BUTTON_FONT_COLOR !default; -$bookmark_dropdown_item_background: $BUTTON_COLOR !default; -$bookmark_dropdown_item_background_hover: $BUTTON_COLOR_HOVER !default; -$bookmark_dropdown_item_background_selected: $BUTTON_COLOR_2 !default; -$bookmark_dropdown_item_background_selected_hover: $BUTTON_COLOR_2_HOVER !default; -$bookmark_dropdown_item_icon_size: 24px !default; -$bookmark_dropdown_item_icon_padding: 0 $BIG_PADDING !default; -.bookmark-dropdown-item { - display: flex; - justify-content: space-between; - padding: $bookmark_dropdown_item_padding; - margin: $bookmark_dropdown_item_margin; - cursor: pointer; - border: $button_border; - border-radius: $button_border_radius; - color: $bookmark_dropdown_item_font_color; - - background-color: $bookmark_dropdown_item_background; - &:hover { - background-color: $bookmark_dropdown_item_background_hover; - } - - &::before { - content: ''; - background-color: currentColor; - mask: url('data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Crect%20x%3D%221.5%22%20y%3D%221.5%22%20width%3D%2221%22%20height%3D%2221%22%20rx%3D%223%22%20stroke%3D%22currentColor%22%20stroke-width%3D%223%22%20fill%3D%22none%22%2F%3E%3C%2Fsvg%3E') center/contain no-repeat; - width: $bookmark_dropdown_item_icon_size; - height: $bookmark_dropdown_item_icon_size; - padding: $bookmark_dropdown_item_icon_padding; - flex-shrink: 0; - } - - &.selected { - background-color: $bookmark_dropdown_item_background_selected; - &:hover { - background-color: $bookmark_dropdown_item_background_selected_hover; - } - - &::before{ - mask: url('data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Crect%20x%3D%221.5%22%20y%3D%221.5%22%20width%3D%2221%22%20height%3D%2221%22%20rx%3D%223%22%20stroke%3D%22currentColor%22%20stroke-width%3D%223%22%20fill%3D%22none%22%2F%3E%3Crect%20x%3D%225%22%20y%3D%225%22%20width%3D%2214%22%20height%3D%2214%22%20rx%3D%222%22%20stroke%3D%22none%22%20fill%3D%22currentColor%22%2F%3E%3C%2Fsvg%3E') center/contain no-repeat; - } - } -} - -.bookmarks-dropdown-header { - display: flex; - justify-content: space-between; -} - -.bookmark-dropdown-item-name { - overflow: hidden; - text-overflow: ellipsis; -} - -$bookmark_dropdown_item_stats_padding: 0 $MEDIUM_PADDING !default; -.bookmark-dropdown-item-stats { - padding: $bookmark_dropdown_item_stats_padding; - flex-shrink: 0; - margin-left: auto; -} - -$bookmark_dropdown_items_container_max_height: 300px !default; -.bookmark-dropdown-items-container { - max-height: $bookmark_dropdown_items_container_max_height; - overflow: scroll; -} - -$motd_background_color: $ACCENT_COLOR !default; -$motd_border: 2px outset $LIGHT !default; -$motd_padding: $MEDIUM_PADDING $MEDIUM_BIG_PADDING !default; -$motd_margin: $MEDIUM_PADDING 0 !default; -.motd { - display: flex; - background-color: $motd_background_color; - border: $motd_border; - padding: $motd_padding; - margin: $motd_margin; -} - -$motd_icon_min_width: 80px !default; -$motd_icon_padding_right: $MEDIUM_BIG_PADDING !default; -.motd-icon-container { - display: flex; - min-width: $motd_icon_min_width; - padding-right: $motd_icon_padding_right; -} - -$motd_content_padding_right: 25% !default; -.motd-content-container { - display: flex; - flex-direction: column; - align-self: center; - flex-grow: 1; - padding-right: $motd_content_padding_right; -} - -.motd-title { - font-weight: bold; - font-size: larger; -} - -$mention_font_color: $DEFAULT_FONT_COLOR_INVERSE !default; -$mention_font_color_hover: $DEFAULT_FONT_COLOR !default; -$mention_background_color: $DARK_2 !default; -$mention_background_color_me: color.adjust($DARK_2, $hue: 90) !default; -$mention_background_color_hover: $LIGHT_2 !default; -$mention_border_me: 1px dashed; -$mention_padding: $SMALL_PADDING !default; -$mention_border_radius: $DEFAULT_BORDER_RADIUS !default; -a.mention, a.mention:visited { - display: inline-block; - color: $mention_font_color; - background-color: $mention_background_color; - padding: $mention_padding; - border-radius: $mention_border_radius; - text-decoration: none; - - &.display { - text-decoration: underline; - text-decoration-style: dashed; - } - - &.me { - background-color: $mention_background_color_me; - border: $mention_border_me; - } - - &:hover { - background-color: $mention_background_color_hover; - color: $mention_font_color_hover; - } -} - -$settings_grid_gap: $MEDIUM_PADDING !default; -$settings_grid_item_min_width: 600px !default; -$settings_grid_fieldset_border: 1px solid $DEFAULT_FONT_COLOR_INVERSE !default; -$settings_grid_fieldset_border_radius: $DEFAULT_BORDER_RADIUS !default; -$settings_grid_fieldset_background_color: $DARK_1_LIGHTER !default; -.settings-grid { - display: grid; - gap: $settings_grid_gap; - - --grid-item-max-width: calc((100% - #{$settings_grid_gap}) / 2); - grid-template-columns: repeat(auto-fill, minmax(max($settings_grid_item_min_width, var(--grid-item-max-width)), 1fr)); - - & fieldset { - border: $settings_grid_fieldset_border; - border-radius: $settings_grid_fieldset_border_radius; - background-color: $settings_grid_fieldset_background_color; - } -} - -.hfc { - height: fit-content; -} - -$compact_h1_margin: $ZERO_PADDING !default; -h1 { - margin: $compact_h1_margin; -} - -$settings_badge_container_gap: $SMALL_PADDING !default; -$settings_badge_container_border: $DEFAULT_BORDER !default; -$settings_badge_container_border_invalid: $DEFAULT_BORDER_INVALID !default; -$settings_badge_container_border_radius: $DEFAULT_BORDER_RADIUS !default; -$settings_badge_container_padding: $SMALL_PADDING $MEDIUM_PADDING !default; -$settings_badge_container_margin: $MEDIUM_PADDING $ZERO_PADDING !default; -.settings-badge-container { - display: flex; - align-items: baseline; - gap: $settings_badge_container_gap; - border: $settings_badge_container_border; - border-radius: $settings_badge_container_border_radius; - padding: $settings_badge_container_padding; - margin: $settings_badge_container_margin; - - // the file picker's validity is managed by js - // so we got lucky here. when the file picker - // is hidden, its set to be valid. it's only invalid - // when, well, invalid. - &:has(input:invalid) { - border: $settings_badge_container_border_invalid; - } - - input:invalid { - border: $settings_badge_container_border_invalid; - } -} - -.settings-badge-file-picker { - display: flex; - flex-direction: column; - align-items: center; - - & input.hidden[type=file] { - width: 100%; - - &::file-selector-button { - display: none; - } - } - - &.hidden { - display: none; - } -} - -$settings_badge_select_gap: $SMALL_PADDING !default; -$settings_badge_select_min_width: 200px !default; -.settings-badge-select { - display: flex; - flex-direction: column; - gap: $settings_badge_select_gap; - align-items: center; - min-width: $settings_badge_select_min_width; -} - -img.badge-button { - min-width: 88px; - min-height: 31px; - max-width: 88px; - max-height: 31px; -} - -$badges_container_gap: $SMALL_PADDING !default; -.badges-container { - display: flex; - flex-wrap: wrap; - justify-content: center; - gap: $badges_container_gap; -} - -$rss_button_color: #fba668 !default; -$rss_button_color_hover: color.scale($rss_button_color, $lightness: 20%) !default; -$rss_button_color_active: color.scale($rss_button_color, $lightness: -10%, $saturation: -70%) !default; -$rss_button_font_color: black !default; -$rss_button_font_color_hover: black !default; -$rss_button_font_color_active: black !default; -.rss-button { - background-color: $rss_button_color; - color: $rss_button_font_color; - - &:hover { - background-color: $rss_button_color_hover; - color: $rss_button_font_color_hover; - } - - &:active { - background-color: $rss_button_color_active; - color: $rss_button_font_color_active; - } -} - -@media (orientation: portrait) { - $body_portrait_margin: $BIG_PADDING $ZERO_PADDING !default; - body { - margin: $body_portrait_margin; - } - - .guide-container { - grid-template-areas: - "guide-toc" - "guide-topics"; - grid-template-columns: unset; - } - - .guide-toc { - position: unset; - } - - $guide_section_padding_right_portrait: $BIG_PADDING !default; - .guide-section { - padding-right: $guide_section_padding_right_portrait; - } -} - -$sortable_item_background: $ACCENT_COLOR !default; -$sortable_item_dragged_color: $BUTTON_COLOR !default; -$sortable_item_immovable_color: $BUTTON_COLOR_2 !default; -$sortable_item_padding: $BIG_PADDING !default; -$sortable_item_margin: $MEDIUM_BIG_PADDING 0 !default; -$sortable_item_border: 5px outset !default; -$sortable_item_border_top: $sortable_item_border $LIGHT !default; -$sortable_item_border_bottom: $sortable_item_border $DARK_2 !default; -$sortable_item_gap: $MEDIUM_PADDING !default; -ol.sortable-list { - list-style: none; - flex-grow: 1; - margin: 0; - - li { - display: flex; - gap: $sortable_item_gap; - background-color: $sortable_item_background; - padding: $sortable_item_padding; - margin: $sortable_item_margin; - border-top: $sortable_item_border_top; - border-bottom: $sortable_item_border_bottom; - } - - li.dragged { - background-color: $sortable_item_dragged_color; - } - - li.immovable { - background-color: $sortable_item_immovable_color; - } - - li.immovable .dragger { - cursor: not-allowed; - } -} - -$sortable_item_grabber_padding: $SMALL_PADDING $MEDIUM_PADDING !default; -.dragger { - display: flex; - align-items: center; - background-color: $DARK_2; - padding: $sortable_item_grabber_padding; - cursor: move; -} - -$sortable_item_inner_gap: $MEDIUM_PADDING !default; -.sortable-item-inner { - display: flex; - gap: $sortable_item_inner_gap; - flex-grow: 1; - flex-direction: column; - - & > * { - flex-grow: 1; - } - - &.row { - flex-direction: row; - } - - &:not(.row) > * { - margin-right: auto; - } -} - -.fg { - flex-grow: 1; -} diff --git a/sass/otomotone.scss b/sass/otomotone.scss deleted file mode 100644 index 5cf8f75..0000000 --- a/sass/otomotone.scss +++ /dev/null @@ -1,117 +0,0 @@ -$fc: #e6e6e6; -$fci: black; - -$lightish_accent: #503250; -$lightish_accent2: #502d50; -$dark_accent: #231c23; - -$warn: #eaea6a; -$crit: #d53232; - -$br: 8px; - -@use 'default' with ( - $ACCENT_COLOR: #9b649b, - - $MAIN_BG: #220d16, - $DARK_1: $lightish_accent2, - $DARK_3: #302731, - - $LIGHT_2: #ae6bae, - $LIGHT: $lightish_accent, - - $DEFAULT_FONT_COLOR: $fc, - $DEFAULT_FONT_COLOR_INVERSE: $fci, - - $BUTTON_COLOR: #3c283c, - $BUTTON_COLOR_2: #8a5584, - $BUTTON_FONT_COLOR: $fc, - $BUTTON_COLOR_WARN: $warn, - $BUTTON_WARN_FONT_COLOR: $fci, - $BUTTON_COLOR_CRITICAL: $crit, - $BUTTON_CRITICAL_FONT_COLOR: $fc, - $ACCORDION_COLOR: #7d467d, - - $DEFAULT_BORDER_RADIUS: $br, - - $bottomnav_color: $dark_accent, - - $topic_info_background: $dark_accent, - $topic_locked_background: $lightish_accent, - $thread_locked_background: $lightish_accent, - $thread_locked_border: 2px outset $dark_accent, - - $site_title_color: white, - $topnav_color: #303030, - - $quote_background_color: #fbafcf0a, - - $link_color: #e87fe1, - $link_color_visited: #ed4fb1, - - $post_info_background: #412841, - $post_content_background: $dark_accent, - - $thread_info_background_color: $dark_accent, - $motd_background_color: $lightish_accent, - - $post_reactions_background: $lightish_accent, - - $post_accordion_content_background: #2d212d, - - $guide_toc_background: #3c233c, - $guide_section_background: $dark_accent, - - $text_input_background: #371e37, - $text_input_background_focus: #514151, - $text_input_font_color: $fc, - - $colorful_table_th_color: $lightish_accent, - $colorful_table_td_color: $dark_accent, - - $lightbox_background: $lightish_accent, - - $infobox_info_color: #775891, - $infobox_warn_color: $warn, - $infobox_warn_font_color: $fci, - $infobox_critical_color: $crit, - - $tab_content_background: $lightish_accent, - $tab_button_active_color: #8a5584, - - $bookmarks_dropdown_background_color: $lightish_accent, - - $mention_font_color: $fc, - - $settings_grid_fieldset_background_color: $lightish_accent, - - // $settings_badge_container_border_invalid: 2px dashed $crit, -); - -#topnav { - margin-bottom: 10px; - border: 10px solid rgb(40, 40, 40); -} - -#bottomnav { - margin-top: 10px; - border: 10px solid rgb(40, 40, 40); -} - -footer { - margin-top: 10px; -} - -.infobox, .motd { - border-radius: $br; -} - -.thread-sticky-container { - border-top-left-radius: $br; - border-bottom-left-radius: $br; -} - -.thread-locked-container { - border-top-right-radius: $br; - border-bottom-right-radius: $br; -} diff --git a/sass/peachy.scss b/sass/peachy.scss deleted file mode 100644 index 4dccf8f..0000000 --- a/sass/peachy.scss +++ /dev/null @@ -1,89 +0,0 @@ -// $accent: #dd5536; -$accent: #f27a5a; - -$br: 16px; - -@use 'default' with ( - $ACCENT_COLOR: $accent, - $thread_locked_background: $accent, - $topic_locked_background: $accent, - - // $DARK_1: #e36286, - $DARK_1: #88486d, - $MAIN_BG: #c85d45, - - $usercard_border: none, - $usercard_border_right: none, - $thread_locked_border: 1px solid black, - $motd_border: 1px solid black, - - $PAGE_SIDE_MARGIN: 50px, - - $link_color: black, - $link_color_visited: black, - $reaction_button_active_font_color: white, - // $DEFAULT_FONT_COLOR: white, - // $DEFAULT_FONT_COLOR_INVERSE: black, - - $text_input_font_color: black, - - $BUTTON_COLOR: $accent, - $BUTTON_COLOR_2: #b54444, - $BUTTON_COLOR_CRITICAL: #f73030, - $ACCORDION_COLOR: #c6655b, - $BUTTON_WARN_FONT_COLOR: black, - $BUTTON_CRITICAL_FONT_COLOR: white, - - $SMALL_PADDING: 3px, - $MEDIUM_PADDING: 6px, - $MEDIUM_BIG_PADDING: 8px, - $BIG_PADDING: 12px, - $BIGGER_PADDING: 16px, - - $DEFAULT_BORDER_RADIUS: $br, - $code_border_radius: $br, - $button_padding: 8px 12px, - $reduced_button_padding: 6px, - - $post_reactions_border_top: 2px dotted #f7bfdf, - - $post_info_min_height: 35px, - $post_reactions_padding: 6px 12px, - $post_reactions_gap: 6px, - - $text_input_padding: 8px, - - $infobox_info_color: #81a3e6, - $infobox_critical_color: #f73030, - $infobox_warn_color: #fbfb8d, - - $infobox_info_font_color: black, - $infobox_critical_font_color: white, - $infobox_warn_font_color: black, - - $pagebutton_min_width: 36px, - $quote_background_color: #0002, - - $bookmark_dropdown_item_icon_padding: 0 24px, -); - -#topnav { - border-top-left-radius: $br; - border-top-right-radius: $br; -} - -#bottomnav { - color: white; -} - -textarea { - padding: 12px 16px; -} - -#footer { - border-radius: $br; - border-top-left-radius: 0; - border-top-right-radius: 0; - border: none; - text-align: center; -} diff --git a/sass/snow-white.scss b/sass/snow-white.scss deleted file mode 100644 index 86d03c0..0000000 --- a/sass/snow-white.scss +++ /dev/null @@ -1,7 +0,0 @@ -// a simple light theme - -@use 'default' with ( - $ACCENT_COLOR: #ced9ee, - $link_color: #711579, - $link_color_visited: #4a144f, -)