diff --git a/config/env/torrents.js b/config/env/torrents.js index f254c9a7..75ba7dbe 100644 --- a/config/env/torrents.js +++ b/config/env/torrents.js @@ -938,6 +938,8 @@ module.exports = { * @isVip: set whether is only for VIP user * @showThumbsUpUserList: if true, will show thumbs up users list at eof of topic content or reply content * @showUserSignature: if true, will show user signature info in forum + * + * @rulesForumID: if you create a forum for user rules and helpers, here is the forumID, it will link to from home help items more */ forumsConfig: { category: [ @@ -948,7 +950,9 @@ module.exports = { {name: 'ADMINISTRATION', value: 'Administration', index: 4, isOper: true, isVip: false} ], showThumbsUpUserList: true, - showUserSignature: true + showUserSignature: true, + + rulesForumID: '595b0c31235c3405a290d737' }, /** @@ -962,11 +966,25 @@ module.exports = { * @topicsSearchPerPage: forum topic search list page settings * @torrentsPerPage: torrents list page settings * @torrentsCommentsPerPage: torrent comments list settings + * @makeGroupTorrentsPerPage: torrent of make group list page settings * @tracesPerPage: system traces log list page settings * @adminUserListPerPage: admin manage users list page settings * @collectionsListPerPage: movie collections list page settings * @backupFilesListPerPage: system backup files list page settings * @torrentPeersListPerPage: torrent detail seeder & leecher users list page settings + * + * @uploaderUserListPerPage: admin management uploader access list page settings + * @messageBoxListPerPage: message box list page settings + * @followListPerPage: users follow list page settings + * + * @requestListPerPage: request list page settings + * @requestCommentsPerPage: request comments list settings + * + * @homeOrderTorrentListPerType: every type of torrent showed in home settings + * @homeNewestTorrentListPerType: every type of torrent of newest showed in home settings + * @homeHelpListLimit: help items number of home settings + * @homeNoticeListLimit: notice items number of home settings + * @homeNewTopicListLimit: new topic items number of home settings */ itemsPerPage: { topicsPerPage: 10, @@ -980,13 +998,19 @@ module.exports = { collectionsListPerPage: 6, backupFilesListPerPage: 15, torrentPeersListPerPage: 15, - homeOrderTorrentListPerType: 9, - homeNewestTorrentListPerType: 14, + uploaderUserListPerPage: 15, messageBoxListPerPage: 10, followListPerPage: 30, + requestListPerPage: 15, - requestCommentsPerPage: 10 + requestCommentsPerPage: 10, + + homeOrderTorrentListPerType: 9, + homeNewestTorrentListPerType: 14, + homeHelpListLimit: 8, + homeNoticeListLimit: 8, + homeNewTopicListLimit: 8 }, /** diff --git a/modules/core/client/app/trans-string-en.js b/modules/core/client/app/trans-string-en.js index c13d6067..fafcbde2 100644 --- a/modules/core/client/app/trans-string-en.js +++ b/modules/core/client/app/trans-string-en.js @@ -94,6 +94,13 @@ NEWEST_MORE: 'more...', BTN_DOWNLOAD: 'Download', + HOME: { + TITLE_HELP: 'Rules And Helper', + TITLE_NOTICE: 'System Broadcast', + TITLE_NEW_TOPIC: 'Forum New Topics', + MORE_HELP_RULES: 'More rules and help contents' + }, + //element title/alt TITLE_ALT: { SEEDS: 'Seeds users', diff --git a/modules/core/client/app/trans-string-zh.js b/modules/core/client/app/trans-string-zh.js index e470dd73..d29e8e12 100644 --- a/modules/core/client/app/trans-string-zh.js +++ b/modules/core/client/app/trans-string-zh.js @@ -94,6 +94,13 @@ NEWEST_MORE: '更多...', BTN_DOWNLOAD: '下载', + HOME: { + TITLE_HELP: '用户规则与帮助', + TITLE_NOTICE: '系统动态与通知', + TITLE_NEW_TOPIC: '论坛最新话题', + MORE_HELP_RULES: '更多规则以及帮助内容' + }, + //element title/alt TITLE_ALT: { SEEDS: '做种用户数', diff --git a/modules/core/client/controllers/home.client.controller.js b/modules/core/client/controllers/home.client.controller.js index 8ceb806c..4f77ce96 100644 --- a/modules/core/client/controllers/home.client.controller.js +++ b/modules/core/client/controllers/home.client.controller.js @@ -6,15 +6,16 @@ .controller('HomeController', HomeController); HomeController.$inject = ['$scope', '$state', '$translate', 'Authentication', 'TorrentsService', 'Notification', 'MeanTorrentConfig', - 'getStorageLangService', 'DownloadService', '$timeout', 'localStorageService', 'ScrapeService', 'TorrentGetInfoServices', 'DebugConsoleService', + 'getStorageLangService', 'DownloadService', '$timeout', 'localStorageService', 'TopicsService', 'TorrentGetInfoServices', 'DebugConsoleService', 'marked']; function HomeController($scope, $state, $translate, Authentication, TorrentsService, Notification, MeanTorrentConfig, getStorageLangService, - DownloadService, $timeout, localStorageService, ScrapeService, TorrentGetInfoServices, mtDebug, + DownloadService, $timeout, localStorageService, TopicsService, TorrentGetInfoServices, mtDebug, marked) { var vm = this; vm.appConfig = MeanTorrentConfig.meanTorrentConfig.app; vm.globalSalesConfig = MeanTorrentConfig.meanTorrentConfig.torrentGlobalSales; + vm.forumsConfig = MeanTorrentConfig.meanTorrentConfig.forumsConfig; /** * getSaleNoticeMessage @@ -75,5 +76,35 @@ e.addClass('panel-collapsed'); }, 100); }; + + /** + * getHomeHelp + */ + vm.getHomeHelp = function () { + TopicsService.getHomeHelp(function (topics) { + console.log(topics); + vm.homeHelpTopics = topics; + }); + }; + + /** + * getHomeNotice + */ + vm.getHomeNotice = function () { + TopicsService.getHomeNotice(function (topics) { + console.log(topics); + vm.homeNoticeTopics = topics; + }); + }; + + /** + * getForumNewTopic + */ + vm.getForumNewTopic = function () { + TopicsService.getHomeNewTopic(function (topics) { + console.log(topics); + vm.homeNewTopics = topics; + }); + }; } }()); diff --git a/modules/core/client/css/core.css b/modules/core/client/css/core.css index c540b247..4f9754b8 100644 --- a/modules/core/client/css/core.css +++ b/modules/core/client/css/core.css @@ -1,3 +1,7 @@ +body { + font-family: 'ProximaNova', 'Helvetica Neue', 'Arial', 'Helvetica', 'sans-serif' +} + .content { margin-top: 50px; } @@ -83,7 +87,7 @@ a:hover .header-profile-image { min-width: 150px; } -.view-footer{ +.view-footer { color: #aaa; font-size: 12px; } diff --git a/modules/core/client/less/home.less b/modules/core/client/less/home.less new file mode 100644 index 00000000..c7b4bad3 --- /dev/null +++ b/modules/core/client/less/home.less @@ -0,0 +1,65 @@ +@import (reference) "../../../core/client/less/mt-var.less"; + +.home-help, .home-notice, .home-new-topic { + margin: 20px 0; + color: #4d4e53; + .list-items { + background-color: #fafbfc; + box-shadow: 2px 2px 2px rgba(0, 0, 0, .075); + margin-top: -25px; + padding: 20px 10px; + border-top: solid 2px @mt-base-color; + p { + &:before { + content: '+'; + display: inline-block; + color: #ff6600; + margin-right: 2px; + } + &:last-child { + margin-bottom: 1px !important; + } + } + .item-date { + color: #999; + } + } + .list-title { + margin-bottom: 10px; + position: relative; + .fa-stack { + font-size: 30px; + color: @mt-base-color; + .fa:first-child { + text-shadow: 0 1px 1px #fff, 0 1px 1px #fff; + } + } + .fa-more { + position: absolute; + top: 22px; + right: 10px; + font-size: 20px; + &:hover { + color: @mt-base-color; + } + } + } +} + +.home-new-topic { + @media (max-width: @screen-md-max) { + display: none; + } +} + +.home_vip_info { + padding: 20px; + min-height: 300px; + background-color: #f7f7f7; +} + +.home_global_search { + padding: 20px; + min-height: 300px; + background-color: #9d9e9f; +} diff --git a/modules/core/client/views/home.client.view.html b/modules/core/client/views/home.client.view.html index b11d73d0..27296fd7 100644 --- a/modules/core/client/views/home.client.view.html +++ b/modules/core/client/views/home.client.view.html @@ -9,5 +9,62 @@ + + + + + + + + +
+ {{t.pushHomeAt | date: 'MM-dd HH:mm'}} - + {{t.title}} +
++ {{t.pushHomeAt | date: 'MM-dd HH:mm'}} - + {{t.title}} +
+