Skip to content

Commit

Permalink
global-navbar fixes (#105)
Browse files Browse the repository at this point in the history
  • Loading branch information
bates64 authored Aug 1, 2024
1 parent 6c81378 commit dc14385
Show file tree
Hide file tree
Showing 7 changed files with 76 additions and 33 deletions.
33 changes: 0 additions & 33 deletions packages/global-navbar/src/Nav.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -123,39 +123,6 @@
gap: 1rem;
position: relative; /* for .select */
/* TODO: make this more modular */
& > li {
height: 1.5rem;
&:empty {
flex: 1;
}
& > a,
& > button {
display: flex;
align-items: center;
height: 100%;
color: rgb(168 162 158);
background: none;
border: 0;
font: inherit;
text-decoration: none;
font-weight: 600;
cursor: pointer;
& svg {
height: 100%;
&.global-navbar-social-icon {
height: 1rem;
}
}
}
}
}
#global-navbar-technology,
Expand Down
1 change: 1 addition & 0 deletions packages/global-navbar/src/SelectMenu.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
</script>

<select on:change={change}>
<option selected disabled>Leaning Technologies</option>
{#each Object.entries(menu) as [label, items]}
<optgroup {label}>
{#each items as { title }}
Expand Down
21 changes: 21 additions & 0 deletions packages/global-navbar/src/items/Dropdown.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,24 @@
</svg>
</button>
</Item>

<style>
button {
display: flex;
align-items: center;
height: 100%;
color: rgb(168 162 158);
background: none;
border: 0;
font: inherit;
text-decoration: none;
font-weight: 600;
cursor: pointer;
}
svg {
height: 100%;
}
</style>
1 change: 1 addition & 0 deletions packages/global-navbar/src/items/Item.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@
<style>
li {
height: 1.5rem;
margin: 0; /* required to override style on cheerpj.com */
}
</style>
14 changes: 14 additions & 0 deletions packages/global-navbar/src/items/Logotype.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,20 @@
display: flex;
align-items: center;
gap: 0.75rem;
height: 100%;
color: rgb(168 162 158);
background: none;
border: 0;
font: inherit;
text-decoration: none;
font-weight: 600;
cursor: pointer;
& :global(svg) {
height: 100%;
}
}
.company-name {
Expand Down
7 changes: 7 additions & 0 deletions packages/global-navbar/src/items/SocialIcon.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,10 @@
{/if}
</a>
</li>

<style>
svg {
color: rgb(168 162 158);
height: 1rem;
}
</style>
32 changes: 32 additions & 0 deletions packages/global-navbar/src/popover/BigIcon.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,35 @@
<span>{description}</span>
</a>
</li>

<style>
li {
margin: 0; /* required to override style on cheerpj.com */
}
a {
color: white;
text-decoration: none;
padding: 1rem;
border-radius: 8px;
&:global(:has(svg)) { /* <slot /> */
display: grid;
grid-template-rows: 1fr 1fr;
grid-template-columns: 3rem 1fr;
align-items: center;
gap: 0.5rem;
& :global(svg) {
grid-row: span 2;
width: 80%;
height: 100%;
}
}
}
span {
color: rgb(168 162 158);
}
</style>

0 comments on commit dc14385

Please sign in to comment.