Skip to content
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
2 changes: 1 addition & 1 deletion public/assets/logo.min.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 13 additions & 5 deletions src/lib/components/LinksMenu.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
.linksMenuWrap {
display: flex;
align-items: center;
gap: 32px;
gap: 48px;
flex: 1 0 auto;

:global(.navLink) {
Expand All @@ -24,9 +24,10 @@
& { // same as secondary styles
color: #AAAAAA;
font-family: $nunito;
font-weight: 500;
font-weight: 700;
font-size: 14px;
line-height: 22px;
white-space: nowrap;

&:hover, &:global(.hover) {
color: #FFFFFF;
Expand All @@ -44,16 +45,16 @@
&.primary {
color: #2A2A2A;
font-family: $nunito;
font-weight: 500;
font-weight: 700;
font-size: 16px;
line-height: 24px;

&:hover, &:global(.hover) {
color: rgba(#2A2A2A, 0.6);
color: #0d61bf;
}

&:global(.active) {
color: #16679A;
color: #0d61bf;
}
}

Expand Down Expand Up @@ -95,6 +96,13 @@
font-weight: 500;
}
}

&.vertical {
flex-direction: column;
gap: 12px;
align-items: flex-start;
padding: 0 16px;
}
}

.menuItemWrap {
Expand Down
3 changes: 2 additions & 1 deletion src/lib/components/LinksMenu.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
export let menuItems: NavMenuItem[];
export let activeRoute: NavMenuItem = undefined;
export let activeRoutePath: NavMenuItem[] = [];
export let vertical: boolean = false;
let hoveredMenuItem: NavMenuItem = undefined;
let hoveredElement: HTMLElement = undefined;
let isPopupMenuActive: boolean = false;
Expand Down Expand Up @@ -41,7 +42,7 @@
}
</script>

<div class={styles.linksMenuWrap} bind:this={ref}>
<div class={classnames(styles.linksMenuWrap, vertical && styles.vertical)} bind:this={ref}>
{#each menuItems as menuItem}
{#if !!menuItem.label}
<div class={styles.menuItemWrap}>
Expand Down
8 changes: 8 additions & 0 deletions src/lib/components/MobileMenu.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,11 @@

position: relative;
}

.closeIcon {
display: flex;
align-items: center;
img {
height: 15px;
}
}
2 changes: 1 addition & 1 deletion src/lib/components/MobileMenu.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
</script>

<div class={styles.mobileMenuWrap} transition:fade={{duration: 200}}>
<TopNavbar style="primary">
<TopNavbar style="primary" showLogo={false}>
<div class={styles.closeIcon} slot="right" on:click={handleClose} on:keydown={() => {}}>
<img src={closeMenuIcon} alt="close" />
</div>
Expand Down
6 changes: 3 additions & 3 deletions src/lib/components/TcLogo.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@
.min {
margin-right: 48px;
img {
height: 22px;
height: 26px;
}
}

@include mobile {
margin-right: 20px;
margin-right: 24px;
img {
height: 17px;
height: 26px;
}
}
}
5 changes: 2 additions & 3 deletions src/lib/components/TopNavbar.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,14 @@

let className = '';
export {className as class};
export let showLogo = false;
export let showLogo = true;
export let style: 'primary'|'secondary'|'tertiary';
export let minVersionLogo: boolean = false;

</script>

<nav class={classnames(styles.topNavbarWrap, className, styles[style], 'uni-topNavbar')}>
<div class={styles.topNavbarInner}>
{#if showLogo || style === 'primary'}
{#if showLogo && style === 'primary'}
<TcLogo minVersion={minVersionLogo} />
{/if}
<slot />
Expand Down
4 changes: 2 additions & 2 deletions src/lib/config/hosts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ export const TC_DOMAIN: string = {
}[HOST_ENV] || 'topcoder.com'


export const WP_HOST_URL: string = `http://localhost:5173`;
// export const WP_HOST_URL: string = `https://www.${TC_DOMAIN}`;
// export const WP_HOST_URL: string = `http://localhost:5173`;
export const WP_HOST_URL: string = `https://www.${TC_DOMAIN}`;
export const CHALLENGE_HOST: string = `https://www.${TC_DOMAIN}`;
export const COMMUNITY_HOST: string = `https://www.${TC_DOMAIN}`;

Expand Down
2 changes: 1 addition & 1 deletion src/lib/config/nav-menu/all-nav-items.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export const allNavItems: {[key: string]: NavMenuItem} = {
url: getWordpressUrl('/customer/product'),
},
talent: {
label: 'Talent',
label: 'The Talent',
url: getWordpressUrl('/about-talent'),
},
support: {
Expand Down
44 changes: 28 additions & 16 deletions src/lib/footer-navigation/FooterNavigation.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@
margin-left: auto;
margin-right: auto;
}
@include tablet {
padding: 48px 15px;
}
}

.footerInner {
Expand All @@ -23,7 +26,6 @@
}
@include tablet {
flex-direction: column;
gap: 32px;
}
}

Expand All @@ -38,7 +40,7 @@
h5 {
font-weight: 700;
font-size: 16px;
line-height: 20px;
line-height: 22px;
margin-top: 0;
margin-bottom: 16px;
}
Expand All @@ -51,21 +53,20 @@

.footerNavigation {
position: relative;
max-height: 332px;
box-sizing: border-box;

@include maxViewWidth;
margin: 0 auto;

@include tabletOnly {
max-height: none;
padding: 16px;
width: 100%;
}

@include mobile {
padding: 0;
max-height: none;
width: 100%;
}
}

Expand All @@ -78,6 +79,13 @@
> a {
display: inline-block;
}

@include tablet {
padding-bottom: 17px;
> a {
height: 48px;
}
}
}

.menuSections {
Expand All @@ -95,7 +103,10 @@
}

@include mobile {
flex-direction: column;
flex-wrap: wrap;
.menuSection {
flex: 1 1 45%;
}
}
}

