Skip to content

Commit df1bab0

Browse files
committed
fix: blog post formatting
1 parent 158c66a commit df1bab0

2 files changed

Lines changed: 18 additions & 26 deletions

File tree

resources/css/app.css

Lines changed: 17 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -118,29 +118,21 @@
118118
--noise: 0;
119119
}
120120

121-
/* EasyMDE Preview Styles */
122-
.EasyMDEContainer h1 {
123-
@apply text-4xl font-bold mb-5;
124-
}
125-
126-
.EasyMDEContainer h2 {
127-
@apply text-2xl font-bold mb-3;
128-
}
129-
130-
.EasyMDEContainer h3 {
131-
@apply text-lg font-bold mb-3;
132-
}
133-
134-
/* EasyMDE Dark Mode Support */
135-
.EasyMDEContainer .CodeMirror {
136-
@apply bg-base-100 text-base-content;
137-
}
138-
139-
.EasyMDEContainer .CodeMirror-cursor {
140-
@apply border border-b-base-100;
141-
}
142-
143-
.EasyMDEContainer .editor-toolbar>button:hover,
144-
.EasyMDEContainer .editor-toolbar>.active {
145-
@apply bg-base-100 text-base-content;
121+
@layer components {
122+
#mainarticle {
123+
@apply text-base leading-relaxed max-w-none;
124+
color: var(--base-content);
125+
}
126+
#mainarticle p { @apply mb-4; }
127+
#mainarticle h1 { @apply text-2xl font-semibold mt-6 mb-2; }
128+
#mainarticle h2 { @apply text-xl font-semibold mt-5 mb-2; }
129+
#mainarticle h3 { @apply text-lg font-semibold mt-4 mb-2; }
130+
#mainarticle a { @apply underline; color: var(--primary); }
131+
#mainarticle code { @apply bg-gray-100 px-1 py-0.5 rounded font-mono text-sm; }
132+
#mainarticle pre { @apply p-4 rounded overflow-auto font-mono text-sm; background: #0f172a; color: #e6eef8; }
133+
#mainarticle img { @apply max-w-full h-auto block my-2 rounded-md; }
134+
#mainarticle ul, #mainarticle ol { @apply mb-4 ml-5; }
135+
#mainarticle blockquote { @apply p-3 mb-4 border-l-4 border-l-[rgba(0,0,0,0.08)]; background: rgba(0,0,0,0.02); }
136+
#mainarticle table { @apply w-full border-collapse mb-4; }
137+
#mainarticle th, #mainarticle td { @apply border px-3 py-2 text-left; border-color: rgba(0,0,0,0.08); }
146138
}

resources/views/livewire/blog/post-detail.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ class="w-full h-full object-cover hover:scale-105 transition-transform duration-
108108

109109
{{-- Article Body --}}
110110
<div class="card-body p-6 sm:p-10">
111-
<div class="prose prose-lg max-w-none">
111+
<div id="mainarticle" class="prose prose-lg max-w-none">
112112
{!! $parsedContent !!}
113113
</div>
114114

0 commit comments

Comments
 (0)