Skip to content

Commit

Permalink
feat: icons + manifest + navigation
Browse files Browse the repository at this point in the history
1. Added icons/favicons for iOS/Android/modern browsers
2. Added manifest.json with android icons
3. Added icon with navigation to /
  • Loading branch information
Beraliv committed Dec 29, 2024
1 parent 61bc0ad commit e29c125
Show file tree
Hide file tree
Showing 21 changed files with 144 additions and 11 deletions.
66 changes: 65 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,71 @@
name="description"
content="Interactive TypeScript tool: learn how to convert types effectively with hands-on examples, TypeScript Playground, and references to widely used libraries"
/>
<link rel="icon" href="/icon.jpg" />
<link rel="manifest" href="manifest.json" />
<link
href="/safari-macos-icon-196x196.png"
rel="icon"
sizes="196x196"
type="image/png"
/>
<link
href="/android-icon-192x192.png"
rel="icon"
sizes="192x192"
type="image/png"
/>
<link
href="/apple-touch-icon-180x180.png"
rel="apple-touch-icon"
sizes="180x180"
type="image/png"
/>
<link
href="/apple-touch-icon-167x167.png"
rel="apple-touch-icon"
sizes="167x167"
type="image/png"
/>
<link
href="/apple-touch-icon-152x152.png"
rel="apple-touch-icon"
sizes="152x152"
type="image/png"
/>
<link rel="apple-touch-icon" href="/apple-touch-icon-120x120.png" />
<link
href="/safari-macos-icon-196x196.png"
rel="icon"
sizes="144x144"
type="image/png"
/>
<link
href="/safari-macos-icon-196x196.png"
rel="icon"
sizes="96x96"
type="image/png"
/>
<link
href="/safari-macos-icon-196x196.png"
rel="icon"
sizes="72x72"
type="image/png"
/>
<link
href="/safari-macos-icon-196x196.png"
rel="icon"
sizes="48x48"
type="image/png"
/>
<link
href="/safari-macos-icon-196x196.png"
rel="icon"
sizes="36x36"
type="image/png"
/>
<link href="/favicon-32x32.png" rel="icon" sizes="32x32" type="image/png" />
<link href="/favicon-16x16.png" rel="icon" sizes="16x16" type="image/png" />
<link href="/favicon-16x16.ico" rel="icon" />
<meta name="image" content="/image.png" />
<meta name="keywords" content="TypeScript Conversion TS" />
<link rel="canonical" href="https://ts-conversion.beraliv.com/" />
Expand Down
Binary file added public/android-icon-144x144.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 added public/android-icon-192x192.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 added public/android-icon-36x36.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 added public/android-icon-48x48.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 added public/android-icon-72x72.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 added public/android-icon-96x96.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 added public/apple-touch-icon-120x120.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 added public/apple-touch-icon-152x152.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 added public/apple-touch-icon-167x167.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 added public/apple-touch-icon-180x180.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 added public/favicon-16x16.ico
Binary file not shown.
Binary file added public/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 added public/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 added public/favicon-64x64.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 removed public/icon.jpg
Binary file not shown.
46 changes: 46 additions & 0 deletions public/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
{
"short_name": "ts-conversion",
"name": "Convert one type to another in TypeScript",
"display": "standalone",
"start_url": "/",
"theme_color": "#242424",
"background_color": "#242424",
"icons": [
{
"src": "/android-icon-36x36.png",
"sizes": "36x36",
"type": "image/png",
"density": "0.75"
},
{
"src": "/android-icon-48x48.png",
"sizes": "48x48",
"type": "image/png",
"density": "1.0"
},
{
"src": "/android-icon-72x72.png",
"sizes": "72x72",
"type": "image/png",
"density": "1.5"
},
{
"src": "/android-icon-96x96.png",
"sizes": "96x96",
"type": "image/png",
"density": "2.0"
},
{
"src": "/android-icon-144x144.png",
"sizes": "144x144",
"type": "image/png",
"density": "3.0"
},
{
"src": "/android-icon-192x192.png",
"sizes": "192x192",
"type": "image/png",
"density": "4.0"
}
]
}
Binary file added public/safari-macos-icon-196x196.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 15 additions & 0 deletions src/components/Intro.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,21 @@
gap: 0.5rem;
}

.Title {
display: grid;
grid-template-columns: max-content 1fr;
gap: 1rem;
}

.IconWrapper {
align-self: end;
}

.Icon {
width: 1.5rem;
height: 1.5rem;
}

.ProgressData {
font-size: 0.75rem;
}
21 changes: 14 additions & 7 deletions src/components/Intro.tsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,22 @@
import styles from "./Intro.module.css";
import { Link } from "./Link";

export const Intro = () => (
<div className={styles.Intro}>
<h2>
Converting types in TypeScript
<sup className={styles.ProgressData}>beta</sup>
</h2>
<div className={styles.Title}>
<Link
className={styles.IconWrapper}
text={<img className={styles.Icon} src="/favicon-64x64.png" />}
href="/"
/>
<h2>
ts-conversion
<sup className={styles.ProgressData}>beta</sup>
</h2>
</div>
<p>
Interactive TypeScript tool: learn how to transform types effectively with
hands-on examples, TypeScript Playground, and references to widely used
libraries.
Learn how to convert types effectively with hands-on examples, TypeScript
Playground, and references to widely used libraries.
</p>
</div>
);
7 changes: 4 additions & 3 deletions src/components/Link.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,19 @@ import { ExternalIcon } from "./icons/ExternalIcon";
import style from "./Link.module.css";

export type LinkProps = {
className?: string;
href: string;
text: string;
text: string | JSX.Element;
external?: boolean;
};

export const Link = ({ href, text, external }: LinkProps) => {
export const Link = ({ className, href, text, external }: LinkProps) => {
const linkProps = external
? { target: "_blank", rel: "noopener noreferrer" }
: {};

return (
<a href={href} {...linkProps}>
<a className={className} href={href} {...linkProps}>
{text}
{external ? (
<span className={style.LinkExternal}>
Expand Down

0 comments on commit e29c125

Please sign in to comment.