Skip to content

Commit 307d658

Browse files
authored
fix check box ☑
1 parent 8bc877c commit 307d658

File tree

3 files changed

+51
-8
lines changed

3 files changed

+51
-8
lines changed

blog/Hello-World.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,5 @@ summary: "Made with love"
1010
To-Do:
1111

1212
- [x] Fix Search
13-
- [ ] Better UI
13+
- [x] Fix check box
14+
- [ ] Better UI

generate.py

Lines changed: 22 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,29 @@
1919
# PYGMENTS_STYLE = 'friendly' # Or 'monokai', 'friendly', etc.
2020

2121
# --- Setup ---
22-
md_extensions = ['fenced_code', 'codehilite', 'tables', 'meta', 'extra', 'smarty', 'md_in_html']
23-
md = markdown.Markdown(extensions=md_extensions, extension_configs={
24-
'codehilite': {
25-
'css_class': 'highlight',
26-
'guess_lang': True,
27-
'linenums': True
22+
md_extensions = [
23+
'fenced_code',
24+
'codehilite',
25+
'tables',
26+
'meta',
27+
'extra',
28+
'smarty',
29+
'md_in_html',
30+
'pymdownx.tasklist',
31+
]
32+
md = markdown.Markdown(
33+
extensions=md_extensions,
34+
extension_configs={
35+
'codehilite': {
36+
'css_class': 'highlight',
37+
'guess_lang': False,
38+
'linenums': False
39+
},
40+
'pymdownx.tasklist': {
41+
'custom_checkbox': False,
2842
}
29-
})
43+
}
44+
)
3045
env = jinja2.Environment(
3146
loader=jinja2.FileSystemLoader(TEMPLATES_DIR),
3247
autoescape=jinja2.select_autoescape(['html', 'xml'])

static/style.css

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -364,4 +364,31 @@ div.highlight:hover .code-copy-button {
364364
font-size: 0.6rem;
365365
padding: 0.1rem 0.3rem;
366366
}
367+
}
368+
369+
ul.task-list {
370+
list-style-type: none;
371+
padding-left: 0.5em;
372+
}
373+
374+
375+
li.task-list-item {
376+
margin-bottom: 0.3em;
377+
display: flex;
378+
align-items: flex-start;
379+
}
380+
381+
382+
li.task-list-item > input[type="checkbox"] {
383+
margin-right: 0.6em;
384+
margin-left: 0.1em;
385+
margin-top: 0.2em;
386+
cursor: default;
387+
vertical-align: middle;
388+
}
389+
390+
391+
li.task-list-item.task-list-item-checked {
392+
text-decoration: line-through;
393+
color: var(--muted-text-color);
367394
}

0 commit comments

Comments
 (0)