├── .gitignore ├── HiBlogs ├── BlogsMigration │ ├── BlogMigration.cs │ ├── BlogsMigration.csproj │ └── MigrationBlogModel.cs ├── HiBlogs.Application │ ├── Admin │ │ └── AccountAppService.cs │ ├── ApplicationModule.cs │ └── HiBlogs.Application.csproj ├── HiBlogs.Core │ ├── AuditedEntitys │ │ ├── CreationAuditedEntity.cs │ │ ├── DeleterAuditedEntity.cs │ │ ├── Entity.cs │ │ ├── EntityBase.cs │ │ ├── IEntity.cs │ │ └── ModifyAuditedEntity.cs │ ├── Authorization │ │ └── PermissionNamesEnum.cs │ ├── Entities │ │ ├── Blog.cs │ │ ├── BlogBlogTag.cs │ │ ├── BlogBlogType.cs │ │ ├── BlogTag.cs │ │ ├── BlogType.cs │ │ ├── Remark.cs │ │ ├── ReplyRemark.cs │ │ ├── Role.cs │ │ ├── RolePermissionName.cs │ │ ├── User.cs │ │ └── UserRole.cs │ ├── HiBlogs.Core.csproj │ └── HiBlogs.Core.csproj.user ├── HiBlogs.Definitions │ ├── Dependency │ │ ├── IScopedDependency.cs │ │ ├── ISingletonDependency.cs │ │ └── ITransientDependency.cs │ ├── HiBlogs.Definitions.csproj │ ├── HiClaimTypes │ │ └── HiClaimTypes.cs │ ├── IHiSession.cs │ └── RoleNames.cs ├── HiBlogs.EntityFramework │ ├── EntityFramework │ │ └── HiBlogsDbContext.cs │ ├── HiBlogs.EntityFramework.csproj │ ├── HiBlogs.EntityFramework.csproj.user │ └── Migrations │ │ ├── 20170922101236_initDB.Designer.cs │ │ ├── 20170922101236_initDB.cs │ │ └── HiBlogsDbContextModelSnapshot.cs ├── HiBlogs.Infrastructure │ ├── Config │ │ ├── AppConfig.cs │ │ ├── EmailValue.cs │ │ └── SqlConnection.cs │ ├── ConfigurationManager.cs │ ├── EmailHelper.cs │ ├── Extensions │ │ ├── EncryptDecryptExtension.cs │ │ ├── EnumExtension.cs │ │ └── StringExtend.cs │ ├── HiBlogs.Infrastructure.csproj │ ├── HiBlogs.Infrastructure.csproj.user │ ├── HiSession.cs │ └── Models │ │ └── ReturnResult.cs ├── HiBlogs.Web │ ├── .bowerrc │ ├── Areas │ │ └── Admin │ │ │ ├── Controllers │ │ │ ├── AccountController.cs │ │ │ ├── AdminBaseController.cs │ │ │ ├── AuditController.cs │ │ │ ├── BlogManageController.cs │ │ │ └── HomeController.cs │ │ │ ├── Models │ │ │ └── LoginViewModel.cs │ │ │ ├── Views │ │ │ ├── Account │ │ │ │ ├── Activation.cshtml │ │ │ │ ├── Activation.cshtml.cs │ │ │ │ ├── Login.cshtml │ │ │ │ └── Register.cshtml │ │ │ ├── Audit │ │ │ │ ├── GetLogInfo.cshtml │ │ │ │ ├── GetLogInfo.cshtml.cs │ │ │ │ └── Logs.cshtml │ │ │ └── BlogManage │ │ │ │ ├── Blogs.cshtml │ │ │ │ └── Migration.cshtml │ │ │ ├── _ViewImports.cshtml │ │ │ └── _ViewStart.cshtml │ ├── Authorization │ │ └── MvcAuthorizeAttribute.cs │ ├── Controllers │ │ ├── HomeController.cs │ │ ├── MvcBaseController.cs │ │ └── UserBlogController.cs │ ├── HiBlogs.Web.csproj │ ├── HiBlogs.Web.csproj.user │ ├── Models │ │ ├── BlogInfoViewModel.cs │ │ ├── BlogViewModel.cs │ │ └── ErrorViewModel.cs │ ├── Program.cs │ ├── Properties │ │ ├── PublishProfiles │ │ │ ├── FolderProfile.pubxml │ │ │ └── FolderProfile.pubxml.user │ │ └── launchSettings.json │ ├── Startup.cs │ ├── Views │ │ ├── Home │ │ │ ├── Blog.cshtml │ │ │ └── Index.cshtml │ │ ├── Shared │ │ │ ├── Error.cshtml │ │ │ ├── _AdminLayout.cshtml │ │ │ ├── _Layout.cshtml │ │ │ └── _ValidationScriptsPartial.cshtml │ │ ├── UserBlog │ │ │ ├── Blog.cshtml │ │ │ └── Blog.cshtml.cs │ │ ├── _ViewImports.cshtml │ │ └── _ViewStart.cshtml │ ├── appsettings - 复制.Development.json │ ├── appsettings - 复制.json │ ├── bower.json │ ├── bundleconfig.json │ ├── hosting.json │ ├── web.config │ └── wwwroot │ │ ├── Resource │ │ └── Home │ │ │ ├── Blog.css │ │ │ └── Index.css │ │ ├── css │ │ ├── site.css │ │ └── site.min.css │ │ ├── favicon.ico │ │ ├── hi_login.html │ │ ├── images │ │ ├── banner1.svg │ │ ├── banner2.svg │ │ ├── banner3.svg │ │ ├── banner4.svg │ │ ├── github.jpg │ │ ├── hi_128.png │ │ ├── hi_48.png │ │ ├── hi_72.png │ │ ├── qq.png │ │ └── xinlang.png │ │ ├── js │ │ ├── jquery.common.js │ │ ├── site.js │ │ └── site.min.js │ │ └── lib │ │ ├── bootstrap │ │ ├── .bower.json │ │ ├── CHANGELOG.md │ │ ├── Gemfile │ │ ├── Gemfile.lock │ │ ├── Gruntfile.js │ │ ├── ISSUE_TEMPLATE.md │ │ ├── LICENSE │ │ ├── README.md │ │ ├── bower.json │ │ ├── dist │ │ │ ├── css │ │ │ │ ├── bootstrap-theme.css │ │ │ │ ├── bootstrap-theme.css.map │ │ │ │ ├── bootstrap-theme.min.css │ │ │ │ ├── bootstrap-theme.min.css.map │ │ │ │ ├── bootstrap.css │ │ │ │ ├── bootstrap.css.map │ │ │ │ ├── bootstrap.min.css │ │ │ │ └── bootstrap.min.css.map │ │ │ ├── fonts │ │ │ │ ├── glyphicons-halflings-regular.eot │ │ │ │ ├── glyphicons-halflings-regular.svg │ │ │ │ ├── glyphicons-halflings-regular.ttf │ │ │ │ ├── glyphicons-halflings-regular.woff │ │ │ │ └── glyphicons-halflings-regular.woff2 │ │ │ └── js │ │ │ │ ├── bootstrap.js │ │ │ │ ├── bootstrap.min.js │ │ │ │ └── npm.js │ │ ├── fonts │ │ │ ├── glyphicons-halflings-regular.eot │ │ │ ├── glyphicons-halflings-regular.svg │ │ │ ├── glyphicons-halflings-regular.ttf │ │ │ ├── glyphicons-halflings-regular.woff │ │ │ └── glyphicons-halflings-regular.woff2 │ │ ├── grunt │ │ │ ├── .jshintrc │ │ │ ├── bs-commonjs-generator.js │ │ │ ├── bs-glyphicons-data-generator.js │ │ │ ├── bs-lessdoc-parser.js │ │ │ ├── bs-raw-files-generator.js │ │ │ ├── change-version.js │ │ │ ├── configBridge.json │ │ │ ├── npm-shrinkwrap.json │ │ │ └── sauce_browsers.yml │ │ ├── js │ │ │ ├── .jscsrc │ │ │ ├── .jshintrc │ │ │ ├── affix.js │ │ │ ├── alert.js │ │ │ ├── button.js │ │ │ ├── carousel.js │ │ │ ├── collapse.js │ │ │ ├── dropdown.js │ │ │ ├── modal.js │ │ │ ├── popover.js │ │ │ ├── scrollspy.js │ │ │ ├── tab.js │ │ │ ├── tooltip.js │ │ │ └── transition.js │ │ ├── less │ │ │ ├── .csscomb.json │ │ │ ├── .csslintrc │ │ │ ├── alerts.less │ │ │ ├── badges.less │ │ │ ├── bootstrap.less │ │ │ ├── breadcrumbs.less │ │ │ ├── button-groups.less │ │ │ ├── buttons.less │ │ │ ├── carousel.less │ │ │ ├── close.less │ │ │ ├── code.less │ │ │ ├── component-animations.less │ │ │ ├── dropdowns.less │ │ │ ├── forms.less │ │ │ ├── glyphicons.less │ │ │ ├── grid.less │ │ │ ├── input-groups.less │ │ │ ├── jumbotron.less │ │ │ ├── labels.less │ │ │ ├── list-group.less │ │ │ ├── media.less │ │ │ ├── mixins.less │ │ │ ├── mixins │ │ │ │ ├── alerts.less │ │ │ │ ├── background-variant.less │ │ │ │ ├── border-radius.less │ │ │ │ ├── buttons.less │ │ │ │ ├── center-block.less │ │ │ │ ├── clearfix.less │ │ │ │ ├── forms.less │ │ │ │ ├── gradients.less │ │ │ │ ├── grid-framework.less │ │ │ │ ├── grid.less │ │ │ │ ├── hide-text.less │ │ │ │ ├── image.less │ │ │ │ ├── labels.less │ │ │ │ ├── list-group.less │ │ │ │ ├── nav-divider.less │ │ │ │ ├── nav-vertical-align.less │ │ │ │ ├── opacity.less │ │ │ │ ├── pagination.less │ │ │ │ ├── panels.less │ │ │ │ ├── progress-bar.less │ │ │ │ ├── reset-filter.less │ │ │ │ ├── reset-text.less │ │ │ │ ├── resize.less │ │ │ │ ├── responsive-visibility.less │ │ │ │ ├── size.less │ │ │ │ ├── tab-focus.less │ │ │ │ ├── table-row.less │ │ │ │ ├── text-emphasis.less │ │ │ │ ├── text-overflow.less │ │ │ │ └── vendor-prefixes.less │ │ │ ├── modals.less │ │ │ ├── navbar.less │ │ │ ├── navs.less │ │ │ ├── normalize.less │ │ │ ├── pager.less │ │ │ ├── pagination.less │ │ │ ├── panels.less │ │ │ ├── popovers.less │ │ │ ├── print.less │ │ │ ├── progress-bars.less │ │ │ ├── responsive-embed.less │ │ │ ├── responsive-utilities.less │ │ │ ├── scaffolding.less │ │ │ ├── tables.less │ │ │ ├── theme.less │ │ │ ├── thumbnails.less │ │ │ ├── tooltip.less │ │ │ ├── type.less │ │ │ ├── utilities.less │ │ │ ├── variables.less │ │ │ └── wells.less │ │ ├── nuget │ │ │ ├── MyGet.ps1 │ │ │ ├── bootstrap.less.nuspec │ │ │ └── bootstrap.nuspec │ │ ├── package.js │ │ └── package.json │ │ ├── jquery-validation-unobtrusive │ │ ├── .bower.json │ │ ├── jquery.validate.unobtrusive.js │ │ └── jquery.validate.unobtrusive.min.js │ │ ├── jquery-validation │ │ ├── .bower.json │ │ ├── LICENSE.md │ │ └── dist │ │ │ ├── additional-methods.js │ │ │ ├── additional-methods.min.js │ │ │ ├── jquery.validate.js │ │ │ └── jquery.validate.min.js │ │ └── jquery │ │ ├── .bower.json │ │ ├── LICENSE.txt │ │ └── dist │ │ ├── jquery.js │ │ ├── jquery.min.js │ │ └── jquery.min.map ├── HiBlogs.WebApi │ ├── Admin │ │ └── Controllers │ │ │ ├── AccountController.cs │ │ │ ├── BlogManageController.cs │ │ │ ├── BlogMigrationController.cs │ │ │ └── Dto │ │ │ └── RegisterInfo.cs │ ├── ApiBaseController.cs │ ├── Controllers │ │ ├── RemarkController.cs │ │ └── UserBlogController.cs │ └── HiBlogs.WebApi.csproj ├── HiBlogs.sln ├── Hiblogs.Redis.Tests │ ├── Hiblogs.Redis.Tests.csproj │ └── UnitTest1.cs ├── Hiblogs.Redis │ ├── Hiblogs.Redis.csproj │ ├── RedisHelper.cs │ └── RedisType.cs ├── ToolConsole │ ├── Program.cs │ ├── ToolConsole.csproj │ └── 迁移.bat └── XUnitTestBlogsMigration │ ├── UnitTest1.cs │ └── XUnitTestBlogsMigration.csproj ├── LICENSE ├── README.md └── 开发日志、备忘、计划.md /.gitignore: -------------------------------------------------------------------------------- 1 | /HiBlogs/HiBlogs/obj 2 | /HiBlogs/HiBlogs/bin 3 | /HiBlogs/.vs 4 | /HiBlogs/HiBlogs.Infrastructure/bin 5 | /HiBlogs/HiBlogs.Application/bin 6 | /HiBlogs/HiBlogs.EntityFramework/bin 7 | /HiBlogs/HiBlogs.Core/bin 8 | /HiBlogs/HiBlogs.Web/bin 9 | /HiBlogs/ToolConsole/bin 10 | /HiBlogs/BlogsMigration/bin 11 | /HiBlogs/HiBlogs.WebApi/bin 12 | /HiBlogs/BlogsMigration/obj 13 | /HiBlogs/HiBlogs.Infrastructure/obj 14 | /HiBlogs/HiBlogs.EntityFramework/obj 15 | /HiBlogs/HiBlogs.Application/obj 16 | /HiBlogs/HiBlogs.Core/obj 17 | /HiBlogs/HiBlogs.Web/obj 18 | /HiBlogs/HiBlogs.WebApi/obj 19 | /HiBlogs/ToolConsole/obj 20 | /HiBlogs/HiBlogs.Web/appsettings.json 21 | /HiBlogs/HiBlogs.Web/appsettings.Development.json 22 | /.vs 23 | /HiBlogs/HiBlogs.Web/wwwroot/File 24 | /HiBlogs/XUnitTestBlogsMigration/bin 25 | /HiBlogs/XUnitTestBlogsMigration/obj 26 | /HiBlogs/HiBlogs.Definitions/bin 27 | /HiBlogs/HiBlogs.Definitions/obj 28 | /HiBlogs/Hiblogs.Redis/obj 29 | /HiBlogs/Hiblogs.Redis/bin 30 | /HiBlogs/Hiblogs.Redis.Tests/obj 31 | /HiBlogs/Hiblogs.Redis.Tests/bin 32 | /HiBlogs/HiBlogs.Web/logs 33 | -------------------------------------------------------------------------------- /HiBlogs/BlogsMigration/BlogsMigration.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netstandard2.0 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /HiBlogs/BlogsMigration/MigrationBlogModel.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace BlogsMigration 6 | { 7 | /// 8 | /// 要迁移的博客模型 9 | /// 10 | public class MigrationBlogModel 11 | { 12 | /// 13 | /// 标题 14 | /// 15 | public string Title { get; set; } 16 | 17 | /// 18 | /// 正文 19 | /// 20 | public string Content { get; set; } 21 | 22 | /// 23 | /// 原链接 24 | /// 25 | public string Url { get; set; } 26 | 27 | /// 28 | /// 原博客发表时间 29 | /// 30 | public string OldPublishTiem { get; set; } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /HiBlogs/HiBlogs.Application/Admin/AccountAppService.cs: -------------------------------------------------------------------------------- 1 | using HiBlogs.Infrastructure; 2 | using Microsoft.AspNetCore.Http; 3 | using System; 4 | using System.Collections.Generic; 5 | using System.Text; 6 | using Talk.OAuthClient; 7 | 8 | namespace HiBlogs.Application.Admin 9 | { 10 | public class AccountAppService 11 | { 12 | public IOAuthClient GetOAuthClient(AuthType authType, HttpRequest Request) 13 | { 14 | string clientId = string.Empty; 15 | string clientSecret = string.Empty; 16 | string callbackUrl = string.Empty; 17 | 18 | if (authType == AuthType.QQ) 19 | { 20 | clientId = ConfigurationManager.GetSection("OAuthClient:TencentQQClient:ClientId"); 21 | clientSecret = ConfigurationManager.GetSection("OAuthClient:TencentQQClient:ClientSecret"); 22 | callbackUrl = "http://" + Request.Host.Value + ConfigurationManager.GetSection("OAuthClient:TencentQQClient:CallbackUrl"); 23 | } 24 | else if (authType == AuthType.Sina) 25 | { 26 | clientId = ConfigurationManager.GetSection("OAuthClient:SinaClient:ClientId"); 27 | clientSecret = ConfigurationManager.GetSection("OAuthClient:SinaClient:ClientSecret"); 28 | callbackUrl = "http://" + Request.Host.Value + ConfigurationManager.GetSection("OAuthClient:SinaClient:CallbackUrl"); 29 | } 30 | return OAuthClientFactory.GetOAuthClient(clientId, clientSecret, callbackUrl, authType); 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /HiBlogs/HiBlogs.Application/ApplicationModule.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Reflection; 4 | using System.Text; 5 | 6 | namespace HiBlogs.Application 7 | { 8 | public class ApplicationModule 9 | { 10 | public static Assembly GetAssembly() 11 | { 12 | return Assembly.GetExecutingAssembly(); 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /HiBlogs/HiBlogs.Application/HiBlogs.Application.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netstandard2.0 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /HiBlogs/HiBlogs.Core/AuditedEntitys/CreationAuditedEntity.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace HiBlogs.Core.AuditedEntitys 6 | { 7 | /// 8 | /// 创建时间和创建人 9 | /// 10 | /// 11 | public abstract class CreationAuditedEntity : Entity 12 | { 13 | /// 14 | /// 创建时间 15 | /// 16 | public virtual DateTime CreationTime { get; set; } = DateTime.Now; 17 | 18 | /// 19 | /// 创建人 20 | /// 21 | public virtual int CreatorUserId { get; set; } 22 | 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /HiBlogs/HiBlogs.Core/AuditedEntitys/DeleterAuditedEntity.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace HiBlogs.Core.AuditedEntitys 6 | { 7 | /// 8 | /// 软删除 9 | /// 10 | /// 11 | public abstract class DeleterAuditedEntity : ModifyAuditedEntity 12 | { 13 | /// 14 | /// 是否被删除 15 | /// 16 | public virtual bool IsDeleted { get; set; } 17 | 18 | /// 19 | /// 删除人 20 | /// 21 | public virtual int? DeleterUserId { get; set; } 22 | 23 | /// 24 | /// 删除时间 25 | /// 26 | public virtual DateTime? DeletionTime { get; set; } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /HiBlogs/HiBlogs.Core/AuditedEntitys/Entity.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace HiBlogs.Core.AuditedEntitys 6 | { 7 | /// 8 | /// 主键 9 | /// 10 | /// 11 | public abstract class Entity : IEntity 12 | { 13 | /// 14 | /// 主键ID 15 | /// 16 | public TKey Id { get; set; } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /HiBlogs/HiBlogs.Core/AuditedEntitys/EntityBase.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace HiBlogs.Core.AuditedEntitys 6 | { 7 | /// 8 | /// 包含了 创建、修改、删除 等相关信息 9 | /// 10 | public class EntityBase : DeleterAuditedEntity 11 | { 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /HiBlogs/HiBlogs.Core/AuditedEntitys/IEntity.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace HiBlogs.Core.AuditedEntitys 6 | { 7 | public interface IEntity 8 | { 9 | TKey Id { get; set; } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /HiBlogs/HiBlogs.Core/AuditedEntitys/ModifyAuditedEntity.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace HiBlogs.Core.AuditedEntitys 6 | { 7 | /// 8 | /// 修改时间和修改人 9 | /// 10 | /// 11 | public abstract class ModifyAuditedEntity: CreationAuditedEntity 12 | { 13 | /// 14 | /// 最后修改时间 15 | /// 16 | public virtual DateTime? LastModificationTime { get; set; } 17 | 18 | /// 19 | /// 最后修改人 20 | /// 21 | public virtual long? LastModifierUserId { get; set; } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /HiBlogs/HiBlogs.Core/Authorization/PermissionNamesEnum.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace HiBlogs.Core.Authorization 6 | { 7 | /// 8 | /// 权限 9 | /// 10 | public enum PermissionNamesEnum 11 | { 12 | /// 13 | /// 超级管理 14 | /// 15 | Administrator = 1, 16 | /// 17 | /// 管理 18 | /// 19 | Admin = 2, 20 | /// 21 | /// 有js和css权限 22 | /// 23 | Script = 3, 24 | /// 25 | /// 发布 26 | /// 27 | Publish = 4, 28 | /// 29 | /// 浏览 30 | /// 31 | Browse = 5 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /HiBlogs/HiBlogs.Core/Entities/Blog.cs: -------------------------------------------------------------------------------- 1 | using HiBlogs.Core.AuditedEntitys; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.ComponentModel.DataAnnotations.Schema; 5 | using System.Text; 6 | 7 | namespace HiBlogs.Core.Entities 8 | { 9 | public class Blog : EntityBase 10 | { 11 | /// 12 | /// 标题 13 | /// 14 | public string Title { get; set; } 15 | 16 | /// 17 | /// 正文 18 | /// 19 | public string Content { get; set; } 20 | 21 | /// 22 | /// 阅读量 23 | /// 24 | public int ReadNumber { get; set; } = 0; 25 | 26 | /// 27 | /// 评论数量 28 | /// 29 | public int RemarksNumber { get; set; } = 0; 30 | 31 | /// 32 | /// 是否显示在首页 33 | /// 34 | public bool IsHome { get; set; } = false; 35 | 36 | /// 37 | /// 是否显示在个人主页 38 | /// 39 | public bool IsMyHome { get; set; } = true; 40 | 41 | /// 42 | /// 是否是转发文章 43 | /// 44 | public bool IsForwarding { get; set; } = false; 45 | 46 | /// 47 | /// 原链接 48 | /// 49 | public string Url { get; set; } 50 | 51 | /// 52 | /// 原博客发表时间 53 | /// 54 | public string OldPublishTiem { get; set; } 55 | 56 | 57 | /// 58 | /// 用户id 59 | /// 60 | public int UserId { get; set; } 61 | 62 | /// 63 | /// 博客标签 64 | /// 65 | [ForeignKey("BlogId")] 66 | public virtual ICollection BlogBlogTags { get; set; } 67 | 68 | /// 69 | /// 博客标签 70 | /// 71 | [ForeignKey("BlogId")] 72 | public virtual ICollection BlogBlogTypes { get; set; } 73 | 74 | /// 75 | /// 博客评论 76 | /// 77 | [ForeignKey("BlogId")] 78 | public virtual ICollection Remarks { get; set; } 79 | 80 | /// 81 | /// 用户 82 | /// 83 | [ForeignKey("UserId")] 84 | public virtual User User { get; set; } 85 | } 86 | } 87 | -------------------------------------------------------------------------------- /HiBlogs/HiBlogs.Core/Entities/BlogBlogTag.cs: -------------------------------------------------------------------------------- 1 | using HiBlogs.Core.AuditedEntitys; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.ComponentModel.DataAnnotations.Schema; 5 | using System.Text; 6 | 7 | namespace HiBlogs.Core.Entities 8 | { 9 | /// 10 | /// 博客和标签中间表 11 | /// 12 | public class BlogBlogTag : Entity 13 | { 14 | public int BlogId { get; set; } 15 | public int TagId { get; set; } 16 | 17 | [ForeignKey("BlogId")] 18 | public virtual Blog Blog { get; set; } 19 | [ForeignKey("TagId")] 20 | 21 | public virtual BlogTag BlogTag { get; set; } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /HiBlogs/HiBlogs.Core/Entities/BlogBlogType.cs: -------------------------------------------------------------------------------- 1 | using HiBlogs.Core.AuditedEntitys; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.ComponentModel.DataAnnotations.Schema; 5 | using System.Text; 6 | 7 | namespace HiBlogs.Core.Entities 8 | { 9 | /// 10 | /// 博客和类型中间表 11 | /// 12 | public class BlogBlogType :Entity 13 | { 14 | public int BlogId { get; set; } 15 | public int TypeId { get; set; } 16 | 17 | [ForeignKey("BlogId")] 18 | public virtual Blog Blog { get; set; } 19 | [ForeignKey("TypeId")] 20 | 21 | public virtual BlogType BlogType { get; set; } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /HiBlogs/HiBlogs.Core/Entities/BlogTag.cs: -------------------------------------------------------------------------------- 1 | using HiBlogs.Core.AuditedEntitys; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.ComponentModel.DataAnnotations.Schema; 5 | using System.Text; 6 | 7 | namespace HiBlogs.Core.Entities 8 | { 9 | /// 10 | /// 博客标签 11 | /// 12 | public class BlogTag : CreationAuditedEntity 13 | { 14 | /// 15 | /// 名字 16 | /// 17 | public string Name { get; set; } 18 | /// 19 | /// 备注 20 | /// 21 | public string Remark { get; set; } 22 | 23 | public int UserId { get; set; } 24 | 25 | /// 26 | /// 属于这个用户的标签 27 | /// 28 | [ForeignKey("UserId")] 29 | public virtual User User { get; set; } 30 | 31 | /// 32 | /// 关联的博客 33 | /// 34 | [ForeignKey("TagId")] 35 | public virtual ICollection BlogBlogTags { get; set; } 36 | 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /HiBlogs/HiBlogs.Core/Entities/BlogType.cs: -------------------------------------------------------------------------------- 1 | using HiBlogs.Core.AuditedEntitys; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.ComponentModel.DataAnnotations.Schema; 5 | using System.Text; 6 | 7 | namespace HiBlogs.Core.Entities 8 | { 9 | /// 10 | /// 博客类型 11 | /// 12 | public class BlogType: CreationAuditedEntity 13 | { 14 | /// 15 | /// 名字 16 | /// 17 | public string Name { get; set; } 18 | /// 19 | /// 备注 20 | /// 21 | public string Remark { get; set; } 22 | 23 | /// 24 | /// 属于这个用户的类型 25 | /// 26 | [ForeignKey("CreatorUserId")] 27 | public virtual User User { get; set; } 28 | 29 | /// 30 | /// 关联的博客 31 | /// 32 | [ForeignKey("TypeId")] 33 | public virtual ICollection BlogBlogTypes { get; set; } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /HiBlogs/HiBlogs.Core/Entities/Remark.cs: -------------------------------------------------------------------------------- 1 | using HiBlogs.Core.AuditedEntitys; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.ComponentModel.DataAnnotations.Schema; 5 | using System.Text; 6 | 7 | namespace HiBlogs.Core.Entities 8 | { 9 | /// 10 | /// 评论 11 | /// 12 | public class Remark: EntityBase 13 | { 14 | /// 15 | /// 评论内容 16 | /// 17 | public string Content { get; set; } 18 | 19 | /// 20 | /// 置顶 21 | /// 22 | public bool Top { get; set; } = false; 23 | 24 | /// 25 | /// 记录IP(以后可能更加ip显示地区) 26 | /// 27 | public string IP { get; set; } 28 | 29 | /// 30 | /// 评论的博客 31 | /// 32 | public int BlogId { get; set; } 33 | 34 | [ForeignKey("BlogId")] 35 | /// 36 | /// 博客 37 | /// 38 | public virtual Blog Blog { get; set; } 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /HiBlogs/HiBlogs.Core/Entities/ReplyRemark.cs: -------------------------------------------------------------------------------- 1 | using HiBlogs.Core.AuditedEntitys; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.ComponentModel.DataAnnotations.Schema; 5 | using System.Text; 6 | 7 | namespace HiBlogs.Core.Entities 8 | { 9 | /// 10 | /// 回复评论(也就是码楼的第二层) 11 | /// 12 | public class ReplyRemark: EntityBase 13 | { 14 | /// 15 | /// 回复的评论id 16 | /// 17 | public int RemarkId { get; set; } 18 | 19 | /// 20 | /// 回复给用户 21 | /// 22 | public int? ReplyToUserId { get; set; } 23 | 24 | /// 25 | /// 回复给用户的名字(为了兼容迁移博客) 26 | /// 27 | public string ReplyToUserName { get; set; } 28 | 29 | /// 30 | /// 备用(以后可能显示地址) 31 | /// 32 | public string IP { get; set; } 33 | 34 | 35 | [ForeignKey("RemarkId")] 36 | 37 | public virtual Remark Remark { get; set; } 38 | 39 | /// 40 | /// 回复给的用户 41 | /// 42 | [ForeignKey("ReplyToUserId")] 43 | 44 | public virtual User ReplyToUser { get; set; } 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /HiBlogs/HiBlogs.Core/Entities/Role.cs: -------------------------------------------------------------------------------- 1 | using HiBlogs.Core.AuditedEntitys; 2 | using HiBlogs.Core.Entities; 3 | using Microsoft.AspNetCore.Identity; 4 | using System.Collections.Generic; 5 | using System.ComponentModel.DataAnnotations.Schema; 6 | 7 | namespace HiBlogs.Core.Entities 8 | { 9 | /// 10 | /// 11 | /// 12 | public class Role : IdentityRole 13 | { 14 | /// 15 | /// 权限 16 | /// 17 | [ForeignKey("RoleId")] 18 | public virtual ICollection RolePermissionNames { get; set; } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /HiBlogs/HiBlogs.Core/Entities/RolePermissionName.cs: -------------------------------------------------------------------------------- 1 | using HiBlogs.Core.AuditedEntitys; 2 | using HiBlogs.Core.Authorization; 3 | using System.ComponentModel.DataAnnotations.Schema; 4 | 5 | namespace HiBlogs.Core.Entities 6 | { 7 | /// 8 | /// 角色 权限关联表 9 | /// 10 | public class RolePermissionName: Entity 11 | { 12 | public int RoleId { get; set; } 13 | 14 | [ForeignKey("RoleId")] 15 | public virtual Role Role { get; set; } 16 | 17 | /// 18 | /// 权限 19 | /// 20 | public PermissionNamesEnum PermissionName { get; set; } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /HiBlogs/HiBlogs.Core/Entities/User.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Identity; 2 | using System; 3 | 4 | namespace HiBlogs.Core.Entities 5 | { 6 | public class User : IdentityUser 7 | { 8 | /// 9 | /// 第三方登录唯一标识 10 | /// 11 | public string OpenId { get; set; } 12 | /// 13 | /// 昵称 14 | /// 15 | public string Nickname { get; set; } 16 | /// 17 | /// 创建时间 18 | /// 19 | public DateTime CreationTime { get; set; } = DateTime.Now; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /HiBlogs/HiBlogs.Core/Entities/UserRole.cs: -------------------------------------------------------------------------------- 1 | using HiBlogs.Core.AuditedEntitys; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.ComponentModel.DataAnnotations.Schema; 5 | using System.Text; 6 | 7 | namespace HiBlogs.Core.Entities 8 | { 9 | /// 10 | /// 用户角色关联表 11 | /// 12 | public class UserRole : Entity 13 | { 14 | public int UserId { get; set; } 15 | 16 | [ForeignKey("UserId")] 17 | public virtual User User { get; set; } 18 | 19 | public int RoleId { get; set; } 20 | 21 | [ForeignKey("RoleId")] 22 | public virtual Role Role { get; set; } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /HiBlogs/HiBlogs.Core/HiBlogs.Core.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netstandard2.0 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /HiBlogs/HiBlogs.Core/HiBlogs.Core.csproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | false 5 | 6 | -------------------------------------------------------------------------------- /HiBlogs/HiBlogs.Definitions/Dependency/IScopedDependency.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace HiBlogs.Definitions.Dependency 6 | { 7 | /// 8 | /// 一个请求内唯一(线程内唯一) 9 | /// 10 | public interface IScopedDependency 11 | { 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /HiBlogs/HiBlogs.Definitions/Dependency/ISingletonDependency.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace HiBlogs.Definitions.Dependency 6 | { 7 | /// 8 | /// 单例(全局唯一) 9 | /// 10 | public interface ISingletonDependency 11 | { 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /HiBlogs/HiBlogs.Definitions/Dependency/ITransientDependency.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace HiBlogs.Definitions.Dependency 6 | { 7 | /// 8 | /// 瞬时(每次都重新实例) 9 | /// 10 | public interface ITransientDependency 11 | { 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /HiBlogs/HiBlogs.Definitions/HiBlogs.Definitions.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netstandard2.0 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /HiBlogs/HiBlogs.Definitions/HiClaimTypes/HiClaimTypes.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Security.Claims; 5 | 6 | namespace HiBlogs.Definitions.HiClaimTypes 7 | { 8 | public class HiClaimTypes 9 | { 10 | /// 11 | /// 账号 12 | /// 13 | public static string UserName { get; } = ClaimTypes.Name; 14 | /// 15 | /// id 16 | /// 17 | public static string UserId { get; } = ClaimTypes.NameIdentifier; 18 | /// 19 | /// 角色 20 | /// 21 | public static string Role { get; } = ClaimTypes.Role; 22 | /// 23 | /// 昵称 24 | /// 25 | public static string Nickname { get; }= "http://www.haojima.net/identity/claims/nickName"; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /HiBlogs/HiBlogs.Definitions/IHiSession.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace HiBlogs.Definitions 6 | { 7 | public interface IHiSession 8 | { 9 | int? UserId { get; } 10 | 11 | string UsreName { get; } 12 | 13 | string UserNickname { get; } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /HiBlogs/HiBlogs.Definitions/RoleNames.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace HiBlogs.Definitions 6 | { 7 | public static class RoleNames 8 | { 9 | /// 10 | /// 超级管理员 11 | /// 12 | public const string Administrator = "Administrator"; 13 | /// 14 | /// 管理员 15 | /// 16 | public const string Admin = "Admin"; 17 | /// 18 | /// 普通用户 19 | /// 20 | public const string Average = "Average"; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /HiBlogs/HiBlogs.EntityFramework/EntityFramework/HiBlogsDbContext.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.EntityFrameworkCore; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Text; 5 | using JetBrains.Annotations; 6 | using HiBlogs.Core; 7 | using HiBlogs.Core.Entities; 8 | using Microsoft.AspNetCore.Identity.EntityFrameworkCore; 9 | 10 | namespace HiBlogs.EntityFramework.EntityFramework 11 | { 12 | public class HiBlogsDbContext : IdentityDbContext 13 | { 14 | public HiBlogsDbContext(DbContextOptions options) : base(options) 15 | { 16 | } 17 | 18 | private string connection; 19 | public HiBlogsDbContext(string connection) => this.connection = connection; 20 | 21 | protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) 22 | { 23 | if (!string.IsNullOrWhiteSpace(connection)) 24 | optionsBuilder.UseMySql(connection); 25 | 26 | } 27 | 28 | public DbSet Blogs { get; set; } 29 | public DbSet RolePermissionNames { get; set; } 30 | 31 | public DbSet BlogBlogTags { get; set; } 32 | public DbSet BlogBlogTypes { get; set; } 33 | public DbSet BlogTags { get; set; } 34 | public DbSet BlogTypes { get; set; } 35 | public DbSet Remarks { get; set; } 36 | 37 | public DbSet ReplyRemarks { get; set; } 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /HiBlogs/HiBlogs.EntityFramework/HiBlogs.EntityFramework.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netstandard2.0 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /HiBlogs/HiBlogs.EntityFramework/HiBlogs.EntityFramework.csproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | false 5 | 6 | -------------------------------------------------------------------------------- /HiBlogs/HiBlogs.Infrastructure/Config/AppConfig.cs: -------------------------------------------------------------------------------- 1 | using HiBlogs.Infrastructure; 2 | using Microsoft.Extensions.Configuration; 3 | using System; 4 | using System.Collections.Generic; 5 | using System.Text; 6 | 7 | namespace HiBlogs.Definitions.Config 8 | { 9 | /// 10 | /// 配置文件 11 | /// 12 | public class AppConfig 13 | { 14 | /// 15 | /// mysql 数据库连接 16 | /// 17 | public static string MySqlConnection { get; } = ConfigurationManager.Configuration.GetConnectionString("MySqlConnection"); 18 | 19 | /// 20 | /// redis 连接 21 | /// 22 | public static string RedisConnection { get; } = ConfigurationManager.GetSection("RedisConnection"); 23 | 24 | /// 25 | /// 加密解密键 26 | /// 27 | public static string DESKey { get; } = ConfigurationManager.GetSection("DESKey"); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /HiBlogs/HiBlogs.Infrastructure/Config/EmailValue.cs: -------------------------------------------------------------------------------- 1 | using HiBlogs.Infrastructure; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Text; 5 | 6 | namespace HiBlogs.Definitions 7 | { 8 | public static class EmailConfig 9 | { 10 | public static string From { get; } = ConfigurationManager.GetSection("Mail:From"); 11 | public static string Passwod { get; } = ConfigurationManager.GetSection("Mail:Passwod"); 12 | public static string Host { get; } = ConfigurationManager.GetSection("Mail:Host"); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /HiBlogs/HiBlogs.Infrastructure/Config/SqlConnection.cs: -------------------------------------------------------------------------------- 1 | using HiBlogs.Infrastructure; 2 | using Microsoft.Extensions.Configuration; 3 | using System; 4 | using System.Collections.Generic; 5 | using System.Text; 6 | 7 | namespace HiBlogs.Definitions 8 | { 9 | public class SqlConnection 10 | { 11 | public static string MySqlConnection { get; } = ConfigurationManager.Configuration.GetConnectionString("MySqlConnection"); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /HiBlogs/HiBlogs.Infrastructure/ConfigurationManager.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.Extensions.Configuration; 2 | using Microsoft.Extensions.DependencyInjection; 3 | using Microsoft.Extensions.Options; 4 | using System; 5 | using System.Collections.Generic; 6 | using System.IO; 7 | using System.Text; 8 | 9 | namespace HiBlogs.Infrastructure 10 | { 11 | public class ConfigurationManager 12 | { 13 | public readonly static IConfiguration Configuration; 14 | 15 | static ConfigurationManager() 16 | { 17 | Configuration = new ConfigurationBuilder() 18 | .SetBasePath(Directory.GetCurrentDirectory()) 19 | .AddJsonFile("appsettings.json", optional: true) 20 | .Build(); 21 | } 22 | 23 | public static T GetSection(string key) where T : class, new() 24 | { 25 | var obj = new ServiceCollection() 26 | .AddOptions() 27 | .Configure(Configuration.GetSection(key)) 28 | .BuildServiceProvider() 29 | .GetService>() 30 | .Value; 31 | return obj; 32 | } 33 | 34 | public static string GetSection(string key) 35 | { 36 | return Configuration.GetValue(key); 37 | } 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /HiBlogs/HiBlogs.Infrastructure/Extensions/EncryptDecryptExtension.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Security.Cryptography; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | 8 | 9 | namespace HiBlogs.Infrastructure 10 | { 11 | /// 12 | /// 加密、解密 13 | /// 14 | public static class EncryptDecryptExtension 15 | { 16 | // 3DES 加密解密 17 | 18 | /// 19 | /// 加密 20 | /// 21 | /// 22 | /// 必须16位 23 | /// 24 | public static string DES3Encrypt(this string data, string key) 25 | { 26 | byte[] inputArray = Encoding.UTF8.GetBytes(data); 27 | var tripleDES = TripleDES.Create(); 28 | var byteKey = Encoding.UTF8.GetBytes(key); 29 | byte[] allKey = new byte[24]; 30 | Buffer.BlockCopy(byteKey, 0, allKey, 0, 16); 31 | Buffer.BlockCopy(byteKey, 0, allKey, 16, 8); 32 | tripleDES.Key = allKey; 33 | tripleDES.Mode = CipherMode.ECB; 34 | tripleDES.Padding = PaddingMode.PKCS7; 35 | ICryptoTransform cTransform = tripleDES.CreateEncryptor(); 36 | byte[] resultArray = cTransform.TransformFinalBlock(inputArray, 0, inputArray.Length); 37 | return Convert.ToBase64String(resultArray, 0, resultArray.Length); 38 | } 39 | 40 | /// 41 | /// 解密 42 | /// 43 | /// 44 | /// 45 | /// 46 | public static string DES3Decrypt(this string data, string key) 47 | { 48 | byte[] inputArray = Convert.FromBase64String(data); 49 | var tripleDES = TripleDES.Create(); 50 | var byteKey = Encoding.UTF8.GetBytes(key); 51 | byte[] allKey = new byte[24]; 52 | Buffer.BlockCopy(byteKey, 0, allKey, 0, 16); 53 | Buffer.BlockCopy(byteKey, 0, allKey, 16, 8); 54 | tripleDES.Key = allKey; 55 | tripleDES.Mode = CipherMode.ECB; 56 | tripleDES.Padding = PaddingMode.PKCS7; 57 | ICryptoTransform cTransform = tripleDES.CreateDecryptor(); 58 | byte[] resultArray = cTransform.TransformFinalBlock(inputArray, 0, inputArray.Length); 59 | return Encoding.UTF8.GetString(resultArray); 60 | } 61 | 62 | public static string Md5(this string value) 63 | { 64 | byte[] bytes; 65 | using (var md5 = MD5.Create()) 66 | { 67 | bytes = md5.ComputeHash(Encoding.UTF8.GetBytes(value)); 68 | } 69 | var result = new StringBuilder(); 70 | foreach (byte t in bytes) 71 | { 72 | result.Append(t.ToString("X2")); 73 | } 74 | return result.ToString(); 75 | } 76 | } 77 | } 78 | -------------------------------------------------------------------------------- /HiBlogs/HiBlogs.Infrastructure/Extensions/EnumExtension.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel; 4 | using System.Reflection; 5 | using System.Text; 6 | 7 | namespace HiBlogs.Infrastructure.Extensions 8 | { 9 | public static class EnumExtension 10 | { 11 | /// 12 | /// 获取枚举的中文描述 13 | /// 14 | /// 15 | /// 16 | public static string GetDescription(this Enum obj) 17 | { 18 | string objName = obj.ToString(); 19 | Type t = obj.GetType(); 20 | FieldInfo fi = t.GetField(objName); 21 | DescriptionAttribute[] arrDesc = (DescriptionAttribute[])fi.GetCustomAttributes(typeof(DescriptionAttribute), false); 22 | return arrDesc[0].Description; 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /HiBlogs/HiBlogs.Infrastructure/Extensions/StringExtend.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace HiBlogs.Infrastructure 6 | { 7 | public static class StringExtend 8 | { 9 | /// 10 | /// 替换所有的字符串 11 | /// 12 | /// 13 | /// 14 | /// 15 | /// 16 | public static string ReplaceAll(this string str,string[] oldValues, string newValue) 17 | { 18 | foreach (var oldValue in oldValues) 19 | { 20 | str = str.Replace(oldValue, newValue); 21 | } 22 | return str; 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /HiBlogs/HiBlogs.Infrastructure/HiBlogs.Infrastructure.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netstandard2.0 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /HiBlogs/HiBlogs.Infrastructure/HiBlogs.Infrastructure.csproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | false 5 | 6 | -------------------------------------------------------------------------------- /HiBlogs/HiBlogs.Infrastructure/HiSession.cs: -------------------------------------------------------------------------------- 1 | using HiBlogs.Definitions; 2 | using HiBlogs.Definitions.HiClaimTypes; 3 | using System; 4 | using System.Collections.Generic; 5 | using System.Linq; 6 | using System.Security.Claims; 7 | using System.Text; 8 | 9 | namespace HiBlogs.Infrastructure 10 | { 11 | public class HiSession : IHiSession 12 | { 13 | public int? UserId { get; } 14 | 15 | public string UsreName { get; } 16 | 17 | public string UserNickname { get; } 18 | 19 | public HiSession() 20 | { } 21 | 22 | public HiSession(ClaimsPrincipal User) 23 | { 24 | // UserId 25 | var userIdClaim = User.Claims.FirstOrDefault(c => c.Type == HiClaimTypes.UserId); 26 | if (string.IsNullOrEmpty(userIdClaim?.Value)) 27 | return; 28 | if (int.TryParse(userIdClaim.Value, out int userId)) 29 | UserId = userId; 30 | 31 | // UsreName 32 | var userNameClaim = User.Claims.FirstOrDefault(c => c.Type == HiClaimTypes.UserName); 33 | UsreName = userNameClaim?.Value; 34 | 35 | //Nickname 36 | var nicknameClaim = User.Claims.FirstOrDefault(c => c.Type == HiClaimTypes.Nickname); 37 | UserNickname = nicknameClaim?.Value; 38 | 39 | var userRoleClaim = User.Claims.FirstOrDefault(c => c.Type == HiClaimTypes.Role); 40 | } 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /HiBlogs/HiBlogs.Infrastructure/Models/ReturnResult.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace HiBlogs.Infrastructure.Models 6 | { 7 | /// 8 | /// 返回结果 9 | /// 10 | public class ReturnResult 11 | { 12 | /// 13 | /// 是否成功 14 | /// 15 | public bool IsSuccess { get; set; } = true;//默认是成功 16 | 17 | /// 18 | /// 描述 19 | /// 20 | public string Description { get; set; } 21 | 22 | /// 23 | /// 异常消息 24 | /// 25 | public List Errors { get; set; } 26 | 27 | /// 28 | /// 回调地址 29 | /// 30 | public string ReturnUrl { get; set; } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /HiBlogs/HiBlogs.Web/.bowerrc: -------------------------------------------------------------------------------- 1 | { 2 | "directory": "wwwroot/lib" 3 | } 4 | -------------------------------------------------------------------------------- /HiBlogs/HiBlogs.Web/Areas/Admin/Controllers/AccountController.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using Microsoft.AspNetCore.Mvc; 6 | using HiBlogs.Application.Admin; 7 | using Talk.OAuthClient; 8 | 9 | // For more information on enabling MVC for empty projects, visit https://go.microsoft.com/fwlink/?LinkID=397860 10 | 11 | namespace HiBlogs.Web.Areas.Admin.Controllers 12 | { 13 | /// 14 | /// 帐户管理 15 | /// 16 | public class AccountController : AdminBaseController 17 | { 18 | private readonly AccountAppService accountAppService; 19 | public AccountController() 20 | { 21 | accountAppService = new AccountAppService(); 22 | } 23 | 24 | /// 25 | /// 登录 26 | /// 27 | /// 28 | public IActionResult Login() 29 | { 30 | return View(); 31 | } 32 | 33 | /// 34 | /// 注册 35 | /// 36 | /// 37 | public IActionResult Register() 38 | { 39 | return View(); 40 | } 41 | 42 | public IActionResult GetOAuthQQUrl() 43 | { 44 | var url = accountAppService.GetOAuthClient(AuthType.QQ, Request).GetAuthUrl(); 45 | return Redirect(url); 46 | } 47 | 48 | public IActionResult GetOAuthSinaUrl() 49 | { 50 | var url = accountAppService.GetOAuthClient(AuthType.Sina,Request).GetAuthUrl(); 51 | return Redirect(url); 52 | } 53 | 54 | /// 55 | /// 激活账号 56 | /// 57 | [HttpGet] 58 | public IActionResult Activation(string desstring) 59 | { 60 | return View(); 61 | } 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /HiBlogs/HiBlogs.Web/Areas/Admin/Controllers/AdminBaseController.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Mvc; 2 | 3 | namespace HiBlogs.Web.Areas.Admin.Controllers 4 | { 5 | [Area("Admin")] 6 | public class AdminBaseController: Controller 7 | { 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /HiBlogs/HiBlogs.Web/Areas/Admin/Controllers/AuditController.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using Microsoft.AspNetCore.Mvc; 6 | using System.IO; 7 | using Microsoft.AspNetCore.Authorization; 8 | 9 | // For more information on enabling MVC for empty projects, visit https://go.microsoft.com/fwlink/?LinkID=397860 10 | 11 | namespace HiBlogs.Web.Areas.Admin.Controllers 12 | { 13 | /// 14 | /// 需超级管理员权限 15 | /// 16 | [Authorize(Roles = "Administrator")] 17 | public class AuditController : AdminBaseController 18 | { 19 | private string directoryPath = Directory.GetCurrentDirectory() + "/logs/"; 20 | // GET: // 21 | public IActionResult Logs() 22 | { 23 | var files = new List(); 24 | foreach (var file in new DirectoryInfo(directoryPath).GetFiles()) 25 | { 26 | files.Add(file.Name); 27 | } 28 | return View(files); 29 | } 30 | 31 | public async Task GetLogInfo(string fileName) 32 | { 33 | return await System.IO.File.ReadAllTextAsync(directoryPath + fileName); 34 | } 35 | } 36 | 37 | } 38 | -------------------------------------------------------------------------------- /HiBlogs/HiBlogs.Web/Areas/Admin/Controllers/BlogManageController.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Authorization; 2 | using Microsoft.AspNetCore.Mvc; 3 | 4 | // For more information on enabling MVC for empty projects, visit https://go.microsoft.com/fwlink/?LinkID=397860 5 | 6 | namespace HiBlogs.Web.Areas.Admin.Controllers 7 | { 8 | /// 9 | /// 博客管理 10 | /// 11 | [Authorize(Roles = "Administrator")] 12 | public class BlogManageController : AdminBaseController 13 | { 14 | /// 15 | /// 博客管理 16 | /// 17 | /// 18 | public IActionResult Blogs() 19 | { 20 | return View(); 21 | } 22 | 23 | /// 24 | /// 博客迁移 25 | /// 26 | /// 27 | public IActionResult Migration() 28 | { 29 | return View(); 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /HiBlogs/HiBlogs.Web/Areas/Admin/Controllers/HomeController.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using Microsoft.AspNetCore.Mvc; 6 | 7 | // For more information on enabling MVC for empty projects, visit https://go.microsoft.com/fwlink/?LinkID=397860 8 | 9 | namespace HiBlogs.Web.Areas.Admin.Controllers 10 | { 11 | public class HomeController : AdminBaseController 12 | { 13 | 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /HiBlogs/HiBlogs.Web/Areas/Admin/Models/LoginViewModel.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | 6 | namespace HiBlogs.Web.Areas.Admin.Models 7 | { 8 | public class LoginViewModel 9 | { 10 | public string UserName { get; set; } 11 | public string Password { get; set; } 12 | public bool RememberMe { get; set; } 13 | public string Email { get; internal set; } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /HiBlogs/HiBlogs.Web/Areas/Admin/Views/Account/Activation.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | ViewData["Title"] = "激活"; 3 | } 4 | 5 |
正在验证激活...
7 | 8 | @section scripts{ 9 | 29 | } 30 | -------------------------------------------------------------------------------- /HiBlogs/HiBlogs.Web/Areas/Admin/Views/Account/Activation.cshtml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using Microsoft.AspNetCore.Mvc; 6 | using Microsoft.AspNetCore.Mvc.RazorPages; 7 | 8 | namespace HiBlogs.Web.Areas.Admin.Views.Account 9 | { 10 | public class ActivationModel : PageModel 11 | { 12 | public void OnGet() 13 | { 14 | } 15 | } 16 | } -------------------------------------------------------------------------------- /HiBlogs/HiBlogs.Web/Areas/Admin/Views/Audit/GetLogInfo.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | ViewData["Title"] = "日志详情"; 3 | } 4 | 5 | @model string 6 | @{ 7 |
8 | @Model 9 |
10 | } -------------------------------------------------------------------------------- /HiBlogs/HiBlogs.Web/Areas/Admin/Views/Audit/GetLogInfo.cshtml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using Microsoft.AspNetCore.Mvc; 6 | using Microsoft.AspNetCore.Mvc.RazorPages; 7 | 8 | namespace HiBlogs.Web.Areas.Admin.Views.Audit 9 | { 10 | public class GetLogInfoModel : PageModel 11 | { 12 | public void OnGet() 13 | { 14 | } 15 | } 16 | } -------------------------------------------------------------------------------- /HiBlogs/HiBlogs.Web/Areas/Admin/Views/Audit/Logs.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | ViewData["Title"] = "日志"; 3 | } 4 | @model List 5 | 6 |
    7 | @foreach (var item in Model) 8 | { 9 |
  • @item
  • 10 | } 11 |
