From a7134f4b4d2454fdfb34900913d1123390b980e2 Mon Sep 17 00:00:00 2001 From: Flancian <0@flancia.org> Date: Fri, 12 Mar 2021 21:49:59 +0100 Subject: [PATCH] Fool around with topline for way too long :) --- app/agora.py | 5 ++-- app/static/css/screen-dark.css | 19 ++++++++++---- app/templates/base.html | 45 ++++++++++++++++++++-------------- 3 files changed, 43 insertions(+), 26 deletions(-) diff --git a/app/agora.py b/app/agora.py index a3618dd4b..94c0f4c99 100644 --- a/app/agora.py +++ b/app/agora.py @@ -17,6 +17,7 @@ import jsons from flask import Blueprint, url_for, render_template, current_app, Response, redirect, request, jsonify from markupsafe import escape from slugify import slugify, SLUG_OK +from urllib.parse import parse_qs from . import config from . import db from . import feed @@ -143,7 +144,7 @@ def push(node, other): @bp.route('/exec') @bp.route('/search') @bp.route('/jump') -def jump(): +def search(): """Redirects to an appropriate context. Originally called "jump" because in the [[agora]] nodes *always* exist, as they map 1:1 to all possible queries. Thus [[agora search]]. """ @@ -152,7 +153,7 @@ def jump(): # hack hack # [[push]] [[2021-02-28]] in case I don't get to it today. if tokens[0] == 'go' and len(tokens) > 1: - return redirect(url_for('.go', node=slugify(q[3:]))) + return redirect(url_for('.go', node=slugify(" ".join(tokens[1:])))) return redirect(url_for('.node', node=slugify(q))) # Entities diff --git a/app/static/css/screen-dark.css b/app/static/css/screen-dark.css index 220bb4408..f1a13cc21 100644 --- a/app/static/css/screen-dark.css +++ b/app/static/css/screen-dark.css @@ -48,7 +48,6 @@ nav { font-family: sans-serif} } .navigation { - width: 100%; vertical-align: middle; overflow-y: auto; margin-bottom: 10px; @@ -67,13 +66,23 @@ nav { font-family: sans-serif} .navigation-item { } -.mini-cli { - width: 350px; - height: 20px; - line-height: 20px; +.topline-container { + display: flex; +} +.topline-home { + margin-right: 10px; +} + +.topline-cli { + margin-right: 10px; +} + +.topline-icons { + flex-grow: 1; } .mini-search { + padding-top: 10px; padding-bottom: 10px; border-bottom: 1px solid grey; } diff --git a/app/templates/base.html b/app/templates/base.html index f1836db5d..77067c587 100644 --- a/app/templates/base.html +++ b/app/templates/base.html @@ -29,7 +29,7 @@ - +