-
-
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.
Merge pull request #39 from plone/revert-38-addVLT
Revert "Add vlt"
- Loading branch information
Showing
22 changed files
with
3,305 additions
and
28 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
12 changes: 12 additions & 0 deletions
12
frontend/src/addons/volto-plonede/src/components/theme/Style.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,12 @@ | ||
// import React from 'react'; | ||
// import ThemeSwitcher from './ThemeSwitcher'; | ||
|
||
// const Style = () => { | ||
// return ( | ||
// <> | ||
// <ThemeSwitcher /> | ||
// </> | ||
// ); | ||
// }; | ||
|
||
// export default Style; |
23 changes: 23 additions & 0 deletions
23
frontend/src/addons/volto-plonede/src/components/theme/ThemeSwitcher.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,23 @@ | ||
// import { useState } from 'react'; | ||
// import { BodyClass } from '@plone/volto/helpers'; | ||
// import { Icon } from '@plone/volto/components'; | ||
// import Logo from '../../icons/logo.svg'; | ||
|
||
// const themeSwitcher = () => { | ||
// const [darkMode, setDarkMode] = useState(false); | ||
// return ( | ||
// <> | ||
// <BodyClass className={darkMode ? 'dark' : 'light'} /> | ||
// <div> | ||
// <button | ||
// onClick={() => setDarkMode(!darkMode)} | ||
// className="themeSwitcher" | ||
// > | ||
// <Icon className="themeSwitcherIcon" name={Logo} size="20" /> | ||
// </button> | ||
// </div> | ||
// </> | ||
// ); | ||
// }; | ||
|
||
// export default themeSwitcher; |
144 changes: 144 additions & 0 deletions
144
...ons/volto-plonede/src/customizations/volto/components/theme/EventDetails/EventDetails.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,144 @@ | ||
import React from 'react'; | ||
import { defineMessages, useIntl } from 'react-intl'; | ||
import { Segment, Header, List } from 'semantic-ui-react'; | ||
import { | ||
When, | ||
Recurrence, | ||
} from '@plone/volto/components/theme/View/EventDatesInfo'; | ||
|
||
const messages = defineMessages({ | ||
what: { | ||
id: 'event_what', | ||
defaultMessage: 'What', | ||
}, | ||
when: { | ||
id: 'event_when', | ||
defaultMessage: 'When', | ||
}, | ||
allDates: { | ||
id: 'event_alldates', | ||
defaultMessage: 'All dates', | ||
}, | ||
downloadEvent: { | ||
id: 'Download Event', | ||
defaultMessage: 'Download Event', | ||
}, | ||
where: { | ||
id: 'event_where', | ||
defaultMessage: 'Where', | ||
}, | ||
contactName: { | ||
id: 'event_contactname', | ||
defaultMessage: 'Contact Name', | ||
}, | ||
contactPhone: { | ||
id: 'event_contactphone', | ||
defaultMessage: 'Contact Phone', | ||
}, | ||
attendees: { | ||
id: 'event_attendees', | ||
defaultMessage: 'Attendees', | ||
}, | ||
website: { | ||
id: 'event_website', | ||
defaultMessage: 'Website', | ||
}, | ||
visitWebsite: { | ||
id: 'visit_external_website', | ||
defaultMessage: 'Visit external website', | ||
}, | ||
}); | ||
|
||
const EventDetails = ({ content, display_as = 'aside' }) => { | ||
const intl = useIntl(); | ||
return ( | ||
<Segment | ||
as={display_as} | ||
{...(display_as === 'aside' ? { floated: 'right' } : {})} | ||
> | ||
{content.subjects?.length > 0 && ( | ||
<> | ||
<Header dividing sub> | ||
{intl.formatMessage(messages.what)} | ||
</Header> | ||
<List items={content.subjects} /> | ||
</> | ||
)} | ||
<Header dividing sub> | ||
{intl.formatMessage(messages.when)} | ||
</Header> | ||
<When | ||
start={content.start} | ||
end={content.end} | ||
whole_day={content.whole_day} | ||
open_end={content.open_end} | ||
/> | ||
{content.recurrence && ( | ||
<> | ||
<Header dividing sub> | ||
{intl.formatMessage(messages.allDates)} | ||
</Header> | ||
<Recurrence recurrence={content.recurrence} start={content.start} /> | ||
</> | ||
)} | ||
{content.location && ( | ||
<> | ||
<Header dividing sub> | ||
{intl.formatMessage(messages.where)} | ||
</Header> | ||
<p>{content.location}</p> | ||
</> | ||
)} | ||
{content.contact_name && ( | ||
<> | ||
<Header dividing sub> | ||
{intl.formatMessage(messages.contactName)} | ||
</Header> | ||
<p> | ||
{content.contact_email ? ( | ||
<a href={`mailto:${content.contact_email}`}> | ||
{content.contact_name} | ||
</a> | ||
) : ( | ||
content.contact_name | ||
)} | ||
</p> | ||
</> | ||
)} | ||
{content.contact_phone && ( | ||
<> | ||
<Header dividing sub> | ||
{intl.formatMessage(messages.contactPhone)} | ||
</Header> | ||
<p>{content.contact_phone}</p> | ||
</> | ||
)} | ||
{content.attendees?.length > 0 && ( | ||
<> | ||
<Header dividing sub> | ||
{intl.formatMessage(messages.attendees)} | ||
</Header> | ||
<List items={content.attendees} /> | ||
</> | ||
)} | ||
{content.event_url && ( | ||
<> | ||
<Header dividing sub> | ||
{intl.formatMessage(messages.website)} | ||
</Header> | ||
<p> | ||
<a | ||
href={content.event_url} | ||
target="_blank" | ||
rel="noopener noreferrer" | ||
> | ||
{intl.formatMessage(messages.visitWebsite)} | ||
</a> | ||
</p> | ||
</> | ||
)} | ||
</Segment> | ||
); | ||
}; | ||
|
||
export default EventDetails; |
159 changes: 159 additions & 0 deletions
159
...tend/src/addons/volto-plonede/src/customizations/volto/components/theme/Footer/Footer.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,159 @@ | ||
/** | ||
* Footer component. | ||
* @module components/theme/Footer/Footer | ||
*/ | ||
|
||
import React from 'react'; | ||
import { Container, List, Segment } from 'semantic-ui-react'; | ||
|
||
import { FormattedMessage, defineMessages, injectIntl } from 'react-intl'; | ||
import { useSelector } from 'react-redux'; | ||
import { UniversalLink, Logo } from '@plone/volto/components'; | ||
import config from '@plone/volto/registry'; | ||
|
||
const messages = defineMessages({ | ||
copyright: { | ||
id: 'Copyright', | ||
defaultMessage: 'Copyright', | ||
}, | ||
}); | ||
|
||
/** | ||
* Component to display the footer. | ||
* @function Footer | ||
* @param {Object} intl Intl object | ||
* @returns {string} Markup of the component | ||
*/ | ||
const Footer = ({ intl }) => { | ||
const { settings } = config; | ||
const lang = useSelector((state) => state.intl.locale); | ||
return ( | ||
<Segment | ||
role="contentinfo" | ||
vertical | ||
padded | ||
inverted | ||
textAlign="center" | ||
id="footer" | ||
> | ||
<Container> | ||
<Segment basic inverted className="discreet"> | ||
<FormattedMessage | ||
id="The {plonecms} is {copyright} 2000-{current_year} by the {plonefoundation} and friends." | ||
defaultMessage="The {plonecms} is {copyright} 2000-{current_year} by the {plonefoundation} and friends." | ||
values={{ | ||
plonecms: ( | ||
<FormattedMessage | ||
id="Plone{reg} Open Source CMS/WCM" | ||
defaultMessage="Plone{reg} Open Source CMS/WCM" | ||
values={{ reg: <sup>®</sup> }} | ||
/> | ||
), | ||
copyright: ( | ||
<abbr title={intl.formatMessage(messages.copyright)}>©</abbr> | ||
), | ||
current_year: new Date().getFullYear(), | ||
plonefoundation: ( | ||
<a className="item" href="http://plone.org/foundation"> | ||
<FormattedMessage | ||
id="Plone Foundation" | ||
defaultMessage="Plone Foundation" | ||
/> | ||
</a> | ||
), | ||
}} | ||
/>{' '} | ||
<FormattedMessage | ||
id="Distributed under the {license}." | ||
defaultMessage="Distributed under the {license}." | ||
values={{ | ||
license: ( | ||
<a | ||
className="item" | ||
href="http://creativecommons.org/licenses/GPL/2.0/" | ||
> | ||
<FormattedMessage | ||
id="GNU GPL license" | ||
defaultMessage="GNU GPL license" | ||
/> | ||
</a> | ||
), | ||
}} | ||
/> | ||
</Segment> | ||
<List horizontal inverted> | ||
{/* wrap in div for a11y reasons: listitem role cannot be on the <a> element directly */} | ||
<div role="listitem" className="item"> | ||
<UniversalLink | ||
className="item" | ||
href={settings.isMultilingual ? `/${lang}/sitemap` : '/sitemap'} | ||
> | ||
<FormattedMessage id="Site Map" defaultMessage="Site Map" /> | ||
</UniversalLink> | ||
</div> | ||
<div role="listitem" className="item"> | ||
<UniversalLink | ||
className="item" | ||
href={ | ||
settings.isMultilingual | ||
? `/${lang}/accesibility-info` | ||
: '/accesibility-info' | ||
} | ||
> | ||
<FormattedMessage | ||
id="Accessibility" | ||
defaultMessage="Accessibility" | ||
/> | ||
</UniversalLink> | ||
</div> | ||
<div role="listitem" className="item"> | ||
<UniversalLink | ||
className="item" | ||
href={ | ||
settings.isMultilingual | ||
? `/${lang}/contact-form` | ||
: '/contact-form' | ||
} | ||
> | ||
<FormattedMessage id="Contact" defaultMessage="Contact" /> | ||
</UniversalLink> | ||
</div> | ||
<div role="listitem" className="item"> | ||
<UniversalLink | ||
className="item" | ||
href={settings.isMultilingual ? `/${lang}/imprint` : '/imprint'} | ||
> | ||
<FormattedMessage id="Imprint" defaultMessage="Imprint" /> | ||
</UniversalLink> | ||
</div> | ||
<br /> | ||
<br /> | ||
<br /> | ||
<Logo /> | ||
<br /> | ||
<div role="listitem" className="item"> | ||
<a className="item" href="https://plone.org"> | ||
<FormattedMessage | ||
id="Powered by Plone & Python" | ||
defaultMessage="Powered by Plone & Python" | ||
/> | ||
</a> | ||
</div> | ||
</List> | ||
</Container> | ||
</Segment> | ||
); | ||
}; | ||
|
||
/** | ||
* Property types. | ||
* @property {Object} propTypes Property types. | ||
* @static | ||
*/ | ||
Footer.propTypes = { | ||
/** | ||
* i18n object | ||
*/ | ||
}; | ||
|
||
export default injectIntl(Footer); |
Oops, something went wrong.