1
0
懒得勤快 6 жил өмнө
parent
commit
5cb360b4da

+ 13 - 29
src/Masuit.MyBlogs.Core/Controllers/CommentController.cs

@@ -54,6 +54,11 @@ namespace Masuit.MyBlogs.Core.Controllers
         [HttpPost, ValidateAntiForgeryToken]
         public ActionResult Put(CommentInputDto comment)
         {
+            if (Regex.Match(comment.Content, CommonHelper.BanRegex).Length > 0)
+            {
+                return ResultData(null, false, "您提交的内容包含敏感词,被禁止发表,请注意改善您的言辞!");
+            }
+
             Post post = PostService.GetById(comment.PostId);
             if (post is null)
             {
@@ -66,10 +71,12 @@ namespace Masuit.MyBlogs.Core.Controllers
             {
                 return ResultData(null, false, "您刚才已经在这篇文章发表过一次评论了,换一篇文章吧,或者换一下评论内容吧!");
             }
+
             if (Regex.Match(comment.Content, CommonHelper.ModRegex).Length <= 0)
             {
                 comment.Status = Status.Pended;
             }
+
             if (user != null)
             {
                 comment.NickName = user.NickName;
@@ -101,11 +108,7 @@ namespace Masuit.MyBlogs.Core.Controllers
                         {
                             Title = $"来自【{com.NickName}】的新文章评论",
                             Content = com.Content,
-                            Link = Url.Action("Details", "Post", new
-                            {
-                                id = com.PostId,
-                                cid = com.Id
-                            }, Request.Scheme) + "#comment"
+                            Link = Url.Action("Details", "Post", new { id = com.PostId, cid = com.Id }, Request.Scheme) + "#comment"
                         });
                     }
 #if !DEBUG
@@ -115,26 +118,15 @@ namespace Masuit.MyBlogs.Core.Controllers
                         //新评论,只通知博主和楼主
                         foreach (var s in emails.Distinct())
                         {
-                            BackgroundJob.Enqueue(() => CommonHelper.SendMail(HttpUtility.UrlDecode(Request.Headers[HeaderNames.Referer]) + "|博客文章新评论:", content.Replace("{{link}}", Url.Action("Details", "Post", new
-                            {
-                                id = com.PostId,
-                                cid = com.Id
-                            }, Request.Scheme) + "#comment"), s));
+                            BackgroundJob.Enqueue(() => CommonHelper.SendMail(HttpUtility.UrlDecode(Request.Headers[HeaderNames.Referer]) + "|博客文章新评论:", content.Replace("{{link}}", Url.Action("Details", "Post", new { id = com.PostId, cid = com.Id }, Request.Scheme) + "#comment"), s));
                         }
                     }
                     else
                     {
                         //通知博主和上层所有关联的评论访客
                         var pid = CommentService.GetParentCommentIdByChildId(com.Id);
-                        emails = CommentService.GetSelfAndAllChildrenCommentsByParentId(pid).Select(c => c.Email).Except(new List<string>()
-                        {
-                            com.Email
-                        }).Distinct().ToList();
-                        string link = Url.Action("Details", "Post", new
-                        {
-                            id = com.PostId,
-                            cid = com.Id
-                        }, Request.Scheme) + "#comment";
+                        emails = CommentService.GetSelfAndAllChildrenCommentsByParentId(pid).Select(c => c.Email).Except(new List<string> { com.Email }).Distinct().ToList();
+                        string link = Url.Action("Details", "Post", new { id = com.PostId, cid = com.Id }, Request.Scheme) + "#comment";
                         foreach (var s in emails)
                         {
                             BackgroundJob.Enqueue(() => CommonHelper.SendMail($"{HttpUtility.UrlDecode(Request.Headers[HeaderNames.Referer])}{CommonHelper.SystemSettings["Title"]}文章评论回复:", content.Replace("{{link}}", link), s));
@@ -145,11 +137,7 @@ namespace Masuit.MyBlogs.Core.Controllers
                 }
                 foreach (var s in emails.Distinct())
                 {
-                    BackgroundJob.Enqueue(() => CommonHelper.SendMail(HttpUtility.UrlDecode(Request.Headers[HeaderNames.Referer]) + "|博客文章新评论(待审核):", content.Replace("{{link}}", Url.Action("Details", "Post", new
-                    {
-                        id = com.PostId,
-                        cid = com.Id
-                    }, Request.Scheme) + "#comment") + "<p style='color:red;'>(待审核)</p>", s));
+                    BackgroundJob.Enqueue(() => CommonHelper.SendMail(HttpUtility.UrlDecode(Request.Headers[HeaderNames.Referer]) + "|博客文章新评论(待审核):", content.Replace("{{link}}", Url.Action("Details", "Post", new { id = com.PostId, cid = com.Id }, Request.Scheme) + "#comment") + "<p style='color:red;'>(待审核)</p>", s));
                 }
                 return ResultData(null, true, "评论成功,待站长审核通过以后将显示");
             }
