Skip to content

Commit 5533773

Browse files
authored
Merge pull request #214 from valor-software/feat-citation-block-visual
feat(articles): update citation block visual
2 parents dd7e35e + 5a78a95 commit 5533773

2 files changed

Lines changed: 43 additions & 11 deletions

File tree

assets/articles/0048-webpack-plugin-written-by-chatgpt/webpack-plugin-written-by-chatgpt.adoc

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,15 @@ A lot of my focus lately is on ModuleFederation and webpack. I asked myself what
1414

1515
The first question I asked the site:
1616

17+
[.block-citation]
1718
[quote,Zackary Chapple]
1819
____
19-
Create a webpack plugin in typescript that wraps module federation and adds additional logging"
20+
Create a webpack plugin in typescript that wraps module federation and adds additional logging
2021
____
2122

2223

2324
Below is the first reply:
24-
25+
[.block-citation]
2526
[quote, The AI]
2627
____
2728
To create a webpack plugin in TypeScript that wraps module federation and adds additional logging, you can follow these steps:"
@@ -127,11 +128,15 @@ ____
127128

128129
You can see that the last code block is incomplete. Sometimes, on more lengthy requests, the chatbot can time out, I tried, quite literally, asking it to keep going.
129130

130-
"Keep going"
131-
-- Zackary Chapple
131+
[.block-citation]
132+
[quote, Zackary Chapple]
133+
____
134+
Keep going
135+
____
136+
132137

133138
"Sure, here are the next steps:", said ChatGPT
134-
139+
[.block-citation]
135140
[quote, The AI]
136141
____
137142
@@ -202,7 +207,7 @@ ____
202207
== Modifying the results
203208

204209
Seeing what the results were it was quite verbose, but it does not follow the platform I usually like to use, https://dev.to/nrwl_io[@nrwl_io's, window=_blank] Nx. So I did a redirect on the conversation.
205-
210+
[.block-citation]
206211
[quote, Zackary Chapple]
207212
____
208213
how can I simplify the steps by using Nx
@@ -289,14 +294,14 @@ In the libs/module-federation-logging-plugin/src/index.ts file, export the Modul
289294
== Second timeout
290295

291296
You can see that I received another timeout due to the length of the response. This time instead of just asking it to continue I tried to get it to pick back up from step 7 which was incomplete.
292-
297+
[.block-citation]
293298
[quote, Zackary Chapple]
294299
____
295300
Repeat the content of step 7 and keep going
296301
____
297302

298303
And the chat-bot said:
299-
304+
[.block-citation]
300305
[quote, The AI]
301306
____
302307
Sure, here is the content of step 7:
@@ -354,14 +359,14 @@ ____
354359
== One more tweak
355360

356361
Just to see how far I can go I wanted to add some documentation. No plugin is complete without documentation right?
357-
362+
[.block-citation]
358363
[quote, Zackary Chapple]
359364
____
360365
Can you add swagger documentation to the src/module-federation-logging-plugin.ts file
361366
____
362367

363368
And the chat-bot delivered the following:
364-
369+
[.block-citation]
365370
[quote, The AI]
366371
____
367372
To add Swagger documentation to the src/module-federation-logging-plugin.ts file, you can use Swagger annotations in the form of JSDoc comments. JSDoc is a documentation standard for JavaScript that is widely supported by tools like Swagger.

libs/route-pages/blog-portfolio/src/article.component.ts

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { Subscription, of } from "rxjs";
88
@Component({
99
// eslint-disable-next-line @angular-eslint/component-selector
1010
selector: 'article',
11-
styles:[`
11+
styles: [`
1212
::ng-deep.turbo-table {
1313
margin-top: 25px;
1414
}
@@ -28,6 +28,33 @@ import { Subscription, of } from "rxjs";
2828
margin: auto;
2929
width: 40%
3030
}
31+
::ng-deep.block-citation {
32+
border-left-width: 8px;
33+
--tw-border-opacity: 1;
34+
border-color: rgba(32, 32, 32, var(--tw-border-opacity));
35+
--tw-bg-opacity: 1;
36+
background-color: #2c2c2d;
37+
}
38+
::ng-deep.block-citation>.attribution {
39+
padding: 0 16px 16px 16px;
40+
text-align: right;
41+
}
42+
::ng-deep.block-citation>blockquote {
43+
border: 0px
44+
}
45+
::ng-deep.block-citation>blockquote>.paragraph:first-of-type:before {
46+
content: open-quote;
47+
float: left;
48+
font-size: 3em;
49+
margin-right: 4px;
50+
font-weight: 700;
51+
line-height: 0.6em;
52+
color: rgba(226, 78, 99, var(--tw-text-opacity));
53+
}
54+
::ng-deep.block-citation>blockquote>.paragraph:first-of-type:after {
55+
content: no-close-quote;
56+
}
57+
3158
`],
3259
templateUrl: './article.component.html'
3360
})

0 commit comments

Comments
 (0)