~lown/openorb

ef02aaf32fd56f40eb65b95fc80350f9ea1de92a — Alex S a month ago f1a2d01 main
Adds Templating for new config items

User can now set instance_info, instance_title, and logo.
3 files changed, 21 insertions(+), 9 deletions(-)

M app/templates/about.html
M app/templates/base.html
M data/config.example.toml
M app/templates/about.html => app/templates/about.html +7 -1
@@ 1,6 1,12 @@
{% extends 'base.html' %}

{% block content %}
{% if config.instance_info %}
<h2>About this instance</h2>

<p>{{ config.instance_info|safe }}</p>

{% endif %}
<h2>About OpenOrb</h2>

<p>OpenOrb is a curated search engine for Atom and RSS feeds.</p>


@@ 33,4 39,4 @@ feeds.</p>

<p>The OpenOrb icon is by <a href="https://thenounproject.com/icon/crystal-ball-5331537/">Maxicons from Noun Project</a> (CC BY 3.0).</p>

{% endblock %}
\ No newline at end of file
{% endblock %}

M app/templates/base.html => app/templates/base.html +3 -4
@@ 1,6 1,6 @@
<html lang="en">
    <head>
        <title>OpenOrb</title>
        <title>{{ config.instance_title|default('OpenOrb') }}</title>
        <meta charset="utf-8" />
        <meta name="viewport" content="width=device-width, initial-scale=1" />
        <link


@@ 23,9 23,8 @@
            <h1>
                <img
                    id="header__icon"
                    src="{{ url_for('static', filename='crystal-ball.svg') }}"
                />
                OpenOrb
                    src="{% if config.logo %}{{ config.logo }}{% else %}{{ url_for('static', filename='crystal-ball.svg') }}{% endif %}"
                />{{ config.instance_title|default('OpenOrb') }}
            </h1>
            <nav>
                <ul hx-boost="true">

M data/config.example.toml => data/config.example.toml +11 -4
@@ 1,19 1,26 @@
# Show at the top of the page.
# Show at the top of every page.
curator = "Orb Ponderer"
curator_url = "https://pondering.orb"

# Defaults to 'OpenOrb'
# instance_title = ""

# Shown on the 'About' page if provided.
# instance_info = """
#   <p>This is a multiline Paragraph</p>
#
#   <p>You can add as many lines as you need here.</p>
# """
# logo = 
# ""

# An image URL to replace the default logo - can be absolute
# ('https://example.com/image.png') or relative ('/image.png')
# logo = ""

feeds = [
    "http://cavegirlgames.blogspot.com/feeds/posts/default",
    "https://tenfootpole.org/ironspike/?feed=rss2",
    "http://questingblog.com/feed/",
    "https://goblinpunch.blogspot.com/feeds/posts/default"
    "https://goblinpunch.blogspot.com/feeds/posts/default",
]

# In search results, only show posts with a score of at least this value