@@ -298,11 +286,7 @@ namespace Masuit.MyBlogs.Core.Controllers
             var pid = comment.ParentId == 0 ? comment.Id : CommentService.GetParentCommentIdByChildId(id);
 #if !DEBUG
             string content = System.IO.File.ReadAllText(Path.Combine(_hostingEnvironment.WebRootPath, "template", "notify.html")).Replace("{{title}}", post.Title).Replace("{{time}}", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")).Replace("{{nickname}}", comment.NickName).Replace("{{content}}", comment.Content);
-            var emails = CommentService.GetSelfAndAllChildrenCommentsByParentId(pid).Select(c => c.Email).Distinct().Except(new List<string>()
-            {
-                comment.Email,
-                CommonHelper.SystemSettings["ReceiveEmail"]
-            }).ToList();
+            var emails = CommentService.GetSelfAndAllChildrenCommentsByParentId(pid).Select(c => c.Email).Distinct().Except(new List<string> { comment.Email, CommonHelper.SystemSettings["ReceiveEmail"] }).ToList();
             string link = Url.Action("Details", "Post", new
             {
                 id = comment.PostId,

+ 1 - 1
src/Masuit.MyBlogs.Core/Controllers/HomeController.cs

@@ -67,7 +67,7 @@ namespace Masuit.MyBlogs.Core.Controllers
         {
             ViewBag.Total = PostService.Count(p => p.Status == Status.Pended);
             UserInfoOutputDto user = HttpContext.Session.Get<UserInfoOutputDto>(SessionKey.UserInfo) ?? new UserInfoOutputDto();
-            var banners = BannerService.GetAllFromL2CacheNoTracking(b => Guid.NewGuid()).ToList();
+            var banners = BannerService.GetAllFromL2CacheNoTracking(b => new Random().Next()).ToList();
             List<FastShare> fastShares = FastShareService.GetAllFromL2CacheNoTracking(s => s.Sort).ToList();
             ViewBag.FastShare = fastShares;
             var viewModel = GetIndexPageViewModel(1, 15, orderBy, user);

+ 6 - 4
src/Masuit.MyBlogs.Core/Controllers/MsgController.cs

@@ -124,6 +124,11 @@ namespace Masuit.MyBlogs.Core.Controllers
         [HttpPost, ValidateAntiForgeryToken]
         public ActionResult Put(LeaveMessageInputDto msg)
         {
+            if (Regex.Match(msg.Content, CommonHelper.BanRegex).Length > 0)
+            {
+                return ResultData(null, false, "您提交的内容包含敏感词,被禁止发表,请注意改善您的言辞!");
+            }
+
             UserInfoOutputDto user = HttpContext.Session.Get<UserInfoOutputDto>(SessionKey.UserInfo);
             msg.Content = msg.Content.Trim().Replace("<p><br></p>", string.Empty);
             if (msg.Content.RemoveHtml().Trim().Equals(HttpContext.Session.Get<string>("msg")))
@@ -164,10 +169,7 @@ namespace Masuit.MyBlogs.Core.Controllers
                         {
                             Title = $"来自【{msg2.NickName}】的新留言",
                             Content = msg2.Content,
-                            Link = Url.Action("Index", "Msg", new
-                            {
-                                cid = msg2.Id
-                            }, Request.Scheme)
+                            Link = Url.Action("Index", "Msg", new { cid = msg2.Id }, Request.Scheme)
                         });
                     }
 #if !DEBUG

+ 6 - 2
src/Masuit.MyBlogs.Core/Controllers/PostController.cs

@@ -286,6 +286,11 @@ namespace Masuit.MyBlogs.Core.Controllers
         [HttpPost, ValidateAntiForgeryToken]
         public ActionResult Publish(PostInputDto post)
         {
+            if (Regex.Match(post.Content, CommonHelper.BanRegex).Length > 0)
+            {
+                return ResultData(null, false, "您提交的内容包含敏感词,被禁止发表,请注意改善您的言辞!");
+            }
+
             UserInfoOutputDto user = HttpContext.Session.Get<UserInfoOutputDto>(SessionKey.UserInfo);
             if (!CategoryService.Any(c => c.Id == post.CategoryId && c.Status == Status.Available))
             {
@@ -298,8 +303,7 @@ namespace Masuit.MyBlogs.Core.Controllers
             }
             else if (post.Label.Trim().Length > 50)
             {
-                post.Label = post.Label.Replace(",", ",");
-                post.Label = post.Label.Trim().Substring(0, 50);
+                post.Label = post.Label.Replace(",", ",").Trim().Substring(0, 50);
             }
             else
             {

+ 11 - 7
src/Masuit.MyBlogs.Core/Infrastructure/Repository/BaseRepository.cs

@@ -161,7 +161,7 @@ namespace Masuit.MyBlogs.Core.Infrastructure.Repository
         /// <returns>还未执行的SQL语句</returns>
         public virtual IQueryable<T> LoadEntities(Expression<Func<T, bool>> @where)
         {
-            return Queryable.Where(DataContext.Set<T>(), @where);
+            return DataContext.Set<T>().Where(@where);
         }
 
         /// <summary>
@@ -174,7 +174,7 @@ namespace Masuit.MyBlogs.Core.Infrastructure.Repository
         /// <returns>还未执行的SQL语句</returns>
         public virtual IOrderedQueryable<T> LoadEntities<TS>(Expression<Func<T, bool>> @where, Expression<Func<T, TS>> @orderby, bool isAsc = true)
         {
-            return isAsc ? Queryable.Where(DataContext.Set<T>(), @where).OrderBy(orderby) : Queryable.Where(DataContext.Set<T>(), @where).OrderByDescending(orderby);
+            return isAsc ? DataContext.Set<T>().Where(@where).OrderBy(orderby) : DataContext.Set<T>().Where(@where).OrderByDescending(orderby);
         }
 
         /// <summary>
@@ -254,7 +254,7 @@ namespace Masuit.MyBlogs.Core.Infrastructure.Repository
         /// <returns>实体集合</returns>
         public virtual IEnumerable<T> LoadEntitiesFromL2CacheNoTracking(Expression<Func<T, bool>> @where)
         {
-            return Queryable.Where(DataContext.Set<T>(), @where).AsNoTracking().Cacheable();
+            return DataContext.Set<T>().Where(@where).AsNoTracking().Cacheable();
         }
 
         /// <summary>
@@ -443,7 +443,7 @@ namespace Masuit.MyBlogs.Core.Infrastructure.Repository
         /// <returns>还未执行的SQL语句</returns>
         public virtual IQueryable<T> LoadPageEntities<TS>(int pageIndex, int pageSize, out int totalCount, Expression<Func<T, bool>> where, Expression<Func<T, TS>> orderby, bool isAsc)
         {
-            var temp = Queryable.Where(DataContext.Set<T>(), where);
+            var temp = DataContext.Set<T>().Where(where);
             totalCount = temp.Count();
             if (pageIndex * pageSize > totalCount)
             {
@@ -487,7 +487,7 @@ namespace Masuit.MyBlogs.Core.Infrastructure.Repository
         /// <returns>还未执行的SQL语句</returns>
         public virtual IQueryable<T> LoadPageEntitiesNoTracking<TS>(int pageIndex, int pageSize, out int totalCount, Expression<Func<T, bool>> @where, Expression<Func<T, TS>> @orderby, bool isAsc = true)
         {
-            var temp = Queryable.Where(DataContext.Set<T>(), where).AsNoTracking();
+            var temp = DataContext.Set<T>().Where(where).AsNoTracking();
             totalCount = temp.Count();
             if (pageIndex * pageSize > totalCount)
             {
@@ -563,6 +563,7 @@ namespace Masuit.MyBlogs.Core.Infrastructure.Repository
             if (t != null)
             {
                 DataContext.Entry(t).State = EntityState.Deleted;
+                DataContext.Remove(t);
                 return true;
             }
 
@@ -578,6 +579,7 @@ namespace Masuit.MyBlogs.Core.Infrastructure.Repository
         {
             DataContext.Entry(t).State = EntityState.Unchanged;
             DataContext.Entry(t).State = EntityState.Deleted;
+            DataContext.Remove(t);
             return true;
         }
 
@@ -598,7 +600,7 @@ namespace Masuit.MyBlogs.Core.Infrastructure.Repository
         /// <returns>删除成功</returns>
         public virtual async Task<int> DeleteEntityAsync(Expression<Func<T, bool>> @where)
         {
-            return await Queryable.Where(DataContext.Set<T>(), @where).DeleteAsync().ConfigureAwait(true);
+            return await DataContext.Set<T>().Where(@where).DeleteAsync().ConfigureAwait(true);
         }
 
         /// <summary>
@@ -609,6 +611,7 @@ namespace Masuit.MyBlogs.Core.Infrastructure.Repository
         public virtual bool UpdateEntity(T t)
         {
             DataContext.Entry(t).State = EntityState.Modified;
+            DataContext.Update(t);
             return true;
         }
 
@@ -620,7 +623,7 @@ namespace Masuit.MyBlogs.Core.Infrastructure.Repository
         /// <returns>更新成功</returns>
         public virtual int UpdateEntity(Expression<Func<T, bool>> @where, T t)
         {
-            return Queryable.Where(DataContext.Set<T>(), @where).Update(ts => t);
+            return DataContext.Set<T>().Where(@where).Update(ts => t);
         }
 
         /// <summary>
@@ -642,6 +645,7 @@ namespace Masuit.MyBlogs.Core.Infrastructure.Repository
         public virtual T AddEntity(T t)
         {
             DataContext.Entry(t).State = EntityState.Added;
+            DataContext.Add(t);
             return t;
         }
 

+ 4 - 6
src/Masuit.MyBlogs.Core/Masuit.MyBlogs.Core.csproj

@@ -67,10 +67,9 @@
     <PackageReference Include="AutoMapper" Version="8.0.0" />
     <PackageReference Include="CacheManager.Microsoft.Extensions.Caching.Memory" Version="1.2.0" />
     <PackageReference Include="CacheManager.Serialization.Json" Version="1.2.0" />
-    <PackageReference Include="CSRedisCore" Version="3.0.46" />
-    <PackageReference Include="Dapper" Version="1.60.1" />
+    <PackageReference Include="CSRedisCore" Version="3.0.48" />
     <PackageReference Include="EFSecondLevelCache.Core" Version="1.7.1" />
-    <PackageReference Include="Hangfire" Version="1.6.24" />
+    <PackageReference Include="Hangfire" Version="1.7.0" />
     <PackageReference Include="Hangfire.Autofac" Version="2.3.1" />
     <PackageReference Include="Hangfire.MemoryStorage" Version="1.6.0" />
     <PackageReference Include="Hangfire.Redis.StackExchange" Version="1.8.0" />
@@ -80,10 +79,9 @@
     <PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="2.2.3" />
     <PackageReference Include="PanGu.HighLight" Version="1.0.0" />
     <PackageReference Include="Pomelo.EntityFrameworkCore.MySql" Version="2.2.0" />
-    <PackageReference Include="Swashbuckle.AspNetCore" Version="4.0.1" />
     <PackageReference Include="WilderMinds.RssSyndication" Version="1.5.0" />
-    <PackageReference Include="Z.EntityFramework.Extensions.EFCore" Version="2.1.59" />
-    <PackageReference Include="Z.EntityFramework.Plus.EFCore" Version="1.8.18" />
+    <PackageReference Include="Z.EntityFramework.Extensions.EFCore" Version="2.2.1" />
+    <PackageReference Include="Z.EntityFramework.Plus.EFCore" Version="1.8.24" />
     <PackageReference Include="Z.ExtensionMethods" Version="2.1.1" />
   </ItemGroup>
 

+ 0 - 44
src/Masuit.MyBlogs.Core/Masuit.MyBlogs.Core.xml

@@ -1494,50 +1494,6 @@
             <param name="id"></param>
             <returns></returns>
         </member>
-        <member name="T:Masuit.MyBlogs.Core.Controllers.PublicController">
-            <summary>
-            公共API
-            </summary>
-        </member>
-        <member name="P:Masuit.MyBlogs.Core.Controllers.PublicController.PostService">
-            <summary>
-            
-            </summary>
-        </member>
-        <member name="M:Masuit.MyBlogs.Core.Controllers.PublicController.#ctor(Masuit.MyBlogs.Core.Infrastructure.Services.Interface.IPostService)">
-            <summary>
-            开放API
-            </summary>
-            <param name="postService"></param>
-        </member>
-        <member name="M:Masuit.MyBlogs.Core.Controllers.PublicController.Post">
-            <summary>
-            获取文章列表
-            </summary>
-            <returns></returns>
-        </member>
-        <member name="M:Masuit.MyBlogs.Core.Controllers.PublicController.Position(System.String,System.String)">
-            <summary>
-            根据经纬度获取详细地理信息
-            </summary>
-            <param name="lat">纬度</param>
-            <param name="lng">经度</param>
-            <returns></returns>
-        </member>
-        <member name="M:Masuit.MyBlogs.Core.Controllers.PublicController.Address(System.String)">
-            <summary>
-            根据详细地址获取经纬度
-            </summary>
-            <param name="addr">详细地理信息</param>
-            <returns></returns>
-        </member>
-        <member name="M:Masuit.MyBlogs.Core.Controllers.PublicController.GetIpInfo(System.String)">
-            <summary>
-            获取ip地址详细地理信息
-            </summary>
-            <param name="ip"></param>
-            <returns></returns>
-        </member>
         <member name="T:Masuit.MyBlogs.Core.Controllers.SearchController">
             <summary>
             站内搜索

+ 43 - 20
src/Masuit.MyBlogs.Core/Startup.cs

@@ -26,6 +26,7 @@ using Microsoft.AspNetCore.Hosting;
 using Microsoft.AspNetCore.Http;
 using Microsoft.AspNetCore.Http.Features;
 using Microsoft.AspNetCore.Mvc;
+using Microsoft.AspNetCore.ResponseCompression;
 using Microsoft.AspNetCore.Rewrite;
 using Microsoft.AspNetCore.StaticFiles;
 using Microsoft.AspNetCore.WebSockets;
@@ -36,9 +37,9 @@ using Microsoft.Extensions.WebEncoders;
 using Microsoft.Net.Http.Headers;
 using Newtonsoft.Json;
 using Newtonsoft.Json.Serialization;
-using Swashbuckle.AspNetCore.Swagger;
 using System;
 using System.IO;
+using System.IO.Compression;
 using System.Linq;
 using System.Reflection;
 using System.Text.Encodings.Web;
@@ -96,30 +97,41 @@ namespace Masuit.MyBlogs.Core
                 });
             }); //配置跨域
 
-            services.AddSwaggerGen(c =>
-            {
-                c.SwaggerDoc("v1", new Info
-                {
-                    Title = "API文档",
-                    Version = "v1"
-                });
-                c.DescribeAllEnumsAsStrings();
-                c.IncludeXmlComments(AppContext.BaseDirectory + "Masuit.MyBlogs.Core.xml");
-            }); //配置swagger
-
             services.AddHttpClient(); //注入HttpClient
             services.AddHttpContextAccessor(); //注入静态HttpContext
             services.AddResponseCaching(); //注入响应缓存
             services.Configure<FormOptions>(options =>
             {
-                options.MultipartBodyLengthLimit = 104857600;// 100MB
+                options.MultipartBodyLengthLimit = 104857600; // 100MB
             }); //配置请求长度
 
+            services.Configure<BrotliCompressionProviderOptions>(options =>
+            {
+                options.Level = CompressionLevel.Optimal;
+            });
+            services.Configure<GzipCompressionProviderOptions>(options =>
+            {
+                options.Level = CompressionLevel.Optimal;
+            });
+            services.AddResponseCompression(options =>
+            {
+                options.Providers.Add<BrotliCompressionProvider>();
+                options.Providers.Add<GzipCompressionProvider>();
+                options.Providers.Add<CustomCompressionProvider>();
+                options.MimeTypes = ResponseCompressionDefaults.MimeTypes.Concat(new[]
+                {
+                    "image/svg+xml"
+                });
+            });
+
             services.AddSession(); //注入Session
             //services.AddHangfire(x => x.UseRedisStorage(AppConfig.Redis)); //配置hangfire
             services.AddHangfire(x => x.UseMemoryStorage()); //配置hangfire
 
-            services.AddSevenZipCompressor().AddResumeFileResult().AddSearchEngine<DataContext>(new LuceneIndexerOptions() { Path = "lucene" });// 配置7z和断点续传和Redis和Lucene搜索引擎
+            services.AddSevenZipCompressor().AddResumeFileResult().AddSearchEngine<DataContext>(new LuceneIndexerOptions()
+            {
+                Path = "lucene"
+            }); // 配置7z和断点续传和Redis和Lucene搜索引擎
             RedisHelper.Initialization(new CSRedisClient(AppConfig.Redis));
 
             //配置EF二级缓存
@@ -173,11 +185,12 @@ namespace Masuit.MyBlogs.Core
             else
             {
                 app.UseExceptionHandler("/Home/Error");
-                app.UseHsts();
+                //app.UseHsts();
                 app.UseException();
             }
 
             //db.Database.Migrate();
+
             #region 导词库
 
             Console.WriteLine("正在导入自定义词库...");
@@ -191,6 +204,7 @@ namespace Masuit.MyBlogs.Core
                 }
             });
             Console.WriteLine($"导入自定义词库完成,耗时{time}s");
+
             #endregion
 
             string lucenePath = Path.Combine(env.ContentRootPath, luceneIndexerOptions.Path);
@@ -201,7 +215,8 @@ namespace Masuit.MyBlogs.Core
                 Console.WriteLine("索引库创建完成!");
             }
 
-            app.UseRewriter(new RewriteOptions().AddRedirectToNonWww());// URL重写
+            app.UseResponseCompression();
+            app.UseRewriter(new RewriteOptions().AddRedirectToNonWww()); // URL重写
             app.UseStaticHttpContext(); //注入静态HttpContext对象
 
             app.UseSession(); //注入Session
@@ -235,16 +250,24 @@ namespace Masuit.MyBlogs.Core
                 builder.AllowCredentials();
             }); //配置跨域
             app.UseResponseCaching(); //启动Response缓存
