forked from MarseyWorld/MarseyWorld
Merge branch 'bussy_refactor' of https://github.com/DrTransmisia/rDrama into frost
commit
79f3412aae
|
@ -47,15 +47,31 @@ def marseys(v):
|
||||||
marseys = g.db.query(Marsey).order_by(Marsey.count.desc())
|
marseys = g.db.query(Marsey).order_by(Marsey.count.desc())
|
||||||
return render_template("marseys.html", v=v, marseys=marseys)
|
return render_template("marseys.html", v=v, marseys=marseys)
|
||||||
|
|
||||||
@app.get("/marsey_list")
|
@app.get("/marsey_list.json")
|
||||||
@cache.memoize(timeout=600, make_name=make_name)
|
@cache.memoize(timeout=600)
|
||||||
def marsey_list():
|
def marsey_list():
|
||||||
if SITE_NAME == 'rDrama':
|
# From database
|
||||||
marseys = [f"{x.name} : {y} {x.tags}" for x, y in g.db.query(Marsey, User.username).join(User, User.id==Marsey.author_id).order_by(Marsey.count.desc())]
|
emojis = [{
|
||||||
else:
|
"name": emoij.name,
|
||||||
marseys = [f"{x.name} : {x.tags}" for x in g.db.query(Marsey).order_by(Marsey.count.desc())]
|
"author": author if SITE_NAME == 'rDrama' else "rDrama's chads",
|
||||||
|
# yikes, I don't really like this DB schema. Next time be better
|
||||||
|
"tags": emoij.tags.split(" ") + [emoij.name[len("marsey"):] if emoij.name.startswith("marsey") else emoij.name] + ([author] if SITE_NAME == 'rDrama' else []),
|
||||||
|
"count": emoij.count,
|
||||||
|
"class": "Marsey"
|
||||||
|
} for emoij, author in g.db.query(Marsey, User.username).join(User, User.id==Marsey.author_id).order_by(Marsey.count.desc())]
|
||||||
|
|
||||||
return str(marseys).replace("'",'"')
|
# Stastic shit
|
||||||
|
shit = open("files/assets/shit emojis.json", "r", encoding="utf-8")
|
||||||
|
emojis = emojis + json.load(shit)
|
||||||
|
shit.close()
|
||||||
|
|
||||||
|
if SITE_NAME == 'Cringetopia':
|
||||||
|
shit = open("files/assets/shit emojis.cringetopia.json", "r", encoding="utf-8")
|
||||||
|
emojis = emojis + json.load(shit)
|
||||||
|
shit.close()
|
||||||
|
|
||||||
|
# return str(marseys).replace("'",'"')
|
||||||
|
return jsonify(emojis)
|
||||||
|
|
||||||
@app.get('/rules')
|
@app.get('/rules')
|
||||||
@app.get('/sidebar')
|
@app.get('/sidebar')
|
||||||
|
|
|
@ -1,49 +1,19 @@
|
||||||
<div id="form" class="d-none"></div>
|
<div id="form" class="d-none"></div>
|
||||||
<div class="modal fade" id="emojiModal" tabindex="-1" role="dialog" aria-labelledby="emojiModalTitle" aria-hidden="true">
|
<div class="modal fade" id="emojiModal" tabindex="-1" role="dialog" aria-labelledby="emojiModalTitle" aria-hidden="true">
|
||||||
<div class="modal-dialog modal-dialog-scrollable modal-dialog-centered p-2 py-5 emoji-modal" role="document">
|
<style>
|
||||||
|
#emojiTabs {height: 80%;}
|
||||||
|
@media (max-height: 900px) {
|
||||||
|
#emojiTabs {height: 100%;}
|
||||||
|
#emojiModalInternalDivIDK {margin-top: 0 !important; margin-bottom: 0 !important; padding-top: 0 !important; padding-bottom: 0 !important;}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<div id="emojiModalInternalDivIDK" class="modal-dialog modal-dialog-scrollable modal-dialog-centered p-2 py-5 emoji-modal" role="document">
|
||||||
<div class="modal-content" id="emojiTabs">
|
<div class="modal-content" id="emojiTabs">
|
||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
<div>
|
<div>
|
||||||
<ul class="nav nav-pills py-2">
|
<ul class="nav nav-pills py-2" id="emoji-modal-tabs">
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a class="nav-link active emojitab" data-bs-toggle="tab" href="#emoji-tab-favorite">Favorite</a>
|
<a class="nav-link active emojitab" data-class-name="favorite" data-bs-toggle="tab" href="#" onclick="switchEmojiTab(event)">⭐ Favorite ⭐</a>
|
||||||
</li>
|
|
||||||
|
|
||||||
{% if SITE_NAME == 'Cringetopia' %}
|
|
||||||
<li class="nav-item">
|
|
||||||
<a class="nav-link emojitab" data-bs-toggle="tab" href="#emoji-tab-cringetopia">Cringetopia</a>
|
|
||||||
</li>
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
<li class="nav-item">
|
|
||||||
<a class="nav-link emojitab" data-bs-toggle="tab" href="#emoji-tab-marsey">Marsey</a>
|
|
||||||
</li>
|
|
||||||
<li class="nav-item">
|
|
||||||
<a class="nav-link emojitab" data-bs-toggle="tab" href="#emoji-tab-marseyalphabet">Marsey Alphabet</a>
|
|
||||||
</li>
|
|
||||||
<li class="nav-item">
|
|
||||||
<a class="nav-link emojitab" data-bs-toggle="tab" href="#emoji-tab-platy">Platy</a>
|
|
||||||
</li>
|
|
||||||
<li class="nav-item">
|
|
||||||
<a class="nav-link emojitab" data-bs-toggle="tab" href="#emoji-tab-wolf">Zombie Wolf</a>
|
|
||||||
</li>
|
|
||||||
<li class="nav-item">
|
|
||||||
<a class="nav-link emojitab" data-bs-toggle="tab" href="#emoji-tab-tay">Tay</a>
|
|
||||||
</li>
|
|
||||||
<li class="nav-item">
|
|
||||||
<a class="nav-link emojitab" data-bs-toggle="tab" href="#emoji-tab-classic">Classic</a>
|
|
||||||
</li>
|
|
||||||
<li class="nav-item">
|
|
||||||
<a class="nav-link emojitab" data-bs-toggle="tab" href="#emoji-tab-rage">Rage</a>
|
|
||||||
</li>
|
|
||||||
<li class="nav-item">
|
|
||||||
<a class="nav-link emojitab" data-bs-toggle="tab" href="#emoji-tab-wojak">Wojak</a>
|
|
||||||
</li>
|
|
||||||
<li class="nav-item">
|
|
||||||
<a class="nav-link emojitab" data-bs-toggle="tab" href="#emoji-tab-flags">Flags</a>
|
|
||||||
</li>
|
|
||||||
<li class="nav-item">
|
|
||||||
<a class="nav-link emojitab" data-bs-toggle="tab" href="#emoji-tab-misc">Misc</a>
|
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
@ -52,51 +22,68 @@
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="px-3"><input autocomplete="off" class="form-control px-2" type="text" id="emoji_search" placeholder="Search.."></div>
|
<div class="px-3">
|
||||||
|
<input disabled autocomplete="off" class="form-control px-2" type="text" id="emoji_search" placeholder="Search..">
|
||||||
|
</div>
|
||||||
|
<div class="px-3 d-flex flex-row">
|
||||||
|
<fieldset class="p-2">
|
||||||
|
<label for="emoji-algo">Search Algorithm</label>
|
||||||
|
<select id="emoji-algo">
|
||||||
|
<option value="binary" selected>Binary Search</option>
|
||||||
|
<option value="normal" title="YIKES" disabled>Complete (slower)</option>
|
||||||
|
</select>
|
||||||
|
</fieldset>
|
||||||
|
|
||||||
|
<fieldset class="p-2">
|
||||||
|
<label style="display: inline">Options:</legend>
|
||||||
|
|
||||||
|
<div style="display: inline" title="Makes the emoji larger">
|
||||||
|
<input type="checkbox" id="emoij-sel-0" value="#" class="emoij-suffix">
|
||||||
|
<label for="emoij-sel-0">Large</label>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div style="display: inline" title="Mirror the emoji along the Y axis">
|
||||||
|
<input type="checkbox" id="emoij-sel-1" value="!" class="emoij-suffix">
|
||||||
|
<label for="emoij-sel-1">Mirror</label>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div style="display: inline" title="Adds a hand that pats the emoji. Does not work with animated emoji">
|
||||||
|
<input type="checkbox" id="emoij-sel-2" value="pat" class="emoij-postfix">
|
||||||
|
<label for="emoij-sel-2">Pat</label>
|
||||||
|
</div>
|
||||||
|
</fieldset>
|
||||||
|
<!--
|
||||||
|
<fieldset class="p-2">
|
||||||
|
<label>marseyalphabet:</label>
|
||||||
|
<input type="text">
|
||||||
|
<button>generate!</button>
|
||||||
|
</fieldset>-->
|
||||||
|
</div>
|
||||||
|
|
||||||
<div style="overflow-y: scroll;">
|
<div style="overflow-y: scroll;">
|
||||||
<div class="modal-body p-0" id="emoji-modal-body">
|
<div class="modal-body p-0" id="emoji-modal-body">
|
||||||
<div id="emoji-tab-search"></div>
|
<div id="no-emojis-found" class="tab-content py-3 pl-2" hidden>
|
||||||
<div id="no-emojis-found"></div>
|
No results... Next time be better with your query. 💅
|
||||||
<div id="tab-content" class="tab-content">
|
</div>
|
||||||
<div class="tab-pane fade show active" id="emoji-tab-favorite">
|
<div id="emojis-work" class="tab-content py-3 pl-2">
|
||||||
<div class="d-flex flex-wrap py-3 pl-2" id="EMOJIS_favorite"></div>
|
I am working as hard as I can, sweety... 🚴
|
||||||
</div>
|
</div>
|
||||||
{% if SITE_NAME == 'Cringetopia' %}
|
<div id="tab-content" class="tab-content d-flex flex-wrap py-3 pl-2" hidden>
|
||||||
<div class="tab-pane fade" id="emoji-tab-cringetopia">
|
<style>
|
||||||
<div class="d-flex flex-wrap py-3 pl-2" id="EMOJIS_cringetopia"></div>
|
.emoji2 {
|
||||||
</div>
|
/*background: None!important;*/
|
||||||
{% endif %}
|
width:60px;
|
||||||
<div class="tab-pane fade" id="emoji-tab-marsey">
|
height: 85px;
|
||||||
<div class="d-flex flex-wrap py-3 pl-2" id="EMOJIS_marsey"></div>
|
overflow: hidden;
|
||||||
</div>
|
border: none
|
||||||
<div class="tab-pane fade" id="emoji-tab-marseyalphabet">
|
}
|
||||||
<div class="d-flex flex-wrap py-3 pl-2" id="EMOJIS_marseyalphabet"></div>
|
</style>
|
||||||
</div>
|
<template id="emoij-button-template">
|
||||||
<div class="tab-pane fade" id="emoji-tab-platy">
|
<button class="btn m-1 px-0 emoji2" data-bs-toggle="tooltip" delay:="0">
|
||||||
<div class="d-flex flex-wrap py-3 pl-2" id="EMOJIS_platy"></div>
|
<img loading="lazy" width=50>
|
||||||
</div>
|
</button>
|
||||||
<div class="tab-pane fade" id="emoji-tab-wolf">
|
</template>
|
||||||
<div class="d-flex flex-wrap py-3 pl-2" id="EMOJIS_wolf"></div>
|
|
||||||
</div>
|
|
||||||
<div class="tab-pane fade" id="emoji-tab-tay">
|
|
||||||
<div class="d-flex flex-wrap py-3 pl-2" id="EMOJIS_tay"></div>
|
|
||||||
</div>
|
|
||||||
<div class="tab-pane fade" id="emoji-tab-classic">
|
|
||||||
<div class="d-flex flex-wrap py-3 pl-2" id="EMOJIS_classic"></div>
|
|
||||||
</div>
|
|
||||||
<div class="tab-pane fade" id="emoji-tab-rage">
|
|
||||||
<div class="d-flex flex-wrap py-3 pl-2" id="EMOJIS_rage"></div>
|
|
||||||
</div>
|
|
||||||
<div class="tab-pane fade" id="emoji-tab-wojak">
|
|
||||||
<div class="d-flex flex-wrap py-3 pl-2" id="EMOJIS_wojak"></div>
|
|
||||||
</div>
|
|
||||||
<div class="tab-pane fade" id="emoji-tab-flags">
|
|
||||||
<div class="d-flex flex-wrap py-3 pl-2" id="EMOJIS_flags"></div>
|
|
||||||
</div>
|
|
||||||
<div class="tab-pane fade" id="emoji-tab-misc">
|
|
||||||
<div class="d-flex flex-wrap py-3 pl-2" id="EMOJIS_misc"></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue