Skip to content

Commit

Permalink
Merge pull request #27 from unfoldingWord/develop
Browse files Browse the repository at this point in the history
Merge develop into main
  • Loading branch information
richmahn authored May 31, 2024
2 parents ba994f1 + 9478513 commit 5ef9fe2
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "door43-preview-app",
"private": true,
"version": "1.0.11",
"version": "1.0.12",
"type": "module",
"scripts": {
"dev": "vite",
Expand Down
16 changes: 8 additions & 8 deletions src/components/RcObsTranslationNotes.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ export default function RcObsTranslationNotes() {
title: file,
body: `${resource.toUpperCase()} ARTICLE NOT FOUND`,
rcLink,
anchor: `nav-${bookId}--${resource}-${file.replace(/\//g, '-')}`,
anchor: `nav-obs--${resource}-${file.replace(/\//g, '-')}`,
};
const fileParts = file.split('/');
switch (resource) {
Expand Down Expand Up @@ -364,8 +364,8 @@ export default function RcObsTranslationNotes() {

const generateHtml = async () => {
let html = `
<div class="section obs-tn-book-section" id="nav-${bookId}" data-toc-title="${catalogEntry.title}">
<h1 class="header obs-tn-book-section-header"><a href="#nav-${bookId}" class="header-link">${catalogEntry.title}</a></h1>
<div class="section obs-tn-book-section" id="nav-obs" data-toc-title="${catalogEntry.title}">
<h1 class="header obs-tn-book-section-header"><a href="#nav-obs" class="header-link">${catalogEntry.title}</a></h1>
`;
const rcLinksData = {};

Expand All @@ -391,15 +391,15 @@ ${convertNoteFromMD2HTML(row.Note, bookId, 'front')}
for (let storyIdx = 0; storyIdx < 50; storyIdx++) {
const storyStr = String(storyIdx + 1);
html += `
<div id="obs-${bookId}-${storyStr}" class="section obs-tn-chapter-section" data-toc-title="${obsData.stories[storyIdx].title}">
<h2 class="obs-tn-chapter-header"><a href="#nav-${bookId}-${storyStr}" class="header-link">${obsData.stories[storyIdx].title}</a></h2>
<div id="nav-obs-${storyStr}" class="section obs-tn-chapter-section" data-toc-title="${obsData.stories[storyIdx].title}">
<h2 class="obs-tn-chapter-header"><a href="#nav-obs-${storyStr}" class="header-link">${obsData.stories[storyIdx].title}</a></h2>
`;
if (tnTsvData?.[storyStr]?.['intro']) {
html += `
<div class="section obs-tn-chapter-intro-section">
`;
for (let row of tnTsvData[storyStr]['intro']) {
const link = `nav-${bookId}-${storyStr}-intro-${row.ID}`;
const link = `nav-obs-${storyStr}-intro-${row.ID}`;
const article = `
<div class="article" id="${link}">
<span class="header-title">${catalogEntry.title} :: Introduction</span>
Expand All @@ -416,7 +416,7 @@ ${convertNoteFromMD2HTML(row.Note, bookId, 'front')}

for (let frameIdx = 0; frameIdx < obsData.stories[storyIdx].frames.length; frameIdx++) {
const frameStr = String(frameIdx + 1);
const frameLink = `nav-${bookId}-${storyStr}-${frameStr}`;
const frameLink = `nav-obs-${storyStr}-${frameStr}`;
html += `
<div id="${frameLink}" class="section obs-tn-chapter-frame-section">
<h3 class="obs-tn-frame-header"><a href="#${frameLink}" class="header-link">${storyStr}:${frameStr}</a></h3>
Expand All @@ -438,7 +438,7 @@ ${convertNoteFromMD2HTML(row.Note, bookId, 'front')}
if (tnTsvData?.[storyStr]?.[frameStr]) {
for (let rowIdx in tnTsvData[storyStr][frameStr]) {
const row = tnTsvData[storyStr][frameStr][rowIdx];
const noteLink = `nav-${bookId}-${storyStr}-${frameStr}-${row.ID}`;
const noteLink = `nav-obs-${storyStr}-${frameStr}-${row.ID}`;
let article = `
<div class="article obs-tn-note-article" id="${noteLink}">
`;
Expand Down
10 changes: 5 additions & 5 deletions src/components/RcObsTranslationQuestions.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -313,15 +313,15 @@ export default function RcObsTranslationQuestions() {
for (let storyIdx = 0; storyIdx < 50; storyIdx++) {
const storyStr = String(storyIdx + 1);
html += `
<div id="nav-${bookId}-${storyStr}" class="section tq-story-section" data-toc-title="${obsData.stories[storyIdx].title}">
<h2 class="tq-story-header"><a href="#nav-${bookId}-${storyStr}" class="header-link">${obsData.stories[storyIdx].title}</a></h2>
<div id="nav-obs-${storyStr}" class="section tq-story-section" data-toc-title="${obsData.stories[storyIdx].title}">
<h2 class="tq-story-header"><a href="#nav-obs-${storyStr}" class="header-link">${obsData.stories[storyIdx].title}</a></h2>
`;
if (tqTsvData?.[storyStr]?.['intro']) {
html += `
<div class="section tq-story-intro-section">
`;
for (let row of tqTsvData[storyStr]['intro']) {
const link = `nav-${bookId}-${storyStr}-intro-${row.ID}`;
const link = `nav-obs-${storyStr}-intro-${row.ID}`;
const article = `
<div class="article" id="${link}">
<span class="header-title">${catalogEntry.title} :: Introduction</span>
Expand All @@ -337,7 +337,7 @@ export default function RcObsTranslationQuestions() {

for (let frameIdx = 0; frameIdx < obsData.stories[storyIdx].frames.length; frameIdx++) {
const frameStr = String(frameIdx + 1);
const frameLink = `nav-${bookId}-${storyStr}-${frameStr}`;
const frameLink = `nav-obs-${storyStr}-${frameStr}`;
html += `
<div id="${frameLink}" class="section tq-story-frame-section">
<h3 class="tq-frame-header"><a href="#${frameLink}" class="header-link">${storyStr}:${frameStr}</a></h3>
Expand All @@ -359,7 +359,7 @@ export default function RcObsTranslationQuestions() {
if (tqTsvData?.[storyStr]?.[frameStr]) {
for (let rowIdx in tqTsvData[storyStr][frameStr]) {
const row = tqTsvData[storyStr][frameStr][rowIdx];
const questionLink = `nav-${bookId}-${storyStr}-${frameStr}-${row.ID}`;
const questionLink = `nav-obs-${storyStr}-${frameStr}-${row.ID}`;
if (row.Question) {
let article = `
<div id="${questionLink}" class="tq-question-article">
Expand Down

0 comments on commit 5ef9fe2

Please sign in to comment.