Skip to content
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

Dev test #35

Merged
merged 2 commits into from
Apr 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion components/header/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,10 @@ function Header({
platform={platform}
logoMobile={logoMobile}
>
<div class="fixed w-full z-50 n1-header__desktop">
<div
class="fixed w-full z-50 n1-header__desktop"
style={{ height: headerHeight }}
>
<div
class={"grid grid-cols-2-auto md:n1-container md:px-[120px] items-center portatil:max-w-[90%] portatil:px-0"}
>
Expand Down
15 changes: 11 additions & 4 deletions components/header/Menu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,10 @@ function MenuItem({ item }: PropsMenuItem) {
}
{existsChildren && item && item.children &&
item.children.map((node) => {
console.log("node -------> ", node);
return (
<li>
<li class="mb-[10px]">
<a
class="n1-sublink block px-[5px] py-[5px]"
href={`${node?.url ? node?.url : "javascript:void(0)"}`}
style={{ pointerEvents: `${node?.url ? "all" : "none"}` }}
>
Expand All @@ -77,7 +77,13 @@ function Menu({ items, whatsapp }: Props) {
<ul class="flex-grow flex flex-col divide-y divide-neutral-300 ">
{items.map((item) => {
return (
<li class="pt-[16px]">
<li
class={`pt-[16px] ${
item.name === "Blog" || item.name === "Ferramentas"
? "hidden"
: ""
}`}
>
<a
href={`${item?.url ? item?.url : "javascript:void(0)"}`}
style={{ pointerEvents: `${item?.url ? "all" : "none"}` }}
Expand All @@ -87,7 +93,8 @@ function Menu({ items, whatsapp }: Props) {
</li>
);
})}
<Legend nameItemScape={itemLegend} mobile={true} />
{/* menu legenda */}
{/* <Legend nameItemScape={itemLegend} mobile={true} /> */}
</ul>
<div class="n1-menu-mobile__whatsapp w-[90%] mx-auto">
{whatsapp && (
Expand Down
9 changes: 7 additions & 2 deletions components/header/Navbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import NavItem from "./NavItem.tsx";
import { navbarHeight } from "./constants.ts";
import { Buttons, Logo } from "$store/components/header/Header.tsx";
import Legend from "$store/components/header/Legend.tsx";
import { headerHeight } from "./constants.ts";

interface Props {
items: SiteNavigationElement[];
Expand Down Expand Up @@ -75,7 +76,10 @@ function Navbar({
</div>

{/* Desktop Version */}
<div class="hidden lg:grid gap-x-[70px] portatil:gap-x-[20px] lg:grid-cols-2-auto items-center w-full py-6">
<div
class={`hidden lg:grid gap-x-[70px] portatil:gap-x-[20px] lg:grid-cols-2-auto items-center w-full`}
style={{ height: headerHeight ? headerHeight : "" }}
>
<ul
class={`flex py-[18px] gap-x-[32px] col-span-1 portatil:gap-x-[10px] ${
logoPosition === "left" ? "justify-between" : "justify-start"
Expand All @@ -91,7 +95,8 @@ function Navbar({
);
})}

<Legend nameItemScape={itemLegend} />
{/* menu legenda */}
{/* <Legend nameItemScape={itemLegend} /> */}
</ul>
<div
class={`flex ${
Expand Down
2 changes: 1 addition & 1 deletion components/header/constants.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export const headerHeight = "110px";
export const headerHeight = "86px";

export const navbarHeight = "75px";
27 changes: 24 additions & 3 deletions components/ui/CasesComponentDesktop.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,20 @@ function CasesComponentDesktop({ settingsImage }: Props) {

if (target && target instanceof HTMLElement) {
const cardElement = target?.closest(".n1-cases-card");
const allCardElement = cardElement &&
cardElement.parentElement?.getElementsByClassName("n1-cases-card");

allCardElement && Array.from(allCardElement).forEach((e) => {
e?.classList.remove("is-active");
e?.setAttribute("style", "width: 300px");
});
// console.log('cardElement --> ', cardElement?.parentElement?.getElementsByClassName('n1-cases-card'))

// if(){
// cardElement?.classList.remove('is-active')
// }
// cardElement?.classList.contains('is-active') ?? cardElement?.classList.remove('is-active');

const bgWidth = cardElement?.querySelector<HTMLElement>(".bg-width")
?.dataset.bgwidth;
const bgWidthHover = cardElement?.querySelector<HTMLElement>(
Expand Down Expand Up @@ -196,21 +210,25 @@ function CasesComponentDesktop({ settingsImage }: Props) {
heightImageBackgroundHover,
iconHover,
tagProps,
}) => {
}, index) => {
const nameScape = alt?.replaceAll(/\s/g, "-").toLowerCase();

return (
<>
<a
href={`${href ? href : "javascript:void(0)"}`}
class="relative n1-cases-card cursor-grab [transition:all_.375s_linear] md:w-0 mobile:mb-[10px]"
class={`relative n1-cases-card ${
index === 0 ? "is-active" : ""
} ${
href ? "cursor-pointer" : "cursor-grab"
} [transition:all_.375s_linear] md:w-0 mobile:mb-[10px]`}
onMouseLeave={handleMouserHover}
style={{
height: `${
heightImageBackgroundHover
? heightImageBackgroundHover + "px"
: "500px"
}`,
width: index === 0 ? "500px" : "",
pointerEvents: `${href ? "all" : "grab"}`,
}}
>
Expand Down Expand Up @@ -337,6 +355,9 @@ function CasesComponentDesktop({ settingsImage }: Props) {
{imageLogoHover && (
<img
src={`${imageLogoHover}`}
style={{
width: index === 0 ? widthLogoHover + "px" : "",
}}
class="n1-cases-card__logo--hover duration-200 h-auto"
/>
)}
Expand Down
4 changes: 3 additions & 1 deletion components/ui/CasesComponentMobile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,9 @@ function CasesComponentMobile({ settingsImage }: Props) {
>
<a
href={`${href ? href : "javascript:void(0)"}`}
class="relative n1-cases-card cursor-grab h-[342px] w-full [transition:all_.375s_linear]"
class={`relative n1-cases-card ${
href ? "cursor-pointer" : "cursor-grab"
} h-[342px] w-full [transition:all_.375s_linear]`}
style={{ pointerEvents: `${href ? "all" : "grab"}` }}
>
<div
Expand Down
10 changes: 8 additions & 2 deletions sections/Content/TextWithImage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ export interface Props {
/** @title Mostrar pontos */
/** @description (mostre pontos para navegar pelas imagens) */
dots?: boolean;
/** @title Ocultar Seção toda?*/
noneSection?: boolean;
}

function ImageCarouselItem(
Expand Down Expand Up @@ -197,11 +199,15 @@ function Buttons() {

function TextTopWidthCarousel(props: SectionProps<ReturnType<typeof loader>>) {
const id = useId();
const { images, preload, title, texto, textLink, link, device } = props;
const { images, preload, title, texto, textLink, link, noneSection, device } =
props;

return (
<>
<div id={id} class="relative mobile:pb-[60px]">
<div
id={id}
class={`${noneSection ? "hidden" : ""} relative mobile:pb-[60px]`}
>
<div class=" md:n1-container md:px-[120px] z-10 md:mb-[40px] relative">
<div class="mobile:my-[24px] mt-[120px] mb-[43px] text-[#ffffff] flex items-center justify-between flex-wrap">
<div class="mobile:px-[20px]">
Expand Down
Binary file modified static/favicon-16x16.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified static/favicon-32x32.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified static/favicon.ico
Binary file not shown.
2 changes: 1 addition & 1 deletion tailwind.css
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@
padding-left: 5px !important;
color: #585858;
font-family: "Noto Sans";
font-size: 14px;
font-size: 16px;
font-style: normal;
font-weight: 400;
line-height: 21px;
Expand Down
Loading