Skip to content

Commit

Permalink
Update and clean the front project, added new style.css file
Browse files Browse the repository at this point in the history
  • Loading branch information
Topin2001 committed Jun 5, 2024
1 parent 9f1cdd5 commit 694aa3f
Show file tree
Hide file tree
Showing 6 changed files with 2,135 additions and 5,446 deletions.
40 changes: 15 additions & 25 deletions conf/webpack/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
const path = require("path");
const autoprefixer = require("autoprefixer");

module.exports = {
// Define the entry points here. They MUST have the same name as the page_id
Expand Down Expand Up @@ -47,30 +46,21 @@ module.exports = {
},
module: {
// Our example uses Babel to transpile our code.
loaders: [
{
test: /\.js$/,
loader: "babel",
exclude: /(node_modules)/
},
{
test: /\.css/,
loader: "style-loader!css-loader!postcss-loader"
},
{ test: /\.json$/, loader: "json" }
]
},
postcss() {
return [
autoprefixer({
browsers: [
"last 3 Chrome versions",
"last 3 Firefox versions",
"last 3 Safari versions",
"last 3 Edge versions",
"IE 11"
rules: [
{
test: /\.js$/,
exclude: /node_modules/,
use: {
loader: "babel-loader"
}
},
{
test: /\.css$/,
use: [
'style-loader',
'css-loader'
]
}
]
})
];
}
};
37 changes: 17 additions & 20 deletions conf/webpack/webpack.config.prod.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
*/
const webpack = require('webpack');
const config = require('./webpack.config');
const TerserPlugin = require('terser-webpack-plugin');
const getClientEnvironment = require('../env');

// Get environment variables to inject into our app.
Expand All @@ -41,29 +42,25 @@ config.plugins = [
// Otherwise React will be compiled in the very slow development mode.
new webpack.DefinePlugin(env),

// This helps ensure the builds are consistent if source hasn't changed:
new webpack.optimize.OccurrenceOrderPlugin(),

// Try to dedupe duplicated modules, if any:
new webpack.optimize.DedupePlugin()
];

if (!noUglify) {
config.plugins.push(
new webpack.optimize.UglifyJsPlugin({
compress: {
screw_ie8: true, // React doesn't support IE8
warnings: false
},
mangle: {
screw_ie8: true
},
output: {
comments: false,
screw_ie8: true
}
})
);
config.optimization = {
minimize: true,
minimizer: [
new TerserPlugin({
terserOptions: {
compress: {
warnings: false,
},
mangle: true,
output: {
comments: false,
},
},
}),
],
};
}

module.exports = config;
50 changes: 9 additions & 41 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,44 +2,6 @@
"name": "sonar-cnes-report",
"license": "GPL-3.0",
"version": "5.0.0",
"devDependencies": {
"autoprefixer": "6.2.2",
"babel-core": "6.14.0",
"babel-loader": "6.2.5",
"babel-preset-react-app": "0.2.1",
"cross-env": "2.0.0",
"cross-spawn": "4.0.0",
"css-loader": "0.23.1",
"detect-port": "1.0.0",
"dotenv": "2.0.0",
"enzyme": "2.6.0",
"enzyme-to-json": "1.4.5",
"expose-loader": "0.7.1",
"express": "4.13.4",
"express-http-proxy": "0.6.0",
"filesize": "3.3.0",
"find-cache-dir": "0.1.1",
"gzip-size": "3.0.0",
"imports-loader": "0.6.5",
"json-loader": "0.5.4",
"path-exists": "2.1.0",
"postcss-loader": "0.8.0",
"prettier": "0.22.0",
"react": "15.6.2",
"react-addons-shallow-compare": "15.6.2",
"react-addons-test-utils": "15.6.2",
"react-dev-utils": "0.2.1",
"react-dom": "15.6.2",
"react-router": "3.0.2",
"react-transform-hmr": "1.0.4",
"recursive-readdir": "2.1.0",
"rimraf": "2.5.4",
"script-loader": "0.6.1",
"strip-ansi": "3.0.1",
"style-loader": "0.13.0",
"webpack": "1.13.2",
"webpack-dev-server": "1.16.1"
},
"scripts": {
"build": "node scripts/build.js"
},
Expand All @@ -49,8 +11,14 @@
]
},
"dependencies": {
"backbone": "^1.4.0",
"jquery": "^1.11.0",
"underscore": "^1.9.1"
"@babel/core": "7.24.6",
"babel-loader": "9.1.3",
"babel-preset-react-app": "10.0.1",
"css-loader": "7.1.2",
"style-loader": "4.0.0",
"webpack": "5.91.0"
},
"devDependencies": {
"@babel/plugin-proposal-private-property-in-object": "7.21.11"
}
}
7 changes: 2 additions & 5 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -315,9 +315,6 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-project-info-reports-plugin</artifactId>
<version>3.5.0</version>
<configuration>
<dependencyLocationsEnabled>false</dependencyLocationsEnabled>
</configuration>
</plugin>

<plugin>
Expand Down Expand Up @@ -372,8 +369,8 @@
<goal>install-node-and-yarn</goal>
</goals>
<configuration>
<nodeVersion>v16.14.0</nodeVersion>
<yarnVersion>v1.22.5</yarnVersion>
<nodeVersion>v20.14.0</nodeVersion>
<yarnVersion>v1.22.22</yarnVersion>
</configuration>
</execution>
<execution>
Expand Down
85 changes: 72 additions & 13 deletions src/main/js/global_page/style.css
Original file line number Diff line number Diff line change
@@ -1,22 +1,81 @@
.forminput select, .forminput input{
width:100%;
/* General Styles */
.maintenance-title {
font-size: 35px;
color: #333;
margin-top: 20px;
text-align: center;
}

.login-label{
#generation-form {
margin: 20px auto;
max-width: 500px;
padding: 20px;
background-color: #f9f9f9;
border: 1px solid #ccc;
border-radius: 5px;
}

.forminput {
margin-bottom: 15px;
}

.login-label {
display: block;
margin-bottom: 5px;
color: #555;
}

.info-message{
color:grey;
.login-input {
width: 100%;
padding: 10px;
font-size: 16px;
border: 1px solid #ccc;
border-radius: 5px;
box-sizing: border-box;
}

.compatibility-warning {
padding-bottom: inherit;
color: red;
font-style: italic;
/* Button Styles */
#generation {
display: block;
margin: 0 auto;
font-size: 20px;
padding: 10px 20px;
background-color: #4CAF50;
color: white;
border: none;
border-radius: 5px;
cursor: pointer;
transition: background-color 0.3s ease;
}

#generation:hover {
background-color: #45a049;
}

#generation:active {
transform: translateY(2px);
}

.page-simple {
width: 30%;
margin: auto;
}
/* Checkbox Styles */
.checkbox-label {
display: block;
margin-bottom: 5px;
color: #555;
}

.checkbox-input {
margin-right: 5px;
}

/* Optional: Styles for success/error messages */
.success-message {
color: green;
font-weight: bold;
margin-top: 10px;
}

.error-message {
color: red;
font-weight: bold;
margin-top: 10px;
}
Loading

0 comments on commit 694aa3f

Please sign in to comment.