diff --git a/.gitignore b/.gitignore index 1a478c6..71b805a 100644 --- a/.gitignore +++ b/.gitignore @@ -166,7 +166,7 @@ cython_debug/ # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore # and can be added to the global gitignore or merged into this file. For a more nuclear # option (not recommended) you can uncomment the following to ignore the entire idea folder. -#.idea/ +.idea/ # Ruff stuff: .ruff_cache/ diff --git a/myblog/blog/templates/blog/detail.html b/myblog/blog/templates/blog/detail.html index 9158afa..53bfdce 100644 --- a/myblog/blog/templates/blog/detail.html +++ b/myblog/blog/templates/blog/detail.html @@ -24,6 +24,30 @@ display: block; margin: 10px 0; } + + .post-content pre { + background-color: #f4f4f4; + border: 1px solid #ddd; + border-radius: 4px; + padding: 10px; + overflow-x: auto; + margin: 10px 0; + } + + .post-content code { + font-family: 'Courier New', Courier, monospace; + background-color: #f4f4f4; + padding: 2px 4px; + border-radius: 3px; + font-size: 0.9em; + } + + .post-content pre code { + background-color: transparent; + padding: 0; + border-radius: 0; + font-size: 0.9em; + }