-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FEATURE] add new content element Contacts Card (#253)
* [FEATURE] add new content element Contacts Card * [FEATURE] add styles for Contacts Card, fix template * [FEATURE] change element description
- Loading branch information
1 parent
f364e3b
commit 53e5546
Showing
12 changed files
with
331 additions
and
1 deletion.
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,11 @@ | ||
mod.wizards.newContentElement.wizardItems.contentElements { | ||
elements { | ||
contactsCard { | ||
title = LLL:EXT:theme_t3kit/Resources/Private/Language/ContentElements.xlf:contactsCard.title | ||
description = LLL:EXT:theme_t3kit/Resources/Private/Language/ContentElements.xlf:contactsCard.description | ||
iconIdentifier = content-elements-contactsCard | ||
} | ||
} | ||
show := addToList(contactsCard) | ||
} | ||
|
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,27 @@ | ||
tt_content { | ||
contactsCard =< lib.contentElement | ||
contactsCard { | ||
templateName = ContactsCard | ||
dataProcessing { | ||
10 = T3kit\themeT3kit\DataProcessing\FlexFormProcessor | ||
10 { | ||
fieldName = pi_flexform | ||
as = settings | ||
} | ||
15 = TYPO3\CMS\Frontend\DataProcessing\FilesProcessor | ||
15 { | ||
references.fieldName = image | ||
as = image | ||
} | ||
# "inherit" from lib.fluidContent | ||
800 < lib.contentElement.dataProcessing.800 | ||
830 < lib.contentElement.dataProcessing.830 | ||
} | ||
settings { | ||
defaultImage = EXT:theme_t3kit/Resources/Public/Extensions/News/images/no_image.png | ||
} | ||
stdWrap { | ||
editIcons = tt_content | ||
} | ||
} | ||
} |
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,62 @@ | ||
<T3DataStructure> | ||
<meta> | ||
<langDisable>1</langDisable> | ||
</meta> | ||
<sheets> | ||
<sDEF> | ||
<ROOT> | ||
<TCEforms> | ||
<sheetTitle></sheetTitle> | ||
</TCEforms> | ||
<type>array</type> | ||
<el> | ||
<contactPhone_1> | ||
<TCEforms> | ||
<label>LLL:EXT:theme_t3kit/Resources/Private/Language/ContentElements.xlf:contactsCard.flexform.contactPhone_1</label> | ||
<config> | ||
<type>input</type> | ||
<rows>1</rows> | ||
</config> | ||
</TCEforms> | ||
</contactPhone_1> | ||
<contactPhone_2> | ||
<TCEforms> | ||
<label>LLL:EXT:theme_t3kit/Resources/Private/Language/ContentElements.xlf:contactsCard.flexform.contactPhone_2</label> | ||
<config> | ||
<type>input</type> | ||
<rows>1</rows> | ||
</config> | ||
</TCEforms> | ||
</contactPhone_2> | ||
<mobilePhone> | ||
<TCEforms> | ||
<label>LLL:EXT:theme_t3kit/Resources/Private/Language/ContentElements.xlf:contactsCard.flexform.mobilePhone</label> | ||
<config> | ||
<type>input</type> | ||
<rows>1</rows> | ||
</config> | ||
</TCEforms> | ||
</mobilePhone> | ||
<email> | ||
<TCEforms> | ||
<label>LLL:EXT:theme_t3kit/Resources/Private/Language/ContentElements.xlf:contactsCard.flexform.email</label> | ||
<config> | ||
<type>input</type> | ||
<rows>1</rows> | ||
</config> | ||
</TCEforms> | ||
</email> | ||
<linkedInLink> | ||
<TCEforms> | ||
<label>LLL:EXT:theme_t3kit/Resources/Private/Language/ContentElements.xlf:contactsCard.flexform.linkedInLink</label> | ||
<config> | ||
<type>input</type> | ||
<rows>1</rows> | ||
</config> | ||
</TCEforms> | ||
</linkedInLink> | ||
</el> | ||
</ROOT> | ||
</sDEF> | ||
</sheets> | ||
</T3DataStructure> |
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
67 changes: 67 additions & 0 deletions
67
Resources/Private/Templates/ContentElements/ContactsCard.html
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,67 @@ | ||
<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" data-namespace-typo3-fluid="true"> | ||
|
||
<f:layout name="Default" /> | ||
<f:section name="Header" /> | ||
<f:section name="Main"> | ||
<!-- theme_t3kit: Templates/ContentElements/ContactsCard.html [begin] --> | ||
<div class="contacts-card"> | ||
<div class="contacts-card__photo"> | ||
<f:if condition="{image}"> | ||
<f:then> | ||
<f:for each="{image}" as="image" iteration="imageIteration"> | ||
<f:if condition="{imageIteration.isFirst}"> | ||
<f:image class="img-responsive contacts-card__contacts-photo" image="{image}" maxWidth="{settings.defaultWidth}" cropVariant="default" /> | ||
</f:if> | ||
</f:for> | ||
</f:then> | ||
<f:else> | ||
<f:image src="{settings.defaultImage}" class="img-responsive contacts-card__contacts-photo"/> | ||
</f:else> | ||
</f:if> | ||
</div> | ||
<div class="contacts-card__contacts"> | ||
<f:if condition="{data.header}"> | ||
<h3 class="contacts-card__contact-name">{data.header}</h3> | ||
</f:if> | ||
<f:if condition="{data.subheader}"> | ||
<p class="contacts-card__contact-job">{data.subheader}</p> | ||
</f:if> | ||
<f:if condition="{settings.contactPhone_1}"> | ||
<div class="contacts-card__contact-phone-wrp"> | ||
<span class="icons icon-t3-mobile"></span><f:translate key="phone_label"></f:translate> | ||
<p class="contacts-card__contact-phone">{settings.contactPhone_1}</p> | ||
</div> | ||
</f:if> | ||
<f:if condition="{settings.contactPhone_2}"> | ||
<div class="contacts-card__contact-phone-wrp"> | ||
<span class="icons icon-t3-mobile"></span><f:translate key="phone_label"></f:translate> | ||
<p class="contacts-card__contact-phone">{settings.contactPhone_2}</p> | ||
</div> | ||
</f:if> | ||
<f:if condition="{settings.mobilePhone}"> | ||
<div class="contacts-card__contact-phone-wrp"> | ||
<span class="icons icon-smartphone"></span><f:translate key="phone_label"></f:translate> | ||
<p class="contacts-card__contact-phone">{settings.mobilePhone}</p> | ||
</div> | ||
</f:if> | ||
<f:if condition="{settings.email}"> | ||
<div class="contacts-card__contact-email-wrp"> | ||
<span class="icons icon-t3-mail"></span><f:translate key="email_label"></f:translate> | ||
<f:link.email email="{settings.email}" class="contacts-card__contact-email" title="{settings.email}">{settings.email} | ||
</f:link.email> | ||
</div> | ||
</f:if> | ||
<f:if condition="{settings.linkedInLink}"> | ||
<div class="contacts-card__contact-linkedin-wrp"> | ||
<span class="icons icon-t3-linkedin"></span> | ||
<f:link.external uri="{settings.linkedInLink}" class="contacts-card__contact-linkedin" defaultScheme="https" target="_blank">{settings.linkedInLink} | ||
</f:link.external> | ||
</div> | ||
</f:if> | ||
</div> | ||
</div> | ||
|
||
<!-- theme_t3kit: Templates/ContentElements/ContactsCard.html [end] --> | ||
</f:section> | ||
|
||
</html> |
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
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.