12 | -------------------------------------------------------------------------------- /HiBlogs/HiBlogs.Web/Areas/Admin/Views/BlogManage/Blogs.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | ViewData["Title"] = "后台管理"; 3 | } 4 | 5 |
6 | 7 |
8 | 9 | @section scripts{ 10 | 23 | } -------------------------------------------------------------------------------- /HiBlogs/HiBlogs.Web/Areas/Admin/Views/BlogManage/Migration.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | ViewData["Title"] = "博客迁移"; 3 | } 4 | 5 |
6 | 博客用户: 7 | 8 | 9 | @section scripts{ 10 | 29 | } -------------------------------------------------------------------------------- /HiBlogs/HiBlogs.Web/Areas/Admin/_ViewImports.cshtml: -------------------------------------------------------------------------------- 1 | @using HiBlogs.Web 2 | @using HiBlogs.Web.Models 3 | @addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers -------------------------------------------------------------------------------- /HiBlogs/HiBlogs.Web/Areas/Admin/_ViewStart.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | Layout = "/Views/Shared/_AdminLayout.cshtml"; 3 | } -------------------------------------------------------------------------------- /HiBlogs/HiBlogs.Web/Authorization/MvcAuthorizeAttribute.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Authorization; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Threading.Tasks; 6 | 7 | namespace HiBlogs.Web.Authorization 8 | { 9 | public class MvcAuthorizeAttribute : AuthorizeAttribute//Attribute 10 | { 11 | public MvcAuthorizeAttribute() 12 | { 13 | 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /HiBlogs/HiBlogs.Web/Controllers/HomeController.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Diagnostics; 4 | using System.Linq; 5 | using System.Threading.Tasks; 6 | using Microsoft.AspNetCore.Mvc; 7 | using HiBlogs.Web.Models; 8 | using HiBlogs.EntityFramework.EntityFramework; 9 | using HiBlogs.Application; 10 | using HiBlogs.Definitions.Config; 11 | using System.Threading; 12 | using System.Security.Claims; 13 | 14 | namespace HiBlogs.Web.Controllers 15 | { 16 | public class HomeController : MvcBaseController 17 | { 18 | private readonly HiBlogsDbContext db; 19 | public HomeController(HiBlogsDbContext db) 20 | { 21 | this.db = db; 22 | } 23 | 24 | public IActionResult Index() 25 | { 26 | var blogInfos = db.Blogs.OrderByDescending(t => t.OldPublishTiem) 27 | .Select(t => new BlogInfoViewModel 28 | { 29 | Title = t.Title, 30 | Id = t.Id 31 | }).ToList(); 32 | ViewBag.userNickname = string.IsNullOrWhiteSpace(HiSession.UserNickname) ? HiSession.UsreName : HiSession.UserNickname; 33 | return View(blogInfos); 34 | } 35 | 36 | public IActionResult Blog(int Id) 37 | { 38 | var blog = db.Blogs.Where(t => t.Id == Id) 39 | .Select(t => new BlogViewModel 40 | { 41 | Title = t.Title, 42 | Content = t.Content 43 | }).FirstOrDefault(); 44 | return View(blog); 45 | } 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /HiBlogs/HiBlogs.Web/Controllers/MvcBaseController.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using Microsoft.AspNetCore.Mvc; 6 | using HiBlogs.EntityFramework.EntityFramework; 7 | using HiBlogs.Web.Models; 8 | using System.Security.Claims; 9 | using HiBlogs.Definitions; 10 | using HiBlogs.Infrastructure; 11 | 12 | // For more information on enabling MVC for empty projects, visit https://go.microsoft.com/fwlink/?LinkID=397860 13 | 14 | namespace HiBlogs.Web.Controllers 15 | { 16 | public class MvcBaseController : Controller 17 | { 18 | public IHiSession HiSession 19 | { 20 | get 21 | { 22 | if (HttpContext != null) 23 | return new HiSession(HttpContext.User); 24 | else 25 | return new HiSession(); 26 | } 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /HiBlogs/HiBlogs.Web/Controllers/UserBlogController.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using Microsoft.AspNetCore.Mvc; 6 | using HiBlogs.EntityFramework.EntityFramework; 7 | using HiBlogs.Web.Models; 8 | 9 | // For more information on enabling MVC for empty projects, visit https://go.microsoft.com/fwlink/?LinkID=397860 10 | 11 | namespace HiBlogs.Web.Controllers 12 | { 13 | public class UserBlogController : Controller 14 | { 15 | private readonly HiBlogsDbContext db; 16 | public UserBlogController(HiBlogsDbContext db) 17 | { 18 | this.db = db; 19 | } 20 | // GET: // 21 | public IActionResult Blog(string userName, int blogId) 22 | { 23 | var blog = db.Blogs.Where(t => t.User.UserName == userName && t.Id == blogId) 24 | .Select(t => new BlogViewModel 25 | { 26 | Title = t.Title, 27 | Content = t.Content 28 | }).FirstOrDefault(); 29 | return View(blog); 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /HiBlogs/HiBlogs.Web/HiBlogs.Web.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netcoreapp2.0 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /HiBlogs/HiBlogs.Web/HiBlogs.Web.csproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 600 5 | false 6 | FolderProfile 7 | 8 | -------------------------------------------------------------------------------- /HiBlogs/HiBlogs.Web/Models/BlogInfoViewModel.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | 6 | namespace HiBlogs.Web.Models 7 | { 8 | public class BlogInfoViewModel 9 | { 10 | public string Title { get; internal set; } 11 | public int Id { get; internal set; } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /HiBlogs/HiBlogs.Web/Models/BlogViewModel.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | 6 | namespace HiBlogs.Web.Models 7 | { 8 | public class BlogViewModel 9 | { 10 | public string Content { get; set; } 11 | public string Title { get; set; } 12 | public string OldPublishTiem { get; set; } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /HiBlogs/HiBlogs.Web/Models/ErrorViewModel.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace HiBlogs.Web.Models 4 | { 5 | public class ErrorViewModel 6 | { 7 | public string RequestId { get; set; } 8 | 9 | public bool ShowRequestId => !string.IsNullOrEmpty(RequestId); 10 | } 11 | } -------------------------------------------------------------------------------- /HiBlogs/HiBlogs.Web/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.IO; 4 | using System.Linq; 5 | using System.Threading.Tasks; 6 | using Microsoft.AspNetCore; 7 | using Microsoft.AspNetCore.Hosting; 8 | using Microsoft.Extensions.Configuration; 9 | using Microsoft.Extensions.Logging; 10 | 11 | namespace HiBlogs.Web 12 | { 13 | public class Program 14 | { 15 | public static void Main(string[] args) 16 | { 17 | BuildWebHost(args).Run(); 18 | } 19 | 20 | public static IWebHost BuildWebHost(string[] args) 21 | { 22 | var config = new ConfigurationBuilder() 23 | .SetBasePath(Directory.GetCurrentDirectory()) 24 | .AddJsonFile("hosting.json", optional: true) 25 | .Build(); 26 | 27 | return WebHost.CreateDefaultBuilder(args) 28 | .UseConfiguration(config) 29 | .UseStartup() 30 | .Build(); 31 | } 32 | 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /HiBlogs/HiBlogs.Web/Properties/PublishProfiles/FolderProfile.pubxml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | FileSystem 9 | FileSystem 10 | Release 11 | Any CPU 12 | 13 | True 14 | False 15 | 1117779a-fa5b-4803-80d4-7ee341efa384 16 | C:\01Files\project\hiBlogs 17 | False 18 | netcoreapp2.0 19 | 20 | -------------------------------------------------------------------------------- /HiBlogs/HiBlogs.Web/Properties/PublishProfiles/FolderProfile.pubxml.user: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | <_PublishTargetUrl>C:\01Files\project\hiBlogs 10 | 11 | -------------------------------------------------------------------------------- /HiBlogs/HiBlogs.Web/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "iisSettings": { 3 | "windowsAuthentication": false, 4 | "anonymousAuthentication": true, 5 | "iis": { 6 | "applicationUrl": "http://localhost:80", 7 | "sslPort": 0 8 | }, 9 | "iisExpress": { 10 | "applicationUrl": "http://localhost:15720/", 11 | "sslPort": 0 12 | } 13 | }, 14 | "profiles": { 15 | "IIS Express": { 16 | "commandName": "IISExpress", 17 | "launchBrowser": true, 18 | "environmentVariables": { 19 | "ASPNETCORE_ENVIRONMENT": "Development" 20 | } 21 | }, 22 | "HiBlogs.Web": { 23 | "commandName": "Project", 24 | "launchBrowser": true, 25 | "environmentVariables": { 26 | "ASPNETCORE_ENVIRONMENT": "Development" 27 | }, 28 | "applicationUrl": "http://localhost:15721/" 29 | } 30 | } 31 | } -------------------------------------------------------------------------------- /HiBlogs/HiBlogs.Web/Views/Home/Blog.cshtml: -------------------------------------------------------------------------------- 1 | @model BlogViewModel 2 | @{ 3 | ViewData["Title"] = Model.Title; 4 | } 5 | 6 |
7 |

@Model.Title

8 |
@Html.Raw(Model.Content)
9 |
-------------------------------------------------------------------------------- /HiBlogs/HiBlogs.Web/Views/Home/Index.cshtml: -------------------------------------------------------------------------------- 1 | @model List 2 | @{ 3 | ViewData["Title"] = "嗨-博客"; 4 | } 5 | 6 |
7 |
8 |
9 | 10 | 11 | 12 |
13 |
14 | 15 | 45 |
46 |
    47 | @foreach (var blogInfo in Model) 48 | { 49 |
  • @blogInfo.Title
  • 50 | } 51 |
52 |
53 | 58 |
59 | @section scripts{ 60 | 71 | } -------------------------------------------------------------------------------- /HiBlogs/HiBlogs.Web/Views/Shared/Error.cshtml: -------------------------------------------------------------------------------- 1 | @model ErrorViewModel 2 | @{ 3 | ViewData["Title"] = "Error"; 4 | } 5 | 6 |

Error.

7 |

An error occurred while processing your request.

8 | 9 | @if (Model.ShowRequestId) 10 | { 11 |

12 | Request ID: @Model.RequestId 13 |

14 | } 15 | 16 |

Development Mode

17 |

18 | Swapping to Development environment will display more detailed information about the error that occurred. 19 |

20 |

21 | Development environment should not be enabled in deployed applications, 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 ASPNETCORE_ENVIRONMENT environment variable to Development, and restarting the application. 22 |

23 | -------------------------------------------------------------------------------- /HiBlogs/HiBlogs.Web/Views/Shared/_AdminLayout.cshtml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | @ViewData["Title"] 7 | 37 | @RenderSection("styles", required: false) 38 | 39 | 40 | 41 | 42 | @RenderBody() 43 | 44 | @RenderSection("scripts", required: false) 45 | 46 | 47 | -------------------------------------------------------------------------------- /HiBlogs/HiBlogs.Web/Views/Shared/_Layout.cshtml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | @ViewData["Title"] 10 | 44 | @RenderSection("styles", required: false) 45 | 46 | 47 | 48 | 49 |
50 | @RenderBody() 51 |
52 | @RenderSection("Scripts", required: false) 53 | 54 | 55 | -------------------------------------------------------------------------------- /HiBlogs/HiBlogs.Web/Views/Shared/_ValidationScriptsPartial.cshtml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 12 | 18 | 19 | -------------------------------------------------------------------------------- /HiBlogs/HiBlogs.Web/Views/UserBlog/Blog.cshtml: -------------------------------------------------------------------------------- 1 | @model BlogViewModel 2 | @{ 3 | ViewData["Title"] = Model.Title; 4 | } 5 | 6 |
7 |

@Model.Title

8 |
@Html.Raw(Model.Content)
9 |
10 |
11 | 12 | 13 |
-------------------------------------------------------------------------------- /HiBlogs/HiBlogs.Web/Views/UserBlog/Blog.cshtml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using Microsoft.AspNetCore.Mvc; 6 | using Microsoft.AspNetCore.Mvc.RazorPages; 7 | 8 | namespace HiBlogs.Web.Views.UserBlog 9 | { 10 | public class BlogModel : PageModel 11 | { 12 | public void OnGet() 13 | { 14 | } 15 | } 16 | } -------------------------------------------------------------------------------- /HiBlogs/HiBlogs.Web/Views/_ViewImports.cshtml: -------------------------------------------------------------------------------- 1 | @using HiBlogs.Web 2 | @using HiBlogs.Web.Models 3 | @addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers 4 | -------------------------------------------------------------------------------- /HiBlogs/HiBlogs.Web/Views/_ViewStart.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | Layout = "_Layout"; 3 | } 4 | -------------------------------------------------------------------------------- /HiBlogs/HiBlogs.Web/appsettings - 复制.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "IncludeScopes": false, 4 | "LogLevel": { 5 | "Default": "Debug", 6 | "System": "Information", 7 | "Microsoft": "Information" 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /HiBlogs/HiBlogs.Web/appsettings - 复制.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "IncludeScopes": false, 4 | "LogLevel": { 5 | "Default": "Warning" 6 | } 7 | }, 8 | "DESKey": "1234567890321456", 9 | "ConnectionStrings": { "MySqlConnection": "Data Source=IP;Database=数据库;User ID=用户名;Password=密码;pooling=true;CharSet=utf8;port=3306;sslmode=none" }, 10 | "RedisConnection": "127.0.0.1:6379,allowAdmin=true,password=redis密码,defaultdatabase=1", 11 | "Mail": { 12 | "From": "发送者邮箱", 13 | "Host": "邮箱服务器", 14 | "Passwod": "密码" 15 | }, 16 | "OAuthClient": { 17 | "TencentQQClient": { 18 | "ClientId": "ClientId", 19 | "ClientSecret": "ClientSecret", 20 | "CallbackUrl": "CallbackUrl" 21 | }, 22 | "SinaClient": { 23 | "ClientId": "ClientId", 24 | "ClientSecret": "ClientSecret", 25 | "CallbackUrl": "CallbackUrl" 26 | } 27 | } 28 | 29 | } 30 | 31 | -------------------------------------------------------------------------------- /HiBlogs/HiBlogs.Web/bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "asp.net", 3 | "private": true, 4 | "dependencies": { 5 | "bootstrap": "3.3.7", 6 | "jquery": "2.2.0", 7 | "jquery-validation": "1.14.0", 8 | "jquery-validation-unobtrusive": "3.2.6" 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /HiBlogs/HiBlogs.Web/bundleconfig.json: -------------------------------------------------------------------------------- 1 | // Configure bundling and minification for the project. 2 | // More info at https://go.microsoft.com/fwlink/?LinkId=808241 3 | [ 4 | { 5 | "outputFileName": "wwwroot/css/site.min.css", 6 | // An array of relative input file paths. Globbing patterns supported 7 | "inputFiles": [ 8 | "wwwroot/css/site.css" 9 | ] 10 | }, 11 | { 12 | "outputFileName": "wwwroot/js/site.min.js", 13 | "inputFiles": [ 14 | "wwwroot/js/site.js" 15 | ], 16 | // Optionally specify minification options 17 | "minify": { 18 | "enabled": true, 19 | "renameLocals": true 20 | }, 21 | // Optionally generate .map file 22 | "sourceMap": false 23 | } 24 | ] 25 | -------------------------------------------------------------------------------- /HiBlogs/HiBlogs.Web/hosting.json: -------------------------------------------------------------------------------- 1 | { 2 | "server.urls": "http://*:5004" 3 | } -------------------------------------------------------------------------------- /HiBlogs/HiBlogs.Web/web.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /HiBlogs/HiBlogs.Web/wwwroot/Resource/Home/Blog.css: -------------------------------------------------------------------------------- 1 | * { 2 | font-family: "lucida grande", "lucida sans unicode", lucida, helvetica, "Hiragino Sans GB", "Microsoft YaHei", "WenQuanYi Micro Hei", sans-serif; 3 | color: #808080; 4 | } 5 | 6 | .blogTopics { 7 | border: 1px solid #dedede; 8 | padding: 60px; 9 | padding-bottom: 20px; 10 | margin-top: 20px; 11 | margin-bottom: 80px; 12 | margin-left: 15%; 13 | margin-right: 15%; 14 | } 15 | 16 | .content { 17 | margin-top: 30px; 18 | } 19 | 20 | .content h1 { 21 | margin-top: 20px; 22 | margin-bottom: 8px; 23 | } 24 | 25 | .content h2 { 26 | margin-top: 10px; 27 | margin-bottom: 4px; 28 | } 29 | 30 | p, div { 31 | word-wrap: break-word; /*自动换行*/ 32 | word-break: break-all; /*英文单词断行*/ 33 | } 34 | 35 | .content pre { 36 | overflow-x: auto; 37 | } 38 | 39 | /*.content pre code { 40 | }*/ 41 | 42 | .blogTopics .postTitle { 43 | color: #555454; 44 | font-size: 23px; 45 | text-align: center; 46 | } 47 | 48 | pre { 49 | margin-bottom: 5px; 50 | margin-top: 3px; 51 | border-left: 3px solid #fbd7b0; 52 | padding-left: 5px; 53 | background-color: #f6f6f6; 54 | } 55 | /*笔记本*/ 56 | @media(max-width:1366px) { 57 | } 58 | 59 | /*ipad pro*/ 60 | @media(max-width:1024px) { 61 | .blogTopics { 62 | margin-left: 1%; 63 | margin-right: 1%; 64 | padding: 6px; 65 | } 66 | 67 | img { 68 | max-width: 500px; 69 | } 70 | } 71 | /*移动端*/ 72 | @media(max-width:992px) { 73 | img { 74 | max-width: 350px; 75 | } 76 | 77 | pre, pre * { 78 | font-size: 12px; 79 | } 80 | } 81 | -------------------------------------------------------------------------------- /HiBlogs/HiBlogs.Web/wwwroot/Resource/Home/Index.css: -------------------------------------------------------------------------------- 1 | * { 2 | font-family: STFangSong, Helvetica, Arial, Vernada, Tahoma, STXihei, "Microsoft YaHei", "Songti SC", SimSun, Heiti, sans-serif; 3 | } 4 | 5 | .navbar { 6 | padding: 15px; 7 | border-bottom: 1px solid #dedede; 8 | position: fixed; 9 | top: 0px; 10 | left: 0px; 11 | width: 100%; 12 | background-color: #ffffff; 13 | opacity: 0.9; 14 | } 15 | 16 | .navbar a { 17 | color: #808080; 18 | text-decoration: none; 19 | margin-left: 15px; 20 | } 21 | 22 | .navbar span.mesg { 23 | font-size: 14px; 24 | margin-left: 5px; 25 | color: #ff6a00; 26 | } 27 | 28 | .navbar-left { 29 | float: left; 30 | margin-left: 5px; 31 | } 32 | 33 | .navbar-right { 34 | float: right; 35 | margin-right: 5px; 36 | } 37 | 38 | .blogList { 39 | margin-left: 20%; 40 | margin-right: 20%; 41 | margin-top: 100px; 42 | margin-bottom: 30px; 43 | } 44 | 45 | .blogList li { 46 | list-style-type: none; 47 | padding: 10px; 48 | border: 1px solid #dedede; 49 | } 50 | 51 | .blogList li:nth-child(n+2) { 52 | border-top: initial; 53 | } 54 | 55 | .blogList a { 56 | color: #428bca; 57 | text-decoration: none; 58 | } 59 | 60 | .hiLabel { 61 | position: fixed; 62 | bottom: 20px; 63 | left: 60px; 64 | max-width: 200px; 65 | max-height: 400px; 66 | } 67 | 68 | .footer { 69 | text-align: center; 70 | margin-bottom: 20px; 71 | } 72 | 73 | .footer a { 74 | text-decoration: none; 75 | display:inline-block; 76 | padding:10px; 77 | } 78 | /*笔记本*/ 79 | @media(max-width:1366px) { 80 | .hiLabel { 81 | left: 20px; 82 | } 83 | } 84 | /*ipad pro*/ 85 | @media(max-width:1024px) { 86 | .hiLabel { 87 | display: none; 88 | } 89 | 90 | .blogList { 91 | margin-left: 1%; 92 | margin-right: 1%; 93 | } 94 | } 95 | /*移动端*/ 96 | @media(max-width:992px) { 97 | .navbar-right, .navbar-left .mesg { 98 | display: none; 99 | } 100 | 101 | .navbar a.navbar-brand { 102 | margin-left: 0px; 103 | } 104 | 105 | .navbar-right-phone { 106 | display: initial; 107 | float: right; 108 | } 109 | } 110 | -------------------------------------------------------------------------------- /HiBlogs/HiBlogs.Web/wwwroot/css/site.css: -------------------------------------------------------------------------------- 1 | body { 2 | padding-top: 50px; 3 | padding-bottom: 20px; 4 | } 5 | 6 | /* Wrapping element */ 7 | /* Set some basic padding to keep content from hitting the edges */ 8 | .body-content { 9 | padding-left: 15px; 10 | padding-right: 15px; 11 | } 12 | 13 | /* Carousel */ 14 | .carousel-caption p { 15 | font-size: 20px; 16 | line-height: 1.4; 17 | } 18 | 19 | /* Make .svg files in the carousel display properly in older browsers */ 20 | .carousel-inner .item img[src$=".svg"] { 21 | width: 100%; 22 | } 23 | 24 | /* QR code generator */ 25 | #qrCode { 26 | margin: 15px; 27 | } 28 | 29 | /* Hide/rearrange for smaller screens */ 30 | @media screen and (max-width: 767px) { 31 | /* Hide captions */ 32 | .carousel-caption { 33 | display: none; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /HiBlogs/HiBlogs.Web/wwwroot/css/site.min.css: -------------------------------------------------------------------------------- 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}} -------------------------------------------------------------------------------- /HiBlogs/HiBlogs.Web/wwwroot/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhaopeiym/Hi-Blogs/314d910327a77551b695c60e836772ce25490d27/HiBlogs/HiBlogs.Web/wwwroot/favicon.ico -------------------------------------------------------------------------------- /HiBlogs/HiBlogs.Web/wwwroot/hi_login.html: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Hi-Blogs OAuth认证 6 | 7 | 13 | 14 | 15 | 16 | 17 |
18 |

数据传输中,请稍后...

19 |
20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /HiBlogs/HiBlogs.Web/wwwroot/images/github.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhaopeiym/Hi-Blogs/314d910327a77551b695c60e836772ce25490d27/HiBlogs/HiBlogs.Web/wwwroot/images/github.jpg -------------------------------------------------------------------------------- /HiBlogs/HiBlogs.Web/wwwroot/images/hi_128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhaopeiym/Hi-Blogs/314d910327a77551b695c60e836772ce25490d27/HiBlogs/HiBlogs.Web/wwwroot/images/hi_128.png -------------------------------------------------------------------------------- /HiBlogs/HiBlogs.Web/wwwroot/images/hi_48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhaopeiym/Hi-Blogs/314d910327a77551b695c60e836772ce25490d27/HiBlogs/HiBlogs.Web/wwwroot/images/hi_48.png -------------------------------------------------------------------------------- /HiBlogs/HiBlogs.Web/wwwroot/images/hi_72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhaopeiym/Hi-Blogs/314d910327a77551b695c60e836772ce25490d27/HiBlogs/HiBlogs.Web/wwwroot/images/hi_72.png -------------------------------------------------------------------------------- /HiBlogs/HiBlogs.Web/wwwroot/images/qq.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhaopeiym/Hi-Blogs/314d910327a77551b695c60e836772ce25490d27/HiBlogs/HiBlogs.Web/wwwroot/images/qq.png -------------------------------------------------------------------------------- /HiBlogs/HiBlogs.Web/wwwroot/images/xinlang.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhaopeiym/Hi-Blogs/314d910327a77551b695c60e836772ce25490d27/HiBlogs/HiBlogs.Web/wwwroot/images/xinlang.png -------------------------------------------------------------------------------- /HiBlogs/HiBlogs.Web/wwwroot/js/site.js: -------------------------------------------------------------------------------- 1 | // Write your JavaScript code. 2 | -------------------------------------------------------------------------------- /HiBlogs/HiBlogs.Web/wwwroot/js/site.min.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhaopeiym/Hi-Blogs/314d910327a77551b695c60e836772ce25490d27/HiBlogs/HiBlogs.Web/wwwroot/js/site.min.js -------------------------------------------------------------------------------- /HiBlogs/HiBlogs.Web/wwwroot/lib/bootstrap/.bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "bootstrap", 3 | "description": "The most popular front-end framework for developing responsive, mobile first projects on the web.", 4 | "keywords": [ 5 | "css", 6 | "js", 7 | "less", 8 | "mobile-first", 9 | "responsive", 10 | "front-end", 11 | "framework", 12 | "web" 13 | ], 14 | "homepage": "http://getbootstrap.com", 15 | "license": "MIT", 16 | "moduleType": "globals", 17 | "main": [ 18 | "less/bootstrap.less", 19 | "dist/js/bootstrap.js" 20 | ], 21 | "ignore": [ 22 | "/.*", 23 | "_config.yml", 24 | "CNAME", 25 | "composer.json", 26 | "CONTRIBUTING.md", 27 | "docs", 28 | "js/tests", 29 | "test-infra" 30 | ], 31 | "dependencies": { 32 | "jquery": "1.9.1 - 3" 33 | }, 34 | "version": "3.3.7", 35 | "_release": "3.3.7", 36 | "_resolution": { 37 | "type": "version", 38 | "tag": "v3.3.7", 39 | "commit": "0b9c4a4007c44201dce9a6cc1a38407005c26c86" 40 | }, 41 | "_source": "https://github.com/twbs/bootstrap.git", 42 | "_target": "3.3.7", 43 | "_originalSource": "bootstrap" 44 | } -------------------------------------------------------------------------------- /HiBlogs/HiBlogs.Web/wwwroot/lib/bootstrap/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | Bootstrap uses [GitHub's Releases feature](https://github.com/blog/1547-release-your-software) for its changelogs. 2 | 3 | See [the Releases section of our GitHub project](https://github.com/twbs/bootstrap/releases) for changelogs for each release version of Bootstrap. 4 | 5 | Release announcement posts on [the official Bootstrap blog](http://blog.getbootstrap.com) contain summaries of the most noteworthy changes made in each release. 6 | -------------------------------------------------------------------------------- /HiBlogs/HiBlogs.Web/wwwroot/lib/bootstrap/Gemfile: -------------------------------------------------------------------------------- 1 | source 'https://rubygems.org' 2 | 3 | group :development, :test do 4 | gem 'jekyll', '~> 3.1.2' 5 | gem 'jekyll-sitemap', '~> 0.11.0' 6 | end 7 | -------------------------------------------------------------------------------- /HiBlogs/HiBlogs.Web/wwwroot/lib/bootstrap/Gemfile.lock: -------------------------------------------------------------------------------- 1 | GEM 2 | remote: https://rubygems.org/ 3 | specs: 4 | addressable (2.4.0) 5 | colorator (0.1) 6 | ffi (1.9.14-x64-mingw32) 7 | jekyll (3.1.6) 8 | colorator (~> 0.1) 9 | jekyll-sass-converter (~> 1.0) 10 | jekyll-watch (~> 1.1) 11 | kramdown (~> 1.3) 12 | liquid (~> 3.0) 13 | mercenary (~> 0.3.3) 14 | rouge (~> 1.7) 15 | safe_yaml (~> 1.0) 16 | jekyll-sass-converter (1.4.0) 17 | sass (~> 3.4) 18 | jekyll-sitemap (0.11.0) 19 | addressable (~> 2.4.0) 20 | jekyll-watch (1.4.0) 21 | listen (~> 3.0, < 3.1) 22 | kramdown (1.11.1) 23 | liquid (3.0.6) 24 | listen (3.0.8) 25 | rb-fsevent (~> 0.9, >= 0.9.4) 26 | rb-inotify (~> 0.9, >= 0.9.7) 27 | mercenary (0.3.6) 28 | rb-fsevent (0.9.7) 29 | rb-inotify (0.9.7) 30 | ffi (>= 0.5.0) 31 | rouge (1.11.1) 32 | safe_yaml (1.0.4) 33 | sass (3.4.22) 34 | 35 | PLATFORMS 36 | x64-mingw32 37 | 38 | DEPENDENCIES 39 | jekyll (~> 3.1.2) 40 | jekyll-sitemap (~> 0.11.0) 41 | 42 | BUNDLED WITH 43 | 1.12.5 44 | -------------------------------------------------------------------------------- /HiBlogs/HiBlogs.Web/wwwroot/lib/bootstrap/ISSUE_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | Before opening an issue: 2 | 3 | - [Search for duplicate or closed issues](https://github.com/twbs/bootstrap/issues?utf8=%E2%9C%93&q=is%3Aissue) 4 | - [Validate](http://validator.w3.org/nu/) and [lint](https://github.com/twbs/bootlint#in-the-browser) any HTML to avoid common problems 5 | - Prepare a [reduced test case](https://css-tricks.com/reduced-test-cases/) for any bugs 6 | - Read the [contributing guidelines](https://github.com/twbs/bootstrap/blob/master/CONTRIBUTING.md) 7 | 8 | When asking general "how to" questions: 9 | 10 | - Please do not open an issue here 11 | - Instead, ask for help on [StackOverflow, IRC, or Slack](https://github.com/twbs/bootstrap/blob/master/README.md#community) 12 | 13 | When reporting a bug, include: 14 | 15 | - Operating system and version (Windows, Mac OS X, Android, iOS, Win10 Mobile) 16 | - Browser and version (Chrome, Firefox, Safari, IE, MS Edge, Opera 15+, Android Browser) 17 | - Reduced test cases and potential fixes using [JS Bin](https://jsbin.com) 18 | 19 | When suggesting a feature, include: 20 | 21 | - As much detail as possible for what we should add and why it's important to Bootstrap 22 | - Relevant links to prior art, screenshots, or live demos whenever possible 23 | -------------------------------------------------------------------------------- /HiBlogs/HiBlogs.Web/wwwroot/lib/bootstrap/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2011-2016 Twitter, Inc. 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /HiBlogs/HiBlogs.Web/wwwroot/lib/bootstrap/bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "bootstrap", 3 | "description": "The most popular front-end framework for developing responsive, mobile first projects on the web.", 4 | "keywords": [ 5 | "css", 6 | "js", 7 | "less", 8 | "mobile-first", 9 | "responsive", 10 | "front-end", 11 | "framework", 12 | "web" 13 | ], 14 | "homepage": "http://getbootstrap.com", 15 | "license": "MIT", 16 | "moduleType": "globals", 17 | "main": [ 18 | "less/bootstrap.less", 19 | "dist/js/bootstrap.js" 20 | ], 21 | "ignore": [ 22 | "/.*", 23 | "_config.yml", 24 | "CNAME", 25 | "composer.json", 26 | "CONTRIBUTING.md", 27 | "docs", 28 | "js/tests", 29 | "test-infra" 30 | ], 31 | "dependencies": { 32 | "jquery": "1.9.1 - 3" 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /HiBlogs/HiBlogs.Web/wwwroot/lib/bootstrap/dist/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhaopeiym/Hi-Blogs/314d910327a77551b695c60e836772ce25490d27/HiBlogs/HiBlogs.Web/wwwroot/lib/bootstrap/dist/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /HiBlogs/HiBlogs.Web/wwwroot/lib/bootstrap/dist/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhaopeiym/Hi-Blogs/314d910327a77551b695c60e836772ce25490d27/HiBlogs/HiBlogs.Web/wwwroot/lib/bootstrap/dist/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /HiBlogs/HiBlogs.Web/wwwroot/lib/bootstrap/dist/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhaopeiym/Hi-Blogs/314d910327a77551b695c60e836772ce25490d27/HiBlogs/HiBlogs.Web/wwwroot/lib/bootstrap/dist/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /HiBlogs/HiBlogs.Web/wwwroot/lib/bootstrap/dist/fonts/glyphicons-halflings-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhaopeiym/Hi-Blogs/314d910327a77551b695c60e836772ce25490d27/HiBlogs/HiBlogs.Web/wwwroot/lib/bootstrap/dist/fonts/glyphicons-halflings-regular.woff2 -------------------------------------------------------------------------------- /HiBlogs/HiBlogs.Web/wwwroot/lib/bootstrap/dist/js/npm.js: -------------------------------------------------------------------------------- 1 | // This file is autogenerated via the `commonjs` Grunt task. You can require() this file in a CommonJS environment. 2 | require('../../js/transition.js') 3 | require('../../js/alert.js') 4 | require('../../js/button.js') 5 | require('../../js/carousel.js') 6 | require('../../js/collapse.js') 7 | require('../../js/dropdown.js') 8 | require('../../js/modal.js') 9 | require('../../js/tooltip.js') 10 | require('../../js/popover.js') 11 | require('../../js/scrollspy.js') 12 | require('../../js/tab.js') 13 | require('../../js/affix.js') -------------------------------------------------------------------------------- /HiBlogs/HiBlogs.Web/wwwroot/lib/bootstrap/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhaopeiym/Hi-Blogs/314d910327a77551b695c60e836772ce25490d27/HiBlogs/HiBlogs.Web/wwwroot/lib/bootstrap/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /HiBlogs/HiBlogs.Web/wwwroot/lib/bootstrap/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhaopeiym/Hi-Blogs/314d910327a77551b695c60e836772ce25490d27/HiBlogs/HiBlogs.Web/wwwroot/lib/bootstrap/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /HiBlogs/HiBlogs.Web/wwwroot/lib/bootstrap/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhaopeiym/Hi-Blogs/314d910327a77551b695c60e836772ce25490d27/HiBlogs/HiBlogs.Web/wwwroot/lib/bootstrap/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /HiBlogs/HiBlogs.Web/wwwroot/lib/bootstrap/fonts/glyphicons-halflings-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhaopeiym/Hi-Blogs/314d910327a77551b695c60e836772ce25490d27/HiBlogs/HiBlogs.Web/wwwroot/lib/bootstrap/fonts/glyphicons-halflings-regular.woff2 -------------------------------------------------------------------------------- /HiBlogs/HiBlogs.Web/wwwroot/lib/bootstrap/grunt/.jshintrc: -------------------------------------------------------------------------------- 1 | { 2 | "extends" : "../js/.jshintrc", 3 | "asi" : false, 4 | "browser" : false, 5 | "es3" : false, 6 | "node" : true 7 | } 8 | -------------------------------------------------------------------------------- /HiBlogs/HiBlogs.Web/wwwroot/lib/bootstrap/grunt/bs-commonjs-generator.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap Grunt task for the CommonJS module generation 3 | * http://getbootstrap.com 4 | * Copyright 2014-2015 Twitter, Inc. 5 | * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 6 | */ 7 | 8 | 'use strict'; 9 | 10 | var fs = require('fs'); 11 | var path = require('path'); 12 | 13 | var COMMONJS_BANNER = '// This file is autogenerated via the `commonjs` Grunt task. You can require() this file in a CommonJS environment.\n'; 14 | 15 | module.exports = function generateCommonJSModule(grunt, srcFiles, destFilepath) { 16 | var destDir = path.dirname(destFilepath); 17 | 18 | function srcPathToDestRequire(srcFilepath) { 19 | var requirePath = path.relative(destDir, srcFilepath).replace(/\\/g, '/'); 20 | return 'require(\'' + requirePath + '\')'; 21 | } 22 | 23 | var moduleOutputJs = COMMONJS_BANNER + srcFiles.map(srcPathToDestRequire).join('\n'); 24 | try { 25 | fs.writeFileSync(destFilepath, moduleOutputJs); 26 | } catch (err) { 27 | grunt.fail.warn(err); 28 | } 29 | grunt.log.writeln('File ' + destFilepath.cyan + ' created.'); 30 | }; 31 | -------------------------------------------------------------------------------- /HiBlogs/HiBlogs.Web/wwwroot/lib/bootstrap/grunt/bs-glyphicons-data-generator.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap Grunt task for Glyphicons data generation 3 | * http://getbootstrap.com 4 | * Copyright 2014-2015 Twitter, Inc. 5 | * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 6 | */ 7 | 8 | 'use strict'; 9 | 10 | var fs = require('fs'); 11 | 12 | module.exports = function generateGlyphiconsData(grunt) { 13 | // Pass encoding, utf8, so `readFileSync` will return a string instead of a 14 | // buffer 15 | var glyphiconsFile = fs.readFileSync('less/glyphicons.less', 'utf8'); 16 | var glyphiconsLines = glyphiconsFile.split('\n'); 17 | 18 | // Use any line that starts with ".glyphicon-" and capture the class name 19 | var iconClassName = /^\.(glyphicon-[a-zA-Z0-9-]+)/; 20 | var glyphiconsData = '# This file is generated via Grunt task. **Do not edit directly.**\n' + 21 | '# See the \'build-glyphicons-data\' task in Gruntfile.js.\n\n'; 22 | var glyphiconsYml = 'docs/_data/glyphicons.yml'; 23 | for (var i = 0, len = glyphiconsLines.length; i < len; i++) { 24 | var match = glyphiconsLines[i].match(iconClassName); 25 | 26 | if (match !== null) { 27 | glyphiconsData += '- ' + match[1] + '\n'; 28 | } 29 | } 30 | 31 | // Create the `_data` directory if it doesn't already exist 32 | if (!fs.existsSync('docs/_data')) { 33 | fs.mkdirSync('docs/_data'); 34 | } 35 | 36 | try { 37 | fs.writeFileSync(glyphiconsYml, glyphiconsData); 38 | } catch (err) { 39 | grunt.fail.warn(err); 40 | } 41 | grunt.log.writeln('File ' + glyphiconsYml.cyan + ' created.'); 42 | }; 43 | -------------------------------------------------------------------------------- /HiBlogs/HiBlogs.Web/wwwroot/lib/bootstrap/grunt/bs-raw-files-generator.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap Grunt task for generating raw-files.min.js for the Customizer 3 | * http://getbootstrap.com 4 | * Copyright 2014-2015 Twitter, Inc. 5 | * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 6 | */ 7 | 8 | 'use strict'; 9 | 10 | var fs = require('fs'); 11 | var btoa = require('btoa'); 12 | var glob = require('glob'); 13 | 14 | function getFiles(type) { 15 | var files = {}; 16 | var recursive = type === 'less'; 17 | var globExpr = recursive ? '/**/*' : '/*'; 18 | glob.sync(type + globExpr) 19 | .filter(function (path) { 20 | return type === 'fonts' ? true : new RegExp('\\.' + type + '$').test(path); 21 | }) 22 | .forEach(function (fullPath) { 23 | var relativePath = fullPath.replace(/^[^/]+\//, ''); 24 | files[relativePath] = type === 'fonts' ? btoa(fs.readFileSync(fullPath)) : fs.readFileSync(fullPath, 'utf8'); 25 | }); 26 | return 'var __' + type + ' = ' + JSON.stringify(files) + '\n'; 27 | } 28 | 29 | module.exports = function generateRawFilesJs(grunt, banner) { 30 | if (!banner) { 31 | banner = ''; 32 | } 33 | var dirs = ['js', 'less', 'fonts']; 34 | var files = banner + dirs.map(getFiles).reduce(function (combined, file) { 35 | return combined + file; 36 | }, ''); 37 | var rawFilesJs = 'docs/assets/js/raw-files.min.js'; 38 | try { 39 | fs.writeFileSync(rawFilesJs, files); 40 | } catch (err) { 41 | grunt.fail.warn(err); 42 | } 43 | grunt.log.writeln('File ' + rawFilesJs.cyan + ' created.'); 44 | }; 45 | -------------------------------------------------------------------------------- /HiBlogs/HiBlogs.Web/wwwroot/lib/bootstrap/grunt/change-version.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 'use strict'; 3 | 4 | /* globals Set */ 5 | /*! 6 | * Script to update version number references in the project. 7 | * Copyright 2015 Twitter, Inc. 8 | * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 9 | */ 10 | var fs = require('fs'); 11 | var path = require('path'); 12 | var sh = require('shelljs'); 13 | sh.config.fatal = true; 14 | var sed = sh.sed; 15 | 16 | // Blame TC39... https://github.com/benjamingr/RegExp.escape/issues/37 17 | RegExp.quote = function (string) { 18 | return string.replace(/[-\\^$*+?.()|[\]{}]/g, '\\$&'); 19 | }; 20 | RegExp.quoteReplacement = function (string) { 21 | return string.replace(/[$]/g, '$$'); 22 | }; 23 | 24 | var DRY_RUN = false; 25 | 26 | function walkAsync(directory, excludedDirectories, fileCallback, errback) { 27 | if (excludedDirectories.has(path.parse(directory).base)) { 28 | return; 29 | } 30 | fs.readdir(directory, function (err, names) { 31 | if (err) { 32 | errback(err); 33 | return; 34 | } 35 | names.forEach(function (name) { 36 | var filepath = path.join(directory, name); 37 | fs.lstat(filepath, function (err, stats) { 38 | if (err) { 39 | process.nextTick(errback, err); 40 | return; 41 | } 42 | if (stats.isSymbolicLink()) { 43 | return; 44 | } 45 | else if (stats.isDirectory()) { 46 | process.nextTick(walkAsync, filepath, excludedDirectories, fileCallback, errback); 47 | } 48 | else if (stats.isFile()) { 49 | process.nextTick(fileCallback, filepath); 50 | } 51 | }); 52 | }); 53 | }); 54 | } 55 | 56 | function replaceRecursively(directory, excludedDirectories, allowedExtensions, original, replacement) { 57 | original = new RegExp(RegExp.quote(original), 'g'); 58 | replacement = RegExp.quoteReplacement(replacement); 59 | var updateFile = !DRY_RUN ? function (filepath) { 60 | if (allowedExtensions.has(path.parse(filepath).ext)) { 61 | sed('-i', original, replacement, filepath); 62 | } 63 | } : function (filepath) { 64 | if (allowedExtensions.has(path.parse(filepath).ext)) { 65 | console.log('FILE: ' + filepath); 66 | } 67 | else { 68 | console.log('EXCLUDED:' + filepath); 69 | } 70 | }; 71 | walkAsync(directory, excludedDirectories, updateFile, function (err) { 72 | console.error('ERROR while traversing directory!:'); 73 | console.error(err); 74 | process.exit(1); 75 | }); 76 | } 77 | 78 | function main(args) { 79 | if (args.length !== 2) { 80 | console.error('USAGE: change-version old_version new_version'); 81 | console.error('Got arguments:', args); 82 | process.exit(1); 83 | } 84 | var oldVersion = args[0]; 85 | var newVersion = args[1]; 86 | var EXCLUDED_DIRS = new Set([ 87 | '.git', 88 | 'node_modules', 89 | 'vendor' 90 | ]); 91 | var INCLUDED_EXTENSIONS = new Set([ 92 | // This extension whitelist is how we avoid modifying binary files 93 | '', 94 | '.css', 95 | '.html', 96 | '.js', 97 | '.json', 98 | '.less', 99 | '.md', 100 | '.nuspec', 101 | '.ps1', 102 | '.scss', 103 | '.txt', 104 | '.yml' 105 | ]); 106 | replaceRecursively('.', EXCLUDED_DIRS, INCLUDED_EXTENSIONS, oldVersion, newVersion); 107 | } 108 | 109 | main(process.argv.slice(2)); 110 | -------------------------------------------------------------------------------- /HiBlogs/HiBlogs.Web/wwwroot/lib/bootstrap/grunt/configBridge.json: -------------------------------------------------------------------------------- 1 | { 2 | "paths": { 3 | "customizerJs": [ 4 | "../assets/js/vendor/autoprefixer.js", 5 | "../assets/js/vendor/less.min.js", 6 | "../assets/js/vendor/jszip.min.js", 7 | "../assets/js/vendor/uglify.min.js", 8 | "../assets/js/vendor/Blob.js", 9 | "../assets/js/vendor/FileSaver.js", 10 | "../assets/js/raw-files.min.js", 11 | "../assets/js/src/customizer.js" 12 | ], 13 | "docsJs": [ 14 | "../assets/js/vendor/holder.min.js", 15 | "../assets/js/vendor/ZeroClipboard.min.js", 16 | "../assets/js/vendor/anchor.min.js", 17 | "../assets/js/src/application.js" 18 | ] 19 | }, 20 | "config": { 21 | "autoprefixerBrowsers": [ 22 | "Android 2.3", 23 | "Android >= 4", 24 | "Chrome >= 20", 25 | "Firefox >= 24", 26 | "Explorer >= 8", 27 | "iOS >= 6", 28 | "Opera >= 12", 29 | "Safari >= 6" 30 | ], 31 | "jqueryCheck": [ 32 | "if (typeof jQuery === 'undefined') {", 33 | " throw new Error('Bootstrap\\'s JavaScript requires jQuery')", 34 | "}\n" 35 | ], 36 | "jqueryVersionCheck": [ 37 | "+function ($) {", 38 | " 'use strict';", 39 | " var version = $.fn.jquery.split(' ')[0].split('.')", 40 | " if ((version[0] < 2 && version[1] < 9) || (version[0] == 1 && version[1] == 9 && version[2] < 1) || (version[0] > 3)) {", 41 | " throw new Error('Bootstrap\\'s JavaScript requires jQuery version 1.9.1 or higher, but lower than version 4')", 42 | " }", 43 | "}(jQuery);\n\n" 44 | ] 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /HiBlogs/HiBlogs.Web/wwwroot/lib/bootstrap/grunt/sauce_browsers.yml: -------------------------------------------------------------------------------- 1 | [ 2 | # Docs: https://saucelabs.com/docs/platforms/webdriver 3 | 4 | { 5 | browserName: "safari", 6 | platform: "OS X 10.10" 7 | }, 8 | { 9 | browserName: "chrome", 10 | platform: "OS X 10.10" 11 | }, 12 | { 13 | browserName: "firefox", 14 | platform: "OS X 10.10" 15 | }, 16 | 17 | # Mac Opera not currently supported by Sauce Labs 18 | 19 | { 20 | browserName: "internet explorer", 21 | version: "11", 22 | platform: "Windows 8.1" 23 | }, 24 | { 25 | browserName: "internet explorer", 26 | version: "10", 27 | platform: "Windows 8" 28 | }, 29 | { 30 | browserName: "internet explorer", 31 | version: "9", 32 | platform: "Windows 7" 33 | }, 34 | { 35 | browserName: "internet explorer", 36 | version: "8", 37 | platform: "Windows 7" 38 | }, 39 | 40 | # { # Unofficial 41 | # browserName: "internet explorer", 42 | # version: "7", 43 | # platform: "Windows XP" 44 | # }, 45 | 46 | { 47 | browserName: "chrome", 48 | platform: "Windows 8.1" 49 | }, 50 | { 51 | browserName: "firefox", 52 | platform: "Windows 8.1" 53 | }, 54 | 55 | # Win Opera 15+ not currently supported by Sauce Labs 56 | 57 | { 58 | browserName: "iphone", 59 | platform: "OS X 10.10", 60 | version: "9.2" 61 | }, 62 | 63 | # iOS Chrome not currently supported by Sauce Labs 64 | 65 | # Linux (unofficial) 66 | { 67 | browserName: "chrome", 68 | platform: "Linux" 69 | }, 70 | { 71 | browserName: "firefox", 72 | platform: "Linux" 73 | } 74 | 75 | # Android Chrome not currently supported by Sauce Labs 76 | 77 | # { # Android Browser (super-unofficial) 78 | # browserName: "android", 79 | # version: "4.0", 80 | # platform: "Linux" 81 | # } 82 | ] 83 | -------------------------------------------------------------------------------- /HiBlogs/HiBlogs.Web/wwwroot/lib/bootstrap/js/.jscsrc: -------------------------------------------------------------------------------- 1 | { 2 | "disallowEmptyBlocks": true, 3 | "disallowKeywords": ["with"], 4 | "disallowMixedSpacesAndTabs": true, 5 | "disallowMultipleLineStrings": true, 6 | "disallowMultipleVarDecl": true, 7 | "disallowQuotedKeysInObjects": "allButReserved", 8 | "disallowSpaceAfterPrefixUnaryOperators": ["++", "--", "+", "-", "~", "!"], 9 | "disallowSpaceBeforeBinaryOperators": [","], 10 | "disallowSpaceBeforePostfixUnaryOperators": ["++", "--"], 11 | "disallowSpacesInFunctionDeclaration": { "beforeOpeningRoundBrace": true }, 12 | "disallowSpacesInNamedFunctionExpression": { "beforeOpeningRoundBrace": true }, 13 | "disallowSpacesInsideArrayBrackets": true, 14 | "disallowSpacesInsideParentheses": true, 15 | "disallowTrailingComma": true, 16 | "disallowTrailingWhitespace": true, 17 | "requireCamelCaseOrUpperCaseIdentifiers": true, 18 | "requireCapitalizedConstructors": true, 19 | "requireCommaBeforeLineBreak": true, 20 | "requireDollarBeforejQueryAssignment": true, 21 | "requireDotNotation": true, 22 | "requireLineFeedAtFileEnd": true, 23 | "requirePaddingNewLinesAfterUseStrict": true, 24 | "requirePaddingNewLinesBeforeExport": true, 25 | "requireSpaceAfterBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!==", ">", "<", ">=", "<="], 26 | "requireSpaceAfterKeywords": ["if", "else", "for", "while", "do", "switch", "return", "try", "catch"], 27 | "requireSpaceAfterLineComment": true, 28 | "requireSpaceBeforeBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!==", ">", "<", ">=", "<="], 29 | "requireSpaceBetweenArguments": true, 30 | "requireSpacesInAnonymousFunctionExpression": { "beforeOpeningCurlyBrace": true, "beforeOpeningRoundBrace": true }, 31 | "requireSpacesInConditionalExpression": true, 32 | "requireSpacesInForStatement": true, 33 | "requireSpacesInFunctionDeclaration": { "beforeOpeningCurlyBrace": true }, 34 | "requireSpacesInFunctionExpression": { "beforeOpeningCurlyBrace": true }, 35 | "requireSpacesInNamedFunctionExpression": { "beforeOpeningCurlyBrace": true }, 36 | "requireSpacesInsideObjectBrackets": "allButNested", 37 | "validateAlignedFunctionParameters": true, 38 | "validateIndentation": 2, 39 | "validateLineBreaks": "LF", 40 | "validateNewlineAfterArrayElements": true, 41 | "validateQuoteMarks": "'" 42 | } 43 | -------------------------------------------------------------------------------- /HiBlogs/HiBlogs.Web/wwwroot/lib/bootstrap/js/.jshintrc: -------------------------------------------------------------------------------- 1 | { 2 | "asi" : true, 3 | "browser" : true, 4 | "eqeqeq" : false, 5 | "eqnull" : true, 6 | "es3" : true, 7 | "expr" : true, 8 | "jquery" : true, 9 | "latedef" : true, 10 | "laxbreak" : true, 11 | "nonbsp" : true, 12 | "strict" : true, 13 | "undef" : true, 14 | "unused" : true 15 | } 16 | -------------------------------------------------------------------------------- /HiBlogs/HiBlogs.Web/wwwroot/lib/bootstrap/js/alert.js: -------------------------------------------------------------------------------- 1 | /* ======================================================================== 2 | * Bootstrap: alert.js v3.3.7 3 | * http://getbootstrap.com/javascript/#alerts 4 | * ======================================================================== 5 | * Copyright 2011-2016 Twitter, Inc. 6 | * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 7 | * ======================================================================== */ 8 | 9 | 10 | +function ($) { 11 | 'use strict'; 12 | 13 | // ALERT CLASS DEFINITION 14 | // ====================== 15 | 16 | var dismiss = '[data-dismiss="alert"]' 17 | var Alert = function (el) { 18 | $(el).on('click', dismiss, this.close) 19 | } 20 | 21 | Alert.VERSION = '3.3.7' 22 | 23 | Alert.TRANSITION_DURATION = 150 24 | 25 | Alert.prototype.close = function (e) { 26 | var $this = $(this) 27 | var selector = $this.attr('data-target') 28 | 29 | if (!selector) { 30 | selector = $this.attr('href') 31 | selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7 32 | } 33 | 34 | var $parent = $(selector === '#' ? [] : selector) 35 | 36 | if (e) e.preventDefault() 37 | 38 | if (!$parent.length) { 39 | $parent = $this.closest('.alert') 40 | } 41 | 42 | $parent.trigger(e = $.Event('close.bs.alert')) 43 | 44 | if (e.isDefaultPrevented()) return 45 | 46 | $parent.removeClass('in') 47 | 48 | function removeElement() { 49 | // detach from parent, fire event then clean up data 50 | $parent.detach().trigger('closed.bs.alert').remove() 51 | } 52 | 53 | $.support.transition && $parent.hasClass('fade') ? 54 | $parent 55 | .one('bsTransitionEnd', removeElement) 56 | .emulateTransitionEnd(Alert.TRANSITION_DURATION) : 57 | removeElement() 58 | } 59 | 60 | 61 | // ALERT PLUGIN DEFINITION 62 | // ======================= 63 | 64 | function Plugin(option) { 65 | return this.each(function () { 66 | var $this = $(this) 67 | var data = $this.data('bs.alert') 68 | 69 | if (!data) $this.data('bs.alert', (data = new Alert(this))) 70 | if (typeof option == 'string') data[option].call($this) 71 | }) 72 | } 73 | 74 | var old = $.fn.alert 75 | 76 | $.fn.alert = Plugin 77 | $.fn.alert.Constructor = Alert 78 | 79 | 80 | // ALERT NO CONFLICT 81 | // ================= 82 | 83 | $.fn.alert.noConflict = function () { 84 | $.fn.alert = old 85 | return this 86 | } 87 | 88 | 89 | // ALERT DATA-API 90 | // ============== 91 | 92 | $(document).on('click.bs.alert.data-api', dismiss, Alert.prototype.close) 93 | 94 | }(jQuery); 95 | -------------------------------------------------------------------------------- /HiBlogs/HiBlogs.Web/wwwroot/lib/bootstrap/js/popover.js: -------------------------------------------------------------------------------- 1 | /* ======================================================================== 2 | * Bootstrap: popover.js v3.3.7 3 | * http://getbootstrap.com/javascript/#popovers 4 | * ======================================================================== 5 | * Copyright 2011-2016 Twitter, Inc. 6 | * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 7 | * ======================================================================== */ 8 | 9 | 10 | +function ($) { 11 | 'use strict'; 12 | 13 | // POPOVER PUBLIC CLASS DEFINITION 14 | // =============================== 15 | 16 | var Popover = function (element, options) { 17 | this.init('popover', element, options) 18 | } 19 | 20 | if (!$.fn.tooltip) throw new Error('Popover requires tooltip.js') 21 | 22 | Popover.VERSION = '3.3.7' 23 | 24 | Popover.DEFAULTS = $.extend({}, $.fn.tooltip.Constructor.DEFAULTS, { 25 | placement: 'right', 26 | trigger: 'click', 27 | content: '', 28 | template: '' 29 | }) 30 | 31 | 32 | // NOTE: POPOVER EXTENDS tooltip.js 33 | // ================================ 34 | 35 | Popover.prototype = $.extend({}, $.fn.tooltip.Constructor.prototype) 36 | 37 | Popover.prototype.constructor = Popover 38 | 39 | Popover.prototype.getDefaults = function () { 40 | return Popover.DEFAULTS 41 | } 42 | 43 | Popover.prototype.setContent = function () { 44 | var $tip = this.tip() 45 | var title = this.getTitle() 46 | var content = this.getContent() 47 | 48 | $tip.find('.popover-title')[this.options.html ? 'html' : 'text'](title) 49 | $tip.find('.popover-content').children().detach().end()[ // we use append for html objects to maintain js events 50 | this.options.html ? (typeof content == 'string' ? 'html' : 'append') : 'text' 51 | ](content) 52 | 53 | $tip.removeClass('fade top bottom left right in') 54 | 55 | // IE8 doesn't accept hiding via the `:empty` pseudo selector, we have to do 56 | // this manually by checking the contents. 57 | if (!$tip.find('.popover-title').html()) $tip.find('.popover-title').hide() 58 | } 59 | 60 | Popover.prototype.hasContent = function () { 61 | return this.getTitle() || this.getContent() 62 | } 63 | 64 | Popover.prototype.getContent = function () { 65 | var $e = this.$element 66 | var o = this.options 67 | 68 | return $e.attr('data-content') 69 | || (typeof o.content == 'function' ? 70 | o.content.call($e[0]) : 71 | o.content) 72 | } 73 | 74 | Popover.prototype.arrow = function () { 75 | return (this.$arrow = this.$arrow || this.tip().find('.arrow')) 76 | } 77 | 78 | 79 | // POPOVER PLUGIN DEFINITION 80 | // ========================= 81 | 82 | function Plugin(option) { 83 | return this.each(function () { 84 | var $this = $(this) 85 | var data = $this.data('bs.popover') 86 | var options = typeof option == 'object' && option 87 | 88 | if (!data && /destroy|hide/.test(option)) return 89 | if (!data) $this.data('bs.popover', (data = new Popover(this, options))) 90 | if (typeof option == 'string') data[option]() 91 | }) 92 | } 93 | 94 | var old = $.fn.popover 95 | 96 | $.fn.popover = Plugin 97 | $.fn.popover.Constructor = Popover 98 | 99 | 100 | // POPOVER NO CONFLICT 101 | // =================== 102 | 103 | $.fn.popover.noConflict = function () { 104 | $.fn.popover = old 105 | return this 106 | } 107 | 108 | }(jQuery); 109 | -------------------------------------------------------------------------------- /HiBlogs/HiBlogs.Web/wwwroot/lib/bootstrap/js/transition.js: -------------------------------------------------------------------------------- 1 | /* ======================================================================== 2 | * Bootstrap: transition.js v3.3.7 3 | * http://getbootstrap.com/javascript/#transitions 4 | * ======================================================================== 5 | * Copyright 2011-2016 Twitter, Inc. 6 | * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 7 | * ======================================================================== */ 8 | 9 | 10 | +function ($) { 11 | 'use strict'; 12 | 13 | // CSS TRANSITION SUPPORT (Shoutout: http://www.modernizr.com/) 14 | // ============================================================ 15 | 16 | function transitionEnd() { 17 | var el = document.createElement('bootstrap') 18 | 19 | var transEndEventNames = { 20 | WebkitTransition : 'webkitTransitionEnd', 21 | MozTransition : 'transitionend', 22 | OTransition : 'oTransitionEnd otransitionend', 23 | transition : 'transitionend' 24 | } 25 | 26 | for (var name in transEndEventNames) { 27 | if (el.style[name] !== undefined) { 28 | return { end: transEndEventNames[name] } 29 | } 30 | } 31 | 32 | return false // explicit for ie8 ( ._.) 33 | } 34 | 35 | // http://blog.alexmaccaw.com/css-transitions 36 | $.fn.emulateTransitionEnd = function (duration) { 37 | var called = false 38 | var $el = this 39 | $(this).one('bsTransitionEnd', function () { called = true }) 40 | var callback = function () { if (!called) $($el).trigger($.support.transition.end) } 41 | setTimeout(callback, duration) 42 | return this 43 | } 44 | 45 | $(function () { 46 | $.support.transition = transitionEnd() 47 | 48 | if (!$.support.transition) return 49 | 50 | $.event.special.bsTransitionEnd = { 51 | bindType: $.support.transition.end, 52 | delegateType: $.support.transition.end, 53 | handle: function (e) { 54 | if ($(e.target).is(this)) return e.handleObj.handler.apply(this, arguments) 55 | } 56 | } 57 | }) 58 | 59 | }(jQuery); 60 | -------------------------------------------------------------------------------- /HiBlogs/HiBlogs.Web/wwwroot/lib/bootstrap/less/.csslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "adjoining-classes": false, 3 | "box-sizing": false, 4 | "box-model": false, 5 | "compatible-vendor-prefixes": false, 6 | "floats": false, 7 | "font-sizes": false, 8 | "gradients": false, 9 | "important": false, 10 | "known-properties": false, 11 | "outline-none": false, 12 | "qualified-headings": false, 13 | "regex-selectors": false, 14 | "shorthand": false, 15 | "text-indent": false, 16 | "unique-headings": false, 17 | "universal-selector": false, 18 | "unqualified-attributes": false 19 | } 20 | -------------------------------------------------------------------------------- /HiBlogs/HiBlogs.Web/wwwroot/lib/bootstrap/less/alerts.less: -------------------------------------------------------------------------------- 1 | // 2 | // Alerts 3 | // -------------------------------------------------- 4 | 5 | 6 | // Base styles 7 | // ------------------------- 8 | 9 | .alert { 10 | padding: @alert-padding; 11 | margin-bottom: @line-height-computed; 12 | border: 1px solid transparent; 13 | border-radius: @alert-border-radius; 14 | 15 | // Headings for larger alerts 16 | h4 { 17 | margin-top: 0; 18 | // Specified for the h4 to prevent conflicts of changing @headings-color 19 | color: inherit; 20 | } 21 | 22 | // Provide class for links that match alerts 23 | .alert-link { 24 | font-weight: @alert-link-font-weight; 25 | } 26 | 27 | // Improve alignment and spacing of inner content 28 | > p, 29 | > ul { 30 | margin-bottom: 0; 31 | } 32 | 33 | > p + p { 34 | margin-top: 5px; 35 | } 36 | } 37 | 38 | // Dismissible alerts 39 | // 40 | // Expand the right padding and account for the close button's positioning. 41 | 42 | .alert-dismissable, // The misspelled .alert-dismissable was deprecated in 3.2.0. 43 | .alert-dismissible { 44 | padding-right: (@alert-padding + 20); 45 | 46 | // Adjust close link position 47 | .close { 48 | position: relative; 49 | top: -2px; 50 | right: -21px; 51 | color: inherit; 52 | } 53 | } 54 | 55 | // Alternate styles 56 | // 57 | // Generate contextual modifier classes for colorizing the alert. 58 | 59 | .alert-success { 60 | .alert-variant(@alert-success-bg; @alert-success-border; @alert-success-text); 61 | } 62 | 63 | .alert-info { 64 | .alert-variant(@alert-info-bg; @alert-info-border; @alert-info-text); 65 | } 66 | 67 | .alert-warning { 68 | .alert-variant(@alert-warning-bg; @alert-warning-border; @alert-warning-text); 69 | } 70 | 71 | .alert-danger { 72 | .alert-variant(@alert-danger-bg; @alert-danger-border; @alert-danger-text); 73 | } 74 | -------------------------------------------------------------------------------- /HiBlogs/HiBlogs.Web/wwwroot/lib/bootstrap/less/badges.less: -------------------------------------------------------------------------------- 1 | // 2 | // Badges 3 | // -------------------------------------------------- 4 | 5 | 6 | // Base class 7 | .badge { 8 | display: inline-block; 9 | min-width: 10px; 10 | padding: 3px 7px; 11 | font-size: @font-size-small; 12 | font-weight: @badge-font-weight; 13 | color: @badge-color; 14 | line-height: @badge-line-height; 15 | vertical-align: middle; 16 | white-space: nowrap; 17 | text-align: center; 18 | background-color: @badge-bg; 19 | border-radius: @badge-border-radius; 20 | 21 | // Empty badges collapse automatically (not available in IE8) 22 | &:empty { 23 | display: none; 24 | } 25 | 26 | // Quick fix for badges in buttons 27 | .btn & { 28 | position: relative; 29 | top: -1px; 30 | } 31 | 32 | .btn-xs &, 33 | .btn-group-xs > .btn & { 34 | top: 0; 35 | padding: 1px 5px; 36 | } 37 | 38 | // Hover state, but only for links 39 | a& { 40 | &:hover, 41 | &:focus { 42 | color: @badge-link-hover-color; 43 | text-decoration: none; 44 | cursor: pointer; 45 | } 46 | } 47 | 48 | // Account for badges in navs 49 | .list-group-item.active > &, 50 | .nav-pills > .active > a > & { 51 | color: @badge-active-color; 52 | background-color: @badge-active-bg; 53 | } 54 | 55 | .list-group-item > & { 56 | float: right; 57 | } 58 | 59 | .list-group-item > & + & { 60 | margin-right: 5px; 61 | } 62 | 63 | .nav-pills > li > a > & { 64 | margin-left: 3px; 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /HiBlogs/HiBlogs.Web/wwwroot/lib/bootstrap/less/bootstrap.less: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap v3.3.7 (http://getbootstrap.com) 3 | * Copyright 2011-2016 Twitter, Inc. 4 | * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 5 | */ 6 | 7 | // Core variables and mixins 8 | @import "variables.less"; 9 | @import "mixins.less"; 10 | 11 | // Reset and dependencies 12 | @import "normalize.less"; 13 | @import "print.less"; 14 | @import "glyphicons.less"; 15 | 16 | // Core CSS 17 | @import "scaffolding.less"; 18 | @import "type.less"; 19 | @import "code.less"; 20 | @import "grid.less"; 21 | @import "tables.less"; 22 | @import "forms.less"; 23 | @import "buttons.less"; 24 | 25 | // Components 26 | @import "component-animations.less"; 27 | @import "dropdowns.less"; 28 | @import "button-groups.less"; 29 | @import "input-groups.less"; 30 | @import "navs.less"; 31 | @import "navbar.less"; 32 | @import "breadcrumbs.less"; 33 | @import "pagination.less"; 34 | @import "pager.less"; 35 | @import "labels.less"; 36 | @import "badges.less"; 37 | @import "jumbotron.less"; 38 | @import "thumbnails.less"; 39 | @import "alerts.less"; 40 | @import "progress-bars.less"; 41 | @import "media.less"; 42 | @import "list-group.less"; 43 | @import "panels.less"; 44 | @import "responsive-embed.less"; 45 | @import "wells.less"; 46 | @import "close.less"; 47 | 48 | // Components w/ JavaScript 49 | @import "modals.less"; 50 | @import "tooltip.less"; 51 | @import "popovers.less"; 52 | @import "carousel.less"; 53 | 54 | // Utility classes 55 | @import "utilities.less"; 56 | @import "responsive-utilities.less"; 57 | -------------------------------------------------------------------------------- /HiBlogs/HiBlogs.Web/wwwroot/lib/bootstrap/less/breadcrumbs.less: -------------------------------------------------------------------------------- 1 | // 2 | // Breadcrumbs 3 | // -------------------------------------------------- 4 | 5 | 6 | .breadcrumb { 7 | padding: @breadcrumb-padding-vertical @breadcrumb-padding-horizontal; 8 | margin-bottom: @line-height-computed; 9 | list-style: none; 10 | background-color: @breadcrumb-bg; 11 | border-radius: @border-radius-base; 12 | 13 | > li { 14 | display: inline-block; 15 | 16 | + li:before { 17 | content: "@{breadcrumb-separator}\00a0"; // Unicode space added since inline-block means non-collapsing white-space 18 | padding: 0 5px; 19 | color: @breadcrumb-color; 20 | } 21 | } 22 | 23 | > .active { 24 | color: @breadcrumb-active-color; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /HiBlogs/HiBlogs.Web/wwwroot/lib/bootstrap/less/close.less: -------------------------------------------------------------------------------- 1 | // 2 | // Close icons 3 | // -------------------------------------------------- 4 | 5 | 6 | .close { 7 | float: right; 8 | font-size: (@font-size-base * 1.5); 9 | font-weight: @close-font-weight; 10 | line-height: 1; 11 | color: @close-color; 12 | text-shadow: @close-text-shadow; 13 | .opacity(.2); 14 | 15 | &:hover, 16 | &:focus { 17 | color: @close-color; 18 | text-decoration: none; 19 | cursor: pointer; 20 | .opacity(.5); 21 | } 22 | 23 | // Additional properties for button version 24 | // iOS requires the button element instead of an anchor tag. 25 | // If you want the anchor version, it requires `href="#"`. 26 | // See https://developer.mozilla.org/en-US/docs/Web/Events/click#Safari_Mobile 27 | button& { 28 | padding: 0; 29 | cursor: pointer; 30 | background: transparent; 31 | border: 0; 32 | -webkit-appearance: none; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /HiBlogs/HiBlogs.Web/wwwroot/lib/bootstrap/less/code.less: -------------------------------------------------------------------------------- 1 | // 2 | // Code (inline and block) 3 | // -------------------------------------------------- 4 | 5 | 6 | // Inline and block code styles 7 | code, 8 | kbd, 9 | pre, 10 | samp { 11 | font-family: @font-family-monospace; 12 | } 13 | 14 | // Inline code 15 | code { 16 | padding: 2px 4px; 17 | font-size: 90%; 18 | color: @code-color; 19 | background-color: @code-bg; 20 | border-radius: @border-radius-base; 21 | } 22 | 23 | // User input typically entered via keyboard 24 | kbd { 25 | padding: 2px 4px; 26 | font-size: 90%; 27 | color: @kbd-color; 28 | background-color: @kbd-bg; 29 | border-radius: @border-radius-small; 30 | box-shadow: inset 0 -1px 0 rgba(0,0,0,.25); 31 | 32 | kbd { 33 | padding: 0; 34 | font-size: 100%; 35 | font-weight: bold; 36 | box-shadow: none; 37 | } 38 | } 39 | 40 | // Blocks of code 41 | pre { 42 | display: block; 43 | padding: ((@line-height-computed - 1) / 2); 44 | margin: 0 0 (@line-height-computed / 2); 45 | font-size: (@font-size-base - 1); // 14px to 13px 46 | line-height: @line-height-base; 47 | word-break: break-all; 48 | word-wrap: break-word; 49 | color: @pre-color; 50 | background-color: @pre-bg; 51 | border: 1px solid @pre-border-color; 52 | border-radius: @border-radius-base; 53 | 54 | // Account for some code outputs that place code tags in pre tags 55 | code { 56 | padding: 0; 57 | font-size: inherit; 58 | color: inherit; 59 | white-space: pre-wrap; 60 | background-color: transparent; 61 | border-radius: 0; 62 | } 63 | } 64 | 65 | // Enable scrollable blocks of code 66 | .pre-scrollable { 67 | max-height: @pre-scrollable-max-height; 68 | overflow-y: scroll; 69 | } 70 | -------------------------------------------------------------------------------- /HiBlogs/HiBlogs.Web/wwwroot/lib/bootstrap/less/component-animations.less: -------------------------------------------------------------------------------- 1 | // 2 | // Component animations 3 | // -------------------------------------------------- 4 | 5 | // Heads up! 6 | // 7 | // We don't use the `.opacity()` mixin here since it causes a bug with text 8 | // fields in IE7-8. Source: https://github.com/twbs/bootstrap/pull/3552. 9 | 10 | .fade { 11 | opacity: 0; 12 | .transition(opacity .15s linear); 13 | &.in { 14 | opacity: 1; 15 | } 16 | } 17 | 18 | .collapse { 19 | display: none; 20 | 21 | &.in { display: block; } 22 | tr&.in { display: table-row; } 23 | tbody&.in { display: table-row-group; } 24 | } 25 | 26 | .collapsing { 27 | position: relative; 28 | height: 0; 29 | overflow: hidden; 30 | .transition-property(~"height, visibility"); 31 | .transition-duration(.35s); 32 | .transition-timing-function(ease); 33 | } 34 | -------------------------------------------------------------------------------- /HiBlogs/HiBlogs.Web/wwwroot/lib/bootstrap/less/grid.less: -------------------------------------------------------------------------------- 1 | // 2 | // Grid system 3 | // -------------------------------------------------- 4 | 5 | 6 | // Container widths 7 | // 8 | // Set the container width, and override it for fixed navbars in media queries. 9 | 10 | .container { 11 | .container-fixed(); 12 | 13 | @media (min-width: @screen-sm-min) { 14 | width: @container-sm; 15 | } 16 | @media (min-width: @screen-md-min) { 17 | width: @container-md; 18 | } 19 | @media (min-width: @screen-lg-min) { 20 | width: @container-lg; 21 | } 22 | } 23 | 24 | 25 | // Fluid container 26 | // 27 | // Utilizes the mixin meant for fixed width containers, but without any defined 28 | // width for fluid, full width layouts. 29 | 30 | .container-fluid { 31 | .container-fixed(); 32 | } 33 | 34 | 35 | // Row 36 | // 37 | // Rows contain and clear the floats of your columns. 38 | 39 | .row { 40 | .make-row(); 41 | } 42 | 43 | 44 | // Columns 45 | // 46 | // Common styles for small and large grid columns 47 | 48 | .make-grid-columns(); 49 | 50 | 51 | // Extra small grid 52 | // 53 | // Columns, offsets, pushes, and pulls for extra small devices like 54 | // smartphones. 55 | 56 | .make-grid(xs); 57 | 58 | 59 | // Small grid 60 | // 61 | // Columns, offsets, pushes, and pulls for the small device range, from phones 62 | // to tablets. 63 | 64 | @media (min-width: @screen-sm-min) { 65 | .make-grid(sm); 66 | } 67 | 68 | 69 | // Medium grid 70 | // 71 | // Columns, offsets, pushes, and pulls for the desktop device range. 72 | 73 | @media (min-width: @screen-md-min) { 74 | .make-grid(md); 75 | } 76 | 77 | 78 | // Large grid 79 | // 80 | // Columns, offsets, pushes, and pulls for the large desktop device range. 81 | 82 | @media (min-width: @screen-lg-min) { 83 | .make-grid(lg); 84 | } 85 | -------------------------------------------------------------------------------- /HiBlogs/HiBlogs.Web/wwwroot/lib/bootstrap/less/jumbotron.less: -------------------------------------------------------------------------------- 1 | // 2 | // Jumbotron 3 | // -------------------------------------------------- 4 | 5 | 6 | .jumbotron { 7 | padding-top: @jumbotron-padding; 8 | padding-bottom: @jumbotron-padding; 9 | margin-bottom: @jumbotron-padding; 10 | color: @jumbotron-color; 11 | background-color: @jumbotron-bg; 12 | 13 | h1, 14 | .h1 { 15 | color: @jumbotron-heading-color; 16 | } 17 | 18 | p { 19 | margin-bottom: (@jumbotron-padding / 2); 20 | font-size: @jumbotron-font-size; 21 | font-weight: 200; 22 | } 23 | 24 | > hr { 25 | border-top-color: darken(@jumbotron-bg, 10%); 26 | } 27 | 28 | .container &, 29 | .container-fluid & { 30 | border-radius: @border-radius-large; // Only round corners at higher resolutions if contained in a container 31 | padding-left: (@grid-gutter-width / 2); 32 | padding-right: (@grid-gutter-width / 2); 33 | } 34 | 35 | .container { 36 | max-width: 100%; 37 | } 38 | 39 | @media screen and (min-width: @screen-sm-min) { 40 | padding-top: (@jumbotron-padding * 1.6); 41 | padding-bottom: (@jumbotron-padding * 1.6); 42 | 43 | .container &, 44 | .container-fluid & { 45 | padding-left: (@jumbotron-padding * 2); 46 | padding-right: (@jumbotron-padding * 2); 47 | } 48 | 49 | h1, 50 | .h1 { 51 | font-size: @jumbotron-heading-font-size; 52 | } 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /HiBlogs/HiBlogs.Web/wwwroot/lib/bootstrap/less/labels.less: -------------------------------------------------------------------------------- 1 | // 2 | // Labels 3 | // -------------------------------------------------- 4 | 5 | .label { 6 | display: inline; 7 | padding: .2em .6em .3em; 8 | font-size: 75%; 9 | font-weight: bold; 10 | line-height: 1; 11 | color: @label-color; 12 | text-align: center; 13 | white-space: nowrap; 14 | vertical-align: baseline; 15 | border-radius: .25em; 16 | 17 | // Add hover effects, but only for links 18 | a& { 19 | &:hover, 20 | &:focus { 21 | color: @label-link-hover-color; 22 | text-decoration: none; 23 | cursor: pointer; 24 | } 25 | } 26 | 27 | // Empty labels collapse automatically (not available in IE8) 28 | &:empty { 29 | display: none; 30 | } 31 | 32 | // Quick fix for labels in buttons 33 | .btn & { 34 | position: relative; 35 | top: -1px; 36 | } 37 | } 38 | 39 | // Colors 40 | // Contextual variations (linked labels get darker on :hover) 41 | 42 | .label-default { 43 | .label-variant(@label-default-bg); 44 | } 45 | 46 | .label-primary { 47 | .label-variant(@label-primary-bg); 48 | } 49 | 50 | .label-success { 51 | .label-variant(@label-success-bg); 52 | } 53 | 54 | .label-info { 55 | .label-variant(@label-info-bg); 56 | } 57 | 58 | .label-warning { 59 | .label-variant(@label-warning-bg); 60 | } 61 | 62 | .label-danger { 63 | .label-variant(@label-danger-bg); 64 | } 65 | -------------------------------------------------------------------------------- /HiBlogs/HiBlogs.Web/wwwroot/lib/bootstrap/less/list-group.less: -------------------------------------------------------------------------------- 1 | // 2 | // List groups 3 | // -------------------------------------------------- 4 | 5 | 6 | // Base class 7 | // 8 | // Easily usable on
    ,
      , or
      . 9 | 10 | .list-group { 11 | // No need to set list-style: none; since .list-group-item is block level 12 | margin-bottom: 20px; 13 | padding-left: 0; // reset padding because ul and ol 14 | } 15 | 16 | 17 | // Individual list items 18 | // 19 | // Use on `li`s or `div`s within the `.list-group` parent. 20 | 21 | .list-group-item { 22 | position: relative; 23 | display: block; 24 | padding: 10px 15px; 25 | // Place the border on the list items and negative margin up for better styling 26 | margin-bottom: -1px; 27 | background-color: @list-group-bg; 28 | border: 1px solid @list-group-border; 29 | 30 | // Round the first and last items 31 | &:first-child { 32 | .border-top-radius(@list-group-border-radius); 33 | } 34 | &:last-child { 35 | margin-bottom: 0; 36 | .border-bottom-radius(@list-group-border-radius); 37 | } 38 | } 39 | 40 | 41 | // Interactive list items 42 | // 43 | // Use anchor or button elements instead of `li`s or `div`s to create interactive items. 44 | // Includes an extra `.active` modifier class for showing selected items. 45 | 46 | a.list-group-item, 47 | button.list-group-item { 48 | color: @list-group-link-color; 49 | 50 | .list-group-item-heading { 51 | color: @list-group-link-heading-color; 52 | } 53 | 54 | // Hover state 55 | &:hover, 56 | &:focus { 57 | text-decoration: none; 58 | color: @list-group-link-hover-color; 59 | background-color: @list-group-hover-bg; 60 | } 61 | } 62 | 63 | button.list-group-item { 64 | width: 100%; 65 | text-align: left; 66 | } 67 | 68 | .list-group-item { 69 | // Disabled state 70 | &.disabled, 71 | &.disabled:hover, 72 | &.disabled:focus { 73 | background-color: @list-group-disabled-bg; 74 | color: @list-group-disabled-color; 75 | cursor: @cursor-disabled; 76 | 77 | // Force color to inherit for custom content 78 | .list-group-item-heading { 79 | color: inherit; 80 | } 81 | .list-group-item-text { 82 | color: @list-group-disabled-text-color; 83 | } 84 | } 85 | 86 | // Active class on item itself, not parent 87 | &.active, 88 | &.active:hover, 89 | &.active:focus { 90 | z-index: 2; // Place active items above their siblings for proper border styling 91 | color: @list-group-active-color; 92 | background-color: @list-group-active-bg; 93 | border-color: @list-group-active-border; 94 | 95 | // Force color to inherit for custom content 96 | .list-group-item-heading, 97 | .list-group-item-heading > small, 98 | .list-group-item-heading > .small { 99 | color: inherit; 100 | } 101 | .list-group-item-text { 102 | color: @list-group-active-text-color; 103 | } 104 | } 105 | } 106 | 107 | 108 | // Contextual variants 109 | // 110 | // Add modifier classes to change text and background color on individual items. 111 | // Organizationally, this must come after the `:hover` states. 112 | 113 | .list-group-item-variant(success; @state-success-bg; @state-success-text); 114 | .list-group-item-variant(info; @state-info-bg; @state-info-text); 115 | .list-group-item-variant(warning; @state-warning-bg; @state-warning-text); 116 | .list-group-item-variant(danger; @state-danger-bg; @state-danger-text); 117 | 118 | 119 | // Custom content options 120 | // 121 | // Extra classes for creating well-formatted content within `.list-group-item`s. 122 | 123 | .list-group-item-heading { 124 | margin-top: 0; 125 | margin-bottom: 5px; 126 | } 127 | .list-group-item-text { 128 | margin-bottom: 0; 129 | line-height: 1.3; 130 | } 131 | -------------------------------------------------------------------------------- /HiBlogs/HiBlogs.Web/wwwroot/lib/bootstrap/less/media.less: -------------------------------------------------------------------------------- 1 | .media { 2 | // Proper spacing between instances of .media 3 | margin-top: 15px; 4 | 5 | &:first-child { 6 | margin-top: 0; 7 | } 8 | } 9 | 10 | .media, 11 | .media-body { 12 | zoom: 1; 13 | overflow: hidden; 14 | } 15 | 16 | .media-body { 17 | width: 10000px; 18 | } 19 | 20 | .media-object { 21 | display: block; 22 | 23 | // Fix collapse in webkit from max-width: 100% and display: table-cell. 24 | &.img-thumbnail { 25 | max-width: none; 26 | } 27 | } 28 | 29 | .media-right, 30 | .media > .pull-right { 31 | padding-left: 10px; 32 | } 33 | 34 | .media-left, 35 | .media > .pull-left { 36 | padding-right: 10px; 37 | } 38 | 39 | .media-left, 40 | .media-right, 41 | .media-body { 42 | display: table-cell; 43 | vertical-align: top; 44 | } 45 | 46 | .media-middle { 47 | vertical-align: middle; 48 | } 49 | 50 | .media-bottom { 51 | vertical-align: bottom; 52 | } 53 | 54 | // Reset margins on headings for tighter default spacing 55 | .media-heading { 56 | margin-top: 0; 57 | margin-bottom: 5px; 58 | } 59 | 60 | // Media list variation 61 | // 62 | // Undo default ul/ol styles 63 | .media-list { 64 | padding-left: 0; 65 | list-style: none; 66 | } 67 | -------------------------------------------------------------------------------- /HiBlogs/HiBlogs.Web/wwwroot/lib/bootstrap/less/mixins.less: -------------------------------------------------------------------------------- 1 | // Mixins 2 | // -------------------------------------------------- 3 | 4 | // Utilities 5 | @import "mixins/hide-text.less"; 6 | @import "mixins/opacity.less"; 7 | @import "mixins/image.less"; 8 | @import "mixins/labels.less"; 9 | @import "mixins/reset-filter.less"; 10 | @import "mixins/resize.less"; 11 | @import "mixins/responsive-visibility.less"; 12 | @import "mixins/size.less"; 13 | @import "mixins/tab-focus.less"; 14 | @import "mixins/reset-text.less"; 15 | @import "mixins/text-emphasis.less"; 16 | @import "mixins/text-overflow.less"; 17 | @import "mixins/vendor-prefixes.less"; 18 | 19 | // Components 20 | @import "mixins/alerts.less"; 21 | @import "mixins/buttons.less"; 22 | @import "mixins/panels.less"; 23 | @import "mixins/pagination.less"; 24 | @import "mixins/list-group.less"; 25 | @import "mixins/nav-divider.less"; 26 | @import "mixins/forms.less"; 27 | @import "mixins/progress-bar.less"; 28 | @import "mixins/table-row.less"; 29 | 30 | // Skins 31 | @import "mixins/background-variant.less"; 32 | @import "mixins/border-radius.less"; 33 | @import "mixins/gradients.less"; 34 | 35 | // Layout 36 | @import "mixins/clearfix.less"; 37 | @import "mixins/center-block.less"; 38 | @import "mixins/nav-vertical-align.less"; 39 | @import "mixins/grid-framework.less"; 40 | @import "mixins/grid.less"; 41 | -------------------------------------------------------------------------------- /HiBlogs/HiBlogs.Web/wwwroot/lib/bootstrap/less/mixins/alerts.less: -------------------------------------------------------------------------------- 1 | // Alerts 2 | 3 | .alert-variant(@background; @border; @text-color) { 4 | background-color: @background; 5 | border-color: @border; 6 | color: @text-color; 7 | 8 | hr { 9 | border-top-color: darken(@border, 5%); 10 | } 11 | .alert-link { 12 | color: darken(@text-color, 10%); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /HiBlogs/HiBlogs.Web/wwwroot/lib/bootstrap/less/mixins/background-variant.less: -------------------------------------------------------------------------------- 1 | // Contextual backgrounds 2 | 3 | .bg-variant(@color) { 4 | background-color: @color; 5 | a&:hover, 6 | a&:focus { 7 | background-color: darken(@color, 10%); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /HiBlogs/HiBlogs.Web/wwwroot/lib/bootstrap/less/mixins/border-radius.less: -------------------------------------------------------------------------------- 1 | // Single side border-radius 2 | 3 | .border-top-radius(@radius) { 4 | border-top-right-radius: @radius; 5 | border-top-left-radius: @radius; 6 | } 7 | .border-right-radius(@radius) { 8 | border-bottom-right-radius: @radius; 9 | border-top-right-radius: @radius; 10 | } 11 | .border-bottom-radius(@radius) { 12 | border-bottom-right-radius: @radius; 13 | border-bottom-left-radius: @radius; 14 | } 15 | .border-left-radius(@radius) { 16 | border-bottom-left-radius: @radius; 17 | border-top-left-radius: @radius; 18 | } 19 | -------------------------------------------------------------------------------- /HiBlogs/HiBlogs.Web/wwwroot/lib/bootstrap/less/mixins/buttons.less: -------------------------------------------------------------------------------- 1 | // Button variants 2 | // 3 | // Easily pump out default styles, as well as :hover, :focus, :active, 4 | // and disabled options for all buttons 5 | 6 | .button-variant(@color; @background; @border) { 7 | color: @color; 8 | background-color: @background; 9 | border-color: @border; 10 | 11 | &:focus, 12 | &.focus { 13 | color: @color; 14 | background-color: darken(@background, 10%); 15 | border-color: darken(@border, 25%); 16 | } 17 | &:hover { 18 | color: @color; 19 | background-color: darken(@background, 10%); 20 | border-color: darken(@border, 12%); 21 | } 22 | &:active, 23 | &.active, 24 | .open > .dropdown-toggle& { 25 | color: @color; 26 | background-color: darken(@background, 10%); 27 | border-color: darken(@border, 12%); 28 | 29 | &:hover, 30 | &:focus, 31 | &.focus { 32 | color: @color; 33 | background-color: darken(@background, 17%); 34 | border-color: darken(@border, 25%); 35 | } 36 | } 37 | &:active, 38 | &.active, 39 | .open > .dropdown-toggle& { 40 | background-image: none; 41 | } 42 | &.disabled, 43 | &[disabled], 44 | fieldset[disabled] & { 45 | &:hover, 46 | &:focus, 47 | &.focus { 48 | background-color: @background; 49 | border-color: @border; 50 | } 51 | } 52 | 53 | .badge { 54 | color: @background; 55 | background-color: @color; 56 | } 57 | } 58 | 59 | // Button sizes 60 | .button-size(@padding-vertical; @padding-horizontal; @font-size; @line-height; @border-radius) { 61 | padding: @padding-vertical @padding-horizontal; 62 | font-size: @font-size; 63 | line-height: @line-height; 64 | border-radius: @border-radius; 65 | } 66 | -------------------------------------------------------------------------------- /HiBlogs/HiBlogs.Web/wwwroot/lib/bootstrap/less/mixins/center-block.less: -------------------------------------------------------------------------------- 1 | // Center-align a block level element 2 | 3 | .center-block() { 4 | display: block; 5 | margin-left: auto; 6 | margin-right: auto; 7 | } 8 | -------------------------------------------------------------------------------- /HiBlogs/HiBlogs.Web/wwwroot/lib/bootstrap/less/mixins/clearfix.less: -------------------------------------------------------------------------------- 1 | // Clearfix 2 | // 3 | // For modern browsers 4 | // 1. The space content is one way to avoid an Opera bug when the 5 | // contenteditable attribute is included anywhere else in the document. 6 | // Otherwise it causes space to appear at the top and bottom of elements 7 | // that are clearfixed. 8 | // 2. The use of `table` rather than `block` is only necessary if using 9 | // `:before` to contain the top-margins of child elements. 10 | // 11 | // Source: http://nicolasgallagher.com/micro-clearfix-hack/ 12 | 13 | .clearfix() { 14 | &:before, 15 | &:after { 16 | content: " "; // 1 17 | display: table; // 2 18 | } 19 | &:after { 20 | clear: both; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /HiBlogs/HiBlogs.Web/wwwroot/lib/bootstrap/less/mixins/forms.less: -------------------------------------------------------------------------------- 1 | // Form validation states 2 | // 3 | // Used in forms.less to generate the form validation CSS for warnings, errors, 4 | // and successes. 5 | 6 | .form-control-validation(@text-color: #555; @border-color: #ccc; @background-color: #f5f5f5) { 7 | // Color the label and help text 8 | .help-block, 9 | .control-label, 10 | .radio, 11 | .checkbox, 12 | .radio-inline, 13 | .checkbox-inline, 14 | &.radio label, 15 | &.checkbox label, 16 | &.radio-inline label, 17 | &.checkbox-inline label { 18 | color: @text-color; 19 | } 20 | // Set the border and box shadow on specific inputs to match 21 | .form-control { 22 | border-color: @border-color; 23 | .box-shadow(inset 0 1px 1px rgba(0,0,0,.075)); // Redeclare so transitions work 24 | &:focus { 25 | border-color: darken(@border-color, 10%); 26 | @shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 6px lighten(@border-color, 20%); 27 | .box-shadow(@shadow); 28 | } 29 | } 30 | // Set validation states also for addons 31 | .input-group-addon { 32 | color: @text-color; 33 | border-color: @border-color; 34 | background-color: @background-color; 35 | } 36 | // Optional feedback icon 37 | .form-control-feedback { 38 | color: @text-color; 39 | } 40 | } 41 | 42 | 43 | // Form control focus state 44 | // 45 | // Generate a customized focus state and for any input with the specified color, 46 | // which defaults to the `@input-border-focus` variable. 47 | // 48 | // We highly encourage you to not customize the default value, but instead use 49 | // this to tweak colors on an as-needed basis. This aesthetic change is based on 50 | // WebKit's default styles, but applicable to a wider range of browsers. Its 51 | // usability and accessibility should be taken into account with any change. 52 | // 53 | // Example usage: change the default blue border and shadow to white for better 54 | // contrast against a dark gray background. 55 | .form-control-focus(@color: @input-border-focus) { 56 | @color-rgba: rgba(red(@color), green(@color), blue(@color), .6); 57 | &:focus { 58 | border-color: @color; 59 | outline: 0; 60 | .box-shadow(~"inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px @{color-rgba}"); 61 | } 62 | } 63 | 64 | // Form control sizing 65 | // 66 | // Relative text size, padding, and border-radii changes for form controls. For 67 | // horizontal sizing, wrap controls in the predefined grid classes. `