Skip to content

Commit

Permalink
Update to v2 pre-release 4
Browse files Browse the repository at this point in the history
Update template to v2 pre-release 4
  • Loading branch information
samerton committed May 31, 2018
1 parent 4da4216 commit 53c93ba
Show file tree
Hide file tree
Showing 17 changed files with 115 additions and 45 deletions.
4 changes: 2 additions & 2 deletions upload/custom/templates/Bootstrap3/404.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
<h2>{$TITLE}</h2>
<h4>{$CONTENT}</h4>
<div class="btn-group" role="group" aria-label="...">
<a href="#" class="btn btn-primary btn-lg" onclick="window.history.back()">{$BACK}</a>
<a href="/" class="btn btn-success btn-lg">{$HOME}</a>
<button class="btn btn-primary btn-lg" onclick="javascript:history.go(-1)">{$BACK}</button>
<a href="{$SITE_HOME}" class="btn btn-success btn-lg">{$HOME}</a>
</div>
<hr />
{$ERROR}
Expand Down
1 change: 1 addition & 0 deletions upload/custom/templates/Bootstrap3/footer.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@
<ul class="dropdown-menu" aria-labelledby="Preview">
<li><a target="_blank" href="https://namelessmc.com/">Powered by NamelessMC</a></li>
<li><a href="{$TERMS_LINK}">{$TERMS_TEXT}</a></li>
<li><a href="{$PRIVACY_LINK}">{$PRIVACY_TEXT}</a></li>
</ul>
</li>
</ul>
Expand Down
8 changes: 0 additions & 8 deletions upload/custom/templates/Bootstrap3/forum/forum_index.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -80,20 +80,12 @@
<h2 style="margin-top:5px;">{$STATS} <i class="fa fa-bar-chart"></i></h2>
{$USERS_REGISTERED}<br />
{$LATEST_MEMBER}

<hr />

<h3>{$ONLINE_USERS}</h3>
{$ONLINE_USERS_LIST}

</div>
</div>

{if count($WIDGETS)}
<br />
{foreach from=$WIDGETS item=widget}
{$widget}
<br /><br />
{/foreach}
{/if}
</div>
Expand Down
8 changes: 0 additions & 8 deletions upload/custom/templates/Bootstrap3/forum/view_forum.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -131,20 +131,12 @@
<h2 style="margin-top:5px;">{$STATS} <i class="fa fa-bar-chart"></i></h2>
{$USERS_REGISTERED}<br />
{$LATEST_MEMBER}

<hr />

<h3>{$ONLINE_USERS}</h3>
{$ONLINE_USERS_LIST}

</div>
</div>

{if count($WIDGETS)}
<br />
{foreach from=$WIDGETS item=widget}
{$widget}
<br /><br />
{/foreach}
{/if}
</div>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{include file='navbar.tpl'}

<div class="container">
<div class="panel panel-default">
<div class="panel-body">
{$CONFIRM_REDIRECT}
<hr />
<div class="btn-group btn-group-lg" role="group" aria-label="...">
<a href="{$FORUM_INDEX}" class="btn btn-default">{$NO}</a>
<a href="{$REDIRECT_URL}" target="_blank" rel="noopener nofollow" class="btn btn-primary">{$YES}</a>
</div>
</div>
</div>
</div>

{include file='footer.tpl'}
Original file line number Diff line number Diff line change
Expand Up @@ -72,20 +72,12 @@
<h2 style="margin-top:5px;">{$STATISTICS} <i class="fa fa-bar-chart"></i></h2>
{$USERS_REGISTERED}<br />
{$LATEST_MEMBER}

<hr />

<h3>{$ONLINE_USERS}</h3>
{$ONLINE_USERS_LIST}

</div>
</div>

{if count($WIDGETS)}
<br />
{foreach from=$WIDGETS item=widget}
{$widget}
<br /><br />
{/foreach}
{/if}
</div>
Expand Down
4 changes: 3 additions & 1 deletion upload/custom/templates/Bootstrap3/forum/view_topic.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,9 @@
<small>{$reply.user_title}</small>
{/if}
<hr />
{$reply.user_posts_count} {$POSTS}<br />
<span rel="tooltip" data-toggle="hover" data-original-title="{$reply.user_registered_full}">{$reply.user_registered}</span><br />
{$reply.user_topics_count}<br />
{$reply.user_posts_count}<br />
<hr />
</center>
{if count($reply.fields)}
Expand Down
1 change: 0 additions & 1 deletion upload/custom/templates/Bootstrap3/index.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@
{if count($WIDGETS)}
{foreach from=$WIDGETS item=widget}
{$widget}
<br /><br />
{/foreach}
{/if}

