Skip to content

Commit e20c6c2

Browse files
committed
about page wrap text float, add breakpoints utils component
1 parent edb5cb5 commit e20c6c2

File tree

6 files changed

+35
-5
lines changed

6 files changed

+35
-5
lines changed

docker/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ RUN if [ "$TARGETARCH" = "arm64" ]; then \
3434
fi && \
3535
echo "SITE_URL=$SITE_URL" && \
3636
# must set SITE_URL via .env.production file for yarn build, important
37-
# must use .env.production, .env doesn't work
37+
# must use .env.production, .env doesn't work, my logic with dotenv in src/config/process-env.ts
3838
echo SITE_URL=$SITE_URL > .env.production;
3939

4040
RUN echo "ls -la=" && ls -la

docs/working-notes/todo3.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -535,7 +535,7 @@ moze samo za 1 url data-domain="nemanjamitic.com", to je ok, tako i treba
535535

536536
paralelizuj docker arm x86 build, reuse cache, test
537537
accessibility
538-
image sizes
538+
image sizes, poenta je i koliku sirinu u contentu zauzima slika, ne samo sirina ekrana, to
539539
astro gallery, blur onload, infinite scroll
540540
define real color themes
541541
IPv6 Traefik
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
---
2+
import { CONFIG_SERVER } from '@/config/server';
3+
4+
const isProd = CONFIG_SERVER.NODE_ENV === 'production';
5+
6+
// component just for debuggng responsive styles
7+
---
8+
9+
{
10+
!isProd && (
11+
<div class="fixed top-24 right-4 z-50 flex size-8 p-3 items-center justify-center rounded-full text-base-100 bg-content text-sm font-mono">
12+
<div class="block xs:hidden">2xs</div>
13+
<div class="hidden xs:block sm:hidden">xs</div>
14+
<div class="hidden sm:block md:hidden">sm</div>
15+
<div class="hidden md:block lg:hidden">md</div>
16+
<div class="hidden lg:block xl:hidden">lg</div>
17+
<div class="hidden xl:block 2xl:hidden">xl</div>
18+
<div class="hidden 2xl:block">2xl</div>
19+
</div>
20+
)
21+
}

src/config/process-env.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ const processEnvData: ProcessEnvType = {
3737
PLAUSIBLE_DOMAIN: process.env.PLAUSIBLE_DOMAIN,
3838
};
3939

40-
prettyPrintObject(processEnvData, 'processEnvData');
40+
prettyPrintObject(processEnvData, 'received PROCESS_ENV');
4141

4242
export const PROCESS_ENV = validateData(processEnvData, processEnvSchema);
4343

src/layouts/Base.astro

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import BaseHead from '@/components/BaseHead.astro';
55
import Footer from '@/components/Footer.astro';
66
import Header from '@/components/Header.astro';
77
import ScrollToTop from '@/components/react/ScrollToTop';
8+
import Breakpoints from '@/components/utils/breakpoints.astro';
89
910
import type { BaseHeadProps } from '@/components/BaseHead.astro';
1011
@@ -23,5 +24,7 @@ const { metadata } = Astro.props as BaseProps;
2324
<ScrollToTop client:only="react">
2425
<Icon name="mdi:arrow-up-thin" class="h-10 w-10 text-content hover:text-links-hover" />
2526
</ScrollToTop>
27+
28+
<Breakpoints />
2629
</body>
2730
</html>

src/pages/about.mdx

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,22 @@ description: 'About me page'
77
import { Image } from 'astro:assets';
88

99
import { CONFIG_CLIENT } from '../config/client';
10-
import { IMAGE_SIZES } from '../constants/image';
10+
import { IMAGE_SIZES, TW_SCREENS } from '../constants/image';
1111
import Link from '../components/Link.astro';
1212
import Electronics1Image from '../assets/images/all-images/electronics1.jpg';
1313

1414

1515
export const { AUTHOR_GITHUB, AUTHOR_LINKEDIN, AUTHOR_TWITTER, AUTHOR_YOUTUBE } = CONFIG_CLIENT;
1616

17+
{/* bellow SM image is full width of content so higher resolution image */}
18+
export const imageSizes = {
19+
widths: [TW_SCREENS.SM, TW_SCREENS.MD, TW_SCREENS.SM],
20+
sizes: `(max-width: ${TW_SCREENS.SM}px) ${TW_SCREENS.SM}px, (max-width: ${TW_SCREENS.MD}px) ${TW_SCREENS.MD}px, ${TW_SCREENS.SM}px`,
21+
};
22+
1723
# About
1824

19-
<Image {...IMAGE_SIZES.FIXED.MDX_SM} src={Electronics1Image} alt="Veronica transmitter board" />
25+
<Image {...imageSizes} src={Electronics1Image} alt="Veronica transmitter board" class="md:max-w-sm lg:max-w-md md:float-right md:mt-2 md:ml-8" />
2026

2127
My name is Nemanja, I am a full-stack developer with experience in React.js, Next.js, and Node.js. In the past, I have worked with C# and ASP.NET, and lately, I have developed an interest in Python and FastAPI. I also like to experiment with DevOps and homelab self-hosting.
2228

0 commit comments

Comments
 (0)