-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CORE-442 Hide description field on menu link content form
- Loading branch information
Showing
10 changed files
with
7,622 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
20 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
nodeLinker: node-modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
#edit-menu-link-description{display:none} |
13 changes: 13 additions & 0 deletions
13
modules/stanford_profile_admin/lib/scss/menu_link_form.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
@charset 'UTF-8'; | ||
|
||
// Remove this variable if you are not using assets directly out of Decanter | ||
// that need to be included in the webpack build. | ||
$su-image-path: '~decanter-assets'; | ||
$fa-font-path: '~fa-fonts'; | ||
|
||
// Import Decanter Library: | ||
@import 'decanter/core/src/scss/decanter-no-markup'; | ||
|
||
#edit-menu-link-description { | ||
display: none; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
{ | ||
"name": "stanford_starter", | ||
"version": "1.0.0", | ||
"description": "Changelog: [CHANGELOG.md](CHANGELOG.md)", | ||
"main": "webpack.config.js", | ||
"scripts": { | ||
"watch": "NODE_ENV=production webpack --watch", | ||
"build": "NODE_ENV=production webpack" | ||
}, | ||
"author": "", | ||
"license": "ISC", | ||
"dependencies": { | ||
"@babel/core": "^7.26.0", | ||
"@babel/preset-env": "^7.26.0", | ||
"babel-loader": "^9.2.1", | ||
"css-loader": "^7.1.2", | ||
"decanter": "^6.3.3", | ||
"filemanager-webpack-plugin": "^8.0.0", | ||
"mini-css-extract-plugin": "^2.9.2", | ||
"node-sass": "^9.0.0", | ||
"optimize-css-assets-webpack-plugin": "^6.0.1", | ||
"postcss-loader": "^8.1.1", | ||
"postcss-preset-env": "^10.0.9", | ||
"sass-loader": "^16.0.3", | ||
"style-loader": "^4.0.0", | ||
"webpack": "^5.96.1", | ||
"webpack-cli": "^5.1.4", | ||
"webpack-remove-empty-scripts": "^1.0.4" | ||
}, | ||
"packageManager": "[email protected]" | ||
} |
4 changes: 4 additions & 0 deletions
4
modules/stanford_profile_admin/stanford_profile_admin.libraries.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
menu_link_form: | ||
css: | ||
theme: | ||
dist/css/menu_link_form.css: {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,106 @@ | ||
|
||
const path = require("path"); | ||
const glob = require('glob') | ||
const Webpack = require("webpack"); | ||
const MiniCssExtractPlugin = require("mini-css-extract-plugin"); | ||
const OptimizeCSSAssetsPlugin = require("optimize-css-assets-webpack-plugin"); | ||
const RemoveEmptyScriptsPlugin = require('webpack-remove-empty-scripts'); | ||
const FileManagerPlugin = require('filemanager-webpack-plugin'); | ||
const autoprefixer = require('autoprefixer')({ grid: true }); | ||
|
||
const config = { | ||
isProd: process.env.NODE_ENV === "production", | ||
hmrEnabled: process.env.NODE_ENV !== "production" && !process.env.NO_HMR, | ||
distFolder: path.resolve(__dirname, "./dist/css"), | ||
wdsPort: 3001, | ||
}; | ||
|
||
const entryPoints = glob.sync('./lib/scss/**/*.scss').reduce((acc, filePath) => { | ||
const filePathParts = filePath.replace('./lib/scss/', '').split('/'); | ||
let fileName = filePathParts.pop(); | ||
if (fileName.indexOf('_') === 0) { | ||
return acc; | ||
} | ||
if (fileName === 'index.scss') { | ||
fileName = filePathParts.pop(); | ||
} | ||
const entry = filePathParts.length >= 1 ? filePathParts.join('/') + '/' + fileName : fileName; | ||
acc[entry.replace('.scss', '')] = filePath | ||
return acc | ||
}, {}); | ||
|
||
var webpackConfig = { | ||
entry: entryPoints, | ||
output: { | ||
path: config.distFolder, | ||
filename: '[name].js', | ||
assetModuleFilename: '../assets/[name][ext][query]' | ||
}, | ||
mode: config.isProd ? "production" : "development", | ||
resolve: { | ||
alias: { | ||
'decanter-assets': path.resolve('node_modules', 'decanter/core/src/img'), | ||
'decanter-src': path.resolve('node_modules', 'decanter/core/src'), | ||
'@fortawesome': path.resolve('node_modules', '@fortawesome'), | ||
'fa-fonts': path.resolve('node_modules', '@fortawesome/fontawesome-free/webfonts') | ||
} | ||
}, | ||
module: { | ||
rules: [ | ||
{ | ||
test: /\.m?js$/, | ||
exclude: /(node_modules)/, | ||
use: { | ||
loader: 'babel-loader', | ||
options: { | ||
presets: ['@babel/preset-env'] | ||
} | ||
}, | ||
}, | ||
{ | ||
test: /\.(sa|sc|c)ss$/, | ||
use: [ | ||
config.isProd ? { loader: MiniCssExtractPlugin.loader } : 'style-loader', | ||
{loader:'css-loader', options: {}}, | ||
{ | ||
loader: 'postcss-loader', | ||
options: { | ||
postcssOptions: { | ||
sourceMap: true, | ||
plugins: [autoprefixer], | ||
}, | ||
} | ||
}, | ||
{loader:'sass-loader', options: {}} | ||
] | ||
}, | ||
{ | ||
test: /\.(png|jpg|gif|svg)$/i, | ||
type: "asset" | ||
} | ||
] | ||
}, | ||
plugins: [ | ||
new RemoveEmptyScriptsPlugin(), | ||
new MiniCssExtractPlugin({ | ||
filename: '[name].css', | ||
}), | ||
new FileManagerPlugin({ | ||
events: { | ||
onStart: { | ||
delete: ['dist'], | ||
}, | ||
}, | ||
}), | ||
], | ||
optimization: { | ||
minimizer: [ | ||
new OptimizeCSSAssetsPlugin(), | ||
] | ||
} | ||
}; | ||
|
||
if (config.hmrEnabled) { | ||
webpackConfig.plugins.push(new Webpack.HotModuleReplacementPlugin()); | ||
} | ||
module.exports = webpackConfig; |
Oops, something went wrong.