1
0
mirror of https://git.teknik.io/Teknikode/Teknik.git synced 2023-08-02 14:16:22 +02:00

Modified commit hash to display truncated version and link to repo.

This commit is contained in:
Uncled1023 2016-02-28 15:57:25 -08:00
parent 17ca1a4ed9
commit 2fbcfb3373
3 changed files with 20 additions and 1 deletions

View File

@ -0,0 +1,17 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
namespace Teknik.Helpers
{
public static class StringExtensions
{
public static string Truncate(this string value, int maxLength)
{
if (string.IsNullOrEmpty(value)) return value;
return value.Length <= maxLength ? value : value.Substring(0, maxLength);
}
}
}

View File

@ -268,6 +268,7 @@
<Compile Include="Helpers\MarkdownHelper.cs" />
<Compile Include="Helpers\RequestHelper.cs" />
<Compile Include="Helpers\RSSFeedResult.cs" />
<Compile Include="Helpers\StringExtensions.cs" />
<Compile Include="Helpers\Tracking.cs" />
<Compile Include="Helpers\UrlExtensions.cs" />
<Compile Include="Helpers\Utility.cs" />

View File

@ -1,5 +1,6 @@
@using System.Diagnostics;
@using System.Reflection;
@using Teknik.Helpers;
<footer id="footer" class="footer navbar navbar-default">
<div class="container">
@ -24,7 +25,7 @@
</div>
<div class="row">
<div class="col-md-12 text-center text-muted">
Version: @string.Format("{0}.{1} - Hash: {2}", verNum, commitVer, commitHash)
Version: @string.Format("{0}.{1}", verNum, commitVer) - Hash: <a href="http://git.teknik.io/Teknikode/Teknik/src/@commitHash">@commitHash.Truncate(10)</a>
</div>
</div>
</div>