Skip to content

Commit 9a2b5a8

Browse files
committed
Merge branch 'release/3.12.3'
2 parents 19f83ff + 805a00e commit 9a2b5a8

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+536
-1444
lines changed

.github/workflows/crowdin-actions.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@ jobs:
1919
uses: actions/checkout@v3
2020

2121
- name: Upload or update source files to Crowdin
22-
uses: crowdin/github-action@1.4.15
22+
uses: crowdin/github-action@1.4.16
2323
with:
2424
upload_sources: true
2525

2626
- name: Download German translations
27-
uses: crowdin/github-action@1.4.15
27+
uses: crowdin/github-action@1.4.16
2828
with:
2929
upload_sources: false
3030
download_translations: true
@@ -42,7 +42,7 @@ jobs:
4242
config: crowdin.yaml
4343

4444
- name: Download Spanish translations
45-
uses: crowdin/github-action@1.4.15
45+
uses: crowdin/github-action@1.4.16
4646
with:
4747
upload_sources: false
4848
download_translations: true

csfieldguide/config/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
"""Module for Django system configuration."""
22

3-
__version__ = "3.12.2"
3+
__version__ = "3.12.3"

csfieldguide/package-lock.json

Lines changed: 13 additions & 13 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

csfieldguide/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"dependencies": {},
77
"devDependencies": {
88
"ansi-colors": "4.1.3",
9-
"autoprefixer": "10.4.12",
9+
"autoprefixer": "10.4.13",
1010
"bootstrap": "4.6.2",
1111
"browser-sync": "2.27.10",
1212
"browserify": "17.0.0",
Loading
Loading
10.5 KB
Loading
5.65 KB
Loading
Binary file not shown.

csfieldguide/static/interactives/cmy-mixer/scss/cmy-mixer.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
@import "node_modules/nouislider/distribute/nouislider.css";
1+
@import "static/interactives/cmy-mixer/node_modules/nouislider/distribute/nouislider";
22
@import "node_modules/bootstrap/scss/functions";
33
@import "node_modules/bootstrap/scss/variables";
44
@import "node_modules/bootstrap/scss/mixins";

csfieldguide/static/interactives/colour-matcher/scss/colour-matcher.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
@import "node_modules/nouislider/distribute/nouislider.css";
1+
@import "static/interactives/colour-matcher/node_modules/nouislider/distribute/nouislider";
22

33
/* Distance between bottom of slider and pips */
44
#interactive-colour-matcher .noUi-pips {

csfieldguide/static/interactives/data-bias/css/data-bias.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
@import "node_modules/nouislider/distribute/nouislider.css";
1+
@import "static/interactives/data-bias/node_modules/nouislider/distribute/nouislider";
22
@import "node_modules/bootstrap/scss/functions";
33
@import "node_modules/bootstrap/scss/variables";
44
@import "node_modules/bootstrap/scss/mixins";

csfieldguide/static/interactives/matrix-simplifier/js/matrix-simplifier.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
const dragula = require('dragula');
2-
const mathjs = require('mathjs');
2+
const mathjs_import = require('mathjs');
33
const sprintf = require('sprintf-js').sprintf;
44
const vsprintf = require('sprintf-js').vsprintf;
55

@@ -18,7 +18,7 @@ const MATRIX_CHILD_INDEX = 3; // Index for which child of the draggable element/
1818
* Below is adapted from https://mathjs.org/examples/browser/angle_configuration.html.html
1919
* This is used to configure mathjs to accept degrees as input for trig functions.
2020
*/
21-
21+
const mathjs = mathjs_import.create(mathjs_import.all);
2222
let replacements = {};
2323

2424
// the trigonometric functions that we are configuring to handle inputs of degrees instead of radians
@@ -90,7 +90,7 @@ var resultEqtn;
9090

9191
// only show equations once they are rendered
9292
// URL for mathjax script loaded from CDN
93-
var mjaxURL = 'https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js?config=TeX-AMS-MML_HTMLorMML,Safe.js';
93+
var mjaxURL = 'https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.9/MathJax.js?config=TeX-AMS-MML_HTMLorMML,Safe.js';
9494
// load mathjax script
9595
$.getScript(mjaxURL, function() {
9696
// mathjax successfully loaded, let it render
@@ -595,11 +595,11 @@ function populateModalForEditing() {
595595
$('#matrix-row-0-col-0').val(matrix[0][0]);
596596
$('#matrix-row-0-col-1').val(matrix[0][1]);
597597
$('#matrix-row-0-col-2').val(matrix[0][2]);
598-
598+
599599
$('#matrix-row-1-col-0').val(matrix[1][0]);
600600
$('#matrix-row-1-col-1').val(matrix[1][1]);
601601
$('#matrix-row-1-col-2').val(matrix[1][2]);
602-
602+
603603
$('#matrix-row-2-col-0').val(matrix[2][0]);
604604
$('#matrix-row-2-col-1').val(matrix[2][1]);
605605
$('#matrix-row-2-col-2').val(matrix[2][2]);

csfieldguide/static/interactives/matrix-simplifier/scss/matrix-simplifier.scss

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
@import "node_modules/dragula/dist/dragula.css";
1+
@import "static/interactives/matrix-simplifier/node_modules/dragula/dist/dragula";
22
@import "node_modules/bootstrap/scss/functions";
33
@import "node_modules/bootstrap/scss/variables";
44
@import "node_modules/bootstrap/scss/mixins";
@@ -81,19 +81,13 @@
8181
}
8282
}
8383

84-
#output-container {
85-
> div {
86-
> span {
87-
display: inline !important;
88-
}
89-
}
90-
}
91-
84+
#output-container > div {
85+
display: flex;
86+
align-items: center;
87+
justify-content: center;
9288

93-
#matrix-output,
94-
#vector-output {
95-
> span {
96-
display: inline !important;
89+
.MathJax_Display {
90+
width: min-content;
9791
}
9892
}
9993

csfieldguide/static/interactives/pixel-viewer/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Pixel Viewer Interactive
22

3-
**Author:** Jack Morgan
3+
**Author:** Jack Morgan
44
**Modified by:** Andy Bell, Courtney Bracefield, Alasdair Smith, Jack Morgan
55

66
This interactive is created to allow users to see the values of each pixel of an image.
@@ -29,6 +29,7 @@ The interactive has the following optional parameters to configure the interacti
2929
- `image` - Filename of image to use (for example `arnold.jpg`).
3030
- `picturepicker` - Displays a set of pictures available for using.
3131
- `hide-menu` - Hides the menu.
32+
- `hide-colour-codes` - Hides the colour codes within pixels.
3233
- `hide-colour-code-picker` - Hides the option to change between colour code formats.
3334
- `hide-config-selector` - Hides the option to change between modes.
3435
- `no-pixel-fill` - Displays pixels without background fill from start (also doesn't show initial image with transition).

csfieldguide/static/interactives/pixel-viewer/js/pixel-viewer.js

Lines changed: 19 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
// Settings and intialize layout
22
this.MAX_HEIGHT = 133;
33
this.CELL_SIZE = 50;
4-
54
this.MAX_NOISE = 15;
65

6+
var searchParameters = new URL(window.location.href).searchParams;
7+
78
this.container = document.getElementById("pixel-viewer-interactive-container");
89
this.content = document.getElementById("pixel-viewer-interactive-content");
910
this.context = content.getContext('2d');
@@ -15,8 +16,8 @@ this.contentHeight = 6650;
1516
this.cell_line_height = 15;
1617
this.cell_text = 'R \nG \nB ';
1718
this.text_opacity = 0;
18-
1919
this.mode = 'datarep';
20+
var showColourCode = true;
2021
this.picturePicker = false;
2122

2223
this.filter = null;
@@ -73,15 +74,15 @@ var colour_code_rep = 'rgb';
7374
$( document ).ready(function() {
7475
init_cache(300, MAX_HEIGHT);
7576

76-
if (getUrlParameter('image')){
77-
image_filename = getUrlParameter('image');
77+
if (searchParameters.has('image')){
78+
image_filename = searchParameters.get('image');
7879
}
7980

8081
var image_filepath = image_base_path + image_filename;
8182
$('#pixel-viewer-interactive-original-image').attr('crossorigin', 'anonymous').attr('src', image_filepath);
8283
load_resize_image(image_filepath, false);
8384

84-
switch(getUrlParameter('mode')) {
85+
switch (searchParameters.get('mode')) {
8586
case 'threshold':
8687
mode = 'threshold'; break;
8788
case 'thresholdgreyscale':
@@ -94,24 +95,28 @@ $( document ).ready(function() {
9495
mode = 'brightness'; break;
9596
}
9697

97-
if (getUrlParameter('picturepicker')){
98+
if (searchParameters.has('picturepicker')){
9899
// Whether or not to allow student to pick from set pictures
99100
picturePicker = true;
100101
}
101102

102-
if (getUrlParameter('hide-menu')) {
103+
if (searchParameters.has('hide-menu')) {
103104
$('#pixel-viewer-interactive-menu-toggle').remove();
104105
}
105106

106-
if (getUrlParameter('pixelmania')){
107+
if (searchParameters.has('hide-colour-codes')) {
108+
showColourCode = false;
109+
}
110+
111+
if (searchParameters.has('pixelmania')){
107112
$('#pixelmania-logo').removeClass('d-none');
108113
}
109114

110-
if (getUrlParameter('hide-colour-code-picker')) {
115+
if (searchParameters.has('hide-colour-code-picker')) {
111116
$("#colour-code-radio").addClass('d-none').removeClass('d-flex');
112117
}
113118

114-
if (getUrlParameter('hide-config-selector')) {
119+
if (searchParameters.has('hide-config-selector')) {
115120
$("#configSelector").addClass('d-none');
116121
}
117122

@@ -120,7 +125,7 @@ $( document ).ready(function() {
120125
createPicturePicker();
121126
}
122127

123-
colour_code_rep = getUrlParameter('colour-code');
128+
colour_code_rep = searchParameters.get('colour-code');
124129
if (colour_code_rep == 'rgb-hex') {
125130
$("input[id='rgb-hex-colour-code']").prop('checked', true);
126131
} else if (colour_code_rep == 'hex') {
@@ -149,7 +154,7 @@ $( document ).ready(function() {
149154
scroller_position_left = image_position_left;
150155
reflow();
151156

152-
if (getUrlParameter('no-pixel-fill')){
157+
if (searchParameters.has('no-pixel-fill')){
153158
$('#pixel-viewer-interactive-show-pixel-fill').prop('checked', false);
154159
$("#pixel-viewer-interactive-loader").hide();
155160
$("#pixel-viewer-interactive-buttons").css({opacity: 1});
@@ -1066,7 +1071,7 @@ var paint = function(row, col, left, top, width, height, zoom) {
10661071
}
10671072

10681073
// If text opacity is greater than 0, then display RGB values
1069-
if (text_opacity > 0) {
1074+
if (showColourCode && text_opacity > 0) {
10701075
if (!show_pixel_fill) {
10711076
context.fillStyle = "rgba(0, 0, 0, " + text_opacity + ")";
10721077
} else if ((((pixelData[0] / 255) + (pixelData[1] / 255) + (pixelData[2] / 255)) / 3) < 0.85) {
@@ -1126,7 +1131,7 @@ var reflow = function() {
11261131
};
11271132

11281133
// Set zoom to see numbers if no colour fill
1129-
if (getUrlParameter('no-pixel-fill')) {
1134+
if (searchParameters.has('no-pixel-fill')) {
11301135
this.scroller.zoomTo(1.5);
11311136
}
11321137

@@ -1239,19 +1244,3 @@ function sum(array){
12391244
return prev + curr;
12401245
});
12411246
}
1242-
1243-
// From jquerybyexample.net/2012/06/get-url-parameters-using-jquery.html
1244-
function getUrlParameter(sParam) {
1245-
var sPageURL = decodeURIComponent(window.location.search.substring(1)),
1246-
sURLVariables = sPageURL.split('&'),
1247-
sParameterName,
1248-
i;
1249-
1250-
for (i = 0; i < sURLVariables.length; i++) {
1251-
sParameterName = sURLVariables[i].split('=');
1252-
1253-
if (sParameterName[0] === sParam) {
1254-
return sParameterName[1] === undefined ? true : sParameterName[1];
1255-
}
1256-
}
1257-
};

csfieldguide/static/interactives/pixel-viewer/scss/pixel-viewer.scss

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
user-select: none !important;
77
background-color: #3f51b5;
88
flex-grow: 1;
9+
height: 100vh;
10+
overflow: hidden;
911

1012
#pixel-viewer-interactive-source-canvas {
1113
height: 133px;

csfieldguide/static/interactives/scene-editor/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"private": true,
55
"dependencies": {
66
"mathjs": "6.0.3",
7-
"three": "0.145.0",
7+
"three": "0.146.0",
88
"three-orbit-controls": "82.1.0",
99
"sprintf-js": "1.1.2"
1010
}

csfieldguide/static/interactives/sorting-algorithms/scss/sorting-algorithms.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
@use "sass:math";
2-
@import "node_modules/dragula/dist/dragula.css";
2+
@import "static/interactives/sorting-algorithms/node_modules/dragula/dist/dragula";
33
@import "node_modules/bootstrap/scss/functions";
44
@import "node_modules/bootstrap/scss/variables";
55
@import "node_modules/bootstrap/scss/mixins";
@@ -61,7 +61,7 @@
6161
z-index: 1;
6262
}
6363

64-
// Partial copy of its namesake from Dragula.css
64+
// Partial copy of its namesake from Dragula
6565
// but !important to override changes made in JS for a different purpose
6666
.gu-transit {
6767
opacity: 0.2 !important;

csfieldguide/static/interactives/training-ground/scss/training-ground.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
@import "node_modules/nouislider/distribute/nouislider.css";
1+
@import "static/interactives/training-ground/node_modules/nouislider/distribute/nouislider";
22

33
#interactive-training-ground {
44
max-width: 1000px;

0 commit comments

Comments
 (0)