| 
					
				 | 
			
			
				@@ -9,119 +9,91 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 @using Microsoft.AspNetCore.Http 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 @model Masuit.MyBlogs.Core.Models.ViewModel.HomePageViewModel 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 @{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    ViewBag.Title = "首页"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    Layout = "~/Views/Shared/_Layout.cshtml"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    PooledList<FastShare> shares = ViewBag.FastShare; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    Context.Request.Path = new PathString("/posts"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    var sliderid = Stopwatch.GetTimestamp().ToBase(62); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  ViewBag.Title = "首页"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  Layout = "~/Views/Shared/_Layout.cshtml"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  PooledList<FastShare> shares = ViewBag.FastShare; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  Context.Request.Path = new PathString("/posts"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-<link href="~/Assets/banner/bootstrap-touch-slider.css" rel="stylesheet" /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-@if (Model.Banner.Any()) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    <div id="@sliderid" class="carousel bs-slider fade  control-round indicators-line" data-ride="carousel" data-pause="hover" data-interval="5000" id="@Stopwatch.GetTimestamp()"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        <ol class="carousel-indicators"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            @for (int i = 0; i < Model.Banner.Count; i++) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                if (i == 0) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    <li data-target="#@sliderid" data-slide-to="@i" class="active"></li> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                else 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    <li data-target="#@sliderid" data-slide-to="@i"></li> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        </ol> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        <div class="carousel-inner" id="@Stopwatch.GetTimestamp()"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            @for (int i = 0; i < Model.Banner.Count; i++) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                var p = Model.Banner[i]; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                string[] ani = { "zoomInRight", "flipInX", "fadeInLeft", "lightSpeedIn", "fadeInUp", "zoomInLeft", "fadeInRight" }; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                Random r = new Random(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                <div class="item @(i == 0 ? "active" : "")" class="img-responsive" id="@Stopwatch.GetTimestamp()"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    <a asp-controller="Advertisement" asp-action="Redirect" asp-route-id="@p.Id" target="_blank" data-animation="animated @ani[r.Next(ani.Length)]"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        <img src="@(p.ImageUrl+"?width=1800&format=webp")" title="@p.Title" alt="@p.Description" decoding="async"/> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    </a> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                </div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+<link href="~/Assets/banner/carousel.css" rel="stylesheet"/> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+@if (Model.Banner.Any()) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  <div class="carousel" id="@SnowFlake.NewId"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    @for (int i = 0; i < Model.Banner.Count; i++) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      if (i == 0) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        <div class="active carousel-slide fade-in"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          <a href="@Model.Banner[i].Url" target="_blank" title="@Model.Banner[i].Title"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <img alt="@(i + 1)" src="@Model.Banner[i].ImageUrl"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          </a> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         </div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        <a class="left carousel-control" href="#@sliderid" role="button" data-slide="prev"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            <span class="fa fa-angle-left" aria-hidden="true"></span> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            <span class="sr-only">上一个</span> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        </a> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        <a class="right carousel-control" href="#@sliderid" role="button" data-slide="next"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            <span class="fa fa-angle-right" aria-hidden="true"></span> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            <span class="sr-only">下一个</span> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        </a> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    </div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        <div class="carousel-slide"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          <a href="@Model.Banner[i].Url" target="_blank" title="@Model.Banner[i].Title"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <img alt="@(i + 1)" src="@Model.Banner[i].ImageUrl"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          </a> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        </div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    <button class="carousel-btn left">◀</button> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    <button class="carousel-btn right">▶</button> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    <div class="carousel-indicator"></div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  </div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-<br /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery.touchswipe/1.6.19/jquery.touchSwipe.min.js"></script> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-<script src="~/Assets/banner/bootstrap-touch-slider.min.js"></script> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-@if (Model.Notices.Any()) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    <div class="container notice"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        <a asp-controller="Notice" asp-action="Details" asp-route-id="@(Model.Notices[0].Id)"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            <h3 class="size18 text-red text-center">网站最新公告</h3> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        </a> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        @Html.Raw(Model.Notices[0].Content.Replace("img src=", $"img class='lazyload' title='{CommonHelper.SystemSettings["Title"]}' alt='{CommonHelper.SystemSettings["Title"]}' decoding='async' loading='lazy' data-src=")) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    </div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+<br/> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+@if (Model.Notices.Any()) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  <div class="container notice"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    <a asp-action="Details" asp-controller="Notice" asp-route-id="@(Model.Notices[0].Id)"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      <h3 class="size18 text-center text-red">网站最新公告</h3> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    </a> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    @Html.Raw(Model.Notices[0].Content.Replace("img src=", $"img class='lazyload' title='{CommonHelper.SystemSettings["Title"]}' alt='{CommonHelper.SystemSettings["Title"]}' decoding='async' loading='lazy' data-src=")) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  </div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-@if (shares.Any()) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    <div class="container padding-clear"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        <div class="panel panel-info"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            <div class="panel-heading">⚡小撇步Tips⚡</div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            <div class="panel-body padding-clear"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                <table class="table table-bordered margin-clear"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    @for (int i = 1; i < shares.Count + 1; i += 2) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        if (i < shares.Count) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                            <tr> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                                @if (string.IsNullOrEmpty(shares[i - 1].Link)) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                                { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                                    <td style="width: 50%">▸ @shares[i - 1].Title</td> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                                else 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                                { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                                    <td style="width: 50%">▸ <a href="@shares[i - 1].Link" target="_blank">@shares[i - 1].Title</a></td> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                                @if (string.IsNullOrEmpty(shares[i].Link)) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                                { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                                    <td style="width: 50%">▸ @shares[i].Title</td> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                                else 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                                { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                                    <td style="width: 50%">▸ <a href="@shares[i].Link" target="_blank">@shares[i].Title</a></td> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                            </tr> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        else 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                            if (string.IsNullOrEmpty(shares[i - 1].Link)) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                            { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                                <tr> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                                    <td colspan="2">▸ @shares[i - 1].Title</td> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                                </tr> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                            else 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                            { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                                <tr> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                                    <td colspan="2">▸ <a href="@shares[i - 1].Link" target="_blank">@shares[i - 1].Title</a></td> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                                </tr> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                </table> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            </div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        </div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+@if (shares.Any()) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  <div class="container padding-clear"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    <div class="panel panel-info"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      <div class="panel-heading">⚡小撇步Tips⚡</div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      <div class="padding-clear panel-body"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        <table class="margin-clear table table-bordered"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          @for (int i = 1; i < shares.Count + 1; i += 2) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            if (i < shares.Count) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              <tr> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                @if (string.IsNullOrEmpty(shares[i - 1].Link)) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                  <td style="width: 50%">▸ @shares[i - 1].Title</td> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                  <td style="width: 50%"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    ▸ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    <a href="@shares[i - 1].Link" target="_blank">@shares[i - 1].Title</a> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                  </td> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                @if (string.IsNullOrEmpty(shares[i].Link)) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                  <td style="width: 50%">▸ @shares[i].Title</td> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                  <td style="width: 50%"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    ▸ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    <a href="@shares[i].Link" target="_blank">@shares[i].Title</a> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                  </td> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              </tr> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              if (string.IsNullOrEmpty(shares[i - 1].Link)) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                <tr> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                  <td colspan="2">▸ @shares[i - 1].Title</td> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                </tr> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                <tr> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                  <td colspan="2"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    ▸ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    <a href="@shares[i - 1].Link" target="_blank">@shares[i - 1].Title</a> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                  </td> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                </tr> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        </table> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      </div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     </div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  </div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 @{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    var user = Context.Session.Get<UserInfoDto>(SessionKey.UserInfo) ?? new UserInfoDto(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    await Html.RenderPartialAsync(user.IsAdmin ? "_MainContainer_Admin" : "_MainContainer", Model); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  var user = Context.Session.Get<UserInfoDto>(SessionKey.UserInfo) ?? new UserInfoDto(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  await Html.RenderPartialAsync(user.IsAdmin ? "_MainContainer_Admin" : "_MainContainer", Model); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-<script type="text/javascript"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    $('#@sliderid').bsTouchSlider(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-</script> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+<script src="~/Assets/banner/carousel.js"></script> 
			 |