Skip to content

Commit

Permalink
ok.. for now, in order to keep a good site layout we will move line b…
Browse files Browse the repository at this point in the history
…reaks into our code sections...
  • Loading branch information
yeus committed Jun 9, 2024
1 parent 4b5964b commit dacec2e
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
16 changes: 15 additions & 1 deletion src/components/tyMarkdown.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,20 @@
</template>

<style lang="sass">
/*.code-block-with-overlay
pre.q-markdown--code__inner
overflow: auto !important
max-width: 100% !important
white-space: pre !important
word-wrap: normal !important
max-height: 300px !important // adjust the height to your liking
.q-markdown pre,
.q-markdown code
white-space: pre-wrap // Ensure that long lines of code wrap within the container
word-break: break-word // Break long words to fit within the container
// we need this, because otherwise long words like links will
// completly mess up our scrolling and overflow etc...
.q-markdown
Expand Down Expand Up @@ -103,7 +117,7 @@ function addCopyButtons(md: MarkdownIt) {
// Custom HTML for the button
const customHtml = `
<div class="code-block-with-overlay">
<div class="code-block-with-overlay q-ma-xs">
${originalRenderedHtml}
<button class="copy-button q-btn q-btn-item non-selectable transparent q-btn--flat q-btn--rectangle
q-btn--actionable q-focusable q-hoverable q-btn--dense copy-button print-hide">
Expand Down
2 changes: 0 additions & 2 deletions src/pages/MarkdownPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
<q-markdown
v-if="markdownContent"
:src="markdownContent"
no-line-numbers
style="max-width: 800px"
/>
</q-page>
</template>
Expand Down

0 comments on commit dacec2e

Please sign in to comment.