Skip to content

Commit

Permalink
fix: table images sizes and markdown style
Browse files Browse the repository at this point in the history
  • Loading branch information
d-koppenhagen committed Jan 2, 2024
1 parent c98b856 commit 441e24d
Show file tree
Hide file tree
Showing 5 changed files with 45 additions and 45 deletions.
5 changes: 4 additions & 1 deletion src/app/pages/blog/[slug].page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,10 @@ import { SeriesListComponent } from '../../components/series-list/series-list.co
}
<section class="blog-content">
<analog-markdown [content]="post.content"></analog-markdown>
<analog-markdown
[content]="post.content"
classes="markdown-content"
></analog-markdown>
@if (
!post.content &&
post.attributes.publishedAt &&
Expand Down
43 changes: 0 additions & 43 deletions src/app/pages/blog/slug.page.style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@ h1 {
font-size: 1.4em;
}

h2.sub-heading {
font-size: 0.9em;
}

.extra-info {
display: flex;
flex-direction: row-reverse;
Expand All @@ -35,28 +31,6 @@ h2.sub-heading {
height: 50px;
}

table > tbody td {
vertical-align: top;
min-width: 120px;

> img {
max-width: 100px;
}

> pre {
margin: 1em 0;
border-radius: 5px;
padding: 5px;
background: #2d2d2d;
}

code {
background: none;
white-space: pre-wrap;
overflow-wrap: anywhere;
}
}

.published-at {
display: flex;
align-items: center;
Expand Down Expand Up @@ -113,10 +87,6 @@ span.image > img.thumbnail {
}
}
}

table > tbody td > img {
max-width: 70px;
}
}

@media screen and (max-width: 460px) {
Expand All @@ -129,19 +99,6 @@ span.image > img.thumbnail {
.blog-footer {
padding: 0 24px;
}

table > tbody td > img {
max-width: 40px;
}
}

::slotted(h1) {
color: rgb(51, 6, 37);
background-color: rgb(248, 211, 236);
padding: 5px;
border-radius: 5px;
font-size: 1.4em;
width: fit-content;
}

.blog-header img {
Expand Down
5 changes: 4 additions & 1 deletion src/app/pages/projects/[slug].page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,10 @@ import { PostAttributes } from '../../types';
</section>
<section class="project-content">
<analog-markdown [content]="post.content"></analog-markdown>
<analog-markdown
[content]="post.content"
classes="markdown-content"
></analog-markdown>
<div class="edit-on-github">
<a
[href]="editOnGithubLink(post.filename)"
Expand Down
35 changes: 35 additions & 0 deletions src/markdown-content.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
.markdown-content {
table > tbody td {
vertical-align: top;
min-width: 120px;

img {
max-width: 100px;
}

> pre {
margin: 1em 0;
border-radius: 5px;
padding: 5px;
background: #2d2d2d;
}

code {
background: none;
white-space: pre-wrap;
overflow-wrap: anywhere;
}
}

@media screen and (max-width: 560px) {
table > tbody td > img {
max-width: 70px;
}
}

@media screen and (max-width: 360px) {
table > tbody td > img {
max-width: 40px;
}
}
}
2 changes: 2 additions & 0 deletions src/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -148,3 +148,5 @@ img {
html {
scroll-behavior: smooth;
}

@import 'markdown-content';

0 comments on commit 441e24d

Please sign in to comment.