diff --git a/package.json b/package.json index 971bc0b..d6f378a 100644 --- a/package.json +++ b/package.json @@ -46,7 +46,6 @@ "compression": "^1.7.4", "cookie-parser": "1.4.3", "copy-webpack-plugin": "4.5.2", - "core-js": "3.20.3", "css-loader": "6.5.1", "css-minimizer-webpack-plugin": "3.4.1", "eev": "0.1.5", diff --git a/src/universal/partials/Welcome/PartialCards.js b/src/universal/partials/Welcome/PartialCards.js index 8fb2946..34ee902 100644 --- a/src/universal/partials/Welcome/PartialCards.js +++ b/src/universal/partials/Welcome/PartialCards.js @@ -5,15 +5,6 @@ import { ServerStyleSheet } from 'styled-components'; import partials from './partials'; import groupBy from '../../utils/lodash/groupBy'; -const STATUS_COLOR = { - live: '#8dc63f', - dev: '#FF6000', - page: '#00abff', - 1: '#9b59b6', - 2: '#c0392b', - 3: '#16a085' -}; - const sheet = new ServerStyleSheet(); const Welcome = () => { @@ -26,10 +17,8 @@ const Welcome = () => { className="link" >
-
-
- {title} -
+
+
{title}
{item.name}
diff --git a/src/universal/partials/Welcome/welcomeStyle.js b/src/universal/partials/Welcome/welcomeStyle.js index 9b09e2b..e378dce 100644 --- a/src/universal/partials/Welcome/welcomeStyle.js +++ b/src/universal/partials/Welcome/welcomeStyle.js @@ -10,8 +10,8 @@ const welcomeStyle = () => { --theme-bg-color: #fafafb; --body-font: "Poppins", sans-serif; --body-color: #2f2f33; - --active-color: #0162ff; - --active-light-color: #e1ebfb; + --active-color: #4e4e4e; + --active-light-color: #f1f1f1; --header-bg-color: #fff; --border-color: #d8d8d8; --alert-bg-color: #e8f2ff; @@ -157,7 +157,7 @@ const welcomeStyle = () => { } .group-title { font-size: 24px; - font-weight: 600; + font-weight: 700; } .link { color: inherit; @@ -190,12 +190,13 @@ const welcomeStyle = () => { } .card { - padding: 20px 16px; + padding: 16px 16px; background-color: var(--header-bg-color); border-radius: 8px; cursor: pointer; transition: 0.2s; text-decoration: none; + position: relative; } .card:hover { transform: scale(1.02); @@ -207,8 +208,7 @@ const welcomeStyle = () => { } .card-title { font-weight: 600; - margin-top: 16px; - font-size: 14px; + font-size: 16px; } .card-subtitle { color: var(--subtitle-color); @@ -220,6 +220,54 @@ const welcomeStyle = () => { display: flex; align-items: flex-start; } + + .ribbon-wrapper { + width: 85px; + height: 88px; + overflow: hidden; + position: absolute; + top: 0; + right: 0; + } + + .ribbon { + font-size: 10px; + font-weight: bold; + color: var(--header-bg-color);; + text-align: center; + -webkit-transform: rotate(45deg); + -moz-transform: rotate(45deg); + -ms-transform: rotate(45deg); + -o-transform: rotate(45deg); + position: relative; + padding: 0; + left: 26px; + top: 14px; + width: 80px; + -webkit-box-shadow: 0px 0px 3px rgba(0,0,0,0.3); + -moz-box-shadow: 0px 0px 3px rgba(0,0,0,0.3); + box-shadow: 0px 0px 3px rgba(0,0,0,0.3); + } + + .color-live{ + background-color: #badc58; + } + .color-dev{ + background-color: #f0932b; + } + .color-page{ + background-color: #00abff; + } + .color-1{ + background-color: #9b59b6; + } + .color-2{ + background-color: #c0392b; + } + .color-3{ + background-color: #16a085; + } + .badge{ display: flex; align-items: center; @@ -227,7 +275,7 @@ const welcomeStyle = () => { background-color: #f50; font-weight: 600; margin-top: 16px; - font-size: 14px; + font-size: 10px; padding: 5px 10px; color: white; border-radius: 5px; diff --git a/webpack.client.config.js b/webpack.client.config.js index 7eac9ce..f31b0b4 100644 --- a/webpack.client.config.js +++ b/webpack.client.config.js @@ -25,22 +25,19 @@ const appConfigFilePath = `${voltranConfig.appConfigFile.entry}/${env}.conf.js`; const appConfig = require(appConfigFilePath); const commonConfig = require('./webpack.common.config'); const postCssConfig = require('./postcss.config'); -const babelConfig = require('./babel.server.config'); const voltranClientConfigPath = voltranConfig.webpackConfiguration.client; const voltranClientConfig = voltranClientConfigPath ? require(voltranConfig.webpackConfiguration.client) : ''; -const normalizeUrl = require('./lib/os.js'); const replaceString = require('./config/string.js'); const fragmentManifest = require(voltranConfig.routing.dictionary); const fixFragmentManifest = require('./src/universal/core/route/dictionary'); -const isDebug = voltranConfig.dev; +const isDebug = appConfig.dev; const reScript = /\.(js|jsx|mjs)$/; -const distFolderPath = voltranConfig.distFolder; const isProd = process.env.BROWSER && process.env.VOLTRAN_ENV === 'prod'; const hideCssPrefixOnTest = voltranConfig.hideCssPrefixOnTest; @@ -73,27 +70,8 @@ const appConfigFileTarget = `${voltranConfig.appConfigFile.output.path}/${voltra fs.copyFileSync(appConfigFilePath, appConfigFileTarget); -chunks.client.unshift('regenerator-runtime/runtime.js', 'core-js/stable', 'intersection-observer'); - +chunks.client.unshift('regenerator-runtime/runtime.js'); if (isDebug) { - const appConfigJSONContent = require(appConfigFileTarget); - - for (const service in appConfigJSONContent.services) { - appConfigJSONContent.services[service].clientUrl = - appConfigJSONContent.services[service].serverUrl; - } - - const moduleExportsText = 'module.exports'; - const appConfigFileContent = fs.readFileSync(appConfigFileTarget).toString(); - const moduleExportsIndex = appConfigFileContent.indexOf(moduleExportsText); - - let context = appConfigFileContent.substr(0, moduleExportsIndex + moduleExportsText.length); - context += '='; - context += JSON.stringify(appConfigJSONContent); - context += ';'; - - fs.writeFileSync(appConfigFileTarget, context); - chunks.client.push('webpack-hot-middleware/client'); } @@ -234,7 +212,7 @@ const clientConfig = merge(commonConfig, voltranClientConfig, { ? [] : [ new CleanWebpackPlugin({ - verbose: false, + verbose: true, dangerouslyAllowCleanPatternsOutsideProject: true }) ]), diff --git a/webpack.server.config.js b/webpack.server.config.js index 4a8e9eb..4e7d097 100644 --- a/webpack.server.config.js +++ b/webpack.server.config.js @@ -122,7 +122,7 @@ const serverConfig = merge(commonConfig, voltranServerConfig, { plugins: [ new CleanWebpackPlugin({ - verbose: false, + verbose: true, dangerouslyAllowCleanPatternsOutsideProject: true }),