Skip to content

Commit d68e9c0

Browse files
committed
Add some additional images to the introduction article
1 parent 30a8dfa commit d68e9c0

File tree

11 files changed

+257
-7
lines changed

11 files changed

+257
-7
lines changed
217 KB
Binary file not shown.

src/assets/images/content/blog/1/tauri-vs-electron.pdn

+209
Large diffs are not rendered by default.
Binary file not shown.
-32.1 KB
Binary file not shown.
-7.58 KB
Binary file not shown.

src/assets/state/articles/1.jsx

+29-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
import { people } from "../team";
22
import tags from "./tags";
33

4-
import thumbnail from "@/assets/images/content/blog/1/thumbnail.webp";
4+
import thumbnail from "@blogImages/1/thumbnail.webp";
5+
import tauriVsElectron from "@blogImages/1/tauri-vs-electron.webp";
6+
import oldLookingClients from "@blogImages/1/clients.webp";
57

68
import A from "@/components/pages/blog/post/ArticleComponents";
79

@@ -65,7 +67,7 @@ export default {
6567
</p>
6668

6769
<p>
68-
<strong>What if... it didn't have to be like that?</strong> If you are anything like us, we feel like this takes away from the gains you get from using a Git client. That's why we created Commit Rocket - a next-generation Git client that puts user experience first. With Commit Rocket, you'll never have to sacrifice functionality for ease of use. Join us as we aim to revolutionize the world of Git clients.
70+
<strong>What if... it didn't have to be like that?</strong> If you are anything like us, you'd feel like these pain points take away from the gains you get from using a Git client. That's why we created Commit Rocket - a next-generation Git client that puts user experience first. With Commit Rocket, you'll never have to sacrifice functionality for ease of use. Join us as we aim to revolutionize the world of Git clients.
6971
</p>
7072

7173
<p>
@@ -100,9 +102,17 @@ export default {
100102
</A.H4>
101103

102104
<p>
103-
A lot of the clients that you can find today on <A.Link color="primary" href="https://git-scm.com/downloads/guis" external>Git's official Git client list</A.Link> have outdated visuals (except <A.Link href="https://www.gitkraken.com/" nofollow external>GitKraken</A.Link>, <A.Link href="https://gitnuro.jetpackduba.com/" nofollow external>Gitnuro</A.Link> and <A.Link href="https://gitviewer.com/" nofollow external>GitViewer</A.Link>). Visual appeal and user experience may not persé go hand in hand, but it can be argued that outdated visuals can put people off from using the client and having an overall enjoyable experience. This is especially important when you have a client with a lot of functions like <A.Link href="https://www.sourcetreeapp.com/" nofollow external>SourceTree</A.Link>.
105+
A lot of the clients that you can find today on <A.Link color="primary" href="https://git-scm.com/downloads/guis" external>Git's official Git client list</A.Link> have outdated visuals. Not all Git clients have outdated visuals, take <A.Link href="https://www.gitkraken.com/" nofollow external>GitKraken</A.Link>, <A.Link href="https://gitnuro.jetpackduba.com/" nofollow external>Gitnuro</A.Link> and <A.Link href="https://gitviewer.com/" nofollow external>GitViewer</A.Link>, these clients set a good example for modern visuals. Visual appeal and user experience may not persé go hand in hand, but it can be argued that outdated visuals can put people off from using the client and having an overall enjoyable experience. This is especially important when you have a client with a lot of functionality like <A.Link href="https://www.sourcetreeapp.com/" nofollow external>SourceTree</A.Link>.
104106
</p>
105107

108+
<A.Img
109+
className="mx-auto"
110+
alt={"SourceTree and Git Extensions"}
111+
src={oldLookingClients.src}
112+
width={oldLookingClients.width}
113+
height={oldLookingClients.height}
114+
/>
115+
106116
<p>
107117
We recognize the fact that form should not follow function, but that it should be paired with function. That is why we will be spending a significant amount of our resources to making a good looking user interface that is beginner friendly, and also provides the best user experience we can muster.
108118
</p>
@@ -196,6 +206,22 @@ export default {
196206
Our alternative to using <A.Link href="https://www.nodegit.org/" nofollow external>Nodegit</A.Link> or invoking the CLI and parsing the results is using <A.Link href="https://libgit2.org/" external>Libgit2</A.Link>. Nodegit is a JavaScript binding of Libgit2, however we will be using a <A.Link href="https://github.com/rust-lang/git2-rs" external>Rust binding of Libgit2</A.Link>, which will be a lot faster. This is because invoking C code from Rust is faster compared to invoking it from JavaScript, in addition to that, Rust is already faster then JavaScript; so this will result in a massive speed increase.
197207
</p>
198208

209+
<A.Container className="gap-2">
210+
<p role="note" aria-label="Note" className="mx-auto font-semibold">
211+
Tauri VS Electron (empty app)
212+
</p>
213+
<A.Img
214+
className="mx-auto max-h-[27rem] w-fit"
215+
src={tauriVsElectron.src}
216+
width={tauriVsElectron.width}
217+
height={tauriVsElectron.height}
218+
/>
219+
220+
<p role="note" aria-label="Source" className="mx-auto text-sm">
221+
Source: <A.Link href="https://github.com/Elanis/web-to-desktop-framework-comparison" external>Web to Desktop framework comparison by Elanis</A.Link>
222+
</p>
223+
</A.Container>
224+
199225
<A.H3>
200226
Our Inspiration
201227
</A.H3>

src/components/pages/blog/ArticleBrief.tsx

+3-2
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,10 @@ export type IArticleBrief = {
4040
} & Omit<IArticle, "content" | "updated" | "created" | "slug">;
4141

4242
export interface ArticleBriefProps extends IArticleBrief {
43-
43+
imgLoading?: "eager" | "lazy";
4444
}
4545

46-
const ArticleBrief = ({ title, thumbnail, thumbnailAlt, readtime, teaser, author, date, url, tags }: ArticleBriefProps) => {
46+
const ArticleBrief = ({ title, thumbnail, thumbnailAlt, imgLoading, readtime, teaser, author, date, url, tags }: ArticleBriefProps) => {
4747
const safeToRender = useSSGSafe();
4848

4949
const AuthorTag = author.links.length > 0 ? Link : "div";
@@ -60,6 +60,7 @@ const ArticleBrief = ({ title, thumbnail, thumbnailAlt, readtime, teaser, author
6060
<NextLink href={url} className="group/link aspect-[16/7] rounded-lg overflow-hidden" >
6161
<img
6262
className="aspect-[16/7] object-contain rounded-lg transition-transform group-hover/link:scale-105"
63+
loading={imgLoading}
6364
src={thumbnail.src}
6465
width={thumbnail.width}
6566
height={thumbnail.height}

src/components/pages/blog/post/ArticleComponents.tsx

+9
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,15 @@ const A = {
3030
return <div className={computedClassName} {...props} />;
3131
},
3232

33+
Img: ({ className, loading = "lazy", ...props }: React.DetailedHTMLProps<React.ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>) => {
34+
const computedClassName = useMemo(
35+
() => twMerge("rounded-lg", className),
36+
[className]
37+
);
38+
39+
return <img {...props} className={computedClassName} loading={loading} />;
40+
},
41+
3342
...Heading,
3443
};
3544

src/pages/blog/[pid]/[slug].tsx

+1
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ const BlogPostPage: Page<BlogPostPageProps> = ({ article: { author, tags, thumbn
7070
<img
7171
aria-label="Article Thumbnail"
7272
className="rounded-lg"
73+
loading="eager"
7374
src={thumbnail.src}
7475
width={thumbnail.width}
7576
height={thumbnail.height}

src/pages/blog/index.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ const BlogPage: Page<BlogPageProps> = ({ articles, pathname }) => {
151151
</div>
152152
<ul className="grid grid-cols-1 gap-4 md:grid-cols-2 lg:grid-cols-3" aria-label="blog articles">
153153
<AnimatePresence>
154-
{computedArticles.map((brief) => <ArticleBrief key={brief.url} {...brief} />)}
154+
{computedArticles.map((brief, i) => <ArticleBrief key={brief.url} {...brief} imgLoading={i > 3 ? "lazy" : "eager"} />)}
155155
</AnimatePresence>
156156
</ul>
157157
</>}

tsconfig.json

+5-1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
"DOM.Iterable",
99
"ESNext"
1010
],
11+
"baseUrl": "./",
1112
"strict": true,
1213
"allowJs": true,
1314
"skipLibCheck": true,
@@ -20,7 +21,10 @@
2021
"incremental": true,
2122
"paths": {
2223
"@/*": [
23-
"./src/*"
24+
"src/*"
25+
],
26+
"@blogImages/*": [
27+
"src/assets/images/content/blog/*"
2428
]
2529
}
2630
},

0 commit comments

Comments
 (0)