restored the page breaks display in texts
This commit is contained in:
+35
-7
@@ -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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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,31 +87,31 @@ 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++) {
|
||||||
// pbparts = RegExp(/<span role="pageBreak" data-num="(.+)"><\/span>/).exec(pbs[i], 'g')
|
// pbparts = RegExp(/<span role="pageBreak" data-num="(.+)"><\/span>/).exec(pbs[i], 'g')
|
||||||
// if (!pbparts) {
|
// if (!pbparts) {
|
||||||
// console.warn(`pageBreak ${i} maformed`, pbs[i])
|
// console.warn(`pageBreak ${i} maformed`, pbs[i])
|
||||||
// } else {
|
// } else {
|
||||||
// // console.log('pbparts', pbparts)
|
// // console.log('pbparts', pbparts)
|
||||||
// num = pbparts[1]
|
// num = pbparts[1]
|
||||||
// this.pages.push(num)
|
// this.pages.push(num)
|
||||||
// newpb = `<span` +
|
// newpb = `<span` +
|
||||||
// // ` id="page-break-${num}"` +
|
// // ` id="page-break-${num}"` +
|
||||||
// ` role="pageBreak"` +
|
// ` role="pageBreak"` +
|
||||||
// ` data-num="${num}"` +
|
// ` data-num="${num}"` +
|
||||||
// ` data-num-prev="${num - 1}"` +
|
// ` data-num-prev="${num - 1}"` +
|
||||||
// ` />`
|
// ` />`
|
||||||
// // console.log('newpb', newpb)
|
// // console.log('newpb', newpb)
|
||||||
// this.html = this.html.replace(pbs[i], newpb)
|
// this.html = this.html.replace(pbs[i], newpb)
|
||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
},
|
// },
|
||||||
onClickRef (e) {
|
onClickRef (e) {
|
||||||
console.log('onClickRef(e)', e)
|
console.log('onClickRef(e)', e)
|
||||||
this.$router.push({
|
this.$router.push({
|
||||||
|
|||||||
Reference in New Issue
Block a user