Skip to content
Snippets Groups Projects
Commit 400c0e64 authored by piotr.kupczyk@id.ethz.ch's avatar piotr.kupczyk@id.ethz.ch
Browse files

Merge branch 'ssdm-13504-unify-logos-and-icons' into master

parents 644678d9 ca4e2c89
No related branches found
No related tags found
1 merge request!40SSDM-13578 : 2PT : Database and V3 Implementation - include the new AFS "free"...
Showing
with 71 additions and 11 deletions
docs/logos/openbis-favicon-transparent.png

12.2 KiB

......@@ -3,7 +3,11 @@
<head>
<title>openBIS Admin</title>
<meta charset="utf-8" />
<link rel="shortcut icon" href="<%= require('@src/img/favicon.ico') %>" />
<link rel="apple-touch-icon" sizes="180x180" href="img/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="img/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="img/favicon-16x16.png">
<link rel="manifest" href="manifest/site.webmanifest">
<style>
html {
font-size: 16px;
......
......@@ -41,6 +41,7 @@
"babel-jest": "^29.3.1",
"babel-loader": "^9.1.0",
"babel-plugin-transform-amd-to-commonjs": "^1.6.0",
"copy-webpack-plugin": "^11.0.0",
"css-loader": "^6.7.3",
"enzyme": "^3.11.0",
"enzyme-adapter-react-16": "^1.15.7",
......
ui-admin/src/img/favicon.ico

4.44 KiB

......@@ -18,6 +18,8 @@ import openbis from '@src/js/services/openbis.js'
import messages from '@src/js/common/messages.js'
import logger from '@src/js/common/logger.js'
import Logo from '@src/resources/img/openbis-logo-transparent.png'
const styles = theme => ({
card: {
marginTop: '10%',
......@@ -25,6 +27,10 @@ const styles = theme => ({
width: '30em',
margin: '0 auto'
},
logo: {
display: 'flex',
justifyContent: 'center'
},
header: {
marginBottom: theme.spacing(1)
},
......@@ -212,6 +218,9 @@ class WithLogin extends React.Component {
<form>
<Card classes={{ root: classes.card }}>
<Container square={true}>
<div className={classes.logo}>
<img src={Logo} width='200' height='89' />
</div>
<Typography variant='h6' classes={{ root: classes.header }}>
Login
</Typography>
......
ui-admin/src/resources/img/android-chrome-192x192.png

7.54 KiB

ui-admin/src/resources/img/android-chrome-512x512.png

23.5 KiB

ui-admin/src/resources/img/apple-touch-icon.png

7.69 KiB

ui-admin/src/resources/img/favicon-16x16.png

489 B

ui-admin/src/resources/img/favicon-32x32.png

899 B

ui-admin/src/resources/img/favicon.ico

15 KiB

ui-admin/src/resources/img/openbis-logo-transparent.png

65.3 KiB

{
"name": "openBIS Admin UI",
"short_name": "Admin UI",
"icons": [
{
"src": "img/android-chrome-192x192.png",
"sizes": "192x192",
"type": "image/png"
},
{
"src": "img/android-chrome-512x512.png",
"sizes": "512x512",
"type": "image/png"
}
],
"theme_color": "#ffffff",
"background_color": "#ffffff",
"display": "standalone"
}
/* eslint-disable */
const Webpack = require('webpack')
const HtmlWebpackPlugin = require('html-webpack-plugin')
const CopyWebpackPlugin = require('copy-webpack-plugin')
const path = require('path')
module.exports = {
......@@ -25,9 +26,12 @@ module.exports = {
devMiddleware: {
publicPath: '/admin/'
},
static: {
directory: './src/js'
}
static: [
{
directory: './src/resources',
publicPath: '/admin'
}
]
},
devtool: 'source-map',
......@@ -47,7 +51,7 @@ module.exports = {
},
{
test: /\.(png|svg|jpg|jpeg|gif|ico)$/i,
type: 'asset',
type: 'asset'
},
{
test: /\.(woff2?|eot|ttf|otf)(\?.*)?$/,
......
/* eslint-disable */
const Webpack = require('webpack')
const HtmlWebpackPlugin = require('html-webpack-plugin')
const CopyWebpackPlugin = require('copy-webpack-plugin')
const path = require('path')
module.exports = {
......@@ -26,7 +27,7 @@ module.exports = {
},
{
test: /\.(png|svg|jpg|jpeg|gif|ico)$/i,
type: 'asset',
type: 'asset'
},
{
test: /\.(woff2?|eot|ttf|otf)(\?.*)?$/,
......@@ -61,6 +62,9 @@ module.exports = {
}),
new Webpack.ProvidePlugin({
process: 'process/browser'
}),
new CopyWebpackPlugin({
patterns: [{ from: 'src/resources' }]
})
]
}
......@@ -14,10 +14,24 @@ var loadJSResorce = function(pathToResource, onLoad) {
var setFavicons = function(img) {
var head = document.getElementsByTagName('head')[0];
var iconLink= document.createElement('link');
iconLink.setAttribute('rel', 'icon');
iconLink.setAttribute('href', img);
head.appendChild(iconLink);
if(_.isString(img)){
var iconLink= document.createElement('link');
iconLink.setAttribute('rel', 'icon');
iconLink.setAttribute('href', img);
head.appendChild(iconLink);
}else if(_.isObject(img)){
Object.keys(img).forEach(function(linkKey){
var linkDefinition = img[linkKey]
var linkElement = document.createElement('link');
if(_.isObject(linkDefinition)){
Object.keys(linkDefinition).forEach(function(attributeName){
linkElement.setAttribute(attributeName, linkDefinition[attributeName]);
})
head.appendChild(linkElement);
}
})
}
};
var setHelp = function(url) {
......@@ -42,7 +56,12 @@ var onLoadInstanceProfileResorceFunc = function() {
//<PROFILE_PLACEHOLDER>
loadJSResorce("./etc/InstanceProfile.js", onLoadInstanceProfileResorceFunc);
setFavicons("./img/favicon.ico");
setFavicons({
appleTouchIcon : { href : "./img/apple-touch-icon.png", rel: "apple-touch-icon", sizes: "180x180" },
favicon32 : { href : "./img/favicon-32x32.png", rel: "icon", type: "image/png", sizes: "32x32" },
favicon16 : { href : "./img/favicon-16x16.png", rel: "icon", type: "image/png", sizes: "16x16" },
manifest : { href : "./site.webmanifest", rel: "manifest" }
});
//</PROFILE_PLACEHOLDER>
var PLUGINS_CONFIGURATION = {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment