-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: brand footer #1084
Merged
Merged
feat: brand footer #1084
Changes from 2 commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,106 @@ | ||
@import '../../../styles/mixins.scss'; | ||
@import '../../../styles/variables.scss'; | ||
|
||
$block: '.#{$ns}brand-footer'; | ||
|
||
#{$block} { | ||
$borderHeight: 1px; | ||
|
||
@include text-body-2(); | ||
|
||
position: relative; | ||
display: flex; | ||
align-items: center; | ||
justify-content: center; | ||
width: 100%; | ||
height: 72px; | ||
margin-top: var(--header-height); | ||
color: var(--g-color-text-secondary); | ||
border-top: $borderHeight solid var(--g-color-line-generic); | ||
transition: color 0.5s ease-out, border-color 0.5s ease-out; | ||
|
||
&::after { | ||
position: absolute; | ||
top: -$borderHeight; | ||
right: 0; | ||
left: 0; | ||
height: $borderHeight; | ||
background: linear-gradient( | ||
270deg, | ||
rgba(228, 106, 68, 0.6) 0%, | ||
rgba(242, 159, 85, 0.6) 46.62%, | ||
rgba(255, 212, 102, 0.6) 100% | ||
); | ||
opacity: 0; | ||
transition: opacity 0.5s ease-out; | ||
content: ''; | ||
} | ||
|
||
&:hover { | ||
color: var(--g-color-text-primary); | ||
border-color: transparent; | ||
|
||
&::after { | ||
opacity: 1; | ||
} | ||
} | ||
|
||
&__content { | ||
display: flex; | ||
align-items: center; | ||
justify-content: center; | ||
gap: $indentXXXS; | ||
padding-top: 1px; | ||
} | ||
|
||
&__text { | ||
align-self: flex-end; | ||
} | ||
|
||
&__brand-icon { | ||
display: flex; | ||
align-items: center; | ||
justify-content: center; | ||
width: 24px; | ||
height: 24px; | ||
|
||
& > svg { | ||
width: 100%; | ||
height: 100%; | ||
} | ||
} | ||
|
||
&__brand-name { | ||
display: flex; | ||
align-items: center; | ||
justify-content: center; | ||
width: 90px; | ||
height: 20px; | ||
|
||
& > svg { | ||
width: 100%; | ||
height: 100%; | ||
} | ||
} | ||
|
||
@media (max-width: map-get($gridBreakpoints, 'md')) { | ||
@include text-body-1(); | ||
|
||
height: 52px; | ||
|
||
&__content { | ||
padding: 0; | ||
} | ||
|
||
&__brand-icon { | ||
width: 20px; | ||
height: 20px; | ||
} | ||
|
||
&__brand-name { | ||
width: 72px; | ||
height: 16px; | ||
margin-top: 0; | ||
} | ||
} | ||
} |
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,30 @@ | ||
import React from 'react'; | ||
|
||
import {Link} from '@gravity-ui/uikit'; | ||
|
||
import {BrandIcon} from '../../icons/BrandIcon'; | ||
import {BrandName} from '../../icons/BrandName'; | ||
import type {ClassNameProps} from '../../models'; | ||
import {block} from '../../utils'; | ||
|
||
import {i18n} from './i18n'; | ||
|
||
import './BrandFooter.scss'; | ||
|
||
const b = block('brand-footer'); | ||
|
||
const BrandFooter = ({className}: ClassNameProps) => ( | ||
<Link className={b(null, className)} href="https://gravity-ui.com"> | ||
<div className={b('content')}> | ||
<span className={b('text')}>{i18n('created-on')}</span> | ||
<div className={b('brand-icon')}> | ||
<BrandIcon /> | ||
</div> | ||
<div className={b('brand-name')}> | ||
<BrandName /> | ||
</div> | ||
</div> | ||
</Link> | ||
); | ||
|
||
export default BrandFooter; |
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,3 @@ | ||
{ | ||
"created-on": "Created on" | ||
} |
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,8 @@ | ||
import {addComponentKeysets} from '@gravity-ui/uikit/i18n'; | ||
|
||
import {NAMESPACE} from '../../../utils/cn'; | ||
|
||
import en from './en.json'; | ||
import ru from './ru.json'; | ||
|
||
export const i18n = addComponentKeysets({en, ru}, `${NAMESPACE}BrandFooter`); |
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,3 @@ | ||
{ | ||
"created-on": "Создано на" | ||
} |
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 |
---|---|---|
@@ -1,43 +1,44 @@ | ||
export {default as Anchor} from './Anchor/Anchor'; | ||
export {default as AnimateBlock} from './AnimateBlock/AnimateBlock'; | ||
export {default as Author} from './Author/Author'; | ||
export {default as BackgroundImage} from './BackgroundImage/BackgroundImage'; | ||
export {default as BackgroundMedia} from './BackgroundMedia/BackgroundMedia'; | ||
export {default as BackLink} from './BackLink/BackLink'; | ||
export {default as BalancedMasonry} from './BalancedMasonry/BalancedMasonry'; | ||
export {default as BlockBase} from './BlockBase/BlockBase'; | ||
export {default as Button} from './Button/Button'; | ||
export {default as Buttons} from './Buttons/Buttons'; | ||
export {default as BrandFooter} from './BrandFooter/BrandFooter'; | ||
export {default as CardBase} from './CardBase/CardBase'; | ||
export {default as ContentList} from './ContentList/ContentList'; | ||
export {default as Control} from './Control/Control'; | ||
export {default as ErrorWrapper} from './ErrorWrapper/ErrorWrapper'; | ||
export {default as FileLink} from './FileLink/FileLink'; | ||
export {default as Foldable} from './Foldable/Foldable'; | ||
export {default as FullscreenImage} from './FullscreenImage/FullscreenImage'; | ||
export {default as FullscreenMedia} from './FullscreenMedia/FullscreenMedia'; | ||
export {default as FullWidthBackground} from './FullWidthBackground/FullWidthBackground'; | ||
export {default as HeaderBreadcrumbs} from './HeaderBreadcrumbs/HeaderBreadcrumbs'; | ||
export {default as HTML} from './HTML/HTML'; | ||
export {default as IconWrapper} from './IconWrapper/IconWrapper'; | ||
export {default as Image} from './Image/Image'; | ||
export {default as ImageBase} from './ImageBase/ImageBase'; | ||
export {default as InnerForm} from './InnerForm/InnerForm'; | ||
export {default as Link} from './Link/Link'; | ||
export {default as Links} from './Links/Links'; | ||
export {default as Media} from './Media/Media'; | ||
export {default as MetaInfo} from './MetaInfo/MetaInfo'; | ||
export {default as OutsideClick} from './OutsideClick/OutsideClick'; | ||
export {default as OverflowScroller} from './OverflowScroller/OverflowScroller'; | ||
export {default as ReactPlayer} from './ReactPlayer/ReactPlayer'; | ||
export {default as RouterLink} from './RouterLink/RouterLink'; | ||
export {default as Table} from './Table/Table'; | ||
export {default as Title} from './Title/Title'; | ||
export {default as ToggleArrow} from './ToggleArrow/ToggleArrow'; | ||
export {default as UnpublishedLabel} from './UnpublishedLabel/UnpublishedLabel'; | ||
export {default as VideoBlock} from './VideoBlock/VideoBlock'; | ||
export {default as YFMWrapper} from './YFMWrapper/YFMWrapper'; | ||
export {default as YandexForm} from './YandexForm/YandexForm'; | ||
export {default as Control} from './Control/Control'; | ||
export {default as OverflowScroller} from './OverflowScroller/OverflowScroller'; | ||
export {default as Author} from './Author/Author'; | ||
export {default as RouterLink} from './RouterLink/RouterLink'; | ||
export {default as HTML} from './HTML/HTML'; | ||
export {default as MetaInfo} from './MetaInfo/MetaInfo'; | ||
export {default as FullscreenMedia} from './FullscreenMedia/FullscreenMedia'; | ||
export {default as ContentList} from './ContentList/ContentList'; | ||
export {default as InnerForm} from './InnerForm/InnerForm'; | ||
export {default as IconWrapper} from './IconWrapper/IconWrapper'; | ||
|
||
export type {RouterLinkProps} from './RouterLink/RouterLink'; | ||
export type {ImageBaseProps} from './ImageBase/ImageBase'; |
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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
isBranded
and add info in readme https://github.com/gravity-ui/page-constructor/blob/main/README.md#L42