初始化webSite
8
Examples/website/FreeSql.Site.DAL/Class1.cs
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
using System;
|
||||||
|
|
||||||
|
namespace FreeSql.Site.DAL
|
||||||
|
{
|
||||||
|
public class Class1
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
11
Examples/website/FreeSql.Site.DAL/FreeSql.Site.DAL.csproj
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<TargetFramework>netcoreapp2.1</TargetFramework>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="..\..\..\FreeSql\FreeSql.csproj" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
</Project>
|
8
Examples/website/FreeSql.Site.Entity/Class1.cs
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
using System;
|
||||||
|
|
||||||
|
namespace FreeSql.Site.Entity
|
||||||
|
{
|
||||||
|
public class Class1
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,7 @@
|
|||||||
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<TargetFramework>netcoreapp2.1</TargetFramework>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
</Project>
|
@ -0,0 +1,95 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using FreeSql.Site.UI.Controllers;
|
||||||
|
using Microsoft.AspNetCore.Http;
|
||||||
|
using Microsoft.AspNetCore.Mvc;
|
||||||
|
|
||||||
|
namespace FreeSql.Site.UI.Areas.Doc.Controllers
|
||||||
|
{
|
||||||
|
[Area("Doc")]
|
||||||
|
public class DocumentsController : BaseController
|
||||||
|
{
|
||||||
|
// GET: Documents
|
||||||
|
public ActionResult Index()
|
||||||
|
{
|
||||||
|
return View();
|
||||||
|
}
|
||||||
|
|
||||||
|
// GET: Documents/Details/5
|
||||||
|
public ActionResult Details(int id)
|
||||||
|
{
|
||||||
|
return View();
|
||||||
|
}
|
||||||
|
|
||||||
|
// GET: Documents/Create
|
||||||
|
public ActionResult Create()
|
||||||
|
{
|
||||||
|
return View();
|
||||||
|
}
|
||||||
|
|
||||||
|
// POST: Documents/Create
|
||||||
|
[HttpPost]
|
||||||
|
[ValidateAntiForgeryToken]
|
||||||
|
public ActionResult Create(IFormCollection collection)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
// TODO: Add insert logic here
|
||||||
|
|
||||||
|
return RedirectToAction(nameof(Index));
|
||||||
|
}
|
||||||
|
catch
|
||||||
|
{
|
||||||
|
return View();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// GET: Documents/Edit/5
|
||||||
|
public ActionResult Edit(int id)
|
||||||
|
{
|
||||||
|
return View();
|
||||||
|
}
|
||||||
|
|
||||||
|
// POST: Documents/Edit/5
|
||||||
|
[HttpPost]
|
||||||
|
[ValidateAntiForgeryToken]
|
||||||
|
public ActionResult Edit(int id, IFormCollection collection)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
// TODO: Add update logic here
|
||||||
|
|
||||||
|
return RedirectToAction(nameof(Index));
|
||||||
|
}
|
||||||
|
catch
|
||||||
|
{
|
||||||
|
return View();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// GET: Documents/Delete/5
|
||||||
|
public ActionResult Delete(int id)
|
||||||
|
{
|
||||||
|
return View();
|
||||||
|
}
|
||||||
|
|
||||||
|
// POST: Documents/Delete/5
|
||||||
|
[HttpPost]
|
||||||
|
[ValidateAntiForgeryToken]
|
||||||
|
public ActionResult Delete(int id, IFormCollection collection)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
// TODO: Add delete logic here
|
||||||
|
|
||||||
|
return RedirectToAction(nameof(Index));
|
||||||
|
}
|
||||||
|
catch
|
||||||
|
{
|
||||||
|
return View();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,4 @@
|
|||||||
|
@*
|
||||||
|
For more information on enabling MVC for empty projects, visit http://go.microsoft.com/fwlink/?LinkID=397860
|
||||||
|
*@
|
||||||
|
文档首页
|
@ -0,0 +1,13 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using Microsoft.AspNetCore.Mvc;
|
||||||
|
|
||||||
|
namespace FreeSql.Site.UI.Controllers
|
||||||
|
{
|
||||||
|
public class BaseController : Controller
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,43 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Diagnostics;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using Microsoft.AspNetCore.Mvc;
|
||||||
|
using FreeSql.Site.UI.Models;
|
||||||
|
|
||||||
|
namespace FreeSql.Site.UI.Controllers
|
||||||
|
{
|
||||||
|
public class HomeController : Controller
|
||||||
|
{
|
||||||
|
public IActionResult Index()
|
||||||
|
{
|
||||||
|
return View();
|
||||||
|
}
|
||||||
|
|
||||||
|
public IActionResult About()
|
||||||
|
{
|
||||||
|
ViewData["Message"] = "Your application description page.";
|
||||||
|
|
||||||
|
return View();
|
||||||
|
}
|
||||||
|
|
||||||
|
public IActionResult Contact()
|
||||||
|
{
|
||||||
|
ViewData["Message"] = "Your contact page.";
|
||||||
|
|
||||||
|
return View();
|
||||||
|
}
|
||||||
|
|
||||||
|
public IActionResult Privacy()
|
||||||
|
{
|
||||||
|
return View();
|
||||||
|
}
|
||||||
|
|
||||||
|
[ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)]
|
||||||
|
public IActionResult Error()
|
||||||
|
{
|
||||||
|
return View(new ErrorViewModel { RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier });
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
21
Examples/website/FreeSql.Site.UI/FreeSql.Site.UI.csproj
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<TargetFramework>netcoreapp2.1</TargetFramework>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<PackageReference Include="Microsoft.AspNetCore.App" />
|
||||||
|
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="2.1.1" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<Folder Include="Areas\BBS\Controllers\" />
|
||||||
|
<Folder Include="Areas\BBS\Data\" />
|
||||||
|
<Folder Include="Areas\BBS\Models\" />
|
||||||
|
<Folder Include="Areas\BBS\Views\" />
|
||||||
|
<Folder Include="Areas\Doc\Data\" />
|
||||||
|
<Folder Include="Areas\Doc\Models\" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
</Project>
|
11
Examples/website/FreeSql.Site.UI/Models/ErrorViewModel.cs
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
using System;
|
||||||
|
|
||||||
|
namespace FreeSql.Site.UI.Models
|
||||||
|
{
|
||||||
|
public class ErrorViewModel
|
||||||
|
{
|
||||||
|
public string RequestId { get; set; }
|
||||||
|
|
||||||
|
public bool ShowRequestId => !string.IsNullOrEmpty(RequestId);
|
||||||
|
}
|
||||||
|
}
|
24
Examples/website/FreeSql.Site.UI/Program.cs
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.IO;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using Microsoft.AspNetCore;
|
||||||
|
using Microsoft.AspNetCore.Hosting;
|
||||||
|
using Microsoft.Extensions.Configuration;
|
||||||
|
using Microsoft.Extensions.Logging;
|
||||||
|
|
||||||
|
namespace FreeSql.Site.UI
|
||||||
|
{
|
||||||
|
public class Program
|
||||||
|
{
|
||||||
|
public static void Main(string[] args)
|
||||||
|
{
|
||||||
|
CreateWebHostBuilder(args).Build().Run();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static IWebHostBuilder CreateWebHostBuilder(string[] args) =>
|
||||||
|
WebHost.CreateDefaultBuilder(args)
|
||||||
|
.UseStartup<Startup>();
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,27 @@
|
|||||||
|
{
|
||||||
|
"iisSettings": {
|
||||||
|
"windowsAuthentication": false,
|
||||||
|
"anonymousAuthentication": true,
|
||||||
|
"iisExpress": {
|
||||||
|
"applicationUrl": "http://localhost:59757",
|
||||||
|
"sslPort": 44395
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"profiles": {
|
||||||
|
"IIS Express": {
|
||||||
|
"commandName": "IISExpress",
|
||||||
|
"launchBrowser": true,
|
||||||
|
"environmentVariables": {
|
||||||
|
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"FreeSql.Site.UI": {
|
||||||
|
"commandName": "Project",
|
||||||
|
"launchBrowser": true,
|
||||||
|
"applicationUrl": "https://localhost:5001;http://localhost:5000",
|
||||||
|
"environmentVariables": {
|
||||||
|
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
12
Examples/website/FreeSql.Site.UI/ScaffoldingReadMe.txt
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
Scaffolding has generated all the files and added the required dependencies.
|
||||||
|
|
||||||
|
However the Application's Startup code may required additional changes for things to work end to end.
|
||||||
|
Add the following code to the Configure method in your Application's Startup class if not already done:
|
||||||
|
|
||||||
|
app.UseMvc(routes =>
|
||||||
|
{
|
||||||
|
routes.MapRoute(
|
||||||
|
name : "areas",
|
||||||
|
template : "{area:exists}/{controller=Home}/{action=Index}/{id?}"
|
||||||
|
);
|
||||||
|
});
|
75
Examples/website/FreeSql.Site.UI/Startup.cs
Normal file
@ -0,0 +1,75 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using Microsoft.AspNetCore.Builder;
|
||||||
|
using Microsoft.AspNetCore.Hosting;
|
||||||
|
using Microsoft.AspNetCore.Http;
|
||||||
|
using Microsoft.AspNetCore.HttpsPolicy;
|
||||||
|
using Microsoft.AspNetCore.Mvc;
|
||||||
|
using Microsoft.Extensions.Configuration;
|
||||||
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
|
|
||||||
|
namespace FreeSql.Site.UI
|
||||||
|
{
|
||||||
|
public class Startup
|
||||||
|
{
|
||||||
|
public Startup(IConfiguration configuration)
|
||||||
|
{
|
||||||
|
Configuration = configuration;
|
||||||
|
}
|
||||||
|
|
||||||
|
public IConfiguration Configuration { get; }
|
||||||
|
|
||||||
|
// This method gets called by the runtime. Use this method to add services to the container.
|
||||||
|
public void ConfigureServices(IServiceCollection services)
|
||||||
|
{
|
||||||
|
services.Configure<CookiePolicyOptions>(options =>
|
||||||
|
{
|
||||||
|
// This lambda determines whether user consent for non-essential cookies is needed for a given request.
|
||||||
|
options.CheckConsentNeeded = context => true;
|
||||||
|
options.MinimumSameSitePolicy = SameSiteMode.None;
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_1);
|
||||||
|
}
|
||||||
|
|
||||||
|
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
|
||||||
|
public void Configure(IApplicationBuilder app, IHostingEnvironment env)
|
||||||
|
{
|
||||||
|
if (env.IsDevelopment())
|
||||||
|
{
|
||||||
|
app.UseDeveloperExceptionPage();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
app.UseExceptionHandler("/Home/Error");
|
||||||
|
app.UseHsts();
|
||||||
|
}
|
||||||
|
|
||||||
|
app.UseHttpsRedirection();
|
||||||
|
app.UseStaticFiles();
|
||||||
|
app.UseCookiePolicy();
|
||||||
|
|
||||||
|
//app.UseMvc(routes =>
|
||||||
|
//{
|
||||||
|
// routes.MapRoute(
|
||||||
|
// name: "default",
|
||||||
|
// template: "{controller=Home}/{action=Index}/{id?}");
|
||||||
|
//});
|
||||||
|
//使用Session,必须在UseMvc之上
|
||||||
|
app.UseSession();
|
||||||
|
app.UseMvc(routes =>
|
||||||
|
{
|
||||||
|
routes.MapRoute(
|
||||||
|
name: "area",
|
||||||
|
template: "{area:exists}/{controller=Home}/{action=Index}/{id?}");
|
||||||
|
|
||||||
|
routes.MapRoute(
|
||||||
|
name: "default",
|
||||||
|
template: "{controller=Home}/{action=Index}/{id?}");
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
4
Examples/website/FreeSql.Site.UI/Views/Home/About.cshtml
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
@{
|
||||||
|
ViewData["Title"] = "About";
|
||||||
|
}
|
||||||
|
关于
|
@ -0,0 +1,4 @@
|
|||||||
|
@{
|
||||||
|
ViewData["Title"] = "Contact";
|
||||||
|
}
|
||||||
|
联系人
|
68
Examples/website/FreeSql.Site.UI/Views/Home/Index.cshtml
Normal file
@ -0,0 +1,68 @@
|
|||||||
|
@{
|
||||||
|
ViewData["Title"] = "Home Page";
|
||||||
|
}
|
||||||
|
|
||||||
|
<div class="site-banner">
|
||||||
|
<div class="site-banner-bg" style="background-image: url(/images/layui/banner/winter.jpg?v=0); background-size: cover;">
|
||||||
|
</div>
|
||||||
|
<div class="site-banner-main">
|
||||||
|
<div class="site-zfj site-zfj-anim">
|
||||||
|
<i class="layui-icon" style="color: #fff; color: rgba(255,255,255,.7);"></i>
|
||||||
|
</div>
|
||||||
|
<div class="layui-anim site-desc site-desc-anim">
|
||||||
|
<p class="web-font-desc">.NETCore最方便的ORM</p>
|
||||||
|
<cite>打造.NETCore最方便的ORM,包括dbfirst、codefirst混合使用</cite>
|
||||||
|
</div>
|
||||||
|
<div class="site-download">
|
||||||
|
<a href="https://github.com/2881099/FreeSql" class="layui-inline site-down" target="_blank">
|
||||||
|
<cite class="layui-icon"></cite>
|
||||||
|
立即下载
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<div class="site-version">
|
||||||
|
<span>当前版本:<cite class="site-showv">0.0.1.181227_Beta</cite></span>
|
||||||
|
<span><a href="/doc/base/changelog.html" rel="nofollow" target="_blank">更新日志</a></span>
|
||||||
|
<span>下载量:<em class="site-showdowns">23</em></span>
|
||||||
|
</div>
|
||||||
|
<div class="site-banner-other">
|
||||||
|
<a href="https://github.com/2881099/FreeSql" target="_blank" class="site-star">
|
||||||
|
<i class="layui-icon"></i>
|
||||||
|
Star <cite id="getStars">1</cite>
|
||||||
|
</a>
|
||||||
|
<a href="https://github.com/2881099/FreeSql" target="_blank" rel="nofollow" class="site-fork">
|
||||||
|
<i class="layui-icon">1</i>
|
||||||
|
Fork
|
||||||
|
</a>
|
||||||
|
<a href="https://github.com/2881099/FreeSql" target="_blank" rel="nofollow" class="site-fork">
|
||||||
|
Github
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="layui-main">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<ul class="site-idea">
|
||||||
|
<li>
|
||||||
|
<fieldset class="layui-elem-field layui-field-title">
|
||||||
|
<legend>返璞归真</legend>
|
||||||
|
<p>身处在前端社区的繁荣之下,我们都在有意或无意地追逐。而 layui 偏偏回望当初,奔赴在返璞归真的漫漫征途,自信并勇敢着,追寻于原生态的书写指令,试图以最简单的方式诠释高效。</p>
|
||||||
|
</fieldset>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<fieldset class="layui-elem-field layui-field-title">
|
||||||
|
<legend>双面体验</legend>
|
||||||
|
<p>拥有双面的不仅是人生,还有 layui。一面极简,一面丰盈。极简是视觉所见的外在,是开发所念的简易。丰盈是倾情雕琢的内在,是信手拈来的承诺。一切本应如此,简而全,双重体验。</p>
|
||||||
|
</fieldset>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<fieldset class="layui-elem-field layui-field-title">
|
||||||
|
<legend>星辰大海</legend>
|
||||||
|
<p>如果眼下还是一团零星之火,那运筹帷幄之后,迎面东风,就是一场烈焰燎原吧,那必定会是一番尽情的燃烧。待,秋风萧瑟时,散作满天星辰,你看那四季轮回<!--海天相接-->,正是 layui 不灭的执念。</p>
|
||||||
|
</fieldset>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
</div>
|
@ -0,0 +1,4 @@
|
|||||||
|
@{
|
||||||
|
ViewData["Title"] = "Privacy Policy";
|
||||||
|
}
|
||||||
|
隐私
|
22
Examples/website/FreeSql.Site.UI/Views/Shared/Error.cshtml
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
@model ErrorViewModel
|
||||||
|
@{
|
||||||
|
ViewData["Title"] = "Error";
|
||||||
|
}
|
||||||
|
|
||||||
|
<h1 class="text-danger">Error.</h1>
|
||||||
|
<h2 class="text-danger">An error occurred while processing your request.</h2>
|
||||||
|
|
||||||
|
@if (Model.ShowRequestId)
|
||||||
|
{
|
||||||
|
<p>
|
||||||
|
<strong>Request ID:</strong> <code>@Model.RequestId</code>
|
||||||
|
</p>
|
||||||
|
}
|
||||||
|
|
||||||
|
<h3>Development Mode</h3>
|
||||||
|
<p>
|
||||||
|
Swapping to <strong>Development</strong> environment will display more detailed information about the error that occurred.
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
<strong>Development environment should not be enabled in deployed applications</strong>, as it can result in sensitive information from exceptions being displayed to end users. For local debugging, development environment can be enabled by setting the <strong>ASPNETCORE_ENVIRONMENT</strong> environment variable to <strong>Development</strong>, and restarting the application.
|
||||||
|
</p>
|
@ -0,0 +1,41 @@
|
|||||||
|
@using Microsoft.AspNetCore.Http.Features
|
||||||
|
|
||||||
|
@{
|
||||||
|
var consentFeature = Context.Features.Get<ITrackingConsentFeature>();
|
||||||
|
var showBanner = !consentFeature?.CanTrack ?? false;
|
||||||
|
var cookieString = consentFeature?.CreateConsentCookie();
|
||||||
|
}
|
||||||
|
|
||||||
|
@if (showBanner)
|
||||||
|
{
|
||||||
|
<nav id="cookieConsent" class="navbar navbar-default navbar-fixed-top" role="alert">
|
||||||
|
<div class="container">
|
||||||
|
<div class="navbar-header">
|
||||||
|
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#cookieConsent .navbar-collapse">
|
||||||
|
<span class="sr-only">Toggle cookie consent banner</span>
|
||||||
|
<span class="icon-bar"></span>
|
||||||
|
<span class="icon-bar"></span>
|
||||||
|
<span class="icon-bar"></span>
|
||||||
|
</button>
|
||||||
|
<span class="navbar-brand"><span class="glyphicon glyphicon-info-sign" aria-hidden="true"></span></span>
|
||||||
|
</div>
|
||||||
|
<div class="collapse navbar-collapse">
|
||||||
|
<p class="navbar-text">
|
||||||
|
Use this space to summarize your privacy and cookie use policy.
|
||||||
|
</p>
|
||||||
|
<div class="navbar-right">
|
||||||
|
<a asp-controller="Home" asp-action="Privacy" class="btn btn-info navbar-btn">Learn More</a>
|
||||||
|
<button type="button" class="btn btn-default navbar-btn" data-cookie-string="@cookieString">Accept</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</nav>
|
||||||
|
<script>
|
||||||
|
(function () {
|
||||||
|
document.querySelector("#cookieConsent button[data-cookie-string]").addEventListener("click", function (el) {
|
||||||
|
document.cookie = el.target.dataset.cookieString;
|
||||||
|
document.querySelector("#cookieConsent").classList.add("hidden");
|
||||||
|
}, false);
|
||||||
|
})();
|
||||||
|
</script>
|
||||||
|
}
|
222
Examples/website/FreeSql.Site.UI/Views/Shared/_Layout.cshtml
Normal file
@ -0,0 +1,222 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8" />
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
|
<title>@ViewData["Title"] - FreeSql.Site.UI</title>
|
||||||
|
|
||||||
|
<environment include="Development">
|
||||||
|
<link href="~/layui/css/layui.css" rel="stylesheet" />
|
||||||
|
<link rel="stylesheet" href="~/css/site.css" />
|
||||||
|
</environment>
|
||||||
|
<environment exclude="Development">
|
||||||
|
<link rel="stylesheet" href="https://ajax.aspnetcdn.com/ajax/bootstrap/3.3.7/css/bootstrap.min.css"
|
||||||
|
asp-fallback-href="~/lib/bootstrap/dist/css/bootstrap.min.css"
|
||||||
|
asp-fallback-test-class="sr-only" asp-fallback-test-property="position" asp-fallback-test-value="absolute" />
|
||||||
|
<link rel="stylesheet" href="~/css/site.min.css" asp-append-version="true" />
|
||||||
|
</environment>
|
||||||
|
</head>
|
||||||
|
<body class="site-home" id="LAY_home" style="background-color: #eee;" data-date="12-27">
|
||||||
|
<div class="layui-header header header-index" winter="">
|
||||||
|
<div class="layui-main">
|
||||||
|
<a class="logo" href="/">
|
||||||
|
@*<img src="//res.layui.com/static/images/layui/logo.png" alt="layui">*@
|
||||||
|
<span style="font-size:25px; letter-spacing:1px; color:#fff;">FreeSql</span>
|
||||||
|
</a>
|
||||||
|
<div class="layui-form component">
|
||||||
|
<select lay-search="" lay-filter="component">
|
||||||
|
<option value="">搜索组件或模块</option>
|
||||||
|
<option value="element/layout.html">grid 栅格布局</option>
|
||||||
|
<option value="element/layout.html#admin">admin 后台布局</option>
|
||||||
|
<option value="element/color.html">color 颜色</option>
|
||||||
|
<option value="element/icon.html">iconfont 字体图标</option>
|
||||||
|
<option value="element/anim.html">animation 动画</option>
|
||||||
|
<option value="element/button.html">button 按钮</option>
|
||||||
|
<option value="element/form.html">form 表单组</option>
|
||||||
|
<option value="element/form.html#input">input 输入框</option>
|
||||||
|
<option value="element/form.html#select">select 下拉选择框</option>
|
||||||
|
<option value="element/form.html#checkbox">checkbox 复选框</option>
|
||||||
|
<option value="element/form.html#switch">switch 开关</option>
|
||||||
|
<option value="element/form.html#radio">radio 单选框</option>
|
||||||
|
<option value="element/form.html#textarea">textarea 文本域</option>
|
||||||
|
<option value="element/nav.html">nav 导航菜单</option>
|
||||||
|
<option value="element/nav.html#breadcrumb">breadcrumb 面包屑</option>
|
||||||
|
<option value="element/tab.html">tabs 选项卡</option>
|
||||||
|
<option value="element/progress.html">progress 进度条</option>
|
||||||
|
<option value="element/collapse.html">collapse 折叠面板/手风琴</option>
|
||||||
|
<option value="element/table.html">table 表格元素</option>
|
||||||
|
<option value="element/badge.html">badge 徽章</option>
|
||||||
|
<option value="element/timeline.html">timeline 时间线</option>
|
||||||
|
<option value="element/auxiliar.html#blockquote">blockquote 引用块</option>
|
||||||
|
<option value="element/auxiliar.html#fieldset">fieldset 字段集</option>
|
||||||
|
<option value="element/auxiliar.html#hr">hr 分割线</option>
|
||||||
|
<option value="modules/layer.html">layer 弹出层/弹窗综合</option>
|
||||||
|
<option value="modules/laydate.html">laydate 日期时间选择器</option>
|
||||||
|
<option value="modules/layim.html">layim 即时通讯/聊天</option>
|
||||||
|
<option value="modules/laypage.html">laypage 分页</option>
|
||||||
|
<option value="modules/laytpl.html">laytpl 模板引擎</option>
|
||||||
|
<option value="modules/form.html">form 表单模块</option>
|
||||||
|
<option value="modules/table.html">table 数据表格</option>
|
||||||
|
<option value="modules/upload.html">upload 文件/图片上传</option>
|
||||||
|
<option value="modules/element.html">element 常用元素操作</option>
|
||||||
|
<option value="modules/rate.html">rate 评分</option>
|
||||||
|
<option value="modules/colorpicker.html">colorpicker 颜色选择器</option>
|
||||||
|
<option value="modules/slider.html">slider 滑块</option>
|
||||||
|
<option value="modules/carousel.html">carousel 轮播/跑马灯</option>
|
||||||
|
<option value="modules/layedit.html">layedit 富文本编辑器</option>
|
||||||
|
<option value="modules/tree.html">tree 树形菜单</option>
|
||||||
|
<option value="modules/flow.html">flow 信息流/图片懒加载</option>
|
||||||
|
<option value="modules/util.html">util 工具集</option>
|
||||||
|
<option value="modules/code.html">code 代码修饰</option>
|
||||||
|
</select>
|
||||||
|
<div class="layui-form-select">
|
||||||
|
<div class="layui-select-title">
|
||||||
|
<input type="text" placeholder="搜索组件或模块" value="" class="layui-input"><i class="layui-edge"></i>
|
||||||
|
</div>
|
||||||
|
<dl class="layui-anim layui-anim-upbit" style="">
|
||||||
|
<dd lay-value="" class="layui-select-tips layui-this">搜索组件或模块</dd>
|
||||||
|
<dd lay-value="element/layout.html" class="">grid 栅格布局</dd>
|
||||||
|
<dd lay-value="element/layout.html#admin" class="">admin 后台布局</dd>
|
||||||
|
<dd lay-value="element/color.html" class="">color 颜色</dd>
|
||||||
|
<dd lay-value="element/icon.html" class="">iconfont 字体图标</dd>
|
||||||
|
<dd lay-value="element/anim.html" class="">animation 动画</dd>
|
||||||
|
<dd lay-value="element/button.html" class="">button 按钮</dd>
|
||||||
|
<dd lay-value="element/form.html" class="">form 表单组</dd>
|
||||||
|
<dd lay-value="element/form.html#input" class="">input 输入框</dd>
|
||||||
|
<dd lay-value="element/form.html#select" class="">select 下拉选择框</dd>
|
||||||
|
<dd lay-value="element/form.html#checkbox" class="">checkbox 复选框</dd>
|
||||||
|
<dd lay-value="element/form.html#switch" class="">switch 开关</dd>
|
||||||
|
<dd lay-value="element/form.html#radio" class="">radio 单选框</dd>
|
||||||
|
<dd lay-value="element/form.html#textarea" class="">textarea 文本域</dd>
|
||||||
|
<dd lay-value="element/nav.html" class="">nav 导航菜单</dd>
|
||||||
|
<dd lay-value="element/nav.html#breadcrumb" class="">breadcrumb 面包屑</dd>
|
||||||
|
<dd lay-value="element/tab.html" class="">tabs 选项卡</dd>
|
||||||
|
<dd lay-value="element/progress.html" class="">progress 进度条</dd>
|
||||||
|
<dd lay-value="element/collapse.html" class="">collapse 折叠面板/手风琴</dd>
|
||||||
|
<dd lay-value="element/table.html" class="">table 表格元素</dd>
|
||||||
|
<dd lay-value="element/badge.html" class="">badge 徽章</dd>
|
||||||
|
<dd lay-value="element/timeline.html" class="">timeline 时间线</dd>
|
||||||
|
<dd lay-value="element/auxiliar.html#blockquote" class="">blockquote 引用块</dd>
|
||||||
|
<dd lay-value="element/auxiliar.html#fieldset" class="">fieldset 字段集</dd>
|
||||||
|
<dd lay-value="element/auxiliar.html#hr" class="">hr 分割线</dd>
|
||||||
|
<dd lay-value="modules/layer.html" class="">layer 弹出层/弹窗综合</dd>
|
||||||
|
<dd lay-value="modules/laydate.html" class="">laydate 日期时间选择器</dd>
|
||||||
|
<dd lay-value="modules/layim.html" class="">layim 即时通讯/聊天</dd>
|
||||||
|
<dd lay-value="modules/laypage.html" class="">laypage 分页</dd>
|
||||||
|
<dd lay-value="modules/laytpl.html" class="">laytpl 模板引擎</dd>
|
||||||
|
<dd lay-value="modules/form.html" class="">form 表单模块</dd>
|
||||||
|
<dd lay-value="modules/table.html" class="">table 数据表格</dd>
|
||||||
|
<dd lay-value="modules/upload.html" class="">upload 文件/图片上传</dd>
|
||||||
|
<dd lay-value="modules/element.html" class="">element 常用元素操作</dd>
|
||||||
|
<dd lay-value="modules/rate.html" class="">rate 评分</dd>
|
||||||
|
<dd lay-value="modules/colorpicker.html" class="">colorpicker 颜色选择器</dd>
|
||||||
|
<dd lay-value="modules/slider.html" class="">slider 滑块</dd>
|
||||||
|
<dd lay-value="modules/carousel.html" class="">carousel 轮播/跑马灯</dd>
|
||||||
|
<dd lay-value="modules/layedit.html" class="">layedit 富文本编辑器</dd>
|
||||||
|
<dd lay-value="modules/tree.html" class="">tree 树形菜单</dd>
|
||||||
|
<dd lay-value="modules/flow.html" class="">flow 信息流/图片懒加载</dd>
|
||||||
|
<dd lay-value="modules/util.html" class="">util 工具集</dd>
|
||||||
|
<dd lay-value="modules/code.html" class="">code 代码修饰</dd>
|
||||||
|
</dl>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<ul class="layui-nav">
|
||||||
|
<li class="layui-nav-item ">
|
||||||
|
<a href="/doc/document/index">文档<!-- <span class="layui-badge-dot"></span> --></a>
|
||||||
|
</li>
|
||||||
|
<li class="layui-nav-item ">
|
||||||
|
<a href="/demo/">示例<!-- <span class="layui-badge-dot"></span> --></a>
|
||||||
|
</li>
|
||||||
|
<li class="layui-nav-item layui-hide-xs">
|
||||||
|
<a href="/bbs/document/index" target="_blank">社区</a>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="layui-nav-item">
|
||||||
|
<a href="javascript:;"><span class="layui-badge-dot" style="margin: -5px 0 0 -15px;"></span>周边<span class="layui-nav-more"></span></a>
|
||||||
|
<dl class="layui-nav-child layui-anim layui-anim-upbit">
|
||||||
|
<dd lay-unselect="">
|
||||||
|
<a href="//fly.layui.com/extend/" target="_blank">扩展组件</a>
|
||||||
|
</dd>
|
||||||
|
<dd lay-unselect="">
|
||||||
|
<a href="//fly.layui.com/store/" target="_blank">模板市场 <span class="layui-badge-dot"></span></a>
|
||||||
|
<hr>
|
||||||
|
</dd>
|
||||||
|
|
||||||
|
<dd class="layui-hide-sm layui-show-xs" lay-unselect="">
|
||||||
|
<a href="//fly.layui.com/" target="_blank">社区交流</a>
|
||||||
|
<hr>
|
||||||
|
</dd>
|
||||||
|
<dd lay-unselect=""><a href="/admin/" target="_blank">后台模板</a></dd>
|
||||||
|
<dd lay-unselect=""><a href="/layim/" target="_blank">即时聊天</a><hr></dd>
|
||||||
|
|
||||||
|
<dd lay-unselect=""><a href="/alone.html" target="_blank" lay-unselect="">独立组件</a></dd>
|
||||||
|
<dd lay-unselect=""><a href="#" target="_blank">Axure 组件</a></dd>
|
||||||
|
</dl>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="layui-nav-item layui-hide-xs" lay-unselect="">
|
||||||
|
<a href="/admin/">后台模板<span class="layui-badge-dot" style="margin-top: -5px;"></span></a>
|
||||||
|
</li>
|
||||||
|
<span class="layui-nav-bar" style="left: 54px; top: 55px; width: 0px; opacity: 0;"></span>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<partial name="_CookieConsentPartial" />
|
||||||
|
|
||||||
|
<div class="container body-content">
|
||||||
|
@RenderBody();
|
||||||
|
<hr />
|
||||||
|
<div class="layui-footer footer footer-index">
|
||||||
|
<div class="layui-main">
|
||||||
|
<p>© 2018 <a href="/">FreeSql.com</a> MIT license</p>
|
||||||
|
<p>
|
||||||
|
<a href="http://fly.layui.com/case/2018/" target="_blank">案例</a>
|
||||||
|
<a href="http://fly.layui.com/jie/3147/" target="_blank">支持</a>
|
||||||
|
<a href="https://github.com/sentsin/layui/" target="_blank" rel="nofollow">GitHub</a>
|
||||||
|
<a href="https://gitee.com/sentsin/layui" target="_blank" rel="nofollow">码云</a>
|
||||||
|
<a href="http://fly.layui.com/jie/2461/" target="_blank">公众号</a>
|
||||||
|
<a href="http://www.miitbeian.gov.cn/" target="_blank" rel="nofollow">赣ICP备13006272号-2</a>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<environment include="Development">
|
||||||
|
<script src="~/lib/jquery/dist/jquery.js"></script>
|
||||||
|
<script src="~/lib/bootstrap/dist/js/bootstrap.js"></script>
|
||||||
|
@*<script src="~/js/site.js" asp-append-version="true"></script>*@
|
||||||
|
<script src="~/layui/layui.js"></script>
|
||||||
|
<script>
|
||||||
|
layui.config({
|
||||||
|
base: '/layui/lay/modules/'
|
||||||
|
, version: '31111'
|
||||||
|
}).use('global');
|
||||||
|
|
||||||
|
window.global = {
|
||||||
|
preview: function () {
|
||||||
|
var preview = document.getElementById('LAY_preview');
|
||||||
|
return preview ? preview.innerHTML : '';
|
||||||
|
}()
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
</environment>
|
||||||
|
<environment exclude="Development">
|
||||||
|
<script src="https://ajax.aspnetcdn.com/ajax/jquery/jquery-3.3.1.min.js"
|
||||||
|
asp-fallback-src="~/lib/jquery/dist/jquery.min.js"
|
||||||
|
asp-fallback-test="window.jQuery"
|
||||||
|
crossorigin="anonymous"
|
||||||
|
integrity="sha384-tsQFqpEReu7ZLhBV2VZlAu7zcOV+rXbYlF2cqB8txI/8aZajjp4Bqd+V6D5IgvKT">
|
||||||
|
</script>
|
||||||
|
<script src="https://ajax.aspnetcdn.com/ajax/bootstrap/3.3.7/bootstrap.min.js"
|
||||||
|
asp-fallback-src="~/lib/bootstrap/dist/js/bootstrap.min.js"
|
||||||
|
asp-fallback-test="window.jQuery && window.jQuery.fn && window.jQuery.fn.modal"
|
||||||
|
crossorigin="anonymous"
|
||||||
|
integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa">
|
||||||
|
</script>
|
||||||
|
<script src="~/js/site.min.js" asp-append-version="true"></script>
|
||||||
|
</environment>
|
||||||
|
|
||||||
|
@RenderSection("Scripts", required: false)
|
||||||
|
</body>
|
||||||
|
</html>
|
@ -0,0 +1,18 @@
|
|||||||
|
<environment include="Development">
|
||||||
|
<script src="~/lib/jquery-validation/dist/jquery.validate.js"></script>
|
||||||
|
<script src="~/lib/jquery-validation-unobtrusive/jquery.validate.unobtrusive.js"></script>
|
||||||
|
</environment>
|
||||||
|
<environment exclude="Development">
|
||||||
|
<script src="https://ajax.aspnetcdn.com/ajax/jquery.validate/1.17.0/jquery.validate.min.js"
|
||||||
|
asp-fallback-src="~/lib/jquery-validation/dist/jquery.validate.min.js"
|
||||||
|
asp-fallback-test="window.jQuery && window.jQuery.validator"
|
||||||
|
crossorigin="anonymous"
|
||||||
|
integrity="sha384-rZfj/ogBloos6wzLGpPkkOr/gpkBNLZ6b6yLy4o+ok+t/SAKlL5mvXLr0OXNi1Hp">
|
||||||
|
</script>
|
||||||
|
<script src="https://ajax.aspnetcdn.com/ajax/jquery.validation.unobtrusive/3.2.9/jquery.validate.unobtrusive.min.js"
|
||||||
|
asp-fallback-src="~/lib/jquery-validation-unobtrusive/jquery.validate.unobtrusive.min.js"
|
||||||
|
asp-fallback-test="window.jQuery && window.jQuery.validator && window.jQuery.validator.unobtrusive"
|
||||||
|
crossorigin="anonymous"
|
||||||
|
integrity="sha384-ifv0TYDWxBHzvAk2Z0n8R434FL1Rlv/Av18DXE43N/1rvHyOG4izKst0f2iSLdds">
|
||||||
|
</script>
|
||||||
|
</environment>
|
@ -0,0 +1,3 @@
|
|||||||
|
@using FreeSql.Site.UI
|
||||||
|
@using FreeSql.Site.UI.Models
|
||||||
|
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
|
3
Examples/website/FreeSql.Site.UI/Views/_ViewStart.cshtml
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
@{
|
||||||
|
Layout = "_Layout";
|
||||||
|
}
|
@ -0,0 +1,9 @@
|
|||||||
|
{
|
||||||
|
"Logging": {
|
||||||
|
"LogLevel": {
|
||||||
|
"Default": "Debug",
|
||||||
|
"System": "Information",
|
||||||
|
"Microsoft": "Information"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
8
Examples/website/FreeSql.Site.UI/appsettings.json
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
"Logging": {
|
||||||
|
"LogLevel": {
|
||||||
|
"Default": "Warning"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"AllowedHosts": "*"
|
||||||
|
}
|
1819
Examples/website/FreeSql.Site.UI/wwwroot/css/site.css
Normal file
1
Examples/website/FreeSql.Site.UI/wwwroot/css/site.min.css
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
body{padding-top:50px;padding-bottom:20px}.body-content{padding-left:15px;padding-right:15px}.carousel-caption p{font-size:20px;line-height:1.4}.carousel-inner .item img[src$=".svg"]{width:100%}#qrCode{margin:15px}@media screen and (max-width:767px){.carousel-caption{display:none}}
|
BIN
Examples/website/FreeSql.Site.UI/wwwroot/favicon.ico
Normal file
After Width: | Height: | Size: 31 KiB |
After Width: | Height: | Size: 9.5 KiB |
After Width: | Height: | Size: 8.2 KiB |
After Width: | Height: | Size: 12 KiB |
483
Examples/website/FreeSql.Site.UI/wwwroot/js/site.js
Normal file
@ -0,0 +1,483 @@
|
|||||||
|
/**
|
||||||
|
|
||||||
|
layui官网
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
layui.define(['code', 'element', 'table', 'util'], function (exports) {
|
||||||
|
var $ = layui.jquery
|
||||||
|
, element = layui.element
|
||||||
|
, layer = layui.layer
|
||||||
|
, form = layui.form
|
||||||
|
, util = layui.util
|
||||||
|
, device = layui.device()
|
||||||
|
|
||||||
|
, $win = $(window), $body = $('body');
|
||||||
|
|
||||||
|
|
||||||
|
//阻止IE7以下访问
|
||||||
|
if (device.ie && device.ie < 8) {
|
||||||
|
layer.alert('Layui最低支持ie8,您当前使用的是古老的 IE' + device.ie + ',你丫的肯定不是程序猿!');
|
||||||
|
}
|
||||||
|
|
||||||
|
var home = $('#LAY_home');
|
||||||
|
|
||||||
|
|
||||||
|
layer.ready(function () {
|
||||||
|
var local = layui.data('layui');
|
||||||
|
|
||||||
|
//升级提示
|
||||||
|
if (local.version && local.version !== layui.v) {
|
||||||
|
layer.open({
|
||||||
|
type: 1
|
||||||
|
, title: '更新提示' //不显示标题栏
|
||||||
|
, closeBtn: false
|
||||||
|
, area: '300px;'
|
||||||
|
, shade: false
|
||||||
|
, offset: 'b'
|
||||||
|
, id: 'LAY_updateNotice' //设定一个id,防止重复弹出
|
||||||
|
, btn: ['更新日志', '朕不想升']
|
||||||
|
, btnAlign: 'c'
|
||||||
|
, moveType: 1 //拖拽模式,0或者1
|
||||||
|
, content: ['<div class="layui-text">'
|
||||||
|
, 'layui 已更新到:<strong style="padding-right: 10px; color: #fff;">v' + layui.v + '</strong> <br>请注意升级!'
|
||||||
|
, '</div>'].join('')
|
||||||
|
, skin: 'layui-layer-notice'
|
||||||
|
, yes: function (index) {
|
||||||
|
layer.close(index);
|
||||||
|
setTimeout(function () {
|
||||||
|
location.href = '/doc/base/changelog.html';
|
||||||
|
}, 500);
|
||||||
|
}
|
||||||
|
, end: function () {
|
||||||
|
layui.data('layui', {
|
||||||
|
key: 'version'
|
||||||
|
, value: layui.v
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
layui.data('layui', {
|
||||||
|
key: 'version'
|
||||||
|
, value: layui.v
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
//公告
|
||||||
|
; !function () {
|
||||||
|
return layui.data('layui', {
|
||||||
|
key: 'notice_20180530'
|
||||||
|
, remove: true
|
||||||
|
});
|
||||||
|
|
||||||
|
if (local.notice_20180530 && new Date().getTime() - local.notice_20180530 < 1000 * 60 * 60 * 24 * 5) {
|
||||||
|
return;
|
||||||
|
};
|
||||||
|
|
||||||
|
layer.open({
|
||||||
|
type: 1
|
||||||
|
, title: 'layui 官方通用后台管理模板'
|
||||||
|
, closeBtn: false
|
||||||
|
, area: ['300px', '280px']
|
||||||
|
, shade: false
|
||||||
|
//,offset: 'c'
|
||||||
|
, id: 'LAY_Notice' //设定一个id,防止重复弹出
|
||||||
|
, btn: ['前往围观', '朕不想看']
|
||||||
|
, btnAlign: 'b'
|
||||||
|
, moveType: 1 //拖拽模式,0或者1
|
||||||
|
, resize: false
|
||||||
|
, content: ['<div style="padding: 15px; text-align: center; background-color: #e2e2e2;">'
|
||||||
|
, '<a href="/admin/std/dist/views/" target="_blank"><img src="//cdn.layui.com/upload/2018_5/168_1527691799254_76462.jpg" alt="layuiAdmin" style="width: 100%; height:149.78px;"></a>'
|
||||||
|
, '</div>'].join('')
|
||||||
|
, success: function (layero, index) {
|
||||||
|
var btn = layero.find('.layui-layer-btn');
|
||||||
|
btn.find('.layui-layer-btn0').attr({
|
||||||
|
href: '/admin/std/dist/views/'
|
||||||
|
, target: '_blank'
|
||||||
|
});
|
||||||
|
|
||||||
|
layero.find('a').on('click', function () {
|
||||||
|
layer.close(index);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
, end: function () {
|
||||||
|
layui.data('layui', {
|
||||||
|
key: 'notice_20180530'
|
||||||
|
, value: new Date().getTime()
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}();
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
; !function () {
|
||||||
|
var elemComponentSelect = $(['<select lay-search lay-filter="component">'
|
||||||
|
, '<option value="">搜索组件或模块</option>'
|
||||||
|
, '<option value="element/layout.html">grid 栅格布局</option>'
|
||||||
|
, '<option value="element/layout.html#admin">admin 后台布局</option>'
|
||||||
|
, '<option value="element/color.html">color 颜色</option>'
|
||||||
|
, '<option value="element/icon.html">iconfont 字体图标</option>'
|
||||||
|
, '<option value="element/anim.html">animation 动画</option>'
|
||||||
|
, '<option value="element/button.html">button 按钮</option>'
|
||||||
|
, '<option value="element/form.html">form 表单组</option>'
|
||||||
|
, '<option value="element/form.html#input">input 输入框</option>'
|
||||||
|
, '<option value="element/form.html#select">select 下拉选择框</option>'
|
||||||
|
, '<option value="element/form.html#checkbox">checkbox 复选框</option>'
|
||||||
|
, '<option value="element/form.html#switch">switch 开关</option>'
|
||||||
|
, '<option value="element/form.html#radio">radio 单选框</option>'
|
||||||
|
, '<option value="element/form.html#textarea">textarea 文本域</option>'
|
||||||
|
, '<option value="element/nav.html">nav 导航菜单</option>'
|
||||||
|
, '<option value="element/nav.html#breadcrumb">breadcrumb 面包屑</option>'
|
||||||
|
, '<option value="element/tab.html">tabs 选项卡</option>'
|
||||||
|
, '<option value="element/progress.html">progress 进度条</option>'
|
||||||
|
, '<option value="element/collapse.html">collapse 折叠面板/手风琴</option>'
|
||||||
|
, '<option value="element/table.html">table 表格元素</option>'
|
||||||
|
, '<option value="element/badge.html">badge 徽章</option>'
|
||||||
|
, '<option value="element/timeline.html">timeline 时间线</option>'
|
||||||
|
, '<option value="element/auxiliar.html#blockquote">blockquote 引用块</option>'
|
||||||
|
, '<option value="element/auxiliar.html#fieldset">fieldset 字段集</option>'
|
||||||
|
, '<option value="element/auxiliar.html#hr">hr 分割线</option>'
|
||||||
|
|
||||||
|
, '<option value="modules/layer.html">layer 弹出层/弹窗综合</option>'
|
||||||
|
, '<option value="modules/laydate.html">laydate 日期时间选择器</option>'
|
||||||
|
, '<option value="modules/layim.html">layim 即时通讯/聊天</option>'
|
||||||
|
, '<option value="modules/laypage.html">laypage 分页</option>'
|
||||||
|
, '<option value="modules/laytpl.html">laytpl 模板引擎</option>'
|
||||||
|
, '<option value="modules/form.html">form 表单模块</option>'
|
||||||
|
, '<option value="modules/table.html">table 数据表格</option>'
|
||||||
|
, '<option value="modules/upload.html">upload 文件/图片上传</option>'
|
||||||
|
, '<option value="modules/element.html">element 常用元素操作</option>'
|
||||||
|
, '<option value="modules/rate.html">rate 评分</option>'
|
||||||
|
, '<option value="modules/colorpicker.html">colorpicker 颜色选择器</option>'
|
||||||
|
, '<option value="modules/slider.html">slider 滑块</option>'
|
||||||
|
, '<option value="modules/carousel.html">carousel 轮播/跑马灯</option>'
|
||||||
|
, '<option value="modules/layedit.html">layedit 富文本编辑器</option>'
|
||||||
|
, '<option value="modules/tree.html">tree 树形菜单</option>'
|
||||||
|
, '<option value="modules/flow.html">flow 信息流/图片懒加载</option>'
|
||||||
|
, '<option value="modules/util.html">util 工具集</option>'
|
||||||
|
, '<option value="modules/code.html">code 代码修饰</option>'
|
||||||
|
, '</select>'].join(''));
|
||||||
|
|
||||||
|
$('.component').append(elemComponentSelect);
|
||||||
|
form.render('select', 'LAY-site-header-component');
|
||||||
|
|
||||||
|
//搜索组件
|
||||||
|
form.on('select(component)', function (data) {
|
||||||
|
var value = data.value;
|
||||||
|
location.href = '/doc/' + value;
|
||||||
|
});
|
||||||
|
}();
|
||||||
|
|
||||||
|
|
||||||
|
//点击事件
|
||||||
|
var events = {
|
||||||
|
//联系方式
|
||||||
|
contactInfo: function () {
|
||||||
|
layer.alert('<div class="layui-text">如有合作意向,可联系:<br>邮箱:xianxin@layui-inc.com</div>', {
|
||||||
|
title: '联系'
|
||||||
|
, btn: false
|
||||||
|
, shadeClose: true
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$body.on('click', '*[site-event]', function () {
|
||||||
|
var othis = $(this)
|
||||||
|
, attrEvent = othis.attr('site-event');
|
||||||
|
events[attrEvent] && events[attrEvent].call(this, othis);
|
||||||
|
});
|
||||||
|
|
||||||
|
//切换版本
|
||||||
|
form.on('select(tabVersion)', function (data) {
|
||||||
|
var value = data.value;
|
||||||
|
location.href = value === 'new' ? '/' : ('/' + value + '/doc/');
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
//首页banner
|
||||||
|
setTimeout(function () {
|
||||||
|
$('.site-zfj').addClass('site-zfj-anim');
|
||||||
|
setTimeout(function () {
|
||||||
|
$('.site-desc').addClass('site-desc-anim')
|
||||||
|
}, 5000)
|
||||||
|
}, 100);
|
||||||
|
|
||||||
|
|
||||||
|
//数字前置补零
|
||||||
|
var digit = function (num, length, end) {
|
||||||
|
var str = '';
|
||||||
|
num = String(num);
|
||||||
|
length = length || 2;
|
||||||
|
for (var i = num.length; i < length; i++) {
|
||||||
|
str += '0';
|
||||||
|
}
|
||||||
|
return num < Math.pow(10, length) ? str + (num | 0) : num;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
//下载倒计时
|
||||||
|
var setCountdown = $('#setCountdown');
|
||||||
|
if ($('#setCountdown')[0]) {
|
||||||
|
$.get('/api/getTime', function (res) {
|
||||||
|
util.countdown(new Date(2017, 7, 21, 8, 30, 0), new Date(res.time), function (date, serverTime, timer) {
|
||||||
|
var str = digit(date[1]) + ':' + digit(date[2]) + ':' + digit(date[3]);
|
||||||
|
setCountdown.children('span').html(str);
|
||||||
|
});
|
||||||
|
}, 'jsonp');
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
for (var i = 0; i < $('.adsbygoogle').length; i++) {
|
||||||
|
(adsbygoogle = window.adsbygoogle || []).push({});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//展示当前版本
|
||||||
|
$('.site-showv').html(layui.v);
|
||||||
|
|
||||||
|
////获取下载数
|
||||||
|
//$.get('//fly.layui.com/api/handle?id=10&type=find', function (res) {
|
||||||
|
// $('.site-showdowns').html(res.number);
|
||||||
|
//}, 'jsonp');
|
||||||
|
|
||||||
|
////记录下载
|
||||||
|
//$('.site-down').on('click', function () {
|
||||||
|
// $.get('//fly.layui.com/api/handle?id=10', function () { }, 'jsonp');
|
||||||
|
//});
|
||||||
|
|
||||||
|
//获取Github数据
|
||||||
|
var getStars = $('#getStars');
|
||||||
|
if (getStars[0]) {
|
||||||
|
$.get('https://api.github.com/repos/2881099/FreeSql', function (res) {
|
||||||
|
getStars.html(res.stargazers_count);
|
||||||
|
}, 'json');
|
||||||
|
}
|
||||||
|
|
||||||
|
//固定Bar
|
||||||
|
if (global.pageType !== 'demo') {
|
||||||
|
util.fixbar({
|
||||||
|
bar1: true
|
||||||
|
, click: function (type) {
|
||||||
|
if (type === 'bar1') {
|
||||||
|
location.href = '//fly.layui.com/';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
//窗口scroll
|
||||||
|
; !function () {
|
||||||
|
var main = $('.site-tree').parent(), scroll = function () {
|
||||||
|
var stop = $(window).scrollTop();
|
||||||
|
|
||||||
|
if ($(window).width() <= 750) return;
|
||||||
|
var bottom = $('.footer').offset().top - $(window).height();
|
||||||
|
if (stop > 211 && stop < bottom) {
|
||||||
|
if (!main.hasClass('site-fix')) {
|
||||||
|
main.addClass('site-fix');
|
||||||
|
}
|
||||||
|
if (main.hasClass('site-fix-footer')) {
|
||||||
|
main.removeClass('site-fix-footer');
|
||||||
|
}
|
||||||
|
} else if (stop >= bottom) {
|
||||||
|
if (!main.hasClass('site-fix-footer')) {
|
||||||
|
main.addClass('site-fix site-fix-footer');
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (main.hasClass('site-fix')) {
|
||||||
|
main.removeClass('site-fix').removeClass('site-fix-footer');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stop = null;
|
||||||
|
};
|
||||||
|
scroll();
|
||||||
|
$(window).on('scroll', scroll);
|
||||||
|
}();
|
||||||
|
|
||||||
|
//示例页面滚动
|
||||||
|
$('.site-demo-body').on('scroll', function () {
|
||||||
|
var elemDate = $('.layui-laydate,.layui-colorpicker-main')
|
||||||
|
, elemTips = $('.layui-table-tips');
|
||||||
|
if (elemDate[0]) {
|
||||||
|
elemDate.each(function () {
|
||||||
|
var othis = $(this);
|
||||||
|
if (!othis.hasClass('layui-laydate-static')) {
|
||||||
|
othis.remove();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
$('input').blur();
|
||||||
|
}
|
||||||
|
if (elemTips[0]) elemTips.remove();
|
||||||
|
|
||||||
|
if ($('.layui-layer')[0]) {
|
||||||
|
layer.closeAll('tips');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
//代码修饰
|
||||||
|
layui.code({
|
||||||
|
elem: 'pre'
|
||||||
|
});
|
||||||
|
|
||||||
|
//目录
|
||||||
|
var siteDir = $('.site-dir');
|
||||||
|
if (siteDir[0] && $(window).width() > 750) {
|
||||||
|
layer.ready(function () {
|
||||||
|
layer.open({
|
||||||
|
type: 1
|
||||||
|
, content: siteDir
|
||||||
|
, skin: 'layui-layer-dir'
|
||||||
|
, area: 'auto'
|
||||||
|
, maxHeight: $(window).height() - 300
|
||||||
|
, title: '目录'
|
||||||
|
//,closeBtn: false
|
||||||
|
, offset: 'r'
|
||||||
|
, shade: false
|
||||||
|
, success: function (layero, index) {
|
||||||
|
layer.style(index, {
|
||||||
|
marginLeft: -15
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
siteDir.find('li').on('click', function () {
|
||||||
|
var othis = $(this);
|
||||||
|
othis.find('a').addClass('layui-this');
|
||||||
|
othis.siblings().find('a').removeClass('layui-this');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
//在textarea焦点处插入字符
|
||||||
|
var focusInsert = function (str) {
|
||||||
|
var start = this.selectionStart
|
||||||
|
, end = this.selectionEnd
|
||||||
|
, offset = start + str.length
|
||||||
|
|
||||||
|
this.value = this.value.substring(0, start) + str + this.value.substring(end);
|
||||||
|
this.setSelectionRange(offset, offset);
|
||||||
|
};
|
||||||
|
|
||||||
|
//演示页面
|
||||||
|
$('body').on('keydown', '#LAY_editor, .site-demo-text', function (e) {
|
||||||
|
var key = e.keyCode;
|
||||||
|
if (key === 9 && window.getSelection) {
|
||||||
|
e.preventDefault();
|
||||||
|
focusInsert.call(this, ' ');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
var editor = $('#LAY_editor')
|
||||||
|
, iframeElem = $('#LAY_demo')
|
||||||
|
, demoForm = $('#LAY_demoForm')[0]
|
||||||
|
, demoCodes = $('#LAY_demoCodes')[0]
|
||||||
|
, runCodes = function () {
|
||||||
|
if (!iframeElem[0]) return;
|
||||||
|
var html = editor.val();
|
||||||
|
|
||||||
|
html = html.replace(/=/gi, "layequalsign");
|
||||||
|
html = html.replace(/script/gi, "layscrlayipttag");
|
||||||
|
demoCodes.value = html.length > 100 * 1000 ? '<h1>卧槽,你的代码过长</h1>' : html;
|
||||||
|
|
||||||
|
demoForm.action = '/api/runHtml/';
|
||||||
|
demoForm.submit();
|
||||||
|
|
||||||
|
};
|
||||||
|
$('#LAY_demo_run').on('click', runCodes), runCodes();
|
||||||
|
|
||||||
|
//让导航在最佳位置
|
||||||
|
var setScrollTop = function (thisItem, elemScroll) {
|
||||||
|
if (thisItem[0]) {
|
||||||
|
var itemTop = thisItem.offset().top
|
||||||
|
, winHeight = $(window).height();
|
||||||
|
if (itemTop > winHeight - 120) {
|
||||||
|
elemScroll.animate({ 'scrollTop': itemTop / 2 }, 200)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
setScrollTop($('.site-demo-nav').find('dd.layui-this'), $('.layui-side-scroll').eq(0));
|
||||||
|
setScrollTop($('.site-demo-table-nav').find('li.layui-this'), $('.layui-side-scroll').eq(1));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//查看代码
|
||||||
|
$(function () {
|
||||||
|
var DemoCode = $('#LAY_democode');
|
||||||
|
DemoCode.val([
|
||||||
|
DemoCode.val()
|
||||||
|
, '<body>'
|
||||||
|
, global.preview
|
||||||
|
, '\n<script src="//res.layui.com/layui/dist/layui.js" charset="utf-8"></script>'
|
||||||
|
, '\n<!-- 注意:如果你直接复制所有代码到本地,上述js路径需要改成你本地的 -->'
|
||||||
|
, $('#LAY_democodejs').html()
|
||||||
|
, '\n</body>\n</html>'
|
||||||
|
].join(''));
|
||||||
|
});
|
||||||
|
|
||||||
|
//点击查看代码选项
|
||||||
|
element.on('tab(demoTitle)', function (obj) {
|
||||||
|
if (obj.index === 1) {
|
||||||
|
if (device.ie && device.ie < 9) {
|
||||||
|
layer.alert('强烈不推荐你通过ie8/9 查看代码!因为,所有的标签都会被格式成大写,且没有换行符,影响阅读');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
//手机设备的简单适配
|
||||||
|
var treeMobile = $('.site-tree-mobile')
|
||||||
|
, shadeMobile = $('.site-mobile-shade')
|
||||||
|
|
||||||
|
treeMobile.on('click', function () {
|
||||||
|
$('body').addClass('site-mobile');
|
||||||
|
});
|
||||||
|
|
||||||
|
shadeMobile.on('click', function () {
|
||||||
|
$('body').removeClass('site-mobile');
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//愚人节
|
||||||
|
; !function () {
|
||||||
|
if (home.data('date') === '4-1') {
|
||||||
|
|
||||||
|
if (local['20180401']) return;
|
||||||
|
|
||||||
|
home.addClass('site-out-up');
|
||||||
|
setTimeout(function () {
|
||||||
|
layer.photos({
|
||||||
|
photos: {
|
||||||
|
"data": [{
|
||||||
|
"src": "//cdn.layui.com/upload/2018_4/168_1522515820513_397.png",
|
||||||
|
}]
|
||||||
|
}
|
||||||
|
, anim: 2
|
||||||
|
, shade: 1
|
||||||
|
, move: false
|
||||||
|
, end: function () {
|
||||||
|
layer.msg('愚公,快醒醒!', {
|
||||||
|
shade: 1
|
||||||
|
}, function () {
|
||||||
|
layui.data('layui', {
|
||||||
|
key: '20180401'
|
||||||
|
, value: true
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
, success: function (layero, index) {
|
||||||
|
home.removeClass('site-out-up');
|
||||||
|
|
||||||
|
layero.find('#layui-layer-photos').on('click', function () {
|
||||||
|
layer.close(layero.attr('times'));
|
||||||
|
}).find('.layui-layer-imgsee').remove();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}, 1000 * 3);
|
||||||
|
}
|
||||||
|
}();
|
||||||
|
|
||||||
|
|
||||||
|
exports('global', {});
|
||||||
|
});
|
0
Examples/website/FreeSql.Site.UI/wwwroot/js/site.min.js
vendored
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
/** layui-v2.2.3 MIT License By http://www.layui.com */
|
||||||
|
html #layuicss-skincodecss{display:none;position:absolute;width:1989px}.layui-code-h3,.layui-code-view{position:relative;font-size:12px}.layui-code-view{display:block;margin:10px 0;padding:0;border:1px solid #e2e2e2;border-left-width:6px;background-color:#F2F2F2;color:#333;font-family:Courier New}.layui-code-h3{padding:0 10px;height:32px;line-height:32px;border-bottom:1px solid #e2e2e2}.layui-code-h3 a{position:absolute;right:10px;top:0;color:#999}.layui-code-view .layui-code-ol{position:relative;overflow:auto}.layui-code-view .layui-code-ol li{position:relative;margin-left:45px;line-height:20px;padding:0 5px;border-left:1px solid #e2e2e2;list-style-type:decimal-leading-zero;*list-style-type:decimal;background-color:#fff}.layui-code-view pre{margin:0}.layui-code-notepad{border:1px solid #0C0C0C;border-left-color:#3F3F3F;background-color:#0C0C0C;color:#C2BE9E}.layui-code-notepad .layui-code-h3{border-bottom:none}.layui-code-notepad .layui-code-ol li{background-color:#3F3F3F;border-left:none}
|
After Width: | Height: | Size: 5.8 KiB |
After Width: | Height: | Size: 11 KiB |
After Width: | Height: | Size: 5.7 KiB |
After Width: | Height: | Size: 701 B |
After Width: | Height: | Size: 1.7 KiB |
BIN
Examples/website/FreeSql.Site.UI/wwwroot/layui/font/iconfont.eot
Normal file
447
Examples/website/FreeSql.Site.UI/wwwroot/layui/font/iconfont.svg
Normal file
After Width: | Height: | Size: 222 KiB |
BIN
Examples/website/FreeSql.Site.UI/wwwroot/layui/font/iconfont.ttf
Normal file
BIN
Examples/website/FreeSql.Site.UI/wwwroot/layui/images/face/0.gif
Normal file
After Width: | Height: | Size: 2.6 KiB |
BIN
Examples/website/FreeSql.Site.UI/wwwroot/layui/images/face/1.gif
Normal file
After Width: | Height: | Size: 5.4 KiB |
After Width: | Height: | Size: 2.7 KiB |
After Width: | Height: | Size: 4.0 KiB |
After Width: | Height: | Size: 3.3 KiB |
After Width: | Height: | Size: 7.3 KiB |
After Width: | Height: | Size: 2.3 KiB |
After Width: | Height: | Size: 1.8 KiB |
After Width: | Height: | Size: 6.6 KiB |
After Width: | Height: | Size: 4.3 KiB |
After Width: | Height: | Size: 2.9 KiB |
After Width: | Height: | Size: 3.0 KiB |
BIN
Examples/website/FreeSql.Site.UI/wwwroot/layui/images/face/2.gif
Normal file
After Width: | Height: | Size: 3.1 KiB |
After Width: | Height: | Size: 5.0 KiB |
After Width: | Height: | Size: 5.1 KiB |
After Width: | Height: | Size: 9.6 KiB |
After Width: | Height: | Size: 3.7 KiB |
After Width: | Height: | Size: 7.9 KiB |
After Width: | Height: | Size: 3.1 KiB |
After Width: | Height: | Size: 3.2 KiB |
After Width: | Height: | Size: 4.3 KiB |
After Width: | Height: | Size: 2.7 KiB |
After Width: | Height: | Size: 4.7 KiB |
BIN
Examples/website/FreeSql.Site.UI/wwwroot/layui/images/face/3.gif
Normal file
After Width: | Height: | Size: 3.9 KiB |
After Width: | Height: | Size: 2.5 KiB |
After Width: | Height: | Size: 2.0 KiB |
After Width: | Height: | Size: 3.4 KiB |
After Width: | Height: | Size: 2.4 KiB |
After Width: | Height: | Size: 3.6 KiB |
After Width: | Height: | Size: 1.8 KiB |
After Width: | Height: | Size: 2.3 KiB |
After Width: | Height: | Size: 1.5 KiB |
After Width: | Height: | Size: 3.5 KiB |
After Width: | Height: | Size: 6.3 KiB |
BIN
Examples/website/FreeSql.Site.UI/wwwroot/layui/images/face/4.gif
Normal file
After Width: | Height: | Size: 5.6 KiB |
After Width: | Height: | Size: 3.1 KiB |
After Width: | Height: | Size: 3.6 KiB |
After Width: | Height: | Size: 5.2 KiB |
After Width: | Height: | Size: 2.6 KiB |
After Width: | Height: | Size: 4.0 KiB |
After Width: | Height: | Size: 3.3 KiB |
After Width: | Height: | Size: 2.9 KiB |
After Width: | Height: | Size: 2.3 KiB |
After Width: | Height: | Size: 2.6 KiB |
After Width: | Height: | Size: 2.3 KiB |
BIN
Examples/website/FreeSql.Site.UI/wwwroot/layui/images/face/5.gif
Normal file
After Width: | Height: | Size: 4.5 KiB |
After Width: | Height: | Size: 5.7 KiB |
After Width: | Height: | Size: 2.7 KiB |
After Width: | Height: | Size: 777 B |
After Width: | Height: | Size: 2.1 KiB |
After Width: | Height: | Size: 2.1 KiB |
After Width: | Height: | Size: 1.9 KiB |