WM2MVC / after / PhotoGallery / PhotoGallery / Views / Shared / _Layout.cshtml

<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="utf-8" />
        <title>@ViewBag.Title</title> 
        <link href="@Url.Content("~/Content/Site.css")" rel="stylesheet" />
        <link href="@Url.Content("~/favicon.ico")" rel="shortcut icon" type="image/x-icon" />
        <script src="@Url.Content("~/Scripts/jquery-1.5.1.min.js")" type="text/javascript"></script>
        <script src="@Url.Content("~/Scripts/jquery.ie9ify.js")" type="text/javascript"></script>
        <script type="text/javascript">
            $().ready(function () {
                $('head').ie9ify({
                    navColor: 'Yellow',
                    tasks: [
                        {
                            'name': 'Galleries',
                            'action': '/Gallery',
                            'icon': '/Content/Images/icon-gallery.ico'
                        },
                        {
                            'name': 'Tags',
                            'action': '/Tag',
                            'icon': '/Content/Images/icon-tags.ico'
                        },
                        {
                            'name': 'Account',
                            'action': '/User',
                            'icon': '/Content/Images/icon-account.ico'
                        }
                    ]
                });

                $('#site-logo').ie9ify('enablePinning');

                $('#header').ie9ify('pinTeaser', {
                    addStartLink: false
                });

                if ($.ie9ify.isPinned()) {
                    $.getJSON('Gallery/List', function (data) {
                        var itemList = [];

                        $.each(data, function (key, val) {
                            var item = {
                                'name': data[key].name,
                                'url': 'Gallery/View/' + data[key].id,
                                'icon': '/Content/Images/icon-gallery.ico'
                            };

                            itemList.push(item);
                        });

                        $.ie9ify.addJumpList({
                            title: 'Photo Galleries',
                            items: itemList
                        });
                    });

                    $.ie9ify.createThumbbarButtons({
                        buttons: [{
                            icon: '/Content/Images/download.ico',
                            name: 'Download Images',
                            click: function () {
                                document.location = 'Gallery';
                            }
                        },
                        {
                            icon: '/Content/Images/icon-tags.ico',
                            name: 'Tag Images',
                            click: function () {
                                document.location = 'Tag';
                            }
                        }]
                    });

                    setInterval(function () {
                        $.getJSON('Photo/CommentsForUser/' + new Date().getTime() , function (data) {
                            $.ie9ify.clearOverlay();

                            var itemList = [];
                            var commentCount = parseInt($('#commentCount').val());

                            if (data.length > commentCount) {
                                $.ie9ify.flashTaskbar();
                                $('#commentCount').val(data.length);

                                $.ie9ify.addOverlay({
                                    title: 'New comment: ' + data[0].text + ' (' + data[0].date + ')',
                                    icon: '/Content/Images/comment.ico'
                                });
                            }
                        });
                   }, 5000);
                }
            });
        </script>
    </head>
    <body>
    <div id="header"></div>
    <div id="banner">
            <p class="site-title">
                <img alt="Photo Gallery Site Logo" id="site-logo" src="@Url.Content("~/Content/Images/galleryIcon.ico")" width="32" height="32" />
                <a href="@Url.Action("Default", "Gallery")">Photo Gallery</a>
            </p>
            <ul id="menu">
                <li class="galleries"><a href="@Url.Action("Default", "Gallery")">Galleries</a></li>
                <li class="tags"><a href="@Url.Action("Default", "Tag")">Tags</a></li>
                <li class="account"><a href="@Url.Action("Default", "User")">Account</a></li>
                <li class="login">
                    @if (WebSecurity.IsAuthenticated)
                    {
                        <text>Welcome <strong>@WebSecurity.CurrentUserName</strong>!
                        <a href="@Url.Action("Logout", "Account")">Logout</a></text>
                    }
                    else
                    {
                        <text><a href="@Url.Action("Login", "Account")">Login</a></text>
                    }
                </li>
            </ul>
        </div>        
        <div id="page">
            @RenderBody()
        </div>
        <div id="footer">
            &copy; @DateTime.Now.Year - Photo Gallery 
        </div>
        <input type="hidden" id="commentCount" value="0" />
    </body>
</html>
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.