Skip to content

Commit

Permalink
Merge pull request #72 from VertisanPRO/nameless-v2
Browse files Browse the repository at this point in the history
Support for NamelessMC 2.0.2
  • Loading branch information
Sylensky authored Aug 14, 2022
2 parents 30ea88c + af77359 commit ea560bc
Show file tree
Hide file tree
Showing 24 changed files with 609 additions and 29 deletions.
11 changes: 9 additions & 2 deletions custom/templates/Nexus/Nexus/navbar/navbar_modern.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,15 @@
{if isset($dropdown.separator)}
<div class="ui divider"></div>
{else}
<a class="item" href="{$dropdown.link}" target="{$dropdown.target}">{$dropdown.icon}
{$dropdown.title}</a>
{if isset($dropdown.action)}
<a class="item" href="#" data-link="{$dropdown.link}" data-action="{$dropdown.action}">
{$dropdown.icon} {$dropdown.title}
</a>
{else}
<a class="item" href="{$dropdown.link}" target="{$dropdown.target}">
{$dropdown.icon} {$dropdown.title}
</a>
{/if}
{/if}
{/foreach}
</div>
Expand Down
11 changes: 9 additions & 2 deletions custom/templates/Nexus/Nexus/navbar/navbar_normal.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,15 @@
{if isset($dropdown.separator)}
<div class="ui divider"></div>
{else}
<a class="item" href="{$dropdown.link}" target="{$dropdown.target}">{$dropdown.icon}
{$dropdown.title}</a>
{if isset($dropdown.action)}
<a class="item" href="#" data-link="{$dropdown.link}" data-action="{$dropdown.action}">
{$dropdown.icon} {$dropdown.title}
</a>
{else}
<a class="item" href="{$dropdown.link}" target="{$dropdown.target}">
{$dropdown.icon} {$dropdown.title}
</a>
{/if}
{/if}
{/foreach}
</div>
Expand Down
2 changes: 1 addition & 1 deletion custom/templates/Nexus/forum/forum_edit_post.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
{if isset($EDITING_TOPIC)}
<div class="field">
<label for="title">{$TOPIC_TITLE}</label>
<input type="text" id="title" name="title" value="{$TOPIC_TITLE}">
<input type="text" id="title" name="title" value="{$TOPIC_TITLE_VALUE}">
</div>
{if count($LABELS)}
<div class="inline fields labels">
Expand Down
4 changes: 3 additions & 1 deletion custom/templates/Nexus/forum/view_topic.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,9 @@
{/if}
{if !empty($reply.signature)}
<div class="ui divider"></div>
{$reply.signature}
<div style="overflow: scroll; max-height: 500px;">
{$reply.signature}
</div>
{/if}
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion custom/templates/Nexus/ghost/index.tpl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{include file='ghost/post-list.tpl'}
{* Will be in 1.7.1
{* Will be in 1.7.x
{$PAGINATION}
*}
2 changes: 1 addition & 1 deletion custom/templates/Nexus/header.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ value="{$PAGE_KEYWORDS}"}{else}{assign var="PAGEKEYWORDS" value=" "}{/if}

<!DOCTYPE html>
<html{$HTMLCLASS}{$HTMLLANG}{$HTMLRTL}>
<!-- Nexus 1.7.0 by VertisanPRO | https://github.com/VertisanPRO/nexus -->
<!-- Nexus 1.7.1 by VertisanPRO | https://github.com/VertisanPRO/nexus -->
<head>
<meta charset="{$METACHARSET}">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
Expand Down
13 changes: 12 additions & 1 deletion custom/templates/Nexus/js/core/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,17 @@ function redirect(url) {
window.location.href = url;
}

$(document).ready(function () {
$('[data-action="logout"]').click(function () {
const url = $(this).data('link');
$.post(url, {
token: csrfToken
}).done(function () {
window.location.reload();
});
});
});

$(function () {
$('.ui.sidebar').sidebar('attach events', '.toc.item');

Expand All @@ -33,6 +44,7 @@ $(function () {
$(this).closest('.message').transition('fade');
});

$('.menu.tabular .item').tab();
});

$(function () {
Expand Down Expand Up @@ -75,7 +87,6 @@ $(function () {
timezone.value = timezoneValue;
}
}

});

