Click here to Skip to main content
15,891,136 members
Articles / Web Development / HTML

sBlog.Net - A Minimalistic Blog Engine - Using ASP.NET MVC 3

Rate me:
Please Sign up or sign in to vote.
4.94/5 (55 votes)
16 Aug 2013CPOL51 min read 197.6K   6.4K   182  
sBlog.Net is a minimalistic blog engine created using the ASP.NET MVC 3 framework.
@model sBlog.Net.ShortCodeManager.SyntaxPossibilitiesViewModel

@if (Model.IsEnabled)
{
    <a href="javascript:void(0)" id="showHelp">syntax highlighter usage</a>

    <div id="dialog" title="Syntax Highlighter Help">
        <div class="selected-brushes-title">Selected brushes:</div>
        <br/>
        <div id="accordion">
            @foreach (sBlog.Net.ShortCodeManager.Entities.SyntaxPossibility possibility in Model.SyntaxPossibilities)
            {
                var cssClass = possibility.IsSelected ? "possibilityHeader brush-selected" : "possibilityHeader brush-not-selected";
                <div class="@cssClass">
                    Brush: @possibility.BrushName
                </div>
                <div class="possibilityContent">
                    @foreach (var alias in possibility.PossibleAliases)
                    {
                        @:&lt;pre class="brush: @alias;"&gt;<br/>
                        <span style="white-space: pre">        </span>
                        @:// Some code for @alias brush<br/>
                        @:&lt;/pre&gt;
                        <hr />
                    }
                </div>
            }
        </div>
    
        <div style="float: right">
            <input type="checkbox" id="chk-show-all" />
            <label for="chk-show-all">Show all brushes (including unselected)</label>
        </div>
    </div>
}
else
{
    <span>syntax highlighter: </span> @Html.RouteLink("enable", "AdminSyntaxHighlighterOptions")
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer (Senior)
United States United States
Just another passionate software developer!

Some of the contributions to the open source world - a blog engine written in MVC 4 - sBlog.Net. Check it out here. For the codeproject article regarding sBlog.Net click here!

(Figuring out this section!)

Comments and Discussions