记录社区样式的更新和CSS内容,以年份和具体主题名称命名,
欢迎大家在浏览社区的同时反馈样式 Bug,可在此文章/QQ群/Github中留言,
同时,也可以在 Github 中查看 FlarumCN样式 历史版本:
https://github.com/yannisme/FlarumCN-CSS-Style / https://github.com/FFans/FlarumCN-Site-Backup
FlarumCN 2021 样式 | 优化更新于2021/3/22
2021/3/15 V1.1 版本
2021/3/18 V1.2 版本 - 个人设置按钮样式修復 - 感谢 @轻抚三下
2021/3/22 V1.3 版本 - 已适配移动端 🙃
此样式默认支持夜间模式
外观颜色分别设置为 #276bb0 ; #6699cc - 默认蓝色,可自行更改颜色
颜色 -> 选择两种颜色作为论坛主色调。第一种作为突出显示颜色,第二种作为背景等元素的颜色。
将以下样式代码复制提交即可,可根据需求自行修改调整
自定义样式 -> 添加 LESS/CSS 代码以自定义论坛外观样式,此设置将覆盖 Flarum 默认样式
body{font-family:'Microsoft YaHei',"Open Sans","Clear Sans","Helvetica Neue",Helvetica,Arial,sans-serif;line-height:1.6}
.DiscussionListItem-title{font-family:-apple-system,SF UI Display,Arial,Hiragino Sans GB,Microsoft YaHei,WenQuanYi Micro Hei,sans-serif}
::-webkit-scrollbar{width:8px;height:8px}
::-webkit-scrollbar-thumb{background:@config-primary-color}
::-webkit-scrollbar-track{background:@config-secondary-color}
.IndexPage .DiscussionListItem-title,.UserPage .DiscussionListItem-title{margin-right:155px;font-size:18px}
.IndexPage .DiscussionListItem-info>.item-tags,.UserPage .DiscussionListItem-info>.item-tags{position:inherit!important;-webkit-mask-image:none!important;margin-top:-7px;float:right;padding-right:unset!important}
.DiscussionListItem{border-bottom:1px solid rgba(0,0,0,.0625)}
.DiscussionListItem-author{display:none}
.DiscussionPage-list .DiscussionListItem-content{padding-left:8px;padding-right:15px}
.DiscussionListItem-content{padding-left:5px;padding-right:5px}
.DiscussionListItem-count{display:none}
.DiscussionHero-items{text-align:left}
.DiscussionListItem-badges{float:right}
.IndexPage .DiscussionListItem-badges{margin-top:5px}
.PostUser-badges{float:right;position:initial}
.Badge{margin:2px!important;width:auto;height:auto;background:0 0;color:#276bb0;display:unset;vertical-align:middle;text-align:center;-webkit-box-shadow:none;box-shadow:none}
span.Badge{background:0 0!important}
.Button.active,.Button.focus,.IndexPage .Button:focus,.IndexPage-results .DiscussionList-discussions .Button:hover,.IndexPage-results .DiscussionList-discussions .open>.Dropdown-toggle.Button,.UserPage .Button:focus,.UserPage .Button:hover,.UserPage .open>.Dropdown-toggle.Button{background:0 0!important}
.Button.active,.Button:active,.open>.Button.Dropdown-toggle{box-shadow:none}
.DiscussionHero .item-title{display:unset!important}
.DiscussionPage .DiscussionHero-items li.item-tags{float:right}
header.Hero.DiscussionHero.DiscussionHero--colored{background:@hero-bg!important}
h2.DiscussionHero-title{color:@muted-color}
.DiscussionHero--colored,.DiscussionHero--colored a{color:@hero-color!important}
.DiscussionPage-list button.Dropdown-toggle.Button.Button--icon.Button--flat.Slidable-underneath.Slidable-underneath--right{display:none}
.item-discussion-views{position:unset!important}
.DiscussionPage-list .DiscussionListItem-info>li,.UserPage .DiscussionListItem-info>li{display:none}
.DiscussionPage-list .DiscussionListItem-badges{float:left;padding-right:3px;margin-left:4px;width:auto}
.affix .DiscussionPage-list{overflow-x:hidden}
.affix .App-header{border-top:3px solid @config-primary-color}
.EventPost-icon{text-align:end;width:77px;margin-top:2px;font-size:14px}
.darkenBackground .UserCard-profile i.icon{color:#fff}
.PostUser-avatar{vertical-align:middle;position:relative;left:-7px;top:-2px;width:2.5em;height:2.5em;font-size:1em;line-height:2.5em}
.Post{padding-left:30px}
.PostUser-avatar{border-width:2px!important}
.PostStream-timeGap{padding:10px}
.unread .DiscussionListItem-title:after{font-weight:500;content:'New';color:#f26c4f;transform:scale(.6)}
.item-discussion-views,.item-discussion-views:before{content:' · 查看'!important;color:@muted-more-color!important;font-size:12px!important}
.UserPage .PostsUserPage-discussion a{font-style:normal;font-size:18px;background:@body-bg;margin-left:-20px}
.UserPage .Post-header{display:none}
.PostsUserPage .PostsUserPage-list .Post{padding:0 0 10px 18px}
.PostsUserPage aside.Post-actions{display:none}
.scroll-up{height:auto!important;background-color:#5eacfb!important}
.scroll-up:focus,.scroll-up:hover{background-color:@config-primary-color!important}
.topicStarter{padding:1px 5px 1px 5px!important;font-weight:600;float:right;position:inherit;margin-left:-35px!important;z-index:99;font-size:12px!important}
.DiscussionListItem-info .fa,.DiscussionListItem-info .fas{display:none}
.IndexPage-results.sideNavOffset .DiscussionList.DiscussionList--searchResults li.item-discussion-views{display:none}
@media (max-width:767px){
.DiscussionListItem-content{padding-left:20px;padding-right:20px}
.IndexPage .DiscussionListItem-info>.item-tags{margin-top:unset}
.IndexPage .DiscussionListItem-title{margin-right:auto}
.item-discussion-views{background:@body-bg!important}
}
.DiscussionList:not(.DiscussionList--searchResults) .unread .DiscussionListItem-title{font-weight:500}
.NotificationsDropdown-unread,.new .NotificationsDropdown-unread{background:@muted-color!important}
.Post--BestAnswer{z-index:999}
.SettingsPage legend{float:unset}
.UserPage .SettingsPage .Button--primary.active,.UserPage .SettingsPage .Button--primary:active,.UserPage .SettingsPage .Button:focus,.UserPage .SettingsPage .Button:hover,.UserPage .SettingsPage .open>.Dropdown-toggle.Button,.UserPage .SettingsPage .open>.Dropdown-toggle.Button--primary{background:@config-primary-color!important}
搭配使用"沙发、椅子、地板"美化样式CSS:
/*沙发*/
div.PostStream-item[data-index="1"] article.CommentPost.Post header.Post-header ul:not(ul.PostUser-badges.badges):not(ul.UserCard-badges.badges,ul.UserCard-info)::after{content:"沙发"}
/*板凳*/
div.PostStream-item[data-index="2"] article.CommentPost.Post header.Post-header ul:not(ul.PostUser-badges.badges):not(ul.UserCard-badges.badges,ul.UserCard-info)::after{content:"椅子"}
/*地板*/
div.PostStream-item[data-index="3"] article.CommentPost.Post header.Post-header ul:not(ul.PostUser-badges.badges):not(ul.UserCard-badges.badges,ul.UserCard-info)::after{content:"地板"}
/*美化样式*/
div.PostStream-item[data-index="1"] article.CommentPost.Post header.Post-header ul:not(ul.PostUser-badges.badges):not(ul.UserCard-badges.badges,ul.UserCard-info)::after,div.PostStream-item[data-index="2"] article.CommentPost.Post header.Post-header ul:not(ul.PostUser-badges.badges):not(ul.UserCard-badges.badges,ul.UserCard-info)::after,div.PostStream-item[data-index="3"] article.CommentPost.Post header.Post-header ul:not(ul.PostUser-badges.badges):not(ul.UserCard-badges.badges,ul.UserCard-info)::after{position:relative;z-index:2;background:@hero-bg;padding:1px 5px 1px 5px;color:@link-color;border-radius:4px;font-size:12px;font-weight:600;float:right}
div.PostStream-item[data-index="1"] article.CommentPost.Post.Post--by-start-user .Post-body,div.PostStream-item[data-index="2"] article.CommentPost.Post.Post--by-start-user .Post-body,div.PostStream-item[data-index="3"] article.CommentPost.Post.Post--by-start-user .Post-body{clear:both}