# MS Key Fans Code **Repository Path**: lcoy/ms-key-fans-code ## Basic Information - **Project Name**: MS Key Fans Code - **Description**: 升腾轻论坛的原始code,欢迎大家rebuild! - **Primary Language**: PHP - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 1 - **Forks**: 0 - **Created**: 2023-01-07 - **Last Updated**: 2024-12-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README [](https://imgse.com/i/pSVihGV) # MS Key Fans Code #### 介绍 升腾轻论坛的原始code,欢迎大家rebuild! ST Forum of the original code, welcome to rebuild! [](https://imgse.com/i/pSVkP6U) ### 社区架构说明 社区使用开源[Flarum](https://github.com/flarum/flarum)框架搭建,您可以通过[安装说明](https://docs.flarum.org/install)根据复原社区. #### 我们需要:nginx,Redis,PHP>=8.0,mariadb>=10.4/mysql>=8.0(utf8mb4),同时PHP应有`fileinfo`,`exif`,`redis`扩展.保证至少有2Gb内存空间. ### 伪静态设置 在nginx中加入 ``` include /www/yoursite/.nginx.conf; location = /sitemap.xml { try_files $uri $uri/ /index.php?$query_string; } ``` _/www/yoursite为你的网站目录,请修改!_ ### 设置运行目录 在nginx加入`root /www/yoursite/public;` _/www/yoursite为你的网站目录,请修改!_ ### 连接Redis 编辑`extend.php` ``` return [ new Blomstra\Redis\Extend\Redis([ 'host' => '127.0.0.1', 'password' => 你的redis密码, 'port' => 6379, 'database' => 1, ]) ]; ``` #### 编辑css 将以下代码填入admin页面自定义中,能重现以前的效果! [](https://imgse.com/i/pSVFlon) ``` /* 跳动标题 */ .Hero-title { animation: my-face 5s infinite ease-in-out; display: inline-block; margin: 0 5px; } @keyframes my-face { 2% { transform: translate(0,1.5px) rotate(1.5deg); } 4% { transform: translate(0,-1.5px) rotate(-0.5deg); } 6% { transform: translate(0,1.5px) rotate(-1.5deg); } 8% { transform: translate(0,-1.5px) rotate(-1.5deg); } 10% { transform: translate(0,2.5px) rotate(1.5deg); } 12% { transform: translate(0,-0.5px) rotate(1.5deg); } 14% { transform: translate(0,-1.5px) rotate(1.5deg); } 16% { transform: translate(0,-0.5px) rotate(-1.5deg); } 18% { transform: translate(0,0.5px) rotate(-1.5deg); } 20% { transform: translate(0,-1.5px) rotate(2.5deg); } 22% { transform: translate(0,0.5px) rotate(-1.5deg); } 24% { transform: translate(0,1.5px) rotate(1.5deg); } 26% { transform: translate(0,0.5px) rotate(0.5deg); } 28% { transform: translate(0,0.5px) rotate(1.5deg); } 30% { transform: translate(0,-0.5px) rotate(2.5deg); } 32% { transform: translate(0,1.5px) rotate(-0.5deg); } 34% { transform: translate(0,1.5px) rotate(-0.5deg); } 36% { transform: translate(0,-1.5px) rotate(2.5deg); } 38% { transform: translate(0,1.5px) rotate(-1.5deg); } 40% { transform: translate(0,-0.5px) rotate(2.5deg); } 42% { transform: translate(0,2.5px) rotate(-1.5deg); } 44% { transform: translate(0,1.5px) rotate(0.5deg); } 46% { transform: translate(0,-1.5px) rotate(2.5deg); } 48% { transform: translate(0,-0.5px) rotate(0.5deg); } 50% { transform: translate(0,0.5px) rotate(0.5deg); } 52% { transform: translate(0,2.5px) rotate(2.5deg); } 54% { transform: translate(0,-1.5px) rotate(1.5deg); } 56% { transform: translate(0,2.5px) rotate(2.5deg); } 58% { transform: translate(0,0.5px) rotate(2.5deg); } 60% { transform: translate(0,2.5px) rotate(2.5deg); } 62% { transform: translate(0,-0.5px) rotate(2.5deg); } 64% { transform: translate(0,-0.5px) rotate(1.5deg); } 66% { transform: translate(0,1.5px) rotate(-0.5deg); } 68% { transform: translate(0,-1.5px) rotate(-0.5deg); } 70% { transform: translate(0,1.5px) rotate(0.5deg); } 72% { transform: translate(0,2.5px) rotate(1.5deg); } 74% { transform: translate(0,-0.5px) rotate(0.5deg); } 76% { transform: translate(0,-0.5px) rotate(2.5deg); } 78% { transform: translate(0,-0.5px) rotate(1.5deg); } 80% { transform: translate(0,1.5px) rotate(1.5deg); } 82% { transform: translate(0,-0.5px) rotate(0.5deg); } 84% { transform: translate(0,1.5px) rotate(2.5deg); } 86% { transform: translate(0,-1.5px) rotate(-1.5deg); } 88% { transform: translate(0,-0.5px) rotate(2.5deg); } 90% { transform: translate(0,2.5px) rotate(-0.5deg); } 92% { transform: translate(0,0.5px) rotate(-0.5deg); } 94% { transform: translate(0,2.5px) rotate(0.5deg); } 96% { transform: translate(0,-0.5px) rotate(1.5deg); } 98% { transform: translate(0,-1.5px) rotate(-0.5deg); } 0%,100% { transform: translate(0,0) rotate(0deg); } } /* 不要在全部标签页上展示竖排、信息流广告,以及在线用户、论坛统计 */ .TagsPage .item-forumStatisticsWidget { display: none !important; } @media screen and (max-width: 600px) { .item-forumStatisticsWidget { display: none; } } body { p{font-family: "Noto Serif SC", Times, serif; } background-image: radial-gradient(circle at 44% 9%, hsla(153,0%,47%,0.05) 0%, hsla(153,0%,47%,0.05) 74%,transparent 74%, transparent 83%,transparent 83%, transparent 100%),radial-gradient(circle at 0% 23%, hsla(153,0%,47%,0.05) 0%, hsla(153,0%,47%,0.05) 8%,transparent 8%, transparent 69%,transparent 69%, transparent 100%),radial-gradient(circle at 87% 35%, hsla(153,0%,47%,0.05) 0%, hsla(153,0%,47%,0.05) 10%,transparent 10%, transparent 61%,transparent 61%, transparent 100%),radial-gradient(circle at 22% 7%, hsla(153,0%,47%,0.05) 0%, hsla(153,0%,47%,0.05) 16%,transparent 16%, transparent 88%,transparent 88%, transparent 100%),radial-gradient(circle at 37% 26%, hsla(153,0%,47%,0.05) 0%, hsla(153,0%,47%,0.05) 7%,transparent 7%, transparent 9%,transparent 9%, transparent 100%),radial-gradient(circle at 86% 59%, hsla(153,0%,47%,0.05) 0%, hsla(153,0%,47%,0.05) 77%,transparent 77%, transparent 95%,transparent 95%, transparent 100%),radial-gradient(circle at 75% 83%, hsla(153,0%,47%,0.05) 0%, hsla(153,0%,47%,0.05) 35%,transparent 35%, transparent 86%,transparent 86%, transparent 100%),linear-gradient(0deg, hsl(279,0%,100%),hsl(279,0%,100%)); // This sets the left border to be the same color as the forum primary. border-left: solid @config-primary-color; } .Hero { background-image: linear-gradient(160deg, #ffce00 20%,#ff8b00 80%); .IndexPage .DiscussionListItem-content, .UserPage .DiscussionListItem-content, .DiscussionPage-discussion .DiscussionListItem-content { /* 首页、用户页、讨论页卡片大小、描边 */ padding-left: 80px; padding-right: 80px; padding-top: 10px; border-radius: 8px; padding-bottom: 10px; border: 1px solid #dbdfe6!important; } .IndexPage .Post.CommentPost, .UserPage .Post.CommentPost, .DiscussionPage-discussion .Post.CommentPost { margin-top: 20px; border-radius: 8px; border: 1px solid #dbdfe6 !important; } .IndexPage .DiscussionListItem-info>.item-tags, .UserPage .DiscussionListItem-info>.item-tags { top: 23px !important; } .DiscussionListItem { position: relative; margin-right: 0; padding-right: 0; padding-left: 0; margin-left: 0; border-radius: 8px; margin-top: 15px; } } @media (min-width: 768px) { .IndexPage .DiscussionListItem:hover { background-color: #fff; -webkit-box-shadow: 0px 8px 24px 3px rgba(84,102,134,0.1) !important; box-shadow: 0px 8px 24px 3px rgba(84,102,134,0.1) !important; } } /* banner */ .WelcomeHero { color: #282828; } .Hero h2 { font-size: 25px; font-weight: 700; } .Hero { box-shadow: 0px 1px 10px 0 rgba(151,158,181,0.28); background-color: #fff; margin-bottom: 15px; } /*.DiscussionHero .TagsLabel .TagLabel { color: #4D698E; }*/ .WelcomeHero .Hero-subtitle { color: #000; } *, *::before, *::after { box-sizing: border-box; } @keyframes rotate { 100% { transform: rotate(1turn); } } .ReplyPlaceholder:hover { border-color: #080808; } .ReplyPlaceholder { position: relative; z-index: 0; width: auto; height: 150px; border-radius: 10px; overflow: hidden; &::before { content: ''; position: absolute; z-index: -2; left: -50%; top: -50%; width: 200%; height: 200%; background-color: #399953; background-repeat: no-repeat; background-size: 50% 50%, 50% 50%; background-position: 0 0, 100% 0, 100% 100%, 0 100%; background-image: linear-gradient(#399953, #399953), linear-gradient(#fbb300, #fbb300), linear-gradient(#d53e33, #d53e33), linear-gradient(#377af5, #377af5); animation: rotate 10s linear infinite; } &::after { content: ''; position: absolute; z-index: -1; left: 4px; top: 2px; width: calc(99%); height: calc(98%); background: white; border-radius: 25px; } } @media (min-width: 768px){.DiscussionListItem-content { padding-left: 80px; padding-right: 80px; padding-top: 10px; border-radius: 8px; padding-bottom: 10px; border:1px solid #dbdfe6!important; -webkit-box-shadow: 0px 8px 24px 3px rgba(84,102,134,0.08) !important; box-shadow: 0px 8px 24px 3px rgba(84,102,134,0.08) !important;} .IndexPage .DiscussionListItem-info>.item-tags, .UserPage .DiscussionListItem-info>.item-tags {top: 23px !important;} .DiscussionListItem { position: relative; margin-right: 0; padding-right: 0; padding-left: 0; margin-left: 0; border-radius: 8px; margin-top:15px;}} @media (min-width: 768px){.DiscussionListItem:hover { background-color: #fff; -webkit-box-shadow: 0px 8px 24px 3px rgba(84,102,134,0.1) !important; box-shadow: 0px 8px 24px 3px rgba(84,102,134,0.1) !important;}} .DiscussionList:not(.DiscussionList–searchResults) .read .DiscussionListItem-title { font-weight: 600; color: #282828; } .DiscussionList:not(.DiscussionList–searchResults) .unread .DiscussionListItem-title {color: #e7672e; font-weight: 600; }@media (max-width: 767px) { .DiscussionListItem-badges { margin-left: 0px; position: absolute; right: 10px; } .DiscussionListItem-info .item-excerpt { margin-right: -30px !important; white-space: normal !important; font-size: 14px !important; margin-left: -40px !important; line-height: 1.5em !important; margin-bottom: 25px !important; color: #3a3a3a !important; display: block !important; border-bottom: 1px solid rgba(0,0,0,0.1); padding-bottom: 5px; } .DiscussionListItem-content { padding-left: 60px; padding-right: 50px; margin: 10px; margin-bottom:15px; border-radius: 6px; box-shadow: 0 1px 10px 0 rgba(151, 158, 181, 0.28) !important; background: #fff !important; } .DiscussionListItem-info>.item-tags { margin-right: 4px; opacity: 1; position: absolute; left: 20px; bottom: 12px; -webkit-mask-image: linear-gradient(to right, #000 140px, rgba(0,0,0,0) 150px); } .DiscussionListItem-title { margin-right: 0; font-weight: 600; } .DiscussionListItem-info { overflow: unset !important; } .DiscussionListItem-count { background: transparent !important; font-size: 14px; position: absolute; bottom: 6px; right: 45px; } .DiscussionListItem-count:before { font-family: 'Font Awesome 5 Free'; display: inline-block; line-height: 1; content: "\f27a"; float: left; margin-left: -21px; margin-top: 4px; } .DiscussionListItem-info> .item-recipients { margin-right: 40%; opacity: 1; position: absolute; right: 10px; bottom: 10px; } .item-discussion-views { font-size: 14px !important; bottom: 6px; left: 70%; position: absolute; color: #667c99; top: unset !important; background: transparent !important; } .item-discussion-views:before { display: inline-block; font-family: 'Font Awesome 5 Free'; font-size: inherit; text-rendering: auto; content: '\f06e'; float: left; margin-left: -21px; margin-top: 0; } .unread .DiscussionListItem-count { background: transparent !important; color: #E7672E; }} @media (max-width: 767px) { li.item-forumStatisticsWidget { display: none; } } @media (max-width: 600px) { .OnlineUsers { display:none; } } @media (max-width: 768px){.IndexPage .WhoRead-list { display: none; }} @media (max-width: 768px){.UserPage .WhoRead-list { display: none; }} @media (max-width: 767px) { .ComposerBody-header li:nth-child(n+2):nth-child(-n+4) { display: inline-block; border-bottom: 0; margin-right: -15px; } } @media (max-width: 767px) {body.dark .DiscussionListItem-content{ border: 1px solid rgb(56, 68, 77) !important; background-color: transparent !important; box-shadow: 0 1px 10px 0 #15202b! important; }} .IndexPage-newDiscussion { background: linear-gradient(124deg, #ff2400, #e81d1d, #e8b71d, #e3e81d, #1de840, #1ddde8, #2b1de8, #dd00f3, #dd00f3); color: #fff; background-size: 1800% 1800%; -webkit-animation: rainbow 15s ease infinite; -z-animation: rainbow 15s ease infinite; -o-animation: rainbow 15s ease infinite; animation: rainbow 15s ease infinite; } @-webkit-keyframes rainbow { 0%{background-position:0% 82%} 50%{background-position:100% 19%} 100%{background-position:0% 82%} } @-moz-keyframes rainbow { 0%{background-position:0% 82%} 50%{background-position:100% 19%} 100%{background-position:0% 82%} } @-o-keyframes rainbow { 0%{background-position:0% 82%} 50%{background-position:100% 19%} 100%{background-position:0% 82%} } @keyframes rainbow { 0%{background-position:0% 82%} 50%{background-position:100% 19%} 100%{background-position:0% 82%} }@media (max-width: 767px) { li.item-polls { clear: right; } @media (max-width: 767px) { .DiscussionListItem-content { border-bottom: 1px solid var(--avatar-bg); } li.item-tags, li.item-recipients, li.item-save-draft { float: left; } li.item-save-draft { padding: 3px 0px 0px 15px; } } @keyframes pulse { 0% { transform: scale(1);} 50% { transform: scale(1.5); } 100% { transform: scale(1); } } .new .NotificationsDropdown-unread { animation: pulse 1s infinite; } ``` ### 页脚 ```