1
Fork 0

Improve code block styling

This commit is contained in:
Jake Howard 2024-06-09 21:33:13 +01:00
parent 7c3eee485e
commit 1fabf3b095
Signed by: jake
GPG key ID: 57AFB45680EDD477
2 changed files with 25 additions and 24 deletions

View file

@ -70,7 +70,7 @@ layout: section
## 2.
# Locate the page models
<div class="pt-5">
<div class="pt-5 text-left">
```python
from wagtail.models import Page
@ -82,13 +82,6 @@ child_pages = sysadmin_page.get_descendants()
</div>
<style>
pre.shiki {
font-size: 1.4rem !important;
text-align: left;
}
</style>
---
layout: section
---
@ -96,7 +89,7 @@ layout: section
## 3.
# Locate what was deleted
<div class="pt-5">
<div class="pt-5 text-left">
```python
from django.contrib.admin.utils import NestedObjects
@ -107,21 +100,14 @@ collector.collect(list(child_pages) + [sysadmin_page])
</div>
<style>
pre.shiki {
font-size: 1.4rem !important;
text-align: left;
}
</style>
---
layout: section
---
# 4. Serialize
## 4.
# Serialize
<div class="pt-5">
<div class="pt-5 text-left">
```python {all|3-5|all}
from django.core import serializers
@ -145,12 +131,11 @@ with open("deleted-models.json", "w") as f:
<style>
pre.shiki {
font-size: 1rem !important;
text-align: left;
font-size: 0.8rem !important;
line-height: 18px;
}
</style>
---
layout: section
---
@ -194,6 +179,13 @@ with open("deleted-models.json", "w") as f:
)
```
<style>
pre.shiki {
font-size: 0.7rem !important;
line-height: 17px;
}
</style>
---
layout: fact
---

View file

@ -1,3 +1,12 @@
.slidev-layout {
background: #2e1f5e
:root {
--slidev-code-padding: 1rem;
/* 3px larger than defaults */
--slidev-code-font-size: 15px;
--slidev-code-line-height: 21px;
}
.slidev-layout {
background-color: #2e1f5e
}