Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F103590771
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Mon, Mar 3, 05:19
Size
28 KB
Mime Type
text/x-diff
Expires
Wed, Mar 5, 05:19 (1 d, 13 h)
Engine
blob
Format
Raw Data
Handle
24620335
Attached To
rTPELEVENTY tei-publisher-eleventy-plugin
View Options
diff --git a/src/_data/data.json b/src/_data/data.json
index 9b6765e..6a62079 100644
--- a/src/_data/data.json
+++ b/src/_data/data.json
@@ -1,6 +1,10 @@
{
+ "title": "Zur Genealogie der Moral",
"files": [{ "name":"D20.xml", "target": "dm", "prefix":"srcD_surface_", "type": "doc"},
- { "name":"E40.xml", "target": "ed", "type": "doc"},
{ "name":"K11.xml", "target": "cb", "type": "doc"},
- { "name":"D20_xAppendix.xml", "target": "appendix", "type": "appendix"} ]
+ { "name":"E40.xml", "target": "ed", "type": "doc"},
+ { "name":"D20_xAppendix.xml", "target": "appendix", "type": "appendix"} ],
+ "appendices": [{"title": "Dokumente zur Entstehungs- und Druckgeschichte", "target":"appendix"},
+ {"title":"Querverweise","target":"qv"},
+ {"title": "Chronik", "target":"timeline"}]
}
diff --git a/src/index.njk b/src/index.njk
index fd71b92..7f3c7d3 100644
--- a/src/index.njk
+++ b/src/index.njk
@@ -1,17 +1,48 @@
---
layout: base.njk
style: "/resources/css/browse.css"
---
+<section class="breadcrumbs">
+ <h5 class="tei-title4">{{data.title}}</h5>
+</section>
<section class="panels">
<paper-card class="doclist" data-i18n="[heading]browse.documents" heading="documents">
<div class="card-content">
<div class="browse">
<div id="document-list">
- <pb-paginate id="paginate" per-page="10" range="5" subscribe="search" emit="search"></pb-paginate>
{% tppost "api/static-collection", data %}
</div>
</div>
</div>
</paper-card>
+ <paper-card class="doclist" heading="Anhang">
+ <div class="card-content">
+ <div class="browse">
+ <div id="document-list">
+ <div class="collection">
+ <div>
+ <ul class="documents">
+ {% for entry in data.appendices %}
+ <li class="document">
+ <div class="document-info">
+ <header>
+ <div class="tei-teiHeader3">
+ <div class="header-short">
+ <a class="tei-titleStmt1" href="{{entry.target}}/index.html">
+ <h5 class="tei-title1">{{entry.title}}</h5>
+ </a>
+ </div>
+ </div>
+ </header>
+ </div>
+ </li>
+ {% endfor %}
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ </paper-card>
</section>
diff --git a/src/qv.njk b/src/qv.njk
new file mode 100644
index 0000000..46774e6
--- /dev/null
+++ b/src/qv.njk
@@ -0,0 +1,35 @@
+---
+layout: base.njk
+doc: "QV.xml"
+odd: "nietzsche-ed"
+view: "div"
+origin: "qv"
+style: "/resources/css/qv.css"
+scroll: "/resources/scripts/myscroll.js"
+script: "/resources/scripts/qv.js"
+---
+<pb-document id="document1" path="{{doc}}" odd="{{odd}}" view="{{view}}" data-origin-path="{{origin}}"></pb-document>
+ <div class="offcanvas offcanvas-start" tabindex="-1" id="toc-panel" aria-labelledby="offcanvasExampleLabel">
+ <div class="offcanvas-header">
+ <h5 class="offcanvas-title" id="offcanvasExampleLabel">Inhalt</h5>
+ <button type="button" class="btn-close" data-bs-dismiss="offcanvas" aria-label="Close"></button>
+ </div>
+ <div class="offcanvas-body toc">
+ {% tpfetch "api/document/" + (doc | urlencode) + "/contents?target=transcription&icons=true" %}
+ </div>
+ </div>
+ {% include "toolbar-surface.njk" %}
+ <div class="myrow">
+ <div class="mycol mytext">
+ <section class="breadcrumbs">
+ <pb-view id="title-view1" src="document1" xpath="//teiHeader/fileDesc/titleStmt/title[1]" view="single" static="{{context}}">
+ <pb-param name="header" value="short"/>
+ </pb-view>
+ </section>
+ <main class="content-body">
+ <pb-view id="view1" src="document1" no-scroll="no-scroll" view="single" xpath="//text/body" subscribe="transcription" emit="transcription" static="{{context}}" column-separator=".tei-cb">
+ <pb-param name="mode" value="querverweis"></pb-param>
+ </pb-view>
+ </main>
+ </div>
+ </div>
diff --git a/src/resources/css/browse.css b/src/resources/css/browse.css
index d7ffa5c..02f3dc8 100644
--- a/src/resources/css/browse.css
+++ b/src/resources/css/browse.css
@@ -1,241 +1,250 @@
- main {
- margin: 0 20px 0 20px;
- --pb-browse-toolbar-justify-content: space-between;
- }
-
- app-header-layout {
- background-image: url('resources/images/triangle-background.jpg');
- background-size: 100% auto;
- background-repeat-x: no-repeat;
- background-color: #e8fafa;
- min-height: 100vh;
- }
-
- @media (max-width: 1023px) {
- main {
- margin: 0 8px 0 8px;
- }
- .doclist {
- margin-bottom: 20px;
- }
- .documents {
- padding-left: 10px;
- }
- .documents .label {
- display: none;
- }
- .toolbar pb-search {
- padding-left: 0;
- }
- #facets {
- display: none;
- }
- app-header-layout {
- background-repeat-y: no-repeat;
- }
- }
-
- .tp-title {
- font-family: var(--pb-heading-font-family);
- font-size: 36px;
- font-weight: 400;
- }
-
- .tp-title span {
- color: #9e9e9e;
- font-size: 26px;
- margin-top: 12px;
- }
-
- @media (min-width: 1024px) {
- .toolbar {
- display: none;
- }
- .panels {
- display: grid;
- grid-template-columns: 1fr minmax(220px, 20vw);
- column-gap: 16px;
- }
- }
-
- .panels {
- margin-bottom: 40px;
- }
-
- .panels .doclist {
- --paper-tabs-selection-bar-color: #607D8B;
- --paper-tab-content: {
- font-family: var(--pb-heading-font-family);
- font-weight: 400;
- }
- ;
- --paper-card-header: {
- background-color: #d1dae0;
- }
- ;
- --paper-card-header-text: {
- font-family: var(--pb-heading-font-family);
- font-size: 16px;
- font-weight: 400;
- }
- ;
- }
-
- .panels .doclist .card-content {
- padding: 0;
- }
-
- .panels .doclist .browse {
- display: grid;
- grid-template-columns: auto 1fr;
- column-gap: 16px;
- padding: 0;
- }
-
- .panels .doclist dts-client {
- padding: 0 20px;
- }
-
- aside {
- flex: 1;
- display: flex;
- flex-direction: column;
- }
-
- aside .odds,
- aside .upload {
- --paper-card-header: {
- background-color: #607D8B;
- }
- ;
- --paper-card-header-text: {
- font-family: var(--pb-heading-font-family);
- font-size: 16px;
- font-weight: 400;
- color: white;
- }
- ;
- }
-
- aside .upload {
- margin-bottom: 20px;
- width: 100%;
- }
-
- .browse aside {
- padding: 0 10px;
- }
-
- pb-select {
- margin-top: 0;
- }
-
- #document-list {
- margin-top: 1rem;
- }
-
- .parent-link iron-icon {
- padding-right: 4px;
- }
-
- .parent-link {
- display: block;
- margin-bottom: 10px;
- padding: 6px 0;
- }
-
- .collection {
- margin-top: 8px;
- padding-top: 12px;
- /* border-top: thin solid var(--paper-grey-300); */
- }
-
- .documents img, .documents svg {
- margin-right: 40px;
- }
-
- @media (max-width: 1023px) {
- .documents img, .documents svg {
- display: none;
- }
- }
-
- .documents ul {
- list-style: none;
- }
-
- .documents div {
- margin: 0;
- }
-
- .documents .error {
- color: #c02020;
- }
-
- .documents a,
- .documents a:visited {
- color: #303F9F;
- text-decoration: none;
- }
-
- .documents li {
- display: flex;
- flex-direction: row;
- margin-bottom: 10px;
- padding: 6px 0;
- border-bottom: thin solid var(--paper-grey-300);
- }
-
- .documents li:last-child {
- border: none;
- }
-
- .documents .document-select {
- flex: 0 0;
- margin-right: 20px;
- }
-
- h1,
- h2,
- h3,
- h4,
- h5,
- h6 {
- font-family: var(--pb-heading-font-family);
- font-weight: 400 !important;
- line-height: 1.2;
- }
-
- h5 {
- font-size: 1rem;
- margin: 0;
- }
-
- .welcome {
- display: grid;
- grid-template-columns: 1fr 400px;
- align-items: center;
- min-height: 15vh;
- width: 100%;
- }
-
- .side {
- max-width: 40vw;
- padding-left: 3em;
- }
-
- .side strong {
- color: var(--pb-color-focus);
- }
-
- .thumbnail img {
- border-radius:35px;
- border-color: #19232d;
- border-style: groove;
- box-shadow: 1px 1px 1px 1px #19232d;
- }
-
- /* hide Download menu button */
- #download-button {
- display: none;
- }
+main {
+ margin: 0 20px 0 20px;
+ --pb-browse-toolbar-justify-content: space-between;
+}
+
+app-header-layout {
+ background-image: url('resources/images/triangle-background.jpg');
+ background-size: 100% auto;
+ background-repeat-x: no-repeat;
+ background-color: #e8fafa;
+ min-height: 100vh;
+}
+
+@media (max-width: 1023px) {
+ main {
+ margin: 0 8px 0 8px;
+ }
+ .doclist {
+ margin-bottom: 20px;
+ }
+ .documents {
+ padding-left: 10px;
+ }
+ .documents .label {
+ display: none;
+ }
+ .toolbar pb-search {
+ padding-left: 0;
+ }
+ #facets {
+ display: none;
+ }
+ app-header-layout {
+ background-repeat-y: no-repeat;
+ }
+ .panels {
+ display: grid;
+ grid-template-columns: 1fr minmax(220px, 20vw);
+ column-gap: 16px;
+ max-width: content-width;
+ }
+}
+
+.tp-title {
+ font-family: var(--pb-heading-font-family);
+ font-size: 36px;
+ font-weight: 400;
+}
+
+.tp-title span {
+ color: #9e9e9e;
+ font-size: 26px;
+ margin-top: 12px;
+}
+
+@media (min-width: 1024px) {
+ .toolbar {
+ display: none;
+ }
+ .panels {
+ display: grid;
+ grid-template-columns: 1fr minmax(220px, 20vw);
+ column-gap: 16px;
+ max-width: 1300px;
+ }
+}
+
+.panels {
+ margin-bottom: 40px;
+ margin-right: auto;
+ margin-left: auto;
+}
+
+.panels .doclist {
+ --paper-tabs-selection-bar-color: #607D8B;
+ --paper-tab-content: {
+ font-family: var(--pb-heading-font-family);
+ font-weight: 400;
+ }
+ ;
+ --paper-card-header: {
+ background-color: #d1dae0;
+ }
+ ;
+ --paper-card-header-text: {
+ font-family: var(--pb-heading-font-family);
+ font-size: 16px;
+ font-weight: 400;
+ }
+ ;
+}
+
+.panels .doclist .card-content {
+ padding: 0;
+}
+
+.panels .doclist .browse {
+ display: grid;
+ grid-template-columns: auto 1fr;
+ column-gap: 16px;
+ padding: 0;
+}
+
+.panels .doclist dts-client {
+ padding: 0 20px;
+}
+
+aside {
+ flex: 1;
+ display: flex;
+ flex-direction: column;
+}
+
+aside .odds,
+aside .upload {
+ --paper-card-header: {
+ background-color: #607D8B;
+ }
+ ;
+ --paper-card-header-text: {
+ font-family: var(--pb-heading-font-family);
+ font-size: 16px;
+ font-weight: 400;
+ color: white;
+ }
+ ;
+}
+
+aside .upload {
+ margin-bottom: 20px;
+ width: 100%;
+}
+
+.browse aside {
+ padding: 0 10px;
+}
+
+pb-select {
+ margin-top: 0;
+}
+
+#document-list {
+ margin-top: 1rem;
+}
+
+.parent-link iron-icon {
+ padding-right: 4px;
+}
+
+.parent-link {
+ display: block;
+ margin-bottom: 10px;
+ padding: 6px 0;
+}
+
+.collection {
+ margin-top: 8px;
+ padding-top: 12px;
+ /* border-top: thin solid var(--paper-grey-300); */
+}
+
+.documents img, .documents svg {
+ margin-right: 40px;
+}
+
+@media (max-width: 1023px) {
+ .documents img, .documents svg {
+ display: none;
+ }
+}
+
+.documents ul {
+ list-style: none;
+}
+
+.documents div {
+ margin: 0;
+}
+
+.documents .error {
+ color: #c02020;
+}
+
+.documents a,
+.documents a:visited {
+ color: #303F9F;
+ text-decoration: none;
+}
+
+.documents li {
+ display: flex;
+ flex-direction: row;
+ margin-bottom: 10px;
+ padding: 6px 0;
+ border-bottom: thin solid var(--paper-grey-300);
+}
+
+.documents li:last-child {
+ border: none;
+}
+
+.documents .document-select {
+ flex: 0 0;
+ margin-right: 20px;
+}
+
+h1,
+h2,
+h3,
+h4,
+h5,
+h6 {
+ font-family: var(--pb-heading-font-family);
+ font-weight: 400 !important;
+ line-height: 1.2;
+}
+
+h5 {
+ font-size: 1rem;
+ margin: 0;
+}
+
+.welcome {
+ display: grid;
+ grid-template-columns: 1fr 400px;
+ align-items: center;
+ min-height: 15vh;
+ width: 100%;
+}
+
+.side {
+ max-width: 40vw;
+ padding-left: 3em;
+}
+
+.side strong {
+ color: var(--pb-color-focus);
+}
+
+.thumbnail img {
+ border-radius:35px;
+ border-color: #19232d;
+ border-style: groove;
+ box-shadow: 1px 1px 1px 1px #19232d;
+}
+
+/* hide Download menu button */
+#download-button {
+ display: none;
+}
diff --git a/src/resources/css/qv.css b/src/resources/css/qv.css
new file mode 100644
index 0000000..3390ceb
--- /dev/null
+++ b/src/resources/css/qv.css
@@ -0,0 +1,22 @@
+:root {
+ --scroll-top: 128px;
+}
+body {
+ --pb-view-scroll-margin-top: var(--scroll-top, 128px);
+}
+.qvEntry {
+ scroll-margin-top: var(--scroll-top, 128px);
+}
+
+#view1 {
+ flex: 1 1;
+ display: flex;
+ align-self: center;
+ max-width: 60em;
+}
+.content-body {
+ position: relative;
+ display: flex;
+ justify-content: center;
+ padding: 0 20px;
+}
diff --git a/src/resources/css/theme.css b/src/resources/css/theme.css
index 599b9f7..c4a6166 100644
--- a/src/resources/css/theme.css
+++ b/src/resources/css/theme.css
@@ -1,469 +1,470 @@
@import url("/resources/fonts/font.css");
.myhighlight {
background: var(--pb-toolbar-background-color);
scroll-margin-top: var(--scroll-top, 128px);
}
a {
color: inherit;
}
h1.year {
font-size: 2rem;
}
ul.letters, ul.pages {
color: grey;
font-size: 80%;
list-style-type: '- ';
}
div#pageInfo {
margin-top: 30px;
width: 20%;
position: relative;
height: 100%;
}
.noDisplay {
display: none;
}
#fixedContent {
position: fixed;
overflow-y: scroll;
height: 60%;
}
.edRefLB {
display: none;
}
.logo {
background-image: url("../images/tei-publisher-logo-contrast-color.svg");
}
.splash {
background-image: url("../images/tei-publisher-logo-color.svg");
}
.menubar {
background-image: none;
}
.toolbar {
background-image: none;
}
app-header {
background-image: none;
}
body {
--pb-splash-image-size: 360px auto;
--pb-splash-background-color: var(--pb-color-inverse);
--pb-logo-image-width: 140px;
--pb-logo-image-height: 60px;
--pb-base-font-family: 'Roboto', 'Noto', sans-serif;
--pb-base-font-size: 16px;
--pb-base-line-height: 1.42857143;
--pb-base-font-weight: 300;
--pb-base-font: var(--pb-base-font-weight) var(--pb-base-font-size)/var(--pb-base-line-height) var(--pb-base-font-family);
--pb-serif-font-family: "Junicode", Georgia, "Times New Roman", serif;
--pb-content-font-family: var(--pb-serif-font-family);
--pb-content-font-weight:300;
--pb-content-font-size: 20px;
--pb-heading-font-family: "Oswald", Verdana, "Helvetica", sans-serif;
--pb-heading-font-weight: 400 !important;
--pb-heading-line-height: 1.2;
--pb-breadcrumbs-font-size: 18px;
--pb-color-primary: #303030;
--pb-color-inverse: #F0F0F0;
--pb-color-lighter: #35424b;
--pb-color-focus: #f6a623;
--pb-annotation-stripes-light: #e0e0ef;
--pb-annotation-stripes-dark: #50505f;
--pb-drawer-background-color: var(--pb-color-inverse);
--pb-menubar-background-color: #35424b;
--pb-menubar-color: var(--pb-color-inverse);
--pb-toolbar-background-color: #d1dae0;
--pb-toolbar-color: var(--pb-color-primary);
--paper-tooltip-delay-in: 200;
--pb-footnote-font-size: 13px;
--pb-footnote-font-family: var(--pb-content-font-family);
--pb-footnote-font-weight: var(--pb-content-font-weight);
--pb-footnote-color: #303030;
--pb-footnote-padding: 0 0 0 .25em;
--pb-popover-theme: "light-border";
--pb-popover-max-width: 480px;
--pb-popover-font-size: 16px;
--pb-popover-line-height: 1.2;
--pb-popover-placement: "bottom";
--pb-popover-fallback-placement: "top right left";
--pb-lang-input-color: var(--pb-color-inverse);
--pb-lang-label-color: var(--pb-color-inverse);
--pb-link-color: black;
--pb-link-font-family: var(--pb-serif-font-family);
--pb-highlight-color: #F9E976;
--paper-input-container-focus-color: var(--pb-color-focus);
--pb-view-max-width: 920px;
font: var(--pb-base-font);
color: var(--pb-color-primary);
margin: 0;
}
html {
font-size: var(--pb-base-font-size);
}
*:focus {
outline: none;
}
.splash {
position: fixed;
top: 0;
bottom: 0;
left: 0;
right: 0;
visibility: hidden;
opacity: 0;
background-color: #ffffff;
background-position: center center;
background-size: var(--pb-splash-image-size);
background-repeat: no-repeat;
transition: visibility 0s linear 300ms, opacity 300ms;
}
pb-page[unresolved]~.splash {
visibility: visible;
opacity: 1;
transition: visibility 0s linear 0s, opacity 300ms;
}
app-toolbar {
--app-toolbar-font-size: 16px;
}
app-toolbar pb-search {
--pb-search-label-color: var(--pb-menubar-color);
--pb-search-input-color: var(--pb-menubar-color);
--pb-search-focus-color: var(--pb-color-focus);
padding-left: 20px;
}
app-toolbar .menuitem {
display: inherit;
}
app-drawer {
--pb-lang-item-color: var(--pb-color-primary);
--pb-lang-input-color: var(--pb-color-primary);
--pb-lang-label-color: var(--paper-grey-600);
}
.drawer-content {
overflow: auto;
height: 100%;
padding: 8px 10px;
text-align: left;
}
.drawer-content pb-collapse h3 {
margin-bottom: 0;
margin-top: 0;
}
.drawer-content paper-listbox {
margin: 0;
}
app-drawer .settings, app-drawer pb-collapse {
display: flex;
flex-direction: column;
}
app-drawer paper-listbox {
width: 100%;
}
app-drawer a, app-drawer a:link {
text-decoration: none;
color: inherit;
}
app-drawer-layout:not([narrow]) [drawer-toggle] {
display: none;
}
.caveat-content {
overflow: auto;
height: 100%;
padding: 8px 10px;
text-align: left;
font-size: smaller;
}
.container {
top: 128px;
position: relative;
+ max-width: 100%;
}
.toolbar {
justify-content: space-between;
background-color: var(--pb-toolbar-background-color);
color: var(--pb-toolbar-color);
position: fixed;
z-index: 10;
width: 100%;
left: 0px;
top: 62px;
}
.navbar {
position: fixed;
z-index: 10;
width: 100%;
height: 62px;
left: 0px;
}
.toolbar a {
color: inherit;
text-decoration: none;
}
[drawer-toggle] {
padding-right: 0;
}
.menubar {
justify-content: space-between;
background-color: var(--pb-menubar-background-color);
color: var(--pb-menubar-color);
--pb-search-suggestions-color: var(--pb-menubar-color);
--pb-search-suggestions-background: var(--pb-menubar-background-color);
}
.menubar pb-media-query {
flex: 1 0;
}
.menubar a, .menubar paper-menu-button {
margin: auto 8px;
display: block;
color: var(--pb-menubar-color);
text-decoration: none;
}
.menubar .logo {
margin: 0 16px 0 0;
}
.menubar .gitlab {
margin-left: 16px;
margin-right: 16px;
}
.menubar .gitlab img {
height: 32px;
}
.menubar pb-login {}
.menubar pb-lang {
text-align: right;
flex: 1 0;
--pb-lang-item-color: var(--pb-menubar-color);
}
.menubar paper-item a {
color: var(--pb-color-primary);
margin: 0;
}
[main-title] {
display: inline-block;
}
.logo {
background-repeat: no-repeat;
background-size: auto auto;
background-position: left center;
width: var(--pb-logo-image-width);
height: var(--pb-logo-image-height);
cursor: pointer;
}
pb-progress {
width: 100%;
}
pb-view-type {
font-size: .75em;
}
@media (max-width: 768px) {
#downloadDialog {
width: 100%;
}
}
@media (min-width: 769px) {
#downloadDialog {
width: 50%;
}
}
/* .breadcrumbs {
margin: 10px 0 0 20px;
} */
pb-view, pb-view-annotate {
font-family: var(--pb-content-font-family);
font-size: var(--pb-content-font-size);
margin: 0 16px;
position: relative;
}
.breadcrumbs pb-view {
font-weight: 400;
font-size: var(--pb-breadcrumbs-font-size);
max-width: none;
}
@media (min-width: 769px) {
pb-view, pb-view-annotate {
max-width: max-content;
}
}
pb-popover {
text-align: left !important;
}
h1, h2, h3, h4, h5, h6 {
font-family: var(--pb-heading-font-family);
font-weight: var(--pb-heading-font-weight);
line-height: var(--pb-heading-line-height);
}
pb-drawer {
top: 128px;
background-color: var(--pb-drawer-background-color);
overflow: auto;
height: calc(100vh - 128px);
}
.toc ul {
list-style-type: none;
margin: 0;
padding: 0;
}
.toc ul ul {
margin-left: 28px;
}
.toc li {
margin-bottom: .5em;
}
.toc li:first-child {
margin-top: .5em;
}
.toc pb-link {
display: block;
}
.toc li>pb-link {
margin-left: 28px;
}
.toc pb-link {
font-family: var(--pb-link-font-family);
padding: 4px 8px;
}
.toc pb-link a {
color: var(--pb-link-color);
text-decoration: var(--pb-link-text-decoration);
}
.toc h1, .toc h2, .toc h3, .toc h4, .toc h5 {
font-family: var(--pb-link-font-family);
}
.toc [slot=collapse-trigger] pb-link {
margin-left: 0px;
}
.version {
text-align: right;
font-size: 0.85em;
padding: 1em;
color: var(--pb-color-lighter);
}
.version span {
font-weight: bold;
}
/* Display KWIC search results */
.matches {
margin-left: 20px;
margin-top: 10px;
font-family: var(--pb-content-font-family);
}
.matches .hi {
color: var(--pb-color-focus);
}
.matches .count {
margin-top: 1em;
}
.matches .count::before {
content: '[';
}
.matches .count::after {
content: ']';
}
.facets {
flex: 0;
min-width: 220px;
}
.facets h3 {
display: flex;
flex-direction: row;
align-items: center;
justify-content:space-between;
}
.facets h3 paper-checkbox {
margin-left: 16px;
font-size: 11px;
}
.facets table {
font-size: 14px;
width:100%;
}
.facets table table {
padding-left: 16px;
width: 100%;
}
.facets table td {
padding: 4px 0;
}
.facets table td:nth-child(2) {
color: #808080;
text-align: right;
padding-left: 1em;
vertical-align: middle;
}
.gitlab img {
max-height: var(--pb-logo-image-height);
}
diff --git a/src/resources/scripts/myscroll.js b/src/resources/scripts/myscroll.js
index 91c2daf..3899442 100644
--- a/src/resources/scripts/myscroll.js
+++ b/src/resources/scripts/myscroll.js
@@ -1,46 +1,46 @@
function showTarget(target, root){
target.scrollIntoView(true);
root.querySelectorAll('.myhighlight').forEach(highlighted =>{
highlighted.classList.remove('myhighlight');
});
if (target.classList.contains('noscroll') || target.classList.contains('timelineEntry')) {
target.classList.add("myhighlight");
}
}
document.addEventListener('DOMContentLoaded', function () {
const appHeader = document.querySelector('app-toolbar');
const root = document.querySelector(':root');
if (appHeader && root) {
const headerHeight = appHeader.getBoundingClientRect().bottom;
root.style.setProperty('--scroll-top', headerHeight + 'px');
}
pbEvents.subscribe("pb-update", "transcription", (ev) => {
console.log(ev);
const id = window.location.hash
- if (id && pbRegistry.state.path.startsWith('meta-')){
+ if (id && (pbRegistry.state.path.startsWith('meta-') || pbRegistry.state.path.startsWith('qv'))){
console.log('my pb-update', id, ev.detail.root.querySelector(id))
const target = ev.detail.root.querySelector(id);
if (target){
showTarget(target, ev.detail.root);
}
}
});
pbEvents.subscribe("my-scroll", "transcription", (ev) => {
const target = ev.detail.source.target.renderRoot.querySelector(ev.detail.id)
if (target) {
showTarget(target, ev.detail.source.target.renderRoot);
}
});
pbEvents.subscribe("pb-refresh", "transcription", (ev) => {
const id = document.location.hash.substring(1)
if (id){
const target = document.getElementById(id);
if (target){
showTarget(target, document);
}
}
});
});
diff --git a/src/resources/scripts/qv.js b/src/resources/scripts/qv.js
new file mode 100644
index 0000000..5b34b27
--- /dev/null
+++ b/src/resources/scripts/qv.js
@@ -0,0 +1,28 @@
+document.addEventListener('DOMContentLoaded', function () {
+ /* Fetch json and save files information for updating a[@href] in genesisView1 and concordanceView1.
+ */
+ let files = [];
+ let jsonDealer = new JsonDealer();
+ jsonDealer.fetch('/resources/data/data.json').then((data) =>{
+ files = data.files;
+ });
+
+ pbEvents.subscribe("pb-update", "transcription", (ev) => {
+ ev.detail.root.querySelectorAll('[data-doc]').forEach(a =>{
+ let fileFilter = files.filter(file =>file.name == a.dataset.doc)
+ if (fileFilter.length > 0){
+ let id = (fileFilter[0].prefix) ? fileFilter[0].prefix + a.dataset.id : a.dataset.id;
+ // Activate <a/> for non self-referencing links
+ if(pbRegistry.state.path != fileFilter[0].target + '/index.html' || pbRegistry.state.id != id){
+ // Activate only those whose targets exist
+ if (existingPBs[fileFilter[0].target] && existingPBs[fileFilter[0].target].filter(pb =>pb.id == id).length > 0){
+ a.setAttribute('href', '/' + fileFilter[0].target + '/index.html?id=' + id);
+ }
+ }
+ }
+ });
+
+ });
+
+});
+
Event Timeline
Log In to Comment