Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement editor #95

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions app.py
Original file line number Diff line number Diff line change
Expand Up @@ -452,6 +452,9 @@ def studios(id, tab):
name_len=len(data["title"]),
)

@app.get("/editor")
def editor():
return render_template("editor.html")

@app.errorhandler(werkexcept.NotFound)
def err404(e: Exception):
Expand Down
8 changes: 8 additions & 0 deletions static/master-styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -504,4 +504,12 @@ body {
display: block;
text-overflow: ellipsis;
white-space: nowrap;
}

.editor-wrapper {
position: fixed;
bottom: 0;
left: 0;
width: 100%;
height: 96%;
}
4 changes: 3 additions & 1 deletion templates/_base.html
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@
<div id="menu">
<div class="width-third"><a href="/trending"><button class="width-full "><i
class="fa-solid fa-earth-americas"></i> <span class="desktop-only">Explore</span></button></a></div>
<div class="width-third"><a href="/editor"><button class="width-full "><i class="fa-regular fa-square-plus"></i>
<span class="desktop-only">Create</span></button></a></div>
<div class="width-third"><a href="/forums"> <button class="width-full "><i class="fa-regular fa-comments"></i>
<span class="desktop-only">Forum Browser</span></button></a></div>
<div class="width-third"><a href="/settings"><button class="width-full "><i class="fa-solid fa-gear"></i> <span
Expand All @@ -69,7 +71,7 @@ <h1>Something went wrong.</h1>
{% endblock %}
</div>

{% include '_footer.html' %}
{% block footer %}{% include '_footer.html' %}{% endblock %}

<script>
const sbScale = document.getElementById('sb_scale').value
Expand Down
15 changes: 11 additions & 4 deletions templates/editor.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
{% extends '_base.html' %}

{% block content %}
<section>
<p>We are currently working on the editor. It will launch sometime next year.</p>
</section>
{% endblock %}
<p id="loadtext" style="text-align: center; color: white; font-size: xx-large;">Loading...</p>
<div class="editor-wrapper">
<iframe src="https://snarpledev.github.io/snazzy-gui/" frameborder="0" style="width: 100%; height: 100%;"
onload="document.getElementById('loadtext').remove()"></iframe>
</div>
<script>
alert("WARNING\nThe Snazzle editor is experimental and may not work propperly.")
</script>
{% endblock %}

{% block footer %}{% endblock %}