Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,10 @@
line-height: 1.3;
}

.chooser-page form#chooser #attribution-details label {
display: block;
}

.chooser-page form#chooser #attribution-details div {
margin-bottom: .5em;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -275,8 +275,19 @@ function renderMarkingFormats(state) {
// set contents of plain text mark
// [T]: reverse use of <template> since it has limits on tokenization capacity, even if
// it allows more dev readability.
let template = document.getElementById('plain-text');
let templateContent = template.content.cloneNode(true);

// determine if generic mark is toggled.
plainTextGenericMark = document.querySelector('#plain-text-generic-mark').checked;

if (plainTextGenericMark == true) {
template = document.getElementById('plain-text-generic');
console.log('plain text generic mark true');
} else {
template = document.getElementById('plain-text');
console.log('plain text generic mark false');
}

templateContent = template.content.cloneNode(true);
document.querySelector('#mark-your-work .plain-text.mark').textContent = '';

function parseTokens(name, value, str){
Expand All @@ -299,7 +310,6 @@ function renderMarkingFormats(state) {

if (plainTextFullName == true) {
markProps.toolName = state.props.toolLong;

} else {
markProps.toolName = state.props.toolShort;
}
Expand Down Expand Up @@ -355,7 +365,17 @@ function renderMarkingFormats(state) {
markProps.toolName = state.props.toolShort;
}

let richTextMark = '<a href="' + attribution.workLink + '">' + attribution.title + '</a>' + copyright + ' by ' + '<a href="' + attribution.creatorLink + '">' + attribution.creator + '</a>' + ' is ' + typeAsVerb + ' ' + '<a href="' + state.props.toolURL + '">' + markProps.toolName + '</a>' + ccIconSet;
// determine if generic mark is toggled.
richTextGenericMark = document.querySelector('#rich-text-generic-mark').checked;

if (richTextGenericMark == true) {
richTextMark = 'This work' + ' is ' + typeAsVerb + ' ' + '<a href="' + state.props.toolURL + '">' + markProps.toolName + '</a>' + ccIconSet;
console.log('plain text generic mark true');
} else {
richTextMark = '<a href="' + attribution.workLink + '">' + attribution.title + '</a>' + copyright + ' by ' + '<a href="' + attribution.creatorLink + '">' + attribution.creator + '</a>' + ' is ' + typeAsVerb + ' ' + '<a href="' + state.props.toolURL + '">' + markProps.toolName + '</a>' + ccIconSet;
console.log('plain text generic mark false');
}

document.querySelector('#mark-your-work .rich-text.mark').innerHTML = richTextMark;


Expand All @@ -368,8 +388,19 @@ function renderMarkingFormats(state) {
} else {
markProps.toolName = state.props.toolShort;
}

// determine if generic mark is toggled.
htmlGenericMark = document.querySelector('#html-generic-mark').checked;

if (htmlGenericMark == true) {
htmlMark = 'This work' + ' is ' + typeAsVerb + ' ' + '<a href="' + state.props.toolURL + '">' + markProps.toolName + '</a>' + ccIconSet;
console.log('plain text generic mark true');
} else {
htmlMark = '<a href="' + attribution.workLink + '">' + attribution.title + '</a>' + copyright + ' by ' + '<a href="' + attribution.creatorLink + '">' + attribution.creator + '</a>' + ' is ' + typeAsVerb + ' ' + '<a href="' + state.props.toolURL + '">' + markProps.toolName + '</a>' + ccIconSet;
console.log('plain text generic mark false');
}

//defaultHTML = '<p xmlns:cc="http://creativecommons.org/ns#">This work is licensed under <a href="https://creativecommons.org/licenses/by-sa/4.0/" target="_blank" rel="license noopener noreferrer">CC BY-SA 4.0<img src="https://mirrors.creativecommons.org/presskit/icons/cc.svg" alt=""><img src="https://mirrors.creativecommons.org/presskit/icons/by.svg" alt=""><img src="https://mirrors.creativecommons.org/presskit/icons/sa.svg" alt=""></a></p>';
let htmlMark = '<a href="' + attribution.workLink + '">' + attribution.title + '</a>' + copyright + ' by ' + '<a href="' + attribution.creatorLink + '">' + attribution.creator + '</a>' + ' is ' + typeAsVerb + ' ' + '<a href="' + state.props.toolURL + '">' + markProps.toolName + '</a>' + ccIconSet;
document.querySelector('#mark-your-work .html.mark').innerHTML = htmlMark;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Theme Name: CC Vocabulary Theme
Author: the Creative Commons team; possumbilities, Timid Robot
Author URI: https://opensource.creativecommons.org/
Description: Theme based on the Vocabulary Design System
Version: 1.13
Version: 1.14
Requires at least: 5.0
Tested up to: 6.2.2
Requires PHP: 7.0
Expand Down