-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #23 from plone/develop
Develop
- Loading branch information
Showing
16 changed files
with
276 additions
and
24 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
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
45 changes: 45 additions & 0 deletions
45
frontend/src/addons/volto-conf2023-theme/src/components/Views/Sponsor.jsx
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,45 @@ | ||
import React from 'react'; | ||
import { Container, Grid } from 'semantic-ui-react'; | ||
import { flattenToAppURL } from '@plone/volto/helpers'; | ||
import { useSelector } from 'react-redux'; | ||
import { UniversalLink } from '@plone/volto/components'; | ||
import { FormattedMessage } from 'react-intl'; | ||
|
||
const Sponsor = ({ content }) => { | ||
const remoteUrl = content.remoteUrl; | ||
const token = useSelector((state) => state.userSession?.token); | ||
React.useEffect(() => { | ||
if (!token) { | ||
window.location.href = remoteUrl; | ||
} | ||
}, [token, remoteUrl]); | ||
|
||
return !token ? ( | ||
// <Redirect to={remoteUrl} /> | ||
<p> | ||
<FormattedMessage id="Loading..." defaultMessage="Loading..." /> | ||
</p> | ||
) : ( | ||
<Container className="view-wrapper grid stackable"> | ||
{remoteUrl && ( | ||
<Grid.Row> | ||
<Grid.Column width={2}></Grid.Column> | ||
<Grid.Column width={8}> | ||
{content.title && ( | ||
<h1 className="documentFirstHeading">{content.title}</h1> | ||
)} | ||
<p> | ||
The link address is: | ||
<UniversalLink href={remoteUrl}> | ||
{flattenToAppURL(remoteUrl)} | ||
</UniversalLink> | ||
</p> | ||
</Grid.Column> | ||
<Grid.Column width={2}></Grid.Column> | ||
</Grid.Row> | ||
)} | ||
</Container> | ||
); | ||
}; | ||
|
||
export default Sponsor; |
73 changes: 73 additions & 0 deletions
73
...dons/volto-conf2023-theme/src/customizations/volto/components/theme/View/NewsItemView.jsx
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,73 @@ | ||
/** | ||
* NewsItemView view component. | ||
* @module components/theme/View/NewsItemView | ||
*/ | ||
|
||
import React from 'react'; | ||
import PropTypes from 'prop-types'; | ||
import { Grid, Container } from 'semantic-ui-react'; | ||
import { hasBlocksData } from '@plone/volto/helpers'; | ||
import RenderBlocks from '@plone/volto/components/theme/View/RenderBlocks'; | ||
import { useSelector } from 'react-redux'; | ||
import moment from 'moment'; | ||
import Picture from 'volto-conf2023-theme/components/Picture/Picture'; | ||
/** | ||
* NewsItemView view component class. | ||
* @function NewsItemView | ||
* @params {object} content Content object. | ||
* @returns {string} Markup of the component. | ||
*/ | ||
|
||
const NewsItemView = ({ content }) => { | ||
let lang = useSelector((state) => state.intl.locale); | ||
moment.locale(lang); | ||
return ( | ||
<Container className="view-wrapper grid stackable"> | ||
<Grid.Row> | ||
<Grid.Column width={1}></Grid.Column> | ||
<Grid.Column width={10}> | ||
{content.title && ( | ||
<h1 className="documentFirstHeading"> | ||
{content.title} | ||
{content.subtitle && ` - ${content.subtitle}`} | ||
</h1> | ||
)} | ||
{content.effective && ( | ||
<div className="news-date"> | ||
{moment(content?.effective).format('LL')} | ||
</div> | ||
)} | ||
{content.image && ( | ||
<Picture | ||
source="newsitem" | ||
imageBase={`${content['@id']}/@@images/image`} | ||
alt={content.title} | ||
></Picture> | ||
)} | ||
{content.description && ( | ||
<p className="documentDescription">{content.description}</p> | ||
)} | ||
{hasBlocksData(content) && <RenderBlocks content={content} />} | ||
</Grid.Column> | ||
<Grid.Column width={1}></Grid.Column> | ||
</Grid.Row> | ||
</Container> | ||
); | ||
}; | ||
|
||
/** | ||
* Property types. | ||
* @property {Object} propTypes Property types. | ||
* @static | ||
*/ | ||
NewsItemView.propTypes = { | ||
content: PropTypes.shape({ | ||
title: PropTypes.string, | ||
description: PropTypes.string, | ||
text: PropTypes.shape({ | ||
data: PropTypes.string, | ||
}), | ||
}).isRequired, | ||
}; | ||
|
||
export default NewsItemView; |
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
24 changes: 24 additions & 0 deletions
24
frontend/src/addons/volto-conf2023-theme/theme/assets/images/bottom-left.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 21 additions & 0 deletions
21
frontend/src/addons/volto-conf2023-theme/theme/assets/images/bottom-right.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 21 additions & 0 deletions
21
frontend/src/addons/volto-conf2023-theme/theme/assets/images/top-left.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
22 changes: 22 additions & 0 deletions
22
frontend/src/addons/volto-conf2023-theme/theme/assets/images/top-right.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 |
---|---|---|
|
@@ -12,7 +12,7 @@ | |
color: @tertiaryColor; | ||
|
||
&:hover { | ||
color: @secondaryColor; | ||
color: @primaryColor; | ||
} | ||
} | ||
|
||
|
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
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
Oops, something went wrong.