const announcements = document.querySelectorAll('[id^="announcement"]');
Expand Down
2 changes: 0 additions & 2 deletions custom/templates/Nexus/js/core/pages.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,6 @@ if (page !== '') {
});
});
} else if (page === 'profile') {
$('.menu.tabular .item').tab();

function showBannerSelect() {
$('#imageModal').modal({
onVisible: function () {
Expand Down
12 changes: 11 additions & 1 deletion custom/templates/Nexus/navbar.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
id="update-message">
<i class="close icon"></i>
{/if}
<a href="{$UPDATE_LINK}">
<a href="{$NAMELESS_UPDATE_LINK}">
<i class="download icon" style="color: {if $NEW_UPDATE_URGENT eq true}#d9534f
{else}#0275d8;{/if}"></i>
</a>
Expand Down Expand Up @@ -126,4 +126,14 @@
{$MUST_VALIDATE_ACCOUNT}
</div>
</div>
{/if}

{if isset($MAINTENANCE_ENABLED)}
<div class="ui message icon announcement"
style="border-top-style: solid; border-top-color: #f0ad4e;">
<i class="exclamation icon" style="color: #f0ad4e;"></i>
<div class="content">
{$MAINTENANCE_ENABLED}
</div>
</div>
{/if}
16 changes: 16 additions & 0 deletions custom/templates/Nexus/store/category.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,22 @@
</div>

{if count($WIDGETS_RIGHT)}
{if isset($LOGGED_IN_USER) && isset($SHOW_CREDITS_AMOUNT)}
<div class="ui fluid card" id="widget-store-account">
<div class="content">
<h4 class="ui header">{$ACCOUNT}</h4>
<div class="description">
<div class="ui list">
<div class="item">
<span class="text">{$CREDITS}</span>
<div class="description right floated"><b>{$CURRENCY_SYMBOL}{$CREDITS_VALUE} {$CURRENCY}</b>
</div>
</div>
</div>
</div>
</div>
</div>
{/if}
<div class="ui six wide tablet four wide computer column">
{foreach from=$WIDGETS_RIGHT item=widget}
{$widget}
Expand Down
16 changes: 16 additions & 0 deletions custom/templates/Nexus/store/checkout.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,22 @@
</div>

{if count($WIDGETS_RIGHT)}
{if isset($LOGGED_IN_USER) && isset($SHOW_CREDITS_AMOUNT)}
<div class="ui fluid card" id="widget-store-account">
<div class="content">
<h4 class="ui header">{$ACCOUNT}</h4>
<div class="description">
<div class="ui list">
<div class="item">
<span class="text">{$CREDITS}</span>
<div class="description right floated"><b>{$CURRENCY_SYMBOL}{$CREDITS_VALUE} {$CURRENCY}</b>
</div>
</div>
</div>
</div>
</div>
</div>
{/if}
<div class="ui six wide tablet four wide computer column">
{foreach from=$WIDGETS_RIGHT item=widget}
{$widget}
Expand Down
16 changes: 16 additions & 0 deletions custom/templates/Nexus/store/checkout_add.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,22 @@
</div>

{if count($WIDGETS_RIGHT)}
{if isset($LOGGED_IN_USER) && isset($SHOW_CREDITS_AMOUNT)}
<div class="ui fluid card" id="widget-store-account">
<div class="content">
<h4 class="ui header">{$ACCOUNT}</h4>
<div class="description">
<div class="ui list">
<div class="item">
<span class="text">{$CREDITS}</span>
<div class="description right floated"><b>{$CURRENCY_SYMBOL}{$CREDITS_VALUE} {$CURRENCY}</b>
</div>
</div>
</div>
</div>
</div>
</div>
{/if}
<div class="ui six wide tablet four wide computer column">
{foreach from=$WIDGETS_RIGHT item=widget}
{$widget}
Expand Down
16 changes: 16 additions & 0 deletions custom/templates/Nexus/store/checkout_complete.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,22 @@
</div>

{if count($WIDGETS_RIGHT)}
{if isset($LOGGED_IN_USER) && isset($SHOW_CREDITS_AMOUNT)}
<div class="ui fluid card" id="widget-store-account">
<div class="content">
<h4 class="ui header">{$ACCOUNT}</h4>
<div class="description">
<div class="ui list">
<div class="item">
<span class="text">{$CREDITS}</span>
<div class="description right floated"><b>{$CURRENCY_SYMBOL}{$CREDITS_VALUE} {$CURRENCY}</b>
</div>
</div>
</div>
</div>
</div>
</div>
{/if}
<div class="ui six wide tablet four wide computer column">
{foreach from=$WIDGETS_RIGHT item=widget}
{$widget}
Expand Down
16 changes: 16 additions & 0 deletions custom/templates/Nexus/store/index.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,22 @@
</div>

{if count($WIDGETS_RIGHT)}
{if isset($LOGGED_IN_USER) && isset($SHOW_CREDITS_AMOUNT)}
<div class="ui fluid card" id="widget-store-account">
<div class="content">
<h4 class="ui header">{$ACCOUNT}</h4>
<div class="description">
<div class="ui list">
<div class="item">
<span class="text">{$CREDITS}</span>
<div class="description right floated"><b>{$CURRENCY_SYMBOL}{$CREDITS_VALUE} {$CURRENCY}</b>
</div>
</div>
</div>
</div>
</div>
</div>
{/if}
<div class="ui six wide tablet four wide computer column">
{foreach from=$WIDGETS_RIGHT item=widget}
{$widget}
Expand Down
16 changes: 16 additions & 0 deletions custom/templates/Nexus/store/player_login.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,22 @@

{if count($WIDGETS_RIGHT)}
<div class="ui six wide tablet four wide computer column">
{if isset($LOGGED_IN_USER) && isset($SHOW_CREDITS_AMOUNT)}
<div class="ui fluid card" id="widget-store-account">
<div class="content">
<h4 class="ui header">{$ACCOUNT}</h4>
<div class="description">
<div class="ui list">
<div class="item">
<span class="text">{$CREDITS}</span>
<div class="description right floated"><b>{$CURRENCY_SYMBOL}{$CREDITS_VALUE}
{$CURRENCY}</b></div>
</div>
</div>
</div>
</div>
</div>
{/if}
{foreach from=$WIDGETS_RIGHT item=widget}
{$widget}
{/foreach}
Expand Down
78 changes: 78 additions & 0 deletions custom/templates/Nexus/store/user/store.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
{include file='header.tpl'}
{include file='navbar.tpl'}

<h2 class="ui header">
{$TITLE}
</h2>

{if isset($SUCCESS)}
<div class="ui message icon announcement" style="border-top-style: solid; border-top-color: #5cb85c;">
<i class="check icon" style="color: #5cb85c;"></i>
<div class="content">
{$SUCCESS}
</div>
</div>
{/if}

{if isset($ERRORS)}
<div class="ui message icon announcement" style="border-top-style: solid; border-top-color: #d9534f;">
<i class="x icon" style="color: #d9534f;"></i>
<div class="content">
<ul class="list">
{foreach from=$ERRORS item=error}
<li>{$error}</li>
{/foreach}
</ul>
</div>
</div>
{/if}

<div class="ui stackable grid" id="user">
<div class="ui centered row">
<div class="ui six wide tablet four wide computer column">
{include file='user/navigation.tpl'}
</div>
<div class="ui ten wide tablet twelve wide computer column">
<div class="ui segment">
<h3 class="ui header">{$STORE}</h3>

<p>{$CREDITS}: {$CURRENCY_SYMBOL}{$CREDITS_VALUE} {$CURRENCY}</p>
</div>

<div class="ui segment">
<h3 class="ui header">{$MY_TRANSACTIONS}</h3>
{nocache}
{if count($TRANSACTIONS_LIST)}
<table class="ui fixed single line selectable unstackable small padded res table">
<thead>
<tr>
<th>{$TRANSACTION}</th>
<th>{$AMOUNT}</th>
<th>{$DATE}</th>
</tr>
</thead>
<tbody>
{foreach from=$TRANSACTIONS_LIST item=transaction}
<tr>
<td>{$transaction.transaction}</td>
<td>{$transaction.currency_symbol}{$transaction.amount} {$transaction.currency}</td>
<td><span data-toggle="tooltip"
data-content="{$transaction.date_full}">{$transaction.date_friendly}</span></td>
</tr>
{/foreach}
</tbody>
</table>
{else}
<div class="ui info message">
<div class="content">
{$NO_TRANSACTIONS}
</div>
</div>
{/if}
{/nocache}
</div>
</div>
</div>
</div>

{include file='footer.tpl'}
2 changes: 1 addition & 1 deletion custom/templates/Nexus/store/widgets/latest_purchases.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<a class="header" {if $purchase.user_id}href="{$purchase.profile}"
data-poload="{$USER_INFO_URL}{$purchase.user_id}" {/if}
style="{$purchase.style|replace:';':''}!important;margin-bottom:2px">{$purchase.username}</a>
{$purchase.currency_symbol}{$purchase.price}
{$purchase.currency_symbol}{$purchase.price} {$purchase.currency}
</div>
</div>
</div>
Expand Down
Loading

0 comments on commit ea560bc

Please sign in to comment.