Skip to content

Commit

Permalink
Einige Änderungen (CSS und Pfeilnavigation engl.) (#869)
Browse files Browse the repository at this point in the history
* "previous" and "next" relative path wrong '/2024/' instead of '../' for the english version.
The problem is not yet solved, just patched up

* "previous" and "next" relative path wrong '/2024/' instead of '../' for the english version.
The problem is not yet solved, just patched up

* Table, footnotes, coloring (category analysis) CSS customizations

* Table, footnotes, coloring (category analysis) CSS customizations

* Table, footnotes, coloring (category analysis) CSS customizations
  • Loading branch information
mm-baer authored Nov 11, 2024
1 parent 91ab4b2 commit 6e5180e
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 18 deletions.
37 changes: 20 additions & 17 deletions cntr-monitor/src/components/Post.js
Original file line number Diff line number Diff line change
Expand Up @@ -172,25 +172,28 @@ export default function Post({ data, pageContext, children }) {
return found !== -1
})
}

const next = posts[currentIndex + 1] || null
const previous = posts[currentIndex - 1] || null
// media machine: "previous" and "next" relative path wrong? '/2024/' instead of '../' for the english version.
// The problem is not yet solved, just patched up.
const pagination = (
<nav className={styles.pagination}>
{previous && (
<Link className={`${styles.paginationPrev} ${styles.paginationLink}`} rel="prev" to={`/2024/${previous.childMdx.fields.slug}`}>
<Arrow/>
<span>{t('Previous')} </span>
</Link>
)}
{next && (
<Link className={`${styles.paginationLink}`} rel="next" to={`/2024/${next.childMdx.fields.slug}`}>
<Arrow/>

const pagination = (
<nav className={styles.pagination}>
{previous && (
<Link className={`${styles.paginationPrev} ${styles.paginationLink}`} rel="prev" to={`../${previous.childMdx.fields.slug}`}>
<Arrow />
<span>{t('Previous')}</span>
</Link>
)}
{next && (
<Link className={`${styles.paginationLink}`} rel="next" to={`../${next.childMdx.fields.slug}`}>
<Arrow />
<span>{t('Next')}</span>
</Link>
)}
</nav>
)
<span>{t('Next')} ${next.childMdx.fields.slug}</span>
</Link>
)}
</nav>
)

const translationData = {
translations: data.translations.nodes,
Expand Down Expand Up @@ -249,7 +252,7 @@ export function Head({ data, pageContext, location }) {
}
const { primary, dark, light, knockout } = useColors(
data.issue.childMdx.frontmatter.color,
['Analyse', 'Analysis', 'Anhang', 'Appendix'].includes(data.post.childMdx.frontmatter.category)
['Analyse', 'Analysen', 'Analysis', 'Focus', 'Fokus', 'Anhang', 'Appendix'].includes(data.post.childMdx.frontmatter.category)
)

const bodyStyles = {
Expand Down
21 changes: 21 additions & 0 deletions cntr-monitor/src/components/_vars.scss
Original file line number Diff line number Diff line change
Expand Up @@ -158,3 +158,24 @@
letter-spacing: 0.065em;
word-spacing: 0.02em;
}
table{
text-align: left;
font-size: small;
line-height: 1.1rem;
border: 1px solid;
margin-bottom: 0.5rem;
tr{
vertical-align: top;
}
th,td{
border: 1px solid;
padding: 15px 5px;
}
thead{
tr{
font-weight: bold;
background: var(--fc-light);
border-bottom: 1px solid;
}
}
}
2 changes: 1 addition & 1 deletion cntr-monitor/src/components/global.scss
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ img {
word-break: break-word;
display: inline-block;
position: relative;
padding-left: 1em;
padding-left: 1.5em;
width: 100%;
border-radius: 3px;
&:target {
Expand Down

0 comments on commit 6e5180e

Please sign in to comment.