This repository has been archived by the owner on Jul 15, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 8
/
_SiteLayout.Mobile.cshtml
71 lines (63 loc) · 3.34 KB
/
_SiteLayout.Mobile.cshtml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>@Page.Title</title>
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<link href="~/favicon.ico" rel="shortcut icon" type="image/x-icon" />
<script src="~/Scripts/modernizr-2.5.3.js"></script>
<link rel="stylesheet" href="~/Content/jquery.mobile-1.0.min.css" />
<link rel="stylesheet" href="~/Content/Site.mobile.css" />
<script src="~/Scripts/modernizr-2.5.3.js"></script>
<script src="~/Scripts/jquery-1.7.1.min.js"></script>
<script src="~/Scripts/jquery.mobile-1.0.min.js"></script>
<script type="text/javascript">
$(document).live("pagechange", function(e, data) {
var root = $(location).attr('hash').split("/")[1];
if(root == "User") {
$(this).find('div[data-role="navbar"] a[data-id="user"]').addClass('ui-btn-active');
$(this).find('div[data-role="navbar"] a[data-id="tags"]').removeClass('ui-btn-active');
$(this).find('div[data-role="navbar"] a[data-id="galleries"]').removeClass('ui-btn-active');
}
else if(root == "Tag") {
$(this).find('div[data-role="navbar"] a[data-id="tags"]').addClass('ui-btn-active');
$(this).find('div[data-role="navbar"] a[data-id="user"]').removeClass('ui-btn-active');
$(this).find('div[data-role="navbar"] a[data-id="galleries"]').removeClass('ui-btn-active');
}
else {
$(this).find('div[data-role="navbar"] a[data-id="galleries"]').addClass('ui-btn-active');
$(this).find('div[data-role="navbar"] a[data-id="user"]').removeClass('ui-btn-active');
$(this).find('div[data-role="navbar"] a[data-id="tags"]').removeClass('ui-btn-active');
}
});
</script>
</head>
<body>
<div id="page" class="group" data-role="page">
<div data-role="header" data-position="fixed" data-theme="c">
<div data-role="header" data-theme="c">
<h1>Photo Gallery</h1>
</div>
@if (WebSecurity.IsAuthenticated) {
<a href="~/Account/Logout" class="ui-btn-right">Logout</a>
} else {
<a href="~/Account/Login" class="ui-btn-right">Login</a>
}
<div data-role="navbar">
<ul id="menu">
<li class="galleries"><a data-id="galleries" href="~/">Galleries</a></li>
<li class="tags"><a data-id="tags" href="~/Tag">Tags</a></li>
<li class="account"><a data-id="user" href="~/User">Account</a></li>
</ul>
</div> <!-- \nav -->
</div> <!-- \header -->
<div id="page" data-role="content">
@RenderBody()
@RenderSection("Scripts", required: false)
</div>
<div id="footer" data-role="footer" data-theme="c" data-position="fixed">
© @DateTime.Now.Year - Photo Gallery
</div>
</div>
</body>
</html>