Expand Down
15 changes: 11 additions & 4 deletions upload/custom/templates/Bootstrap3/login.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,17 @@

<hr class="colorgraph">

<div class="form-group">
<input type="text" class="form-control form-control-lg" name="username" id="username"
autocomplete="off" value="{$USERNAME_INPUT}" placeholder="{$USERNAME}" tabindex="1">
</div>
{if isset($EMAIL)}
<div class="form-group">
<input type="email" class="form-control form-control-lg" name="email" id="email"
autocomplete="off" value="{$USERNAME_INPUT}" placeholder="{$EMAIL}" tabindex="1">
</div>
{else}
<div class="form-group">
<input type="text" class="form-control form-control-lg" name="username" id="username"
autocomplete="off" value="{$USERNAME_INPUT}" placeholder="{$USERNAME}" tabindex="1">
</div>
{/if}

<div class="form-group">
<input type="password" class="form-control form-control-lg" name="password" id="password"
Expand Down
7 changes: 6 additions & 1 deletion upload/custom/templates/Bootstrap3/navbar.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@
</div><!-- /.container-fluid -->
</nav>

<div class="container" style="padding-top: 7rem;">
<div class="container" style="padding-top: 7rem !important;">
{* Global messages *}
{if isset($MAINTENANCE_ENABLED)}
<div class="alert alert-danger alert-dismissible" role="alert">
Expand All @@ -119,4 +119,9 @@
{$MAINTENANCE_ENABLED}
</div>
{/if}
{if isset($MUST_VALIDATE_ACCOUNT)}
<div class="alert alert-info">
{$MUST_VALIDATE_ACCOUNT}
</div>
{/if}
</div>
14 changes: 14 additions & 0 deletions upload/custom/templates/Bootstrap3/privacy.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{include file='navbar.tpl'}

<div class="container">
<div class="panel panel-default">
<div class="panel-body">
<h2 style="margin-top:5px;">{$PRIVACY_POLICY}</h2>

<p>{$POLICY}</p>

</div>
</div>
</div>

{include file='footer.tpl'}
2 changes: 1 addition & 1 deletion upload/custom/templates/Bootstrap3/profile.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@
</div>

<div class="panel-heading">
<h2 class="panel-title" style="display:inline;"><a href="{$post.profile}">{$post.nickname}:</a></h2>
<h2 class="panel-title" style="display:inline;"><a href="{$post.profile}" style="{$post.user_style}">{$post.nickname}:</a></h2>
<span class="pull-right"><span rel="tooltip" data-original-title="{$post.date}">{$post.date_rough}</span></span>
</div>

Expand Down
39 changes: 28 additions & 11 deletions upload/custom/templates/Bootstrap3/template.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,17 @@
/*
* Made by Samerton
* https://github.com/NamelessMC/Nameless/
* NamelessMC version 2.0.0-pr3
* NamelessMC version 2.0.0-pr4
*
* License: MIT
*
* Bootstrap 3 template
*/

$template_version = 'v2.0.0-pr3'; // Version number of template
$nl_template_version = '2.0.0-pr3'; // Nameless version template is designed for
$template_version = 'v2.0.0-pr4'; // Version number of template
$nl_template_version = '2.0.0-pr4'; // Nameless version template is designed for

$route = rtrim($_GET['route'], '/');

$cache->setCache('bs3_template');
if($cache->isCached('bootswatch')){
Expand Down Expand Up @@ -43,22 +45,21 @@
(defined('CONFIG_PATH') ? CONFIG_PATH : '') . '/custom/templates/Bootstrap3/js/bootstrap.min.js'
);

