Skip to content

Commit

Permalink
style: fix formatting
Browse files Browse the repository at this point in the history
Signed-off-by: Kai Henseler <[email protected]>
  • Loading branch information
bromiesTM committed Aug 7, 2024
1 parent 76e8ee8 commit 3706ee3
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 31 deletions.
23 changes: 14 additions & 9 deletions IONOS/src/components/Icon.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
height={size * 26}
viewBox="0 0 24 26"
xmlns="http://www.w3.org/2000/svg">
<path d="M16.0832 6.47139C16.0832 5.04743 15.2695 3.72518 14.049 2.96235C12.7776 2.25037 11.201 2.25037 9.9805 2.96235C8.70911 3.72518 7.94627 5.04743 7.94627 6.47139C7.94627 7.94621 8.70911 9.26846 9.9805 10.0313C11.201 10.7433 12.7776 10.7433 14.049 10.0313C15.2695 9.26846 16.0832 7.94621 16.0832 6.47139ZM5.5052 6.47139C5.5052 4.18289 6.72574 2.04694 8.75997 0.877262C10.7433 -0.292421 13.2353 -0.292421 15.2695 0.877262C17.2529 2.04694 18.5243 4.18289 18.5243 6.47139C18.5243 8.81076 17.2529 10.9467 15.2695 12.1164C13.2353 13.2861 10.7433 13.2861 8.75997 12.1164C6.72574 10.9467 5.5052 8.81076 5.5052 6.47139ZM3.11498 23.5589H20.8636C20.4059 20.355 17.6597 17.8631 14.3032 17.8631H9.67537C6.31889 17.8631 3.57268 20.355 3.11498 23.5589ZM0.623047 24.5252C0.623047 19.4905 4.64065 15.422 9.67537 15.422H14.3032C19.338 15.422 23.4064 19.4905 23.4064 24.5252C23.4064 25.3389 22.6944 26 21.8807 26H2.09786C1.28417 26 0.623047 25.3389 0.623047 24.5252Z"/>
<path
d="M16.0832 6.47139C16.0832 5.04743 15.2695 3.72518 14.049 2.96235C12.7776 2.25037 11.201 2.25037 9.9805 2.96235C8.70911 3.72518 7.94627 5.04743 7.94627 6.47139C7.94627 7.94621 8.70911 9.26846 9.9805 10.0313C11.201 10.7433 12.7776 10.7433 14.049 10.0313C15.2695 9.26846 16.0832 7.94621 16.0832 6.47139ZM5.5052 6.47139C5.5052 4.18289 6.72574 2.04694 8.75997 0.877262C10.7433 -0.292421 13.2353 -0.292421 15.2695 0.877262C17.2529 2.04694 18.5243 4.18289 18.5243 6.47139C18.5243 8.81076 17.2529 10.9467 15.2695 12.1164C13.2353 13.2861 10.7433 13.2861 8.75997 12.1164C6.72574 10.9467 5.5052 8.81076 5.5052 6.47139ZM3.11498 23.5589H20.8636C20.4059 20.355 17.6597 17.8631 14.3032 17.8631H9.67537C6.31889 17.8631 3.57268 20.355 3.11498 23.5589ZM0.623047 24.5252C0.623047 19.4905 4.64065 15.422 9.67537 15.422H14.3032C19.338 15.422 23.4064 19.4905 23.4064 24.5252C23.4064 25.3389 22.6944 26 21.8807 26H2.09786C1.28417 26 0.623047 25.3389 0.623047 24.5252Z" />
</svg>
{:else if settings}
<svg
Expand All @@ -105,14 +106,12 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
viewBox="0 0 16 16"
xmlns="http://www.w3.org/2000/svg">
<g clip-path="url(#clip0_4558_20877)">
<path d="M9.53125 0.6875L9.625 1.40625C9.65625 1.59375 9.78125 1.75 9.96875 1.8125C10.2812 1.9375 10.5938 2.0625 10.875 2.1875C11.0625 2.28125 11.2812 2.28125 11.4375 2.15625L12.0312 1.71875C12.2812 1.5 12.625 1.5 12.875 1.6875C12.9688 1.75 13.0625 1.8125 13.1562 1.90625L14.0938 2.875C14.1562 2.9375 14.2188 3 14.2812 3.0625C14.4688 3.3125 14.4688 3.6875 14.25 3.9375L13.8125 4.5C13.6875 4.65625 13.6875 4.875 13.7812 5.0625C13.9375 5.34375 14.0625 5.65625 14.1562 6C14.2188 6.1875 14.375 6.3125 14.5938 6.34375L15.3125 6.4375C15.625 6.46875 15.875 6.71875 15.9375 7.03125C15.9375 7.09375 15.9375 7.15625 15.9375 7.21875V8.84375C15.9375 8.875 15.9375 8.9375 15.9375 9C15.875 9.3125 15.625 9.5625 15.3125 9.59375L14.5938 9.6875C14.375 9.71875 14.2188 9.84375 14.1562 10.0625C14.0625 10.375 13.9375 10.6875 13.7812 10.9688C13.6875 11.1562 13.6875 11.375 13.8125 11.5312L14.25 12.0938C14.4688 12.3438 14.4688 12.7188 14.2812 12.9688C14.2188 13.0312 14.1562 13.0938 14.0938 13.1562L13.1562 14.125C13.0625 14.1875 12.9688 14.2812 12.875 14.3438C12.625 14.5312 12.2812 14.5312 12.0312 14.3125L11.4375 13.875C11.2812 13.75 11.0625 13.75 10.9062 13.8438C10.5938 13.9688 10.3125 14.0938 10 14.1875C9.78125 14.25 9.65625 14.4375 9.625 14.625L9.53125 15.3438C9.5 15.6562 9.25 15.9375 8.9375 15.9688C8.625 16 8.3125 16 8 16C7.65625 16 7.3125 16 6.96875 15.9375C6.65625 15.9062 6.40625 15.6562 6.375 15.3125L6.28125 14.5938C6.25 14.4062 6.09375 14.25 5.90625 14.1875C5.625 14.0625 5.3125 13.9375 5.03125 13.8125C4.875 13.7188 4.625 13.7188 4.46875 13.8438L3.90625 14.2812C3.65625 14.5 3.3125 14.5 3.03125 14.3125C2.53125 13.9062 2.0625 13.4375 1.65625 12.9062C1.46875 12.6562 1.46875 12.2812 1.6875 12.0312L2.125 11.4688C2.25 11.3125 2.25 11.0938 2.15625 10.9062C2.03125 10.625 1.90625 10.3438 1.8125 10.0625C1.75 9.875 1.59375 9.71875 1.375 9.6875L0.65625 9.59375C0.34375 9.5625 0.09375 9.3125 0.03125 9C0 8.6875 0 8.34375 0 8C0 7.6875 0 7.34375 0.03125 7.03125C0.09375 6.71875 0.34375 6.46875 0.65625 6.4375L1.375 6.34375C1.5625 6.3125 1.75 6.15625 1.8125 5.96875C1.90625 5.6875 2.03125 5.40625 2.15625 5.125C2.25 4.9375 2.25 4.71875 2.125 4.5625L1.65625 4C1.46875 3.71875 1.46875 3.375 1.65625 3.125C2.0625 2.59375 2.53125 2.125 3.03125 1.71875C3.28125 1.53125 3.65625 1.53125 3.90625 1.75L4.46875 2.1875C4.625 2.3125 4.84375 2.3125 5.03125 2.21875C5.3125 2.09375 5.59375 1.96875 5.90625 1.84375C6.09375 1.78125 6.25 1.625 6.28125 1.4375L6.34375 0.71875C6.40625 0.375 6.625 0.125 6.96875 0.09375C7.28125 0.03125 7.625 0 8 0C8.3125 0 8.625 0.03125 8.90625 0.0625C9.25 0.09375 9.5 0.375 9.53125 0.6875ZM8 5.5C7.09375 5.5 6.28125 6 5.8125 6.75C5.375 7.53125 5.375 8.5 5.8125 9.25C6.28125 10.0312 7.09375 10.5 8 10.5C8.875 10.5 9.6875 10.0312 10.1562 9.25C10.5938 8.5 10.5938 7.53125 10.1562 6.75C9.6875 6 8.875 5.5 8 5.5Z"/>
<path
d="M9.53125 0.6875L9.625 1.40625C9.65625 1.59375 9.78125 1.75 9.96875 1.8125C10.2812 1.9375 10.5938 2.0625 10.875 2.1875C11.0625 2.28125 11.2812 2.28125 11.4375 2.15625L12.0312 1.71875C12.2812 1.5 12.625 1.5 12.875 1.6875C12.9688 1.75 13.0625 1.8125 13.1562 1.90625L14.0938 2.875C14.1562 2.9375 14.2188 3 14.2812 3.0625C14.4688 3.3125 14.4688 3.6875 14.25 3.9375L13.8125 4.5C13.6875 4.65625 13.6875 4.875 13.7812 5.0625C13.9375 5.34375 14.0625 5.65625 14.1562 6C14.2188 6.1875 14.375 6.3125 14.5938 6.34375L15.3125 6.4375C15.625 6.46875 15.875 6.71875 15.9375 7.03125C15.9375 7.09375 15.9375 7.15625 15.9375 7.21875V8.84375C15.9375 8.875 15.9375 8.9375 15.9375 9C15.875 9.3125 15.625 9.5625 15.3125 9.59375L14.5938 9.6875C14.375 9.71875 14.2188 9.84375 14.1562 10.0625C14.0625 10.375 13.9375 10.6875 13.7812 10.9688C13.6875 11.1562 13.6875 11.375 13.8125 11.5312L14.25 12.0938C14.4688 12.3438 14.4688 12.7188 14.2812 12.9688C14.2188 13.0312 14.1562 13.0938 14.0938 13.1562L13.1562 14.125C13.0625 14.1875 12.9688 14.2812 12.875 14.3438C12.625 14.5312 12.2812 14.5312 12.0312 14.3125L11.4375 13.875C11.2812 13.75 11.0625 13.75 10.9062 13.8438C10.5938 13.9688 10.3125 14.0938 10 14.1875C9.78125 14.25 9.65625 14.4375 9.625 14.625L9.53125 15.3438C9.5 15.6562 9.25 15.9375 8.9375 15.9688C8.625 16 8.3125 16 8 16C7.65625 16 7.3125 16 6.96875 15.9375C6.65625 15.9062 6.40625 15.6562 6.375 15.3125L6.28125 14.5938C6.25 14.4062 6.09375 14.25 5.90625 14.1875C5.625 14.0625 5.3125 13.9375 5.03125 13.8125C4.875 13.7188 4.625 13.7188 4.46875 13.8438L3.90625 14.2812C3.65625 14.5 3.3125 14.5 3.03125 14.3125C2.53125 13.9062 2.0625 13.4375 1.65625 12.9062C1.46875 12.6562 1.46875 12.2812 1.6875 12.0312L2.125 11.4688C2.25 11.3125 2.25 11.0938 2.15625 10.9062C2.03125 10.625 1.90625 10.3438 1.8125 10.0625C1.75 9.875 1.59375 9.71875 1.375 9.6875L0.65625 9.59375C0.34375 9.5625 0.09375 9.3125 0.03125 9C0 8.6875 0 8.34375 0 8C0 7.6875 0 7.34375 0.03125 7.03125C0.09375 6.71875 0.34375 6.46875 0.65625 6.4375L1.375 6.34375C1.5625 6.3125 1.75 6.15625 1.8125 5.96875C1.90625 5.6875 2.03125 5.40625 2.15625 5.125C2.25 4.9375 2.25 4.71875 2.125 4.5625L1.65625 4C1.46875 3.71875 1.46875 3.375 1.65625 3.125C2.0625 2.59375 2.53125 2.125 3.03125 1.71875C3.28125 1.53125 3.65625 1.53125 3.90625 1.75L4.46875 2.1875C4.625 2.3125 4.84375 2.3125 5.03125 2.21875C5.3125 2.09375 5.59375 1.96875 5.90625 1.84375C6.09375 1.78125 6.25 1.625 6.28125 1.4375L6.34375 0.71875C6.40625 0.375 6.625 0.125 6.96875 0.09375C7.28125 0.03125 7.625 0 8 0C8.3125 0 8.625 0.03125 8.90625 0.0625C9.25 0.09375 9.5 0.375 9.53125 0.6875ZM8 5.5C7.09375 5.5 6.28125 6 5.8125 6.75C5.375 7.53125 5.375 8.5 5.8125 9.25C6.28125 10.0312 7.09375 10.5 8 10.5C8.875 10.5 9.6875 10.0312 10.1562 9.25C10.5938 8.5 10.5938 7.53125 10.1562 6.75C9.6875 6 8.875 5.5 8 5.5Z" />
</g>
<defs>
<clipPath id="clip0_4558_20877">
<rect
width={size * 16}
height={size * 16}
fill="white"/>
<rect width={size * 16} height={size * 16} fill="white" />
</clipPath>
</defs>
</svg>
Expand All @@ -123,7 +122,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
height={size * 20}
viewBox="0 0 20 21"
xmlns="http://www.w3.org/2000/svg">
<path d="M18.125 10.5C18.125 7.60938 16.5625 4.95312 14.0625 3.46875C11.5234 2.02344 8.4375 2.02344 5.9375 3.46875C3.39844 4.95312 1.875 7.60938 1.875 10.5C1.875 13.4297 3.39844 16.0859 5.9375 17.5703C8.4375 19.0156 11.5234 19.0156 14.0625 17.5703C16.5625 16.0859 18.125 13.4297 18.125 10.5ZM0 10.5C0 6.94531 1.875 3.66406 5 1.86719C8.08594 0.0703125 11.875 0.0703125 15 1.86719C18.0859 3.66406 20 6.94531 20 10.5C20 14.0938 18.0859 17.375 15 19.1719C11.875 20.9688 8.08594 20.9688 5 19.1719C1.875 17.375 0 14.0938 0 10.5ZM6.60156 6.98438C6.91406 6.08594 7.73438 5.5 8.67188 5.5H10.9375C12.3047 5.5 13.4375 6.63281 13.4375 8C13.4375 8.85938 12.9297 9.67969 12.1875 10.1094L10.9375 10.8516C10.8984 11.3594 10.5078 11.75 10 11.75C9.45312 11.75 9.0625 11.3594 9.0625 10.8125V10.3047C9.0625 9.95312 9.21875 9.64062 9.53125 9.48438L11.25 8.50781C11.4453 8.39062 11.5625 8.19531 11.5625 8C11.5625 7.64844 11.2891 7.41406 10.9375 7.41406H8.67188C8.55469 7.41406 8.4375 7.49219 8.39844 7.60938L8.35938 7.64844C8.20312 8.15625 7.65625 8.39062 7.1875 8.23438C6.67969 8.03906 6.44531 7.49219 6.60156 7.02344V6.98438ZM8.75 14.25C8.75 13.5859 9.29688 13 10 13C10.6641 13 11.25 13.5859 11.25 14.25C11.25 14.9531 10.6641 15.5 10 15.5C9.29688 15.5 8.75 14.9531 8.75 14.25Z"/>
<path
d="M18.125 10.5C18.125 7.60938 16.5625 4.95312 14.0625 3.46875C11.5234 2.02344 8.4375 2.02344 5.9375 3.46875C3.39844 4.95312 1.875 7.60938 1.875 10.5C1.875 13.4297 3.39844 16.0859 5.9375 17.5703C8.4375 19.0156 11.5234 19.0156 14.0625 17.5703C16.5625 16.0859 18.125 13.4297 18.125 10.5ZM0 10.5C0 6.94531 1.875 3.66406 5 1.86719C8.08594 0.0703125 11.875 0.0703125 15 1.86719C18.0859 3.66406 20 6.94531 20 10.5C20 14.0938 18.0859 17.375 15 19.1719C11.875 20.9688 8.08594 20.9688 5 19.1719C1.875 17.375 0 14.0938 0 10.5ZM6.60156 6.98438C6.91406 6.08594 7.73438 5.5 8.67188 5.5H10.9375C12.3047 5.5 13.4375 6.63281 13.4375 8C13.4375 8.85938 12.9297 9.67969 12.1875 10.1094L10.9375 10.8516C10.8984 11.3594 10.5078 11.75 10 11.75C9.45312 11.75 9.0625 11.3594 9.0625 10.8125V10.3047C9.0625 9.95312 9.21875 9.64062 9.53125 9.48438L11.25 8.50781C11.4453 8.39062 11.5625 8.19531 11.5625 8C11.5625 7.64844 11.2891 7.41406 10.9375 7.41406H8.67188C8.55469 7.41406 8.4375 7.49219 8.39844 7.60938L8.35938 7.64844C8.20312 8.15625 7.65625 8.39062 7.1875 8.23438C6.67969 8.03906 6.44531 7.49219 6.60156 7.02344V6.98438ZM8.75 14.25C8.75 13.5859 9.29688 13 10 13C10.6641 13 11.25 13.5859 11.25 14.25C11.25 14.9531 10.6641 15.5 10 15.5C9.29688 15.5 8.75 14.9531 8.75 14.25Z" />
</svg>
{:else if logout}
<svg
Expand All @@ -132,15 +132,20 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
height={size * 24}
viewBox="0 0 24 24"
xmlns="http://www.w3.org/2000/svg">
<path d="M19.6875 12.7188L15.6875 16.7188C15.3125 17.125 14.6562 17.125 14.2812 16.7188C13.875 16.3438 13.875 15.6875 14.2812 15.3125L16.5625 13H10C9.4375 13 9 12.5625 9 12C9 11.4688 9.4375 11 10 11H16.5625L14.2812 8.71875C13.875 8.34375 13.875 7.6875 14.2812 7.3125C14.6562 6.90625 15.3125 6.90625 15.6875 7.3125L19.6875 11.3125C20.0938 11.6875 20.0938 12.3438 19.6875 12.7188ZM9 7H7C6.4375 7 6 7.46875 6 8V16C6 16.5625 6.4375 17 7 17H9C9.53125 17 10 17.4688 10 18C10 18.5625 9.53125 19 9 19H7C5.34375 19 4 17.6562 4 16V8C4 6.34375 5.34375 5 7 5H9C9.53125 5 10 5.46875 10 6C10 6.5625 9.53125 7 9 7Z" fill="#001B41"/>
<path
d="M19.6875 12.7188L15.6875 16.7188C15.3125 17.125 14.6562 17.125 14.2812 16.7188C13.875 16.3438 13.875 15.6875 14.2812 15.3125L16.5625 13H10C9.4375 13 9 12.5625 9 12C9 11.4688 9.4375 11 10 11H16.5625L14.2812 8.71875C13.875 8.34375 13.875 7.6875 14.2812 7.3125C14.6562 6.90625 15.3125 6.90625 15.6875 7.3125L19.6875 11.3125C20.0938 11.6875 20.0938 12.3438 19.6875 12.7188ZM9 7H7C6.4375 7 6 7.46875 6 8V16C6 16.5625 6.4375 17 7 17H9C9.53125 17 10 17.4688 10 18C10 18.5625 9.53125 19 9 19H7C5.34375 19 4 17.6562 4 16V8C4 6.34375 5.34375 5 7 5H9C9.53125 5 10 5.46875 10 6C10 6.5625 9.53125 7 9 7Z"
fill="#001B41" />
</svg>
{/if}

