3. ABPZero series of tutorials: how to modify and optimize the seller's tool project, abpzero seller

Source: Internet
Author: User

3. ABPZero series of tutorials: how to modify and optimize the seller's tool project, abpzero seller

This article is complex and simple. It does not require multi-tenant, multi-language, MPA (Multi-page), and increases page loading speeds ......

After logging on to the system, you will see the following interface. This is not the final result. You can modify it one by one.

 

Multi-tenant is not required

The AbpZeroTemplateConsts. cs code is modified as follows:

File Path: D: \ abp version \ aspnet-zero-3.4.0 \ aspnet-zero-3.4.0 \ src \ MyCompanyName. AbpZeroTemplate. Core \ AbpZeroTemplateConsts. cs

/// <Summary> /// false indicates that multi-tenant is not enabled. The default value is enable /// </summary> public const bool MultiTenancyEnabled = false;

 

Use local clock

Modify the Global. asax. cs Code as follows:

File Path: D: \ abp version \ aspnet-zero-3.4.0 \ aspnet-zero-3.4.0 \ src \ MyCompanyName. AbpZeroTemplate. Web \ Global. asax. cs

protected override void Application_Start(object sender, EventArgs e)        {            //Use UTC clock. Remove this to use local time for your application.            //Clock.Provider = ClockProviders.Utc;            Clock.Provider = ClockProviders.Local;

 

After logon, change to mpa by default.

The ApplicationController. cs code is modified as follows:

File Path: D: \ abp version \ aspnet-zero-3.4.0 \ aspnet-zero-3.4.0 \ src \ MyCompanyName. AbpZeroTemplate. Web \ Controllers \ ApplicationController. cs

Public ActionResult Index () {/* enable the next line to redirect to the multi-page application */return RedirectToAction ("Index", "Home ", new {area = "Mpa"}); // return View ("~ /App/common/views/layout. cshtml "); // Layout of the angular application .}

 

Remove multiple languages and retain simplified text

Go to the system and set the simplified center to the default language.

The code of the _ Header. cshtml file is modified as follows:

File Path: D: \ abp version \ aspnet-zero-3.4.0 \ aspnet-zero-3.4.0 \ src \ MyCompanyName. AbpZeroTemplate. Web \ Areas \ Mpa \ Views \ Layout \ _ Header. cshtml

 

Search @ if (Model. Ages. Count> 1) and delete the code.

 

Increases loading speed without using Google Fonts

 

Google fonts are used in jtable control styles, and each access is particularly slow.
1.open the jtable.css File
File Path: D: \ abp version \ aspnet-zero-3.4.0 \ aspnet-zero-3.4.0 \ src \ MyCompanyName. AbpZeroTemplate. Web \ libs \ jquery-jtable \ themes \ metro \ blue \ jtable.css

Comment out the Google-related connections and save them.

@font-face {  font-family: 'Open Sans';  font-style: normal;  font-weight: 300;  /*src: local('Open Sans Light'), local('OpenSans-Light'), url(http://themes.googleusercontent.com/static/fonts/opensans/v6/DXI1ORHCpsQm3Vp6mXoaTRa1RVmPjeKy21_GQJaLlJI.woff) format('woff');*/}

 

2. Open the StylePaths. cs File
[.. \ MyCompanyName. AbpZeroTemplate. Web \ App_Start \ Bundling \ StylePaths. cs]
Replace jtable.min.csswith jtable.css, save and generate

 

Finally, generate a project and log on again, as shown in

 

Total returned directory

 

Related Article

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.