-            app.UseSwagger().UseSwaggerUI(c =>
-            {
-                c.SwaggerEndpoint("/swagger/v1/swagger.json", CommonHelper.SystemSettings["Title"]);
-            }); //配置swagger
             app.UseSignalR(hub => hub.MapHub<MyHub>("/hubs"));
             HangfireJobInit.Start(); //初始化定时任务
             app.UseMvcWithDefaultRoute();
         }
     }
 
+    public class CustomCompressionProvider : ICompressionProvider
+    {
+        public string EncodingName => "mycustomcompression";
+        public bool SupportsFlush => true;
+
+        public Stream CreateStream(Stream outputStream)
+        {
+            // Create a custom compression stream wrapper here
+            return outputStream;
+        }
+    }
+
     /// <summary>
     /// hangfire授权拦截器
     /// </summary>

+ 12 - 14
src/Masuit.MyBlogs.Core/Views/Misc/About.cshtml

@@ -92,7 +92,6 @@
                 <li>南山下,码农一枚。酷爱编程,乐于分享。</li>
                 <li>09年开始接触编程,致力于更好的分享技术,分享人生。</li>
                 <li>程序老鸟,初心不改!依然喜欢写代码到深夜,最喜欢深夜代码伴随着的键盘声。</li>
-                <li>多年的实战项目经验,擅长.NET、JavaEE、web前端等多种开发技术,擅长于大型互联网项目优化与改进,目前主攻web全栈开发技术,欢迎大家来一起侃技术;</li>
                 <li>喜欢折腾和搞机,追求新鲜的硬件数码设备,也欢迎小伙伴们一起讨论搞机经验,一起来tree new bee;</li>
                 <li>2005年就读于美国联邦总局学院,2006年美国时代周刊年度年度人物,2008年感动中国组委会特别大奖,2010年被奥巴马请回到海豹突击队,2011年参加了美国总统选举二次落选,2012年被提名为世界最具影响力人物,2014年放弃一生辉煌隐退在互联网当码农;</li>
                 <li>同时也是一位B站资深哲♂学家,探索未知领域😏。</li>
