~repos /website

#astro#js#html#css

git clone https://pyrossh.dev/repos/website.git

木 Personal website of pyrossh. Built with astrojs, shiki, vite.


34ba21bb pyrossh

1 year ago
Fix posts layout
src/posts/eyecandy-golang-error-reporting.md CHANGED
@@ -12,10 +12,9 @@ published: true
12
12
 
13
13
  We at playlyfe wanted to get an email report as soon as an error occurred on our production servers. Since golang does not have
14
14
  stack traces with its inbuilt error mechanism we had to find a quick and simple solution which wouldn’t require too much refactoring
15
- of our existing codebase. So this is how we went about accomplishing this task. First we decided to wrap our errors so that we can
15
+ of our existing codebase. So this is how we went about accomplishing this task. First we decided to wrap our errors so that we can get the runtime stack whenever an error occurs.
16
- get the runtime stack whenever an error occurs.
17
16
 
18
- We first started using this, https://github.com/go-errors/errors
17
+ We first started using this library https://github.com/go-errors/errors
19
18
  but soon found out that it wasn’t exactly suited for our use case. So we created this minimalistic and easy approach to wrap all our
20
19
  existing errors. First we decided to wrap our errors so that we can get the runtime stack whenever an error occurs.
21
20
 
src/routes/+page.svelte CHANGED
@@ -101,7 +101,7 @@
101
101
  <h2>Hardware</h2>
102
102
  </div>
103
103
  <ul class="grid gap-2 grid-cols-1 text-center mt-4 children:(bg-gray-200 p-1)">
104
- <li>M2 Macbook Air Laptop</li>
104
+ <li>Macbook Air M2 Laptop</li>
105
105
  <li>LG 27 inch Ultrafine Ergo 4K Monitor</li>
106
106
  <li>Logitech Mx Keys Mini Keyboard</li>
107
107
  <li>Logitech MX Anywhere 3S Mouse</li>
src/routes/posts/[slug]/+page.svelte CHANGED
@@ -12,25 +12,25 @@
12
12
  </svelte:head>
13
13
 
14
14
  <article class="post-page">
15
- <hgroup class="flex flex-1 flex-col font-serif">
15
+ <hgroup class="flex flex-1 flex-col mb-6">
16
16
  <h1 class="font-bold text-2xl">
17
17
  {data.meta.title}
18
18
  </h1>
19
19
  <h2 class="mt-1 font-normal text-base text-slate-700">{data.meta.description}</h2>
20
- <p class="text-md">
20
+ <div class="mt-4">
21
- <span class="font-semibold">Published on: </span>
21
+ <span class="text-slate-700 font-semibold mr-1">Published on: </span>
22
22
  {formatDateLong(data.meta.date)}
23
- </p>
23
+ </div>
24
+ <div class="flex mt-1">
25
+ <span class="text-slate-700 font-semibold mr-1">Tags:</span>
26
+ {#each data.meta.tags as tag}
27
+ <span
28
+ class="inline-flex items-center rounded-sm bg-slate-100 px-1 text-base font-medium text-gray-700 ring-1 ring-inset ring-gray-500/10 mr-3"
29
+ >{tag}</span
30
+ >
31
+ {/each}
32
+ </div>
24
33
  </hgroup>
25
- <div class="mb-6">
26
- <span class="font-semibold">Tags:</span>
27
- {#each data.meta.tags as tag}
28
- <span
29
- class="inline-flex items-center rounded-md bg-gray-100 px-2 py-1 text-base font-medium text-gray-700 ring-1 ring-inset ring-gray-500/10 mr-3"
30
- >{tag}</span
31
- >
32
- {/each}
33
- </div>
34
34
  <div class="prose">
35
35
  <svelte:component this={data.content} />
36
36
  </div>
@@ -51,6 +51,11 @@
51
51
  font-size: 0.9em;
52
52
  }
53
53
 
54
+ & a {
55
+ text-decoration: underline;
56
+ --at-apply: text-blue-900;
57
+ }
58
+
54
59
  & p {
55
60
  margin-top: 1rem;
56
61
  margin-bottom: 1rem;
@@ -116,14 +121,4 @@
116
121
  }
117
122
  }
118
123
  }
119
-
120
- .tag {
121
- background-color: var(--black-light);
122
- color: white;
123
- display: inline-block;
124
- padding-left: 8px;
125
- padding-right: 8px;
126
- text-align: center;
127
- margin-right: 1rem;
128
- }
129
124
  </style>