added about page and local ipfs

main
lza_menace 3 years ago
parent 5719ea1c7e
commit 2756dbff4a

@ -4,9 +4,10 @@ from dotenv import load_dotenv
load_dotenv() load_dotenv()
# App # App
SECRET_KEY = getenv('SECRET_KEY', 'yyyyyyyyyyyyy') # whatever you want it to be SECRET_KEY = getenv('SECRET_KEY', 'yyyyyyyyyyyyy') # whatever you want it to be
DATA_FOLDER = getenv('DATA_FOLDER', '/path/to/uploads') # some stable storage path DATA_FOLDER = getenv('DATA_FOLDER', '/path/to/uploads') # some stable storage path
SERVER_NAME = getenv('SERVER_NAME', '127.0.0.1:5000') # name of your DNS resolvable site (.com) SERVER_NAME = getenv('SERVER_NAME', '127.0.0.1:5000') # name of your DNS resolvable site (.com)
IPFS_SERVER = getenv('IPFS_SERVER', 'http://127.0.0.1:8080') # ip/endpoint of ipfs explorer
# Cache # Cache
CACHE_HOST = getenv('CACHE_HOST', 'localhost') CACHE_HOST = getenv('CACHE_HOST', 'localhost')

@ -28,6 +28,10 @@ def index():
# total_supply = contract.functions.totalSupply().call() # total_supply = contract.functions.totalSupply().call()
return render_template('index.html', memes=memes, contract=contract) return render_template('index.html', memes=memes, contract=contract)
@bp.route('/about')
def about():
return render_template('about.html')
@bp.route('/new', methods=['GET', 'POST']) @bp.route('/new', methods=['GET', 'POST'])
def new(): def new():
meme = None meme = None

@ -0,0 +1,29 @@
<!DOCTYPE html>
<html>
{% include 'includes/head.html' %}
<body>
<section class="section">
<div class="container">
{% include 'includes/navbar.html' %}
<div class="columns">
<div class="column screen" style="padding-top:1em;">
<p>
Welcome. </br>
</br>
Up until now there has been a small group of people who were responsible for reviewing and approving the 4600+ memes submitted to the prior platform.
Wownero has become a meme powerhouse via SuchWow, but it's a highly centralized, aging, and fragile service.
</p>
</br>
<p>
This service is a continuation of <a href="https://suchwow.xyz">SuchWow</a> for the <a href="https://wownero.org">Wownero</a> cryptocurrency project.
It has been remixed onto the <a href="https://www.avax.network/">Avalanche network</a> and <a href="https://ipfs.io">Interplanetary Filesystem</a> and launched with a smart contract with some useful features.
</p>
</div>
</div>
</div>
</section>
{% include 'includes/footer.html' %}
</body>
</html>

@ -6,6 +6,7 @@
Memes. <strong>Interplanetary</strong>! Memes. <strong>Interplanetary</strong>!
</p> </p>
{% if request.path == '/' %} {% if request.path == '/' %}
<a class="button is-secondary" href="{{ url_for('meta.about') }}">About</a>
<a class="button is-primary" href="{{ url_for('meta.new') }}">New Meme</a> <a class="button is-primary" href="{{ url_for('meta.new') }}">New Meme</a>
{% else %} {% else %}
<a class="button" href="{{ url_for('meta.index') }}" up-preload up-follow=".container">Go Home</a> <a class="button" href="{{ url_for('meta.index') }}" up-preload up-follow=".container">Go Home</a>

@ -22,8 +22,8 @@
<p>Title: <strong>{{ meme.title }}</strong></p> <p>Title: <strong>{{ meme.title }}</strong></p>
<p>Description: <strong>{{ meme.description }}</strong></p> <p>Description: <strong>{{ meme.description }}</strong></p>
<p>Creator handle: <a href="{{ url_for('meta.creator', handle=meme.creator_handle) }}" up-layer="new">{{ meme.creator_handle }}</a></p> <p>Creator handle: <a href="{{ url_for('meta.creator', handle=meme.creator_handle) }}" up-layer="new">{{ meme.creator_handle }}</a></p>
<p>Meta IPFS: <a href="https://ipfs.io/ipfs/{{ meme.meta_ipfs_hash }}">{{ meme.meta_ipfs_hash }}</a></p> <p>Meta IPFS: <a href="{{ config.IPFS_SERVER }}/ipfs/{{ meme.meta_ipfs_hash }}" target=_self up-preload up-follow=".container">{{ meme.meta_ipfs_hash }}</a></p>
<p>Meme IPFS: <a href="https://ipfs.io/ipfs/{{ meme.meme_ipfs_hash }}">{{ meme.meme_ipfs_hash }}</a></p> <p>Meme IPFS: <a href="{{ config.IPFS_SERVER }}/ipfs/{{ meme.meme_ipfs_hash }}" target=_self up-preload up-follow=".container">{{ meme.meme_ipfs_hash }}</a></p>
<p>Meme ID: <code>{{ meme }}</code></p> <p>Meme ID: <code>{{ meme }}</code></p>
</div> </div>
</div> </div>

Loading…
Cancel
Save