@@ -157,7 +156,6 @@
             <button class="btn btn-danger">Postman</button>
             <button class="btn btn-success">PanDownload</button>
             <button class="btn btn-info">BlueStack</button>
-            <button class="btn btn-primary">Shadowsocks</button>
             <button class="btn btn-default">ShadowsocksR</button>
             <button class="btn btn-danger">v2ray</button>
         </div>
@@ -167,11 +165,11 @@
             <h2 class="size24 inline">常去的网站</h2>
         </div>
         <div class="col-md-12" style="line-height: 40px;">
-            <a class="btn btn-danger" href="https://github.com" target="_blank">github</a>
+            <a class="btn btn-danger" href="https://github.com" target="_blank">gayhub</a>
             <a class="btn btn-default" href="https://www.cnblogs.com" target="_blank">博客园</a>
-            <a class="btn btn-success" href="https://www.csdn.net" target="_blank">CSDN</a>
-            <a class="btn btn-info" href="http://www.51cto.com" target="_blank">51CTO</a>
-            <a class="btn btn-primary" href="http://www.jb51.net" target="_blank">脚本之家</a>
+            <a class="btn btn-success" href="https://gitlab.com" target="_blank">gaylab</a>
+            <a class="btn btn-info" href="http://google.com" target="_blank">Google</a>
+            <a class="btn btn-primary" href="http://youtube.com" target="_blank">YouTube</a>
             <a class="btn btn-success" href="http://www.htmleaf.com" target="_blank">jquery之家</a>
             <a class="btn btn-info" href="https://www.52pojie.cn" target="_blank">52破解</a>
             <a class="btn btn-primary" href="http://msdn.itellyou.cn" target="_blank">MSDN</a>
