re-added example licenses

This commit is contained in:
ojack
2022-04-27 10:24:02 +02:00
parent c57ad54384
commit c71499017c
7 changed files with 10473 additions and 173 deletions

View File

@@ -1,4 +1,8 @@
# Changelog # Changelog
## [1.3.6] - 2022-04-27
### Fixed
- re-added cc licensing info to example sketches
## [1.3.5] - 2022-04-14 ## [1.3.5] - 2022-04-14
### Added ### Added
- url parameters for updating translation: l10n-url and l10n-lang - url parameters for updating translation: l10n-url and l10n-lang

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -15,7 +15,7 @@
<meta name="twitter:card" content="summary_large_image"> <meta name="twitter:card" content="summary_large_image">
<script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/1.4.0/p5.min.js" defer></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/1.4.0/p5.min.js" defer></script>
<!-- <script src="./bundle.js?1.2we2ajk" defer></script> --> <!-- <script src="./bundle.js?1.2we2ajk" defer></script> -->
<script src="./bundle.min.js?1.3.5" defer></script> <script src="./bundle.min.js?1.3.6" defer></script>
<link href="https://fonts.googleapis.com/css?family=Chivo:300,400,700" rel="stylesheet"> <link href="https://fonts.googleapis.com/css?family=Chivo:300,400,700" rel="stylesheet">
<link rel="stylesheet" href="./css/fontawesome.css"> <link rel="stylesheet" href="./css/fontawesome.css">
<link rel="stylesheet" href="./css/codemirror.css"> <link rel="stylesheet" href="./css/codemirror.css">

View File

@@ -2,6 +2,7 @@ const request = require('superagent')
const examples = require('./examples.json') const examples = require('./examples.json')
const sketches = [] const sketches = []
const license = `// licensed with CC BY-NC-SA 4.0 https://creativecommons.org/licenses/by-nc-sa/4.0/`
class Gallery { class Gallery {
constructor (callback) { constructor (callback) {
@@ -155,7 +156,13 @@ class Gallery {
} }
setSketch(sketch) { setSketch(sketch) {
this.code = this.decodeBase64(sketch.code) let code = this.decodeBase64(sketch.code)
if(code.indexOf(license) < 0)
code =
`${license}
${code}
`
this.code = code
this.current = sketch this.current = sketch
// this.setToURL('sketch_id', sketch._id) // this.setToURL('sketch_id', sketch._id)
// let params = Object.keys(sketch).map( (key) => { // let params = Object.keys(sketch).map( (key) => {

View File

@@ -1,6 +1,6 @@
{ {
"name": "hydra", "name": "hydra",
"version": "1.3.5", "version": "1.3.6",
"description": "", "description": "",
"main": "server.js", "main": "server.js",
"scripts": { "scripts": {