This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@using System.Xml.Linq; | |
@using umbraco.cms.businesslogic.web; | |
@using System.Web.Configuration; | |
@using System.Text; | |
@inherits Umbraco.Web.Macros.PartialViewMacroPage | |
@{ | |
List<string> contentTypes = new List<string>() { "Article" }; | |
// Current site root |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@inherits Umbraco.Web.Mvc.UmbracoTemplatePage | |
@{ | |
Layout = "Master.cshtml"; | |
} | |
@{ | |
int currentPage = 1; | |
int.TryParse(Request.QueryString["p"] + "", out currentPage); | |
var model = new Pagination() | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// <binding ProjectOpened='watch' /> | |
module.exports = function (grunt) { | |
'use strict'; | |
// Project configuration. | |
grunt.initConfig({ | |
pkg: grunt.file.readJSON('package.json'), | |
less: { | |
dist: { | |
options: { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace Project.Web { | |
public class StringExtensions { | |
/// <summary> | |
/// Convert the string to Pascal case. | |
/// </summary> | |
/// <param name="strValue"></param> | |
/// <returns></returns> | |
public static string ToPascalCase(this string strValue) | |
{ | |
// If there are 0 or 1 characters, just return the string. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@model Pagination | |
@RenderPagination(model) | |
@helper RenderPagination(Pagination model) | |
{ | |
<nav> | |
<ul class="pagination"> | |
<li class="@(model.Page <= 1 ? "disabled" : string.Empty)"> | |
<a href="@(model.Page > 1 ? "?p=" + (model.Page-1) : "#" )" aria-label="Previous"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections.Generic; | |
using System.Net.Mail; | |
using System.Text; | |
using Umbraco.Core.Models; | |
using Umbraco.Web; | |
using Tasks = System.Threading.Tasks; | |
namespace ProjectName.Web.Services | |
{ | |
public class EmailService |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Text.RegularExpressions; | |
using System.Web; | |
namespace Umbraco.Web | |
{ | |
public static class UmbracoExtensions |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections.Generic; | |
using System.Linq; | |
namespace System.Web | |
{ | |
public static class StringExtensions { | |
/// <summary> | |
/// Splits a string into parts | |
/// </summary> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Linq; | |
using System.Text; | |
using System.Text.RegularExpressions; | |
namespace System.Web.Mvc | |
{ | |
public static class HtmlHelperExtensions | |
{ | |
#region HtmlHelper Extensions | |
public static string Email(this HtmlHelper helper, string email, string message = "JavaScript is disabled, please enable to read this email address") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
namespace System.Web | |
{ | |
public static class DateTimeExtensions { | |
#region Momentjs | |
/// <summary> | |
/// | |
/// </summary> |
OlderNewer