@@ -186,14 +184,14 @@
             <a class="btn btn-info" href="https://www.linkedin.com" target="_blank">领英</a>
         </div>
     </div>
-    <div class="row margin-top10">
-        <div class="page-header">
-            <h2 class="size24 inline">博主详细简历</h2>
-        </div>
-        <div class="col-md-12" style="line-height: 40px;">
-            <a class="btn btn-info" href="http://resume.masuit.com">立即前往</a>
-        </div>
-    </div>
+    @*<div class="row margin-top10">
+            <div class="page-header">
+                <h2 class="size24 inline">博主详细简历</h2>
+            </div>
+            <div class="col-md-12" style="line-height: 40px;">
+                <a class="btn btn-info" href="http://resume.masuit.com">立即前往</a>
+            </div>
+        </div>*@
     <div class="row margin-top10">
         <div class="page-header">
             <h2 class="size24 inline">联系博主</h2>

+ 0 - 2
src/Masuit.MyBlogs.Core/Views/Shared/_Layout.cshtml

@@ -273,8 +273,6 @@
                     总访客量:@CommonHelper.InterviewCount,平均访问量:@(CommonHelper.AverageCount.ToString("N"))人/天
                     <section>
                         友情链接:
-                        <a href="/swagger">博客开放平台</a>
-                        <span> | </span>
                         @{
                             if (user.IsAdmin)
                             {

+ 1 - 1
src/Masuit.MyBlogs.Core/wwwroot/ng-views/template/sidebar-left.html

@@ -43,7 +43,7 @@
                 <li><a data-ui-sref-active="active" data-ui-sref="post-pending" data-ng-click="mactrl.sidebarStat($event)">文章审核</a></li>
                 <li><a data-ui-sref-active="active" data-ui-sref="post-list" data-ng-click="mactrl.sidebarStat($event)">文章列表</a></li>
                 <li><a data-ui-sref-active="active" data-ui-sref="write-blog" data-ng-click="mactrl.sidebarStat($event)">写文章</a></li>
-                <li><a data-ui-sref-active="active" data-ui-sref="top-post" data-ng-click="mactrl.sidebarStat($event)">置顶页管理</a></li>
+                <li><a data-ui-sref-active="active" data-ui-sref="top-post" data-ng-click="mactrl.sidebarStat($event)">banner头图管理</a></li>
                 <li><a data-ui-sref-active="active" data-ui-sref="post-cat" data-ng-click="mactrl.sidebarStat($event)">文章分类管理</a></li>
                 <li><a data-ui-sref-active="active" data-ui-sref="seminar" data-ng-click="mactrl.sidebarStat($event)"><i class="zmdi zmdi-format-underlined"></i>文章专题管理</a></li>
                 <li><a data-ui-sref-active="active" data-ui-sref="share" data-ng-click="mactrl.sidebarStat($event)">快速分享</a></li>