Skip to content

Commit

Permalink
logo customization
Browse files Browse the repository at this point in the history
  • Loading branch information
mihai-macaneata committed Apr 7, 2020
1 parent 7f16c9e commit ea9ef68
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 7 deletions.
51 changes: 51 additions & 0 deletions src/customizations/volto/components/theme/Logo/Logo.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
/**
* Logo component.
* @module components/theme/Logo/Logo
*/

import React from 'react';
import { Link } from 'react-router-dom';
import { defineMessages, useIntl } from 'react-intl';
import { Image } from 'semantic-ui-react';
import { useSelector } from 'react-redux';
import { settings } from '~/config';

import LogoImage from './Logo.png';

const messages = defineMessages({
site: {
id: 'Site',
defaultMessage: 'Site',
},
plonesite: {
id: 'Plone Site',
defaultMessage: 'Plone Site',
},
});

/**
* Logo component class.
* @function Logo
* @param {Object} intl Intl object
* @returns {string} Markup of the component.
*/
const Logo = () => {
const lang = useSelector(state => state.intl.locale);
const intl = useIntl();

return (
<Link
to={settings.isMultilingual ? `/${lang}` : '/'}
title={intl.formatMessage(messages.site)}
>
<Image
src={LogoImage}
alt={intl.formatMessage(messages.plonesite)}
title={intl.formatMessage(messages.plonesite)}
height={64}
/>
</Link>
);
};

export default Logo;
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 1 addition & 6 deletions theme/themes/pastanaga/elements/header.overrides
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

.ui.basic.segment.header-wrapper {
margin-bottom: 0;
background-color: @primaryColor;
}

.ui.basic.segment .header {
Expand Down Expand Up @@ -36,9 +37,6 @@
@media only screen and (max-width: @largestTabletScreen) {
overflow-x: initial;
}

.ui.secondary.pointing.menu {
}
}
}

Expand All @@ -65,9 +63,6 @@
display: flex;
}

.tools {
}

.search {
form {
@media only screen and (min-width: @largestTabletScreen) {
Expand Down
4 changes: 3 additions & 1 deletion theme/themes/pastanaga/globals/site.variables
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
/*-------------------
Brand Colors
--------------------*/
@primaryColor : @darkBlue;

@secondaryColor : @brown;

Expand Down Expand Up @@ -131,6 +132,7 @@
@brown : #826A6A; // Palette: reddishGrey
@grey : #68778D; // Palette: blueishGrey
@black : #252525; // Palette: darkishGrey
@darkBlue : #005384;

/*--- Light Colors ---*/
@lightOlive : #C9EAB1; // Palette: lightSage
Expand All @@ -146,7 +148,7 @@
/*--- Colored Backgrounds ---*/
@redBackground : #F5C1C1; // Palette: alertError
@tealBackground : #EDF1F2; // Palette: Breadcrumbs
@blueBackground : #F2F6F8;
@blueBackground : #005384;
@purpleBackground : #B8C6C8; // Dublin Core Summary

/*--- Colored Headers ---*/
Expand Down

0 comments on commit ea9ef68

Please sign in to comment.