-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #14 from sdwalker62/light-theme
Light theme
- Loading branch information
Showing
23 changed files
with
320 additions
and
201 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -65,5 +65,6 @@ | |
"__nullptr": "cpp", | ||
"fstream": "cpp", | ||
"source_location": "cpp" | ||
} | ||
}, | ||
"cmake.configureOnOpen": false | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="36.4453" height="19.4238"> | ||
<g> | ||
<rect height="19.4238" opacity="0" width="36.4453" x="0" y="0"/> | ||
<path d="M29.4676 6.56555C28.5731 6.59563 27.7183 7.07957 27.2559 7.91016L23.0371 15.4785C22.8027 15.8691 22.6855 16.3379 22.6855 16.7773C22.6855 16.933 22.698 17.0855 22.7247 17.2327C21.3031 17.7243 19.7309 18.0176 18.0469 18.0176C10.3223 18.0176 4.80469 11.6895 4.80469 9.7168C4.80469 7.73438 10.3223 1.41602 18.0469 1.41602C23.1734 1.41602 27.2697 4.13665 29.4676 6.56555ZM12.5781 9.7168C12.5781 12.6855 15 15.1562 18.0469 15.1562C21.0645 15.1562 23.5059 12.6855 23.5059 9.7168C23.5059 6.66992 21.0645 4.27734 18.0469 4.27734C15 4.27734 12.5781 6.66992 12.5781 9.7168ZM20.0293 9.7168C20.0293 10.791 19.1309 11.6797 18.0469 11.6797C16.9531 11.6797 16.0547 10.791 16.0547 9.7168C16.0547 8.63281 16.9531 7.74414 18.0469 7.74414C19.1309 7.74414 20.0293 8.63281 20.0293 9.7168Z" fill="#ffffff" fill-opacity="0.85"/> | ||
<path d="M30.6934 8.56445L34.9316 16.123C35.0488 16.3379 35.1074 16.5527 35.1074 16.7773C35.1074 17.5098 34.5996 18.0859 33.7891 18.0859L25.332 18.0859C24.5215 18.0859 24.0137 17.5098 24.0137 16.7773C24.0137 16.5527 24.0723 16.3379 24.1895 16.1328L28.418 8.56445C28.6621 8.11523 29.1211 7.89062 29.5605 7.89062C30 7.89062 30.4395 8.11523 30.6934 8.56445ZM28.7402 15.7715C28.7402 16.2305 29.1113 16.6016 29.5605 16.6016C30.0195 16.6016 30.3809 16.2305 30.3906 15.7715C30.3906 15.332 30.0195 14.9512 29.5605 14.9512C29.1113 14.9512 28.7402 15.3223 28.7402 15.7715ZM28.8965 10.9082L28.9746 13.7012C28.9844 14.0332 29.2188 14.2676 29.5605 14.2676C29.9023 14.2676 30.1465 14.0332 30.1562 13.7012L30.2344 10.9082C30.2441 10.5176 29.9707 10.2441 29.5605 10.2441C29.1602 10.2441 28.8867 10.5176 28.8965 10.9082Z" fill="#ffffff" fill-opacity="0.85"/> | ||
</g> | ||
</svg> | ||
|
||
<style lang="scss"> | ||
svg { | ||
margin-top: 0.25rem; | ||
scale: 0.8; | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32"> | ||
<path fill="currentColor" d="M30 18v-2h-6v10h2v-4h3v-2h-3v-2zm-11 8h-4V16h4a3.003 3.003 0 0 1 3 3v4a3.003 3.003 0 0 1-3 3m-2-2h2a1 1 0 0 0 1-1v-4a1 1 0 0 0-1-1h-2zm-6-8H6v10h2v-3h3a2.003 2.003 0 0 0 2-2v-3a2 2 0 0 0-2-2m-3 5v-3h3l.001 3z"/> | ||
<path fill="currentColor" d="M22 14v-4a.91.91 0 0 0-.3-.7l-7-7A.9.9 0 0 0 14 2H4a2.006 2.006 0 0 0-2 2v24a2 2 0 0 0 2 2h16v-2H4V4h8v6a2.006 2.006 0 0 0 2 2h6v2Zm-8-4V4.4l5.6 5.6Z"/> | ||
</svg> | ||
|
||
<style lang="scss"> | ||
svg { | ||
scale: 0.8; | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,50 +1,62 @@ | ||
// /* | ||
// This file contains random utility functions that are used throughout the frontend. There is no logic for which functions are placed here. | ||
// */ | ||
// | ||
// import { GetObjectCommand, S3Client } from '@aws-sdk/client-s3'; | ||
// import dotenv from 'dotenv'; | ||
// import { PUBLIC_BUCKET_ID, PUBLIC_BUCKET_ACCESS_KEY } from '$env/static/public'; | ||
// | ||
// export interface CookieMap { | ||
// [key: string]: string; | ||
// } | ||
// | ||
// export function getAllCookies() { | ||
// const cookies: CookieMap = {}; | ||
// const cookieString: string = document.cookie; | ||
// | ||
// if (cookieString) { | ||
// const cookieArray: string[] = cookieString.split('; '); | ||
// cookieArray.forEach((cookie) => { | ||
// const [name, value] = cookie.split('='); | ||
// cookies[name] = decodeURIComponent(value); | ||
// }); | ||
// } | ||
// | ||
// return cookies; | ||
// } | ||
// | ||
// export function retrieveDocuments(url: string, password: string) { | ||
// console.log(url); | ||
// console.log(password); | ||
// dotenv.config(); | ||
// | ||
// // TODO: | ||
// // 1. Check that the URL begins with https:// | ||
// // 2. Password should be AccessKey since that is what will be used for auth | ||
// // 3. Figure out how to deal with region, maybe ask the user? | ||
// // 4. accessKeyId needs to be provided as well, hardcode for now | ||
// | ||
// const s3Client: S3Client = new S3Client({ | ||
// endpoint: 'https://adl.nyc3.digitaloceanspaces.com', | ||
// forcePathStyle: false, | ||
// region: 'nyc3', | ||
// credentials: { | ||
// accessKeyId: PUBLIC_BUCKET_ID, | ||
// secretAccessKey: PUBLIC_BUCKET_ACCESS_KEY | ||
// } | ||
// }); | ||
// | ||
// console.log(s3Client); | ||
// } | ||
import { type ClassValue, clsx } from "clsx"; | ||
import { twMerge } from "tailwind-merge"; | ||
import { cubicOut } from "svelte/easing"; | ||
import type { TransitionConfig } from "svelte/transition"; | ||
|
||
export function cn(...inputs: ClassValue[]) { | ||
return twMerge(clsx(inputs)); | ||
} | ||
|
||
type FlyAndScaleParams = { | ||
y?: number; | ||
x?: number; | ||
start?: number; | ||
duration?: number; | ||
}; | ||
|
||
export const flyAndScale = ( | ||
node: Element, | ||
params: FlyAndScaleParams = { y: -8, x: 0, start: 0.95, duration: 150 } | ||
): TransitionConfig => { | ||
const style = getComputedStyle(node); | ||
const transform = style.transform === "none" ? "" : style.transform; | ||
|
||
const scaleConversion = ( | ||
valueA: number, | ||
scaleA: [number, number], | ||
scaleB: [number, number] | ||
) => { | ||
const [minA, maxA] = scaleA; | ||
const [minB, maxB] = scaleB; | ||
|
||
const percentage = (valueA - minA) / (maxA - minA); | ||
const valueB = percentage * (maxB - minB) + minB; | ||
|
||
return valueB; | ||
}; | ||
|
||
const styleToString = ( | ||
style: Record<string, number | string | undefined> | ||
): string => { | ||
return Object.keys(style).reduce((str, key) => { | ||
if (style[key] === undefined) return str; | ||
return str + `${key}:${style[key]};`; | ||
}, ""); | ||
}; | ||
|
||
return { | ||
duration: params.duration ?? 200, | ||
delay: 0, | ||
css: (t) => { | ||
const y = scaleConversion(t, [0, 1], [params.y ?? 5, 0]); | ||
const x = scaleConversion(t, [0, 1], [params.x ?? 0, 0]); | ||
const scale = scaleConversion(t, [0, 1], [params.start ?? 0.95, 1]); | ||
|
||
return styleToString({ | ||
transform: `${transform} translate3d(${x}px, ${y}px, 0) scale(${scale})`, | ||
opacity: t | ||
}); | ||
}, | ||
easing: cubicOut | ||
}; | ||
}; |
Oops, something went wrong.