Skip to content

Commit f73ffce

Browse files
committed
feat: enhance documentation and styling for custom JS/CSS guide and incident comments
1 parent 0997967 commit f73ffce

File tree

6 files changed

+60
-11
lines changed

6 files changed

+60
-11
lines changed

docs/custom-js-css-guide.md

Lines changed: 44 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,53 @@ To add inline css go to Manage kener -> Theme -> Custom CSS and add your CSS the
3333

3434
```css
3535
.my-class {
36-
color: red;
36+
color: red;
3737
}
3838
```
3939

4040
<div class="note danger">
4141
Do not include &#x3C;style&#x3E; tags.
4242
</div>
43+
44+
## Grid Layout
45+
46+
To change from a column layout to a grid layout in your Kener instance, you can use the following CSS:
47+
48+
```css
49+
@media (min-width: 1330px) {
50+
.section-monitors,
51+
.section-categories,
52+
.section-hero,
53+
.section-back,
54+
.section-events,
55+
.section-legend,
56+
.section-categories,
57+
.section-browser-events {
58+
width: 1330px !important;
59+
max-width: 1330px !important;
60+
}
61+
62+
.section-monitors .monitor-root {
63+
background-color: transparent;
64+
border: none !important;
65+
box-shadow: none;
66+
}
67+
68+
.section-monitors .monitor-root .monitors-card {
69+
display: grid;
70+
grid-template-columns: repeat(2, minmax(0, 1fr));
71+
gap: 0.5rem;
72+
}
73+
74+
.section-monitors .monitor-root .monitors-card .monitor {
75+
grid-column: span 1;
76+
border-radius: 0.375rem;
77+
background-color: hsl(var(--card) / var(--tw-bg-opacity, 1));
78+
border-width: 1px;
79+
}
80+
.section-monitors .monitor-root .monitors-card .monitor:last-child {
81+
border-bottom: inherit;
82+
border-bottom-width: 1px !important;
83+
}
84+
}
85+
```

src/docs.css

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
code:not([class^="language-"]) {
2-
@apply rounded bg-gray-100 px-1.5 py-0.5 font-mono text-xs dark:bg-gray-800;
3-
}
4-
51
.sidebar-item.active,
62
.sidebar-item:hover {
73
color: #ed702d;

src/kener.css

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -946,3 +946,9 @@ textarea::placeholder {
946946
.no-gutter .ͼo .cm-gutters {
947947
display: none;
948948
}
949+
.kener-md {
950+
@apply text-sm;
951+
}
952+
p code:not([class^="language-"]) {
953+
@apply rounded-sm bg-yellow-100 px-1 py-0.5 font-mono text-xs dark:bg-neutral-700 dark:text-neutral-100;
954+
}

src/lib/components/IncidentNew.svelte

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@
191191

192192
<div class="mb-4 text-sm font-normal">
193193
<div
194-
class="prose prose-stone max-w-none dark:prose-invert prose-code:rounded prose-code:py-[0.2rem] prose-code:font-mono prose-code:text-sm prose-code:font-normal prose-pre:bg-opacity-0 dark:prose-pre:bg-neutral-900"
194+
class="kener-md prose prose-stone max-w-none dark:prose-invert prose-code:rounded prose-code:py-[0.2rem] prose-code:font-mono prose-code:text-sm prose-code:font-normal prose-pre:bg-opacity-0 dark:prose-pre:bg-neutral-900"
195195
>
196196
{@html marked.parse(comment.comment)}
197197
</div>
@@ -212,9 +212,13 @@
212212
)}
213213
</time>
214214

215-
<p class="mb-2 text-sm font-normal">
216-
{comment.comment}
217-
</p>
215+
<div class="mb-2 text-sm font-normal">
216+
<div
217+
class="kener-md prose prose-stone max-w-none dark:prose-invert prose-code:rounded prose-code:py-[0.2rem] prose-code:font-mono prose-code:text-sm prose-code:font-normal prose-pre:bg-opacity-0 dark:prose-pre:bg-neutral-900"
218+
>
219+
{@html marked.parse(comment.comment)}
220+
</div>
221+
</div>
218222
</li>
219223
{/each}
220224
</ol>

src/routes/(docs)/+layout.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@
217217
</div>
218218
</div>
219219
<div
220-
class="prose prose-stone max-w-none dark:prose-invert prose-code:rounded prose-code:py-[0.2rem] prose-code:font-mono prose-code:text-sm prose-code:font-normal prose-pre:bg-opacity-0 dark:prose-pre:bg-neutral-900"
220+
class="kener-md prose prose-stone max-w-none dark:prose-invert prose-code:rounded prose-code:py-[0.2rem] prose-code:font-mono prose-code:text-sm prose-code:font-normal prose-pre:bg-opacity-0 dark:prose-pre:bg-neutral-900"
221221
>
222222
<slot />
223223
</div>

src/routes/(manage)/manage/(app)/app/events/+page.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -957,7 +957,7 @@
957957
<div class="w-full rounded px-2 py-2 {newComment.id == comment.id ? 'bg-input' : ''}">
958958
<div class="mb-2 max-h-[400px] overflow-y-auto rounded-md border bg-card p-2">
959959
<div
960-
class=" prose prose-stone max-w-none dark:prose-invert prose-code:rounded prose-code:py-[0.2rem] prose-code:font-mono prose-code:text-sm prose-code:font-normal prose-pre:bg-opacity-0 dark:prose-pre:bg-neutral-900"
960+
class="kener-md prose prose-stone max-w-none dark:prose-invert prose-code:rounded prose-code:py-[0.2rem] prose-code:font-mono prose-code:text-sm prose-code:font-normal prose-pre:bg-opacity-0 dark:prose-pre:bg-neutral-900"
961961
>
962962
{@html marked.parse(comment.comment)}
963963
</div>

0 commit comments

Comments
 (0)