Compare commits
2 Commits
8db34a6d74
...
a21dc5f73f
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a21dc5f73f | ||
|
|
0d4eec9c80 |
1
.gitignore
vendored
1
.gitignore
vendored
@@ -17,3 +17,4 @@ build/
|
||||
/myriad/static/blinkies
|
||||
/myriad/static/stamps
|
||||
myriad/static/tmp
|
||||
myriad/static/misc
|
||||
|
||||
@@ -771,6 +771,11 @@ def assets():
|
||||
filename = file.filename
|
||||
file.save(os.path.join(current_app.config["STAMPS_UPLOAD_FOLDER"], filename))
|
||||
|
||||
if "image" in request.files:
|
||||
file = request.files["image"]
|
||||
filename = file.filename
|
||||
file.save(os.path.join(current_app.config["MISC_UPLOAD_FOLDER"], filename))
|
||||
|
||||
icons = db.execute("SELECT * FROM icons").fetchall()
|
||||
icon_storage = os.listdir(current_app.config["ICON_UPLOAD_FOLDER"])
|
||||
|
||||
@@ -793,8 +798,9 @@ def assets():
|
||||
|
||||
blinkies = os.listdir(current_app.config["BLINKIES_UPLOAD_FOLDER"])
|
||||
stamps = os.listdir(current_app.config["STAMPS_UPLOAD_FOLDER"])
|
||||
images = os.listdir(current_app.config["MISC_UPLOAD_FOLDER"])
|
||||
|
||||
return render_template("manage/assets.html", icons=unlinked_icons, icon_storage=i_storage, blinkies=blinkies, stamps=stamps)
|
||||
return render_template("manage/assets.html", icons=unlinked_icons, icon_storage=i_storage, blinkies=blinkies, stamps=stamps, images=images)
|
||||
|
||||
@bp.route("/delete_idb")
|
||||
@login_required
|
||||
|
||||
@@ -95,6 +95,12 @@ form textarea{
|
||||
height:100px;
|
||||
float:left;
|
||||
}
|
||||
.manage_images_3{
|
||||
display:block;
|
||||
width:180px;
|
||||
height:100px;
|
||||
float:left;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -108,6 +114,12 @@ form textarea{
|
||||
height:56px;
|
||||
width:auto;
|
||||
}
|
||||
.mng_img
|
||||
{
|
||||
height:56px;
|
||||
width:auto;
|
||||
object-fit:scale-down;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
}
|
||||
|
||||
body.pink{
|
||||
background: linear-gradient(90deg, #f8a1e5 0%, #d55ff3 50%, #f5c35e 100%);
|
||||
background: linear-gradient(90deg, rgba(235, 202, 202, 1) 0%, rgba(201, 77, 255, 1) 50%, rgba(242, 234, 124, 1) 100%);
|
||||
scrollbar-color:#a414da #d991f4;
|
||||
}
|
||||
.pink .container, .pink #mobile-nav{
|
||||
|
||||
@@ -36,9 +36,44 @@
|
||||
{% endif %}
|
||||
|
||||
<div class="heading big">Blinkies</div>
|
||||
|
||||
<p>Not implemented yet (sorry!)</p>
|
||||
|
||||
<div class="heading big">Stamps</div>
|
||||
<p>Not implemented yet (sorry!)</p>
|
||||
|
||||
<hr>
|
||||
|
||||
<div class="heading big">Upload Images</div>
|
||||
<p>Upload images for use in pages and custom sections.
|
||||
Just right click, copy image URL, then use it in the HTML
|
||||
however you like. You can use style tags to customize how the
|
||||
images look/behave on your page, just be careful not to use class or
|
||||
id selectors that already exist (or do, if you are wanting to overwrite
|
||||
their behaviour!). We will make a list of in-use class and ids here, soon.
|
||||
</p>
|
||||
<form method="post" enctype="multipart/form-data" id="image">
|
||||
<input type="file" name="image" class="mobile-edit">
|
||||
<input type="submit" value="Upload to Site">
|
||||
</form>
|
||||
|
||||
<div class="manage_images">
|
||||
<div class="manage_images_2">
|
||||
{% for image in images %}
|
||||
<div class="manage_images_3">
|
||||
<img class="mng_img" src="{{ url_for('static', filename='misc/'+image) }}">
|
||||
<br class="clear" />
|
||||
{% set imgurl = url_for('static', filename='misc/'+image) %}
|
||||
<a href="" onclick="copyURL('{{imgurl}}')">Copy Image URL</a> ☆ <a href="">Delete</a>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
function copyURL(a) {
|
||||
navigator.clipboard.writeText(a);
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user