Skip to content

Commit

Permalink
style: blog makeup
Browse files Browse the repository at this point in the history
  • Loading branch information
adarshaacharya committed Apr 28, 2024
1 parent 59a5320 commit 619618e
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 4 deletions.
24 changes: 21 additions & 3 deletions src/app/global.css
Original file line number Diff line number Diff line change
Expand Up @@ -42,23 +42,41 @@
}

.prose pre {
@apply border border-neutral-800 bg-neutral-900;
@apply bg-neutral-50 dark:bg-neutral-900 rounded-lg overflow-x-auto border border-neutral-200 dark:border-neutral-900;
}

.prose code {
@apply rounded-lg border border-neutral-100 bg-neutral-100 px-1 py-0.5 text-neutral-800 dark:border-neutral-800 dark:bg-neutral-900 dark:text-neutral-200;
/* @apply rounded-lg border border-neutral-100 bg-neutral-100 px-1 py-0.5 text-neutral-800 dark:border-neutral-800 dark:bg-neutral-900 dark:text-neutral-200; */

@apply px-1 py-0.5 rounded-lg;

}

.prose pre code {
@apply p-0 text-neutral-800 dark:text-neutral-200;
border: initial;
line-height: 1.5;
}

.prose code span {
@apply font-medium;
}

.prose img {
/* Don't apply styles to next/image */
@apply m-0;
}

.prose h2,
h3,
h4 {
@apply font-medium tracking-tighter !important;
}

.prose strong {
@apply font-medium;
}

.prose > :first-child {
/* Override removing top margin, causing layout shift */
margin-top: 1.25em !important;
Expand Down Expand Up @@ -89,7 +107,7 @@ input[type="email"] {

.prose .tweet a {
text-decoration: inherit;
font-weight: inherit;
font-weight: 500;
}

table {
Expand Down
3 changes: 2 additions & 1 deletion src/content/format-nestjs-response.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,9 @@ The above response is more structured and contains metadata like status, path, m
## Format Nest.js Response using Interceptors

It will be very cumbersome to format the response in every controller. It will be better if we can create a function that will format the response and we can use that function in every controller.
In Nest.js, [Interceptors](https://docs.nestjs.com/interceptors) are used to intercept the request and response lifecycle. They are used to modify the request and response objects.

> In Nest.js, [Interceptors](https://docs.nestjs.com/interceptors) are used to intercept the request and response lifecycle.
> They are used to modify the request and response objects.
<div className="text-xs text-right">
Image from: [Nest.js Docs](https://docs.nestjs.com/interceptors)
Expand Down

0 comments on commit 619618e

Please sign in to comment.