Skip to content

Commit

Permalink
cimmit inicial
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrielcalarco committed Aug 7, 2020
0 parents commit 3619190
Show file tree
Hide file tree
Showing 7 changed files with 11,126 additions and 0 deletions.
201 changes: 201 additions & 0 deletions README.md

Large diffs are not rendered by default.

8 changes: 8 additions & 0 deletions css/tei.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
tei-div {
display: block;
}
tei-p {
display: block;
margin-top: .5em;
margin-bottom: .5em;
}
98 changes: 98 additions & 0 deletions example/css/tei.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
p.break {
font-family: Arial, Helvetica, sans-serif;
font-size: 80%;
border-top: thin solid silver;
color: gray;
}
tei-byline {
display: block;
text-align: center;
}
tei-closer {
display: block;
}
tei-closer>tei-salute {
display: block;
}
tei-closer>tei-signed {
display: block;
text-align: right;
}
tei-div {
display: block;
}
tei-div[type=dedication]>tei-lg {
margin: auto;
text-align: center;
}
tei-docauthor {
display: block;
text-align: center;
}
tei-docauthor>tei-name {
display: block;
font-size: 2em;
}
tei-docimprint {
display: block;
margin-top: 10em;
text-align: center;
}
tei-doctitle>tei-titlepart {
display: block;
text-align: center;
}
tei-doctitle>tei-titlepart[type=main] {
font-size: 3em;
}
tei-doctitle>tei-titlepart[type=subtitle] {
font-size: 2em;
}
tei-emph[rend=bold] {
font-weight: bold;
}
tei-figure {
display: block;
margin-top: 1em;
margin-bottom: 1em;
text-align: center;
}
tei-figure>tei-p {
font-size: 80%;
font-family: Arial, Helvetica, sans-serif;
text-align: center;
}
tei-hi[rend=italics] {
font-style: italic;
}
tei-l {
display: block;
}
tei-lg {
display: block;
margin-left: 5em;
}
tei-list[type=simple] {
list-style-type: none;
}
tei-list[type=simple]>tei-item {
display: list-item;
}
tei-p {
display: block;
margin-top: .5em;
margin-bottom: .5em;
text-align: justify;
}
tei-tei {
font-family: Georgia, 'Times New Roman', Times, serif;
}
tei-text {
display: block;
width: 750px;
margin: auto;
}
tei-titlepage {
display: block;
}

36 changes: 36 additions & 0 deletions example/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="css/tei.css">
<script src="../js/CETEI.js"></script>
<script>
let c = new CETEI();
let behaviors = {
"tei": {
"head": function(e) {
let level = document.evaluate("count(ancestor::tei-div)", e, null, XPathResult.NUMBER_TYPE, null);
let result = document.createElement("h" + (level.numberValue>7 ? 7 : level.numberValue));
for (let n of Array.from(e.childNodes)) {
result.appendChild(n.cloneNode());
}
return result;
},
"lb": ["<br>"],
/* Insert a <p> with the content of the <pb>'s @n attribute inside it
Add a line above with CSS */
"pb": ["<p class=\"break\">$@n</p>"],
}
};
c.addBehaviors(behaviors);
c.getHTML5('../fpn-washington.xml', function(data){
document.getElementsByTagName('body')[0].appendChild(data);
});
</script>
</head>
<body>

</body>
</html>
Loading

0 comments on commit 3619190

Please sign in to comment.