restored the page breaks display in texts

This commit is contained in:
2020-07-22 15:46:26 +02:00
parent def83059ed
commit feee680d1b
2 changed files with 61 additions and 33 deletions
+35 -7
View File
@@ -467,18 +467,46 @@ section[role="main-content"]{
} }
// <span role=\"pageBreak\" data-num=\"15\"></span> // <span role=\"pageBreak\" data-num=\"15\"></span>
span[role="pageBreak"]{ span[role="pageBreak"]{
display:block; display: inline-block;
border-left: 1px solid $bleuroi;
height:1.4em;
// word-spacing: 0;
margin: 0 0.3em;
line-height: 3;
position: relative; position: relative;
$w:3em; vertical-align: bottom;
&:after, &:before{
content: '';
display: block;
width:0.5em;
position: absolute;
}
&:after{
top:0;
left:0;
border-top: 1px solid $bleuroi;
}
&:before{
bottom:0;
right:0;
border-bottom: 1px solid $bleuroi;
}
}
span[role="pageNum"]{
// display:inline;
position: relative;
float:right;
// position: sticky;
$w:0.5em;
width:$w; height:0; width:$w; height:0;
margin-left:calc(100% - (#{$w} * 0.5)); margin-left:calc(100% - (#{$w} * 0.5));
// &:before // &:before
&:after{ &:after{
display: block; // display: block;
position: absolute; position: absolute;
font-size: 0.630em; font-size: 0.630em;
width:$w; height:$w; width:$w; height:$w*2;
line-height: $w *0.95; line-height: $w*1.7;
padding-left: 1em; padding-left: 1em;
border-right: 1px solid $bleuroilight; border-right: 1px solid $bleuroilight;
color: $bleuroi; color: $bleuroi;
@@ -490,9 +518,9 @@ section[role="main-content"]{
// bottom: 0.1em; // bottom: 0.1em;
// } // }
&:after{ &:after{
content:attr(title); content:attr(data-num);
border-top: 1px solid $bleuroilight; border-top: 1px solid $bleuroilight;
top:0.1em; // bottom:1.3em;
} }
} }
} }
+5 -5
View File
@@ -48,7 +48,7 @@ export default {
` data-uuid="${this.uuid}"` + ` data-uuid="${this.uuid}"` +
`>${this.tei}</div>` `>${this.tei}</div>`
this.parseLinks() this.parseLinks()
this.parsePageBreaks() // this.parsePageBreaks()
// console.log('EdText: builded html', this.html) // console.log('EdText: builded html', this.html)
}, },
parseLinks () { parseLinks () {
@@ -87,9 +87,9 @@ export default {
// console.log('this.html', this.html) // console.log('this.html', this.html)
} }
}, },
parsePageBreaks () { // parsePageBreaks () {
let pbs = this.html.match(/<span role="pageBreak"[^>]+><\/span>/g) // let pbs = this.html.match(/<span role="pageBreak"[^>]+><\/span>/g)
console.log('pagebreaks', pbs) // console.log('pagebreaks', pbs)
// if (pbs) { // if (pbs) {
// let pbparts, newpb, num // let pbparts, newpb, num
// for (var i = 0; i < pbs.length; i++) { // for (var i = 0; i < pbs.length; i++) {
@@ -111,7 +111,7 @@ export default {
// } // }
// } // }
// } // }
}, // },
onClickRef (e) { onClickRef (e) {
console.log('onClickRef(e)', e) console.log('onClickRef(e)', e)
this.$router.push({ this.$router.push({