mirror of
https://github.com/TitanEmbeds/Titan.git
synced 2024-12-24 14:07:03 +01:00
Added Fixed Sidenav implementation for guildnav
This commit is contained in:
parent
5da061a3d5
commit
2feec0e597
@ -89,7 +89,8 @@ def guild_embed(guild_id):
|
||||
css=customcss,
|
||||
cssvariables=parse_css_variable(customcss),
|
||||
same_target=request.args.get("sametarget", False) == "true",
|
||||
userscalable=request.args.get("userscalable", "True").lower().startswith("t")
|
||||
userscalable=request.args.get("userscalable", "True").lower().startswith("t"),
|
||||
fixed_sidenav=request.args.get("fixedsidenav", "False").lower().startswith("t")
|
||||
)
|
||||
abort(404)
|
||||
|
||||
|
@ -11,6 +11,22 @@ QUERY_PARAMETERS = [
|
||||
"description": "Instead of having the top channel as the first channel your users see, you may change it. Enable Discord's Developer mode in the Appearances tab of the User Settings and copy the channel ID. Here is a <a href=\"https://support.discordapp.com/hc/en-us/articles/206346498-Where-can-I-find-my-server-ID-\" target=\"_blank\">tutorial</a> on obtaining the channel ID.",
|
||||
"example": "1234567890",
|
||||
},
|
||||
{
|
||||
"name": "fixedsidenav",
|
||||
"type": "boolean",
|
||||
"description": "Always show the left server navigation sidebar on large screens.",
|
||||
"example": "true",
|
||||
"options": [
|
||||
{
|
||||
"name": "true",
|
||||
"default": False,
|
||||
},
|
||||
{
|
||||
"name": "false",
|
||||
"default": True,
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
"name": "lang",
|
||||
"type": "language",
|
||||
|
@ -33,6 +33,21 @@ html {
|
||||
font-family: Whitney, Helvetica Neue, Helvetica, Arial, sans-serif;
|
||||
}
|
||||
|
||||
@media (min-width: 992px) {
|
||||
body.fixed-sidenav #overall-main-content, body.fixed-sidenav #overall-main-content nav, body.fixed-sidenav #overall-main-content footer {
|
||||
margin-left: auto;
|
||||
width: calc(100% - 300px);
|
||||
}
|
||||
|
||||
body.fixed-sidenav #overall-main-content #message-spinner {
|
||||
left: calc(50% + 150px);
|
||||
}
|
||||
|
||||
body.fixed-sidenav #guild-nav {
|
||||
z-index: 995;
|
||||
}
|
||||
}
|
||||
|
||||
main {
|
||||
min-height: calc(100vh - 80px);
|
||||
overflow-x: hidden;
|
||||
|
@ -47,11 +47,12 @@
|
||||
{% endif %}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<body {% if fixed_sidenav %}class="fixed-sidenav"{% endif %}>
|
||||
<div id="overall-main-content">
|
||||
<div class="navbar-fixed">
|
||||
<nav>
|
||||
<div class="nav-wrapper">
|
||||
<a href="#" data-activates="guild-nav" class="button-collapse" id="guild-btn"><i class="material-icons">menu</i></a>
|
||||
<a href="#" data-activates="guild-nav" class="button-collapse {% if fixed_sidenav %}hide-on-large-only{% endif %}" id="guild-btn"><i class="material-icons">menu</i></a>
|
||||
<div class="container">
|
||||
<a href="{{ url_for("index") }}" target="_blank" class="brand-logo"><img src="{{ url_for('static', filename='img/titanembeds_shield.png') }}" /><span class="brand-logo-text"><strong class="align-top">Titan</strong><span class="align-top">Embeds</span> <span class="betatag align-top">BETA</span></span></a>
|
||||
</div>
|
||||
@ -68,7 +69,21 @@
|
||||
<div id="chatcontent" class="chatcontent"></div>
|
||||
</main>
|
||||
|
||||
<ul id="guild-nav" class="side-nav">
|
||||
<footer id="footer" class="footer">
|
||||
<div id="footercontainer" class="footercontainer">
|
||||
<div class="currentuserchip" id="nameplate">
|
||||
<div id="currentuserimage_parent"><img id="currentuserimage" src="" class="circle currentuserimage" style="display: none;"></div>
|
||||
<div id="currentusername" class="currentusername"><span id="curuser_name">Titan</span><span id="curuser_discrim">#0001</span></div>
|
||||
</div>
|
||||
<div id="messageboxouter" class="input-field inline">
|
||||
<textarea placeholder="Enter message" id="messagebox" type="text" class="materialize-textarea wdt-emoji-open-on-colon" rows="1"></textarea>
|
||||
<span id="visitor_mode_message" style="display:none;"><span id="visitor_mode_message_note">{{ _("Please login to post a message.") }}</span> <a id="visitor_login_btn" class="waves-effect waves-light btn">{{ _("Login") }}</a></span>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
</div>
|
||||
|
||||
<ul id="guild-nav" class="side-nav {% if fixed_sidenav %}fixed{% endif %}">
|
||||
<li>
|
||||
<div class="userView">
|
||||
<img id="guild_icon" class="circle" src="{{ generate_guild_icon( guild['id'], guild['icon'] ) }}" {% if not guild['icon'] %}style="display: none;"{% endif %}>
|
||||
@ -292,19 +307,6 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<footer id="footer" class="footer">
|
||||
<div id="footercontainer" class="footercontainer">
|
||||
<div class="currentuserchip" id="nameplate">
|
||||
<div id="currentuserimage_parent"><img id="currentuserimage" src="" class="circle currentuserimage" style="display: none;"></div>
|
||||
<div id="currentusername" class="currentusername"><span id="curuser_name">Titan</span><span id="curuser_discrim">#0001</span></div>
|
||||
</div>
|
||||
<div id="messageboxouter" class="input-field inline">
|
||||
<textarea placeholder="Enter message" id="messagebox" type="text" class="materialize-textarea wdt-emoji-open-on-colon" rows="1"></textarea>
|
||||
<span id="visitor_mode_message" style="display:none;"><span id="visitor_mode_message_note">{{ _("Please login to post a message.") }}</span> <a id="visitor_login_btn" class="waves-effect waves-light btn">{{ _("Login") }}</a></span>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
<!-- Electron fix -->
|
||||
<script>
|
||||
if (typeof module === "object") {
|
||||
|
Loading…
Reference in New Issue
Block a user