<style>
svg {
fill: var(--ion-color-primary);
&#email, &#user, &#settings, &#help {
&#email,
&#user,
&#settings,
&#help {
fill: rgba(0, 27, 65, 1);
}
}
Expand Down
49 changes: 27 additions & 22 deletions IONOS/src/components/UserMenu.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,19 @@
export let settingsLink = null;
export let helpLink = null;
export let options = [{
label: t('theming', 'Settings'),
icon: 'settings',
link: settingsLink,
}, {
label: t('theming', 'Help & Support'),
icon: 'help',
link: helpLink,
target: '_blank',
}];
export let options = [
{
label: t('theming', 'Settings'),
icon: 'settings',
link: settingsLink,
},
{
label: t('theming', 'Help & Support'),
icon: 'help',
link: helpLink,
target: '_blank',
},
];
export let onSelect = () => {};
Expand Down Expand Up @@ -46,16 +49,17 @@
onDestroy(() => {
document.removeEventListener('click', handleClickOutside);
});
console.log("helpLink", helpLink);
console.log("settingsLink", settingsLink);
console.log('helpLink', helpLink);
console.log('settingsLink', settingsLink);
</script>
<ionos-icons user
on:click={toggleMenu}
on:keydown={toggleMenu}
tabindex="0"
role="button"
aria-label="User Menu" />
<ionos-icons
user
on:click={toggleMenu}
on:keydown={toggleMenu}
tabindex="0"
role="button"
aria-label="User Menu" />
{#if showMenu}
<div class="menu-container">
Expand All @@ -70,10 +74,11 @@
<div class="dropdown-menu">
{#each options as option}
{#if option.link}
<a href="{option.link}"
target="{option.target || '_self'}"
class="option-content"
on:click="{() => handleLinkClick(option)}">
<a
href={option.link}
target={option.target || '_self'}
class="option-content"
on:click={() => handleLinkClick(option)}>
<div class="icon-and-label">
<ionos-icons {...{ [option.icon]: true }} />
<div class="label">{option.label}</div>
Expand Down

0 comments on commit 3706ee3

Please sign in to comment.