migrate to new git

This commit is contained in:
2025-08-29 01:27:25 +08:00
parent 946eb9961e
commit af2c152ef6
8623 changed files with 1000453 additions and 1 deletions

View File

@@ -0,0 +1,26 @@
.text-block {
/* border: .25pt solid #000; */
/* margin: 5mm; */
font-family: ;
text-align: center;
vertical-align: middle;
/* --divw: 120mm; */
/* --divh: 50mm; */
--line_len: 10;
--lines: 1;
--fs_w: var(--divw)/var(--line_len);
--fs_h: var(--divh)/var(--lines);
--fs: min(var(--fs_w), var(--fs_h));
width: var(--divw);
height: var(--divh);
font-size: var(--fs);
line-height: calc(var(--fs_h) * 1.0);
}
.vertical {
writing-mode: vertical-rl;
}

View File

@@ -0,0 +1,60 @@
$(".fit-text.horizon").each(function (i, e) {
var txt = $(this).text();
var htm = $(this).html();
var txt_arr = txt.split('\n');
var txt_arr2 = Array();
//debugger;
var line = 0;
var line_len = 1;
var css = "", htm_lines = "";
txt_arr.forEach((t, n) => {
var len = t.trim().length;
if (len > 0) {
line++;
if (len > line_len) { line_len = len }
txt_arr2.push(t.trim());
}
//console.log(n,t,t.trim().length);
});
//console.log(i, $(this).html(),$(this).text());
//console.log(i, txt==htm);
//console.log(i, txt_arr, line, line_len);
line_len = Math.ceil(line_len / 5) * 5;
//if(line>1){
css = "--lines:" + line + ";--line_len:" + line_len + ";";
htm_lines = txt_arr2.join("<br>");
$(this).attr("style", css);
$(this).html(htm_lines);
//}
//console.log(i, line, line_len, css);
});
$(".fit-text.vertical").each(function (i, e) {
var txt = $(this).text();
var htm = $(this).html();
var txt_arr = txt.split('\n');
var txt_arr2 = Array();
//debugger;
var line = 0;
var line_len = 1;
var css = "", htm_lines = "";
txt_arr.forEach((t, n) => {
var len = t.trim().length;
if (len > 0) {
line++;
if (len > line_len) { line_len = len }
txt_arr2.push(t.trim());
}
//console.log(n,t,t.trim().length);
});
//console.log(i, $(this).html(),$(this).text());
//console.log(i, txt==htm);
//console.log(i, txt_arr, line, line_len);
line_len = Math.ceil(line_len / 5) * 5;
//if(line>1){
css = "--lines:" + line_len + ";--line_len:" + line + ";";
htm_lines = txt_arr2.join("<br>");
$(this).attr("style", css);
$(this).html(htm_lines);
//}
//console.log(i, line, line_len, css);
});