diff --git a/sanityv3/schemas/textSnippets.ts b/sanityv3/schemas/textSnippets.ts index 2a2156e4a..fe685a99b 100644 --- a/sanityv3/schemas/textSnippets.ts +++ b/sanityv3/schemas/textSnippets.ts @@ -847,6 +847,11 @@ const snippets: textSnippet = { defaultValue: 'Local', group: groups.common, }, + global: { + title: 'Global', + defaultValue: 'Global', + group: groups.common, + }, } type textSnippetGroup = { title: string; hidden?: boolean } diff --git a/web/core/Link/StickyMenuLink.tsx b/web/core/Link/StickyMenuLink.tsx index 4124eafb8..b69d6198a 100644 --- a/web/core/Link/StickyMenuLink.tsx +++ b/web/core/Link/StickyMenuLink.tsx @@ -1,12 +1,7 @@ import { forwardRef } from 'react' import { twMerge } from 'tailwind-merge' import { BaseLink, BaseLinkProps } from './BaseLink' -import { TransformableIcon } from '../../icons/TransformableIcon' -import { arrow_down, library_pdf } from '@equinor/eds-icons' import { PiFilePdfThin } from 'react-icons/pi' -import { ArrowRight } from 'icons' -import envisTwMerge from 'twMerge' -import { getArrowAnimation, iconRotation } from './ResourceLink' export type StickMenuLinkProps = { isDownloadable?: boolean @@ -17,17 +12,9 @@ export const StickyMenuLink = forwardRef( { children, type = 'internalUrl', className = '', href = '', isDownloadable = false, ...rest }, ref, ) { - const iconClassNames = `size-arrow-right - text-energy-red-100 - dark:text-white-100 - rotate-90 - group-hover:translate-y-0.5 - transition-all - duration-300 - ` - return ( ( > {isDownloadable && }
{children}
- {/* {isDownloadable && ( -
- -
-
- )} */} - {/* {!isDownloadable && ( - - )} */} ) }) diff --git a/web/core/Topbar/Topbar.tsx b/web/core/Topbar/Topbar.tsx index 43cf47301..90eb536b1 100644 --- a/web/core/Topbar/Topbar.tsx +++ b/web/core/Topbar/Topbar.tsx @@ -2,6 +2,7 @@ import { forwardRef, HTMLAttributes, useEffect, useMemo, useRef, useState } from import { mergeRefs } from '@equinor/eds-utils' import { StickyMenuData } from '../../types/index' import StickyMenu from '@sections/StickyMenu/StickyMenu' +import { useIntl } from 'react-intl' export type TopbarProps = { stickyMenuData?: StickyMenuData @@ -13,7 +14,7 @@ export const Topbar = forwardRef(function Topbar( ) { const topbarRef = useRef(null) const combinedTopbarRef = useMemo(() => mergeRefs(topbarRef, ref), [topbarRef, ref]) - + const intl = useIntl() const [height, setHeight] = useState(0) const [prevScrollPos, setPrevScrollPos] = useState(0) const [isVisible, setIsVisible] = useState(true) @@ -80,29 +81,35 @@ export const Topbar = forwardRef(function Topbar( } }, [isVisible, topbarRef]) - const animateScrollUpClassName = ` - [will-change:transform] - [transition-behavior:allow-discrete] - animate-height - ${isVisible ? 'top-0' : '-top-[var(--topbar-height)]'} - [transition-property:height] - [transition-property:padding] - ease-in-out - duration-400 - ` - return ( <> -
{children}
-
+ {stickyMenuData && ( - + )} ) diff --git a/web/sections/StickyMenu/StickyMenu.tsx b/web/sections/StickyMenu/StickyMenu.tsx index 8088ba97b..7f701b40f 100644 --- a/web/sections/StickyMenu/StickyMenu.tsx +++ b/web/sections/StickyMenu/StickyMenu.tsx @@ -22,13 +22,27 @@ export const StickyMenu = forwardRef(function Stic return (