GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — 首页 · ISmallCode/SmallCode.Web@be153cf

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • src/SmallCode.Web
    • Controllers
      • HomeController.cs
    • DataModels
      • HomeInfoModel.cs
    • Views/Home
      • Index.cshtml
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎src/SmallCode.Web/Controllers/HomeController.cs‎

Copy file name to clipboardExpand all lines: src/SmallCode.Web/Controllers/HomeController.cs
+5-2Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@ public IActionResult Index()
4747
homeInfo.Description = item.Description.SubString(100, "......");
4848
homeInfo.CreateDate = item.CreateDate;
4949
homeInfo.Category = "原创文章";
50-
50+
homeInfo.Browses = item.Browses;
51+
homeInfo.Url = "/Article/Show/" + item.Id;
5152
homeInfoes.Add(homeInfo);
5253
}
5354
foreach (var item in materialses)
@@ -66,6 +67,8 @@ public IActionResult Index()
6667
homeInfo.Description = item.Description.SubString(100, "......");
6768
homeInfo.CreateDate = item.CreateDate;
6869
homeInfo.Category = "学习资料";
70+
homeInfo.Browses = item.Browses;
71+
homeInfo.Url = "/Materials/Show/" + item.Id;
6972
}
7073

7174
//动态用户信息
@@ -82,7 +85,7 @@ public IActionResult Index()
8285

8386
ViewBag.Infoes = infoes;
8487
ViewBag.Users = userList;
85-
ViewBag.HomeInfoes = homeInfoes.OrderByDescending(x=>x.CreateDate).ToList();
88+
ViewBag.HomeInfoes = homeInfoes.OrderByDescending(x => x.CreateDate).ToList();
8689

8790

8891

Collapse file

‎src/SmallCode.Web/DataModels/HomeInfoModel.cs‎

Copy file name to clipboardExpand all lines: src/SmallCode.Web/DataModels/HomeInfoModel.cs
+4Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,9 @@ public class HomeInfoModel
1616
public DateTime CreateDate { set; get; }
1717

1818
public string Category { set; get; }
19+
20+
public int Browses { set; get; }
21+
22+
public string Url { set; get; }
1923
}
2024
}
Collapse file

‎src/SmallCode.Web/Views/Home/Index.cshtml‎

Copy file name to clipboardExpand all lines: src/SmallCode.Web/Views/Home/Index.cshtml
+6-4Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,14 +44,16 @@
4444
{
4545
<article class="excerpt excerpt-none excerpt-5 article53">
4646
<header>
47-
<a class="cat label label-important" target="_blank" href="http://www.wscon.cn/category-1.html" data-original-title="" title="">@item.Category<i class="label-arrow"></i></a><h2><a href="http://www.wscon.cn/53.html" target="_blank" title="vsftpd 配置:chroot_local_user与chroot_list_enable详解 ">@item.Title</a></h2>
47+
<a class="cat label label-important" target="_blank" href="" data-original-title="" title="">@item.Category<i class="label-arrow"></i></a>
48+
<h2><a href="@item.Url" target="_blank" title="@item.Title">@item.Title</a></h2>
4849
</header>
4950
<div class="text-muted time"><span class="post-time nmpost"><i class="fa fa-clock-o"></i> 发布于 @item.CreateDate</span></div>
5051
<span class="note">@item.Description</span>
5152
<div class="text-muted views">
52-
<span class="post-views"><i class="fa fa-eye"></i> 阅读(31)</span>
53-
<a href="javascript:;" class="post-like sf-praise-sdk pull-right" sfa="click" data-postid="53" data-value="1"><i class="fa fa-thumbs-o-up"></i>赞一个 (<span class="sf-praise-sdk" sfa="num" data-value="1" data-postid="53">0</span>)</a>
54-
<span class="post-comments"><i class="fa fa-comments"></i> 评论(0)</span>
53+
<span class="post-views"><i class="fa fa-eye"></i> @item</span>
54+
@* <a href="javascript:;" class="post-like sf-praise-sdk pull-right" sfa="click" data-postid="53" data-value="1">
55+
<i class="fa fa-thumbs-o-up"></i>赞一个 (<span class="sf-praise-sdk" sfa="num" data-value="1" data-postid="53">0</span>)</a>*@
56+
<span class="post-comments"><i class="fa fa-comments"></i></span>
5557
</div>
5658
</article>
5759
}

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.