if(defined('PAGE') && PAGE == 'cc_messaging'){
if($route == '/user/messaging'){
$js_sources[] = (defined('CONFIG_PATH') ? CONFIG_PATH : '') . '/custom/templates/Bootstrap3/js/bootstrap3-typeahead.min.js';
}

// Page load time
$page_load = microtime(true) - $start;
if(isset($page_loading) && $page_loading == '1'){
$js = '
if(isset($page_loading) && $page_loading == '1') {
$page_load_js = '
<script type="text/javascript">
var timer = \'' . str_replace('{x}', round($page_load, 3), $language->get('general', 'page_loaded_in')) . '\';
var timer = \'' . $language->get('general', 'page_loaded_in') . '\';
$(\'#page_load_tooltip\').attr(\'title\', timer).tooltip();
</script>';
} else $js = '';
}

// Popovers
$js.= '
$js = '
<script>
$(".pop").popover({ trigger: "manual" , html: true, animation:false, placement: "top" })
.on("mouseenter", function () {
Expand Down Expand Up @@ -267,10 +268,26 @@ function() {
}
</script>';
} else {
if(defined('COOKIE_NOTICE')){
$js .= '<script type="text/javascript">
toastr.options.timeOut = 0;
toastr.options.extendedTimeOut = 0;
toastr.options.closeButton = true;
toastr.options.onclick = function() { $(\'.toast .toast-close-button\').focus(); }
toastr.options.onHidden = function() { $.cookie(\'accept\', \'accepted\', { path: \'/\' }); }
toastr.options.positionClass = \'toast-bottom-left\';
toastr.info(\'' . $language->get('general', 'cookie_notice') . '\');
</script>';
}
}

// Registration page/login page checkbox
if(defined('PAGE') && (PAGE == 'login' || PAGE == 'register' || PAGE == 'complete_signup')){
if($route == '/login' || $route == '/register' || $route == '/complete_signup'){
$js .= '
<script>
$(function () {
Expand Down
1 change: 1 addition & 0 deletions upload/custom/templates/Bootstrap3/tfa.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

<p>{$TFA_ENTER_CODE}</p>
<input type="text" class="form-control" name="tfa_code">
<input type="hidden" name="tfa" value="true">
<input type="hidden" name="token" value="{$TOKEN}">
<br />
<input type="submit" value="{$SUBMIT}" class="btn btn-primary">
Expand Down
6 changes: 6 additions & 0 deletions upload/custom/templates/Bootstrap3/user/index.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@
{/foreach}
{/nocache}
</ul>
{if isset($FORUM_GRAPH)}
<div id="chartWrapper">
<h3>{$FORUM_GRAPH}</h3>
<canvas id="dataChart" width="100%" height="40"></canvas>
</div>
{/if}
</div>
</div>
</div>
Expand Down
13 changes: 13 additions & 0 deletions upload/custom/templates/Bootstrap3/widgets/online_staff.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<div class="panel panel-default">
<div class="panel-body">
<h2 style="margin-top:5px;">{$ONLINE_STAFF}</h2>
{if isset($ONLINE_STAFF_LIST)}
{foreach from=$ONLINE_STAFF_LIST name=online_staff_arr item=user}
<a style="{$user.style}" href="{$user.profile}"><img src="{$user.avatar}" alt="{$user.nickname}" class="img-rounded" style="max-height:20px;max-width:20px;"> {$user.username}</a>
{if not $smarty.foreach.online_staff_arr.last}, {/if}
{/foreach}
{else}
{$NO_STAFF_ONLINE}
{/if}
</div>
</div>
13 changes: 13 additions & 0 deletions upload/custom/templates/Bootstrap3/widgets/online_users.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<div class="panel panel-default">
<div class="panel-body">
<h2 style="margin-top:5px;">{$ONLINE_USERS}</h2>
{if isset($ONLINE_USERS_LIST)}
{foreach from=$ONLINE_USERS_LIST name=online_users_arr item=user}
<a style="{$user.style}" href="{$user.profile}"><img src="{$user.avatar}" alt="{$user.nickname}" class="img-rounded" style="max-height:20px;max-width:20px;"> {$user.username}</a>
{if not $smarty.foreach.online_users_arr.last}, {/if}
{/foreach}
{else}
{$NO_USERS_ONLINE}
{/if}
</div>
</div>

0 comments on commit 53c93ba

Please sign in to comment.