Starting from scratch, build the blog system Mvc5+ef6 frame (4), the layout of the front and back platform to achieve, publish blog and display.

Source: Internet
Author: User
Tags button type system log

I. Blog system Progress Review

has been completed, the foreground display, as well as the background release of the function, recently in doing this, in fact, I can finish in the national day, but every day I make, suddenly the last 2 days of National Day, even the computer do not want to touch, so have been dragged, On a written front-end implementation of some of the WebUI framework and some of the system used in the JS plug-in, in fact, wrote so long, or the first time, someone left a message, do not rotten tail, feeling or a bit of value, at least some attention.

Nonsense not much to say, now start on the code.

second, the blog system background layout implementation

2.1. Here is the MVC layout page to implement, the background is mainly divided into three parts: navigation, menu, main content

Code implementation:

This is where the background is placed in a single area, so I'm building an admin area here.

Introduce some common CSS files and JS files in the layout page _layout.cshtml

Layout page Code _layout.cshtml:

  1 <!  DOCTYPE html> 2 View Code

Menu partial page _sidebar.cshtml code

  1 @{2 String url = Request.Url.ToString ().
  ToLower (); 3} 4 @if (URL. Contains ("Home")) 5 {6 <aside class= "col-sm-3 col-md-2 Sidebar" > 7 <nav class= "Sidebar-nav"
  ;                     8 <ul class= "Metismenu" id= "menu" > 9 <li class= "Active" > 10                         <a href= "#" aria-expanded= "true" > One <i class= "icon Icon-github" ></i> 12                     System statistics <i class= "FA Arrow fa-fw" ></i> </a> 14 <ul aria-expanded= "true" > <li> <a href= "/ad                                 Min/statistics/visitor "> <i class=" icon icon-list "></i> 18                         Visit Statistics </a> </li> 21 <li>A href= "/ADMIN/STATISTICS/USESR" > <i class= "icon Icon-github" ></i> 24
 User Statistics </a> </li>                     </ul> </li> <li> 30 <a href= "#" aria-expanded= "false" > Blog admin <i class= "FA Arrow fa-fw" ></i></a> 31 & Lt;ul aria-expanded= "false" > <li><a href= "/admin/blogarticle/index" > Blog list </a&                     gt;</li> <li><a href= "/admin/blogarticle/add" > Post blog </a></li> 34 </ul> </li> + <li> Notoginseng A href= "#" aria-expanded= "false" > AD management <i class= "FA Arrow FA-FW" ></i></a>-< UL aria-expanded= "false"> <li><a href= "@Url. Action (" index "," advertisement ")" > Wheel Map Management </a></li&gt
 ;                     </ul> a </li> 43 <li> <a href= "#" aria-expanded= "false" > User Management <i class= "FA Arrow fa-fw" ></i></a> 44 &                         Lt;ul aria-expanded= "false" > <li><a href= "#" > Modify Information </a></li> 46                             <li><a href= "#" > Change Password </a></li> $ <li> 48 <a href= "#" aria-expanded= "false" > User information Management <span class= "FA plus-times" ></span></a > <ul aria-expanded= "false" > <li><a href= "#" > Modify information </a></li> wuyi <li><a href= "#" > Modify password </a></l            I> 52                 </ul> </li> 55 </ul> </li> <li> <a href= "#" aria-expanded= "false" > Rights Management <i CL                         ass= "FA Arrow fa-fw" ></i></a> <ul aria-expanded= "false" > 59 <li><a href= "#" > User authorization </a></li> <li><a href= "#" > User Group Tube                     Rationale </a></li> <li><a href= "#" > User Group Authorization </a></li> 62 </ul> </li> <a <li> href= "#" Aria-expanded= "false" > Log management <i class= "FA Arrow fa-fw" ></i></a> <ul Aria-expa                         Nded= "false" > <li><a href= "#" > User log </a></li> 68 <li><a HREf= "#" > System log </a></li> blog </ul> </li> ;/ul> (</nav>) (URL. Contains ("Blogarticle")) <aside class= "col-sm-3 col-md-2 sidebar" > <nav class= "sidebar-" Nav "> <ul class=" metismenu "id=" menu "> Ba                         ; a href= "#" aria-expanded= "true" > <i class= "icon Icon-github" ></i> 83                     System statistics <i class= "FA Arrow fa-fw" ></i> </a> 85 <ul aria-expanded= "true" > <li> <a href= "/admin/                                 Statistics/visitor "> <i class=" icon icon-list "></i> 89
 Access Statistics </a></li> a <li> <a href= "                                 /ADMIN/STATISTICS/USESR "> <i class=" icon Icon-github ></i> 95                     User statistics </a>% </li> 98                     </ul> </li> <li class= "active" > 101                     <a href= "#" aria-expanded= "false" > Blog admin <i class= "FA Arrow FA-FW" ></i></a> 102 <ul aria-expanded= "false" > <li><a href= "/admin/blogarticle/index" > Blog list & lt;/a></li> <li><a href= "/admin/blogarticle/add" > Post blog </a></li&gt
;                     </ul> (</li>) <li> 108 <a href= "#" Aria-eXpanded= "false" > AD management <i class= "FA Arrow FA-FW" ></i></a> 109 <ul " False "> <li><a href=" @Url. Action ("index", "advertisement") "> Carousel Map Management </a><                     /li> </ul> 112 </li> 113 <li> 114                     <a href= "#" aria-expanded= "false" > User Management <i class= "FA Arrow FA-FW" ></i></a> 115 
<ul aria-expanded= "false" > 116 <li><a href= "#" > Modify Information </a></li>
117 <li><a href= "#" > Modify password </a></li> 118 <li> 119 <a href= "#" aria-expanded= "false" > User information Management <span class= "FA plus-times" ></span& Gt;</a> <ul aria-expanded= "false" > 121 <li& Gt;<a href= "#" > Amendment LetterInterest </a></li> 122 <li><a href= "#" > Modify password </a></li> 123                 </ul> 124 </li> 126 </li> 127 <li> 128 <a href= "#" aria-expanded= "false" > Rights Management &L  T;i

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.