Expand Down Expand Up @@ -132,14 +143,6 @@
@include mobile {
padding: 0;
padding-bottom: 16px;
&:not(:last-child) {
border-bottom: 1px solid #767676;
}

ul {
display: flex;
flex-wrap: wrap;
}

&Entry {
flex: 1 1 50%;
Expand Down Expand Up @@ -204,6 +207,11 @@
padding-top: 48px;
border-top: 1px solid #F7F9FF;
margin-top: 48px;

@include mobile {
margin-top: 18px;
padding-top: 34px;
}
}

.footerSocial {
Expand All @@ -214,13 +222,12 @@
position: relative;
bottom: auto;
right: auto;
margin-top: 48px;
justify-content: center;
margin-top: 16px;
}
}

.cta.cta {
display: flex;
display: inline-flex;
border-radius: 4px;
align-items: center;
justify-content: center;
Expand All @@ -234,4 +241,9 @@
font-weight: 700;
margin-top: 16px;
margin-bottom: 16px;
white-space: nowrap;

@include mobile {
width: 100%;
}
}
8 changes: 0 additions & 8 deletions src/lib/marketing-navigation/MarketingNavigation.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@
import { checkAndLoadFonts } from 'lib/utils/fonts';
import NavigationBar from './components/NavigationBar.svelte';
import Banner from 'lib/components/Banner.svelte';
import Button from 'lib/components/Button.svelte';
import { AUTH0_AUTHENTICATOR_URL } from 'lib/config';
import { allNavItems } from 'lib/config/nav-menu/all-nav-items.config';

const ctx = getAppContext()
$: ({auth} = $ctx)
Expand All @@ -31,11 +28,6 @@
let secondaryRoute: NavMenuItem;
let tertiaryRoute: NavMenuItem;
$: [primaryRoute, secondaryRoute, tertiaryRoute] = activeRoute

const handleLogin = () => {
window.location.href = `${AUTH0_AUTHENTICATOR_URL}?retUrl=${allNavItems.home.url}`
}

onMount(checkAndLoadFonts)
</script>

Expand Down
41 changes: 22 additions & 19 deletions src/lib/marketing-navigation/components/NavigationBar.svelte
Original file line number Diff line number Diff line change
@@ -1,23 +1,24 @@
<script type="ts">
import type { NavMenuItem } from 'lib/functions/nav-menu-item.model';
import LinksMenu from '../../components/LinksMenu.svelte';
import TopNavbar from 'lib/components/TopNavbar.svelte';
import MobileNavigation from 'lib/mobile-navigation/MobileNavigation.svelte';
import { marketingRightItems } from 'lib/functions/marketing-navigation.provider'
import type { NavMenuItem } from 'lib/functions/nav-menu-item.model';
import LinksMenu from '../../components/LinksMenu.svelte';
import TopNavbar from 'lib/components/TopNavbar.svelte';
import MobileNavigation from 'lib/mobile-navigation/MobileNavigation.svelte';
import { marketingRightItems } from 'lib/functions/marketing-navigation.provider'
import { allNavItems } from 'lib/config/nav-menu/all-nav-items.config';

export let style: 'primary'|'secondary'|'tertiary';
export let menuItems: NavMenuItem[] = [];
export let activeRoutePath: NavMenuItem[] = [];
export let activeRoute: NavMenuItem;
export let isMobile: boolean = false;
export let minVersionLogo: boolean = false;
export let style: 'primary'|'secondary'|'tertiary';
export let menuItems: NavMenuItem[] = [];
export let activeRoutePath: NavMenuItem[] = [];
export let activeRoute: NavMenuItem;
export let isMobile: boolean = false;
</script>

<TopNavbar style={style} minVersionLogo={minVersionLogo}>
<TopNavbar style={style} minVersionLogo={isMobile}>
{#if isMobile}
<MobileNavigation
menuItems={menuItems}
activeRoutes={activeRoutePath}
menuItems={[...menuItems,...marketingRightItems]}
activeRoute={activeRoute}
activeRoutePath={activeRoutePath}
/>
{:else}
<LinksMenu
Expand All @@ -29,14 +30,16 @@
{/if}

<svelte:fragment slot="right">
{#if isMobile}
<MobileNavigation
menuItems={menuItems}
activeRoutes={activeRoutePath}
{#if !isMobile}
<LinksMenu
menuItems={marketingRightItems}
style={style}
activeRoute={activeRoute}
activeRoutePath={activeRoutePath}
/>
{:else}
<LinksMenu
menuItems={marketingRightItems}
menuItems={[allNavItems.login]}
style={style}
activeRoute={activeRoute}
activeRoutePath={activeRoutePath}
Expand Down
Loading