Skip to content

Commit

Permalink
Split Resource Viewer into a Read-only Resource Viewer and an editabl…
Browse files Browse the repository at this point in the history
…e Scripture Editor (#877)
  • Loading branch information
rolfheij-sil authored Apr 26, 2024
2 parents fb1eb67 + 93375ca commit fcde1bd
Show file tree
Hide file tree
Showing 77 changed files with 513 additions and 373 deletions.
17 changes: 9 additions & 8 deletions assets/localization/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
"mainMenu_layout": "Layout",
"mainMenu_openHelloWorldProject": "Open Hello World Project",
"mainMenu_openProject": "Open Project",
"mainMenu_openResourceViewer": "Open Resource Viewer",
"mainMenu_openPlatformScriptureEditor": "Open Scripture Editor",
"mainMenu_openPlatformResourceViewer": "Open Resource Viewer",
"mainMenu_openTextCollection": "Open Text Collection",
"mainMenu_openWordList": "Open Word List",
"mainMenu_openVerseImageGenerator": "Open Verse Image Generator",
Expand All @@ -24,13 +25,13 @@
"webView_projectAssignmentsAndProgress": "Assignments and Progress",
"webView_projectSendReceive": "Send/Receive this project",
"wordList": "Word List",
"webView_resourceViewer_options": "Options",
"webView_resourceViewer_info": "Info",
"webView_resourceViewer_backgroundColor": "Background Color",
"webView_resourceViewer_textColor": "Text Color",
"webView_resourceViewer_thickBorders": "Thick Borders",
"webView_resourceViewer_publisherInfo": "Publisher Info",
"webView_resourceViewer_copyrightInfo": "Copyright Info",
"webView_platformScriptureEditor_options": "Options",
"webView_platformScriptureEditor_info": "Info",
"webView_platformScriptureEditor_backgroundColor": "Background Color",
"webView_platformScriptureEditor_textColor": "Text Color",
"webView_platformScriptureEditor_thickBorders": "Thick Borders",
"webView_platformScriptureEditor_publisherInfo": "Publisher Info",
"webView_platformScriptureEditor_copyrightInfo": "Copyright Info",
"settings_platform_group1_label": "Platform Settings",
"settings_platform_group1_description": "Settings pertaining to the software overall",
"settings_platform_verseRef_label": "Current Verse Reference",
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# resource-viewer
# platform-scripture-editor

Simple resource viewer extension for Paranext
Editor extension for Platform.Bible, that can also be used in read-only mode

## Summary

Expand Down
89 changes: 89 additions & 0 deletions extensions/src/platform-scripture-editor/contributions/menus.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
{
"mainMenu": {
"columns": {},
"groups": {},
"items": [
{
"label": "%mainMenu_openPlatformScriptureEditor%",
"localizeNotes": "Application main menu > Project > Open Scripture Editor",
"group": "platform.projectResources",
"order": -100,
"command": "platformScriptureEditor.openScriptureEditor"
},
{
"label": "%mainMenu_openPlatformResourceViewer%",
"localizeNotes": "Application main menu > Project > Open Resource Viewer",
"group": "platform.projectResources",
"order": -100,
"command": "platformScriptureEditor.openResourceViewer"
}
]
},
"webViewMenus": {
"platformScriptureEditor.react": {
"includeDefaults": true,
"topMenu": {
"columns": {
"platformScriptureEditor.options": {
"label": "%webView_platformScriptureEditor_options%",
"order": 3
},
"platformScriptureEditor.info": {
"label": "%webView_platformScriptureEditor_info%",
"order": 4
}
},
"groups": {
"platformScriptureEditor.colors": {
"column": "platformScriptureEditor.options",
"order": 1
},
"platformScriptureEditor.layout": {
"column": "platformScriptureEditor.options",
"order": 2
},
"platformScriptureEditor.general": {
"column": "platformScriptureEditor.info",
"order": 2
}
},
"items": [
{
"label": "%webView_platformScriptureEditor_backgroundColor%",
"group": "platformScriptureEditor.colors",
"order": 2,
"command": "platformScriptureEditor.changeBackgroundColor"
},
{
"label": "%webView_platformScriptureEditor_textColor%",
"group": "platformScriptureEditor.colors",
"order": 1,
"command": "platformScriptureEditor.changeTextColor"
},
{
"label": "%webView_platformScriptureEditor_thickBorders%",
"group": "platformScriptureEditor.layout",
"order": 1,
"command": "platformScriptureEditor.showThickBorders"
},
{
"label": "%webView_platformScriptureEditor_publisherInfo%",
"group": "platformScriptureEditor.general",
"order": 1,
"command": "platformScriptureEditor.showPublisherInfo"
},
{
"label": "%webView_platformScriptureEditor_copyrightInfo%",
"group": "platformScriptureEditor.general",
"order": 2,
"command": "platformScriptureEditor.showCopyrightInfo"
}
]
},
"contextMenu": {
"groups": {},
"items": []
}
}
}
}
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"name": "resourceViewer",
"name": "platformScriptureEditor",
"version": "0.0.1",
"description": "Simple resource viewer extension for Platform.Bible",
"description": "Editor extension for Platform.Bible",
"author": "Paranext",
"license": "MIT",
"main": "src/main.ts",
"types": "src/types/resource-viewer.d.ts",
"types": "src/types/platform-scripture-editor.d.ts",
"menus": "contributions/menus.json",
"settings": "contributions/settings.json",
"projectSettings": "contributions/projectSettings.json",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"name": "resource-viewer",
"name": "platform-scripture-editor",
"version": "0.0.2",
"description": "Simple resource viewer extension for Platform.Bible",
"description": "Editor extension for Platform.Bible",
"main": "src/main.js",
"types": "src/types/resource-viewer.d.ts",
"types": "src/types/platform-scripture-editor.d.ts",
"author": "Katherine Jensen",
"license": "MIT",
"scripts": {
Expand Down
124 changes: 124 additions & 0 deletions extensions/src/platform-scripture-editor/src/_editor-overrides.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
/* Platform.Bible image protocol overrides */
/* stylelint-disable selector-no-qualifying-type */

.editor-container {
max-width: none;
}

.link-editor div.link-edit {
background-image: url('papi-extension://platformScriptureEditor/assets/images/icons/pencil-fill.svg');
}

i.undo {
background-image: url('papi-extension://platformScriptureEditor/assets/images/icons/arrow-counterclockwise.svg');
}

i.redo {
background-image: url('papi-extension://platformScriptureEditor/assets/images/icons/arrow-clockwise.svg');
}

%paragraph {
background-image: url('papi-extension://platformScriptureEditor/assets/images/icons/text-paragraph.svg');
}

%h-one {
background-image: url('papi-extension://platformScriptureEditor/assets/images/icons/type-h1.svg');
}

%h-two {
background-image: url('papi-extension://platformScriptureEditor/assets/images/icons/type-h2.svg');
}

%h-three {
background-image: url('papi-extension://platformScriptureEditor/assets/images/icons/type-h3.svg');
}

%square-one {
background-image: url('papi-extension://platformScriptureEditor/assets/images/icons/1-square.svg');
}

%square-two {
background-image: url('papi-extension://platformScriptureEditor/assets/images/icons/2-square.svg');
}

%square-three {
background-image: url('papi-extension://platformScriptureEditor/assets/images/icons/3-square.svg');
}

%square-four {
background-image: url('papi-extension://platformScriptureEditor/assets/images/icons/4-square.svg');
}

%bookmark {
background-image: url('papi-extension://platformScriptureEditor/assets/images/icons/bookmark.svg');
}

%file-earmark {
background-image: url('papi-extension://platformScriptureEditor/assets/images/icons/file-earmark.svg');
}

.icon.bullet-list,
.icon.ul {
background-image: url('papi-extension://platformScriptureEditor/assets/images/icons/list-ul.svg');
}

.icon.numbered-list,
.icon.ol {
background-image: url('papi-extension://platformScriptureEditor/assets/images/icons/list-ol.svg');
}

%quote {
background-image: url('papi-extension://platformScriptureEditor/assets/images/icons/chat-square-quote.svg');
}

.icon.ban {
background-image: url('papi-extension://platformScriptureEditor/assets/images/icons/ban.svg');
}

.icon.code {
background-image: url('papi-extension://platformScriptureEditor/assets/images/icons/code.svg');
}

i.bold {
background-image: url('papi-extension://platformScriptureEditor/assets/images/icons/type-bold.svg');
}

i.italic {
background-image: url('papi-extension://platformScriptureEditor/assets/images/icons/type-italic.svg');
}

i.underline {
background-image: url('papi-extension://platformScriptureEditor/assets/images/icons/type-underline.svg');
}

i.strikethrough {
background-image: url('papi-extension://platformScriptureEditor/assets/images/icons/type-strikethrough.svg');
}

i.code {
background-image: url('papi-extension://platformScriptureEditor/assets/images/icons/code.svg');
}

i.link {
background-image: url('papi-extension://platformScriptureEditor/assets/images/icons/link.svg');
}

i.left-align {
background-image: url('papi-extension://platformScriptureEditor/assets/images/icons/text-left.svg');
}

i.center-align {
background-image: url('papi-extension://platformScriptureEditor/assets/images/icons/text-center.svg');
}

i.right-align {
background-image: url('papi-extension://platformScriptureEditor/assets/images/icons/text-right.svg');
}

i.justify-align {
background-image: url('papi-extension://platformScriptureEditor/assets/images/icons/justify.svg');
}

i.chevron-down {
background-image: url('papi-extension://platformScriptureEditor/assets/images/icons/chevron-down.svg');
}
Loading

0 comments on commit fcde1bd

Please sign in to comment.