commit 207e7a026c50a1f06e0d3a4352d1aa8993fc7b00 Author: Michal Moskal Date: Thu Jun 29 15:47:26 2017 +0100 Initial commit, based on pxt-adafruit diff --git a/.clang-format b/.clang-format new file mode 100644 index 00000000..001deef8 --- /dev/null +++ b/.clang-format @@ -0,0 +1,5 @@ +BasedOnStyle: LLVM +IndentWidth: 4 +UseTab: Never +ColumnLimit: 100 +AllowShortFunctionsOnASingleLine: Inline diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 00000000..00076398 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +# enforce unix style line endings +*.ts text eol=lf +*.tsx text eol=lf +*.md text eol=lf +*.txt text eol=lf +*.js text eol=lf +*.json text eol=lf +*.xml text eol=lf +*.svg text eol=lf +*.yaml text eol=lf +*.css text eol=lf +*.html text eol=lf +*.py text eol=lf +*.exp text eol=lf +*.manifest text eol=lf + +# do not enforce text for everything - it causes issues with random binary files + +*.sln text eol=crlf + +*.png binary +*.jpg binary +*.jpeg binary diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..d7a531cf --- /dev/null +++ b/.gitignore @@ -0,0 +1,31 @@ +node_modules +yotta_modules +yotta_targets +pxt_modules +built +typings +tmp +temp +projects/** +clients/win10/app/AppPackages +clients/win10/app/BundlePackages +clients/win10/app/BundleArtifacts +clients/win10/app/bin +clients/win10/app/bld +clients/win10/*.opendb +clients/**/bin/** +clients/**/obj/** +clients/electron/projects + +videos/** + +*.user +*.sw? +*.ts.new +*.tgz +*.db +*.suo +*.log +.pioenvs +.piolibdeps +lib/ diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 00000000..4ff0eed2 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,26 @@ +# Contributing Code + +This repo accepts bug fix pull requests. For a bug fix PR to be accepted, it must first have a tracking issue that has been marked approved. Your PR should link to the bug you are fixing. If you've submitted a PR for a bug, please post a comment in the bug to avoid duplication of effort. + +This repo also accepts new feature pull requests. For a feature-level PR to be accepted, it first needs to have design discussion. Design discussion can take one of two forms a) a feature request in the issue tracker that has been marked as approved or b) the PR must be accompanied by a full design spec and this spec is later approved in the open design discussion. Features are evaluated against their complexity, impact on other features, roadmap alignment, and maintainability. + +These two blogs posts on contributing code to open source projects are a good reference: [Open Source Contribution Etiquette](http://tirania.org/blog/archive/2010/Dec-31.html) by Miguel de Icaza and [Don't "Push" Your Pull Requests](https://www.igvita.com/2011/12/19/dont-push-your-pull-requests/) by Ilya Grigorik. + +## Security + +If you believe you have found a security issue here, please share it with us privately following the guidance at the Microsoft [Security TechCenter](https://technet.microsoft.com/en-us/security/ff852094). Reporting it via this channel helps minimize risk to projects built with this repo. + +## Legal + +You will need to complete a Contributor License Agreement (CLA) before your pull request can be accepted. This agreement testifies that you are granting us permission to use the source code you are submitting, and that this work is being submitted under appropriate license that we can use it. + +You can complete the CLA by going through the steps at https://cla.microsoft.com. Once we have received the signed CLA, we'll review the request. You will only need to do this once. + +## Housekeeping + +Your pull request should: +* Include a description of what your change intends to do +* Be a child commit of a reasonably recent commit in the master branch +* Pass all unit tests +* Have a clear commit message +* Include adequate tests diff --git a/LICENSE b/LICENSE new file mode 100644 index 00000000..06950649 --- /dev/null +++ b/LICENSE @@ -0,0 +1,25 @@ +PXT-EV3 + +The MIT License (MIT) + +Copyright (c) Microsoft Corporation + +All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md new file mode 100644 index 00000000..0866a645 --- /dev/null +++ b/README.md @@ -0,0 +1,67 @@ +# LEGO Mindstorms EV3 target for PXT + +[![Build Status](https://ci2.dot.net/buildStatus/icon?job=Private/pxt_project_pink/master/pxt-ev3_Push)](https://ci2.dot.net/job/Private/job/pxt_project_pink/job/master/job/pxt-ev3_Push/) + +This repo contains the editor target hosted at https://lego.makecode.com + +## Local Dev setup + +These instructions assume familiarity with dev tools and languages. + +* install Node.js 6+ +* install [yotta](http://docs.yottabuild.org/#installing) +* (optional) install [Visual Studio Code](https://code.visualstudio.com/) + +In a common folder, + +* clone https://github.com/Microsoft/pxt to ``pxt`` folder +* clone https://github.com/Microsoft/pxt-common-packages to ``pxt-common-packages`` folder +* clone https://github.com/Microsoft/pxt-ev3 to ``pxt-ev3`` folder +* go to ``pxt`` and run + +``` +npm install +typings install +``` + +* go to ``pxt-common-packages`` and run + +``` +npm install +npm link ../pxt +``` + +* go to ``pxt-ev3`` and run + +``` +npm install +npm link ../pxt +npm link ../pxt-common-packages +``` + +## to run the local server + +From root github folder, + +``` +cd pxt-ev3 +pxt serve --cloud +``` + +## to build and deploy a single package via command line + +``` +cd libs/core +pxt deploy +``` + +## Jenkins build + +https://ci2.dot.net/job/Private/job/pxt_project_pink/job/master/ + +## License +MIT + +## Code of Conduct + +This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments. diff --git a/THIRD-PARTY-NOTICES.txt b/THIRD-PARTY-NOTICES.txt new file mode 100644 index 00000000..ea773a0b --- /dev/null +++ b/THIRD-PARTY-NOTICES.txt @@ -0,0 +1,16 @@ +/*!----------------- PXT ThirdPartyNotices ------------------------------------------------------- + +PXT uses third party material from the projects listed below. +The original copyright notice and the license under which Microsoft +received such third party material are set forth below. Microsoft +reserves all other rights not expressly granted, whether by +implication, estoppel or otherwise. + +In the event that we accidentally failed to list a required notice, please +bring it to our attention. Post an issue or email us: + + makecode@microsoft.com + +--------------------------------------------- +Third Party Code Components +--------------------------------------------- diff --git a/cmds/pxtrequire.ts b/cmds/pxtrequire.ts new file mode 100644 index 00000000..0eabce91 --- /dev/null +++ b/cmds/pxtrequire.ts @@ -0,0 +1,7 @@ +/// +/// + +import * as path from "path"; +export let pxtCore = require("pxt-core"); +// require.resolve() gives path to [pxt dir]/built/pxt.js, so move up twice to get pxt root dir +export let pxtCoreDir = path.resolve(require.resolve("pxt-core"), "..", ".."); diff --git a/cmds/tsconfig.json b/cmds/tsconfig.json new file mode 100644 index 00000000..7d57cc95 --- /dev/null +++ b/cmds/tsconfig.json @@ -0,0 +1,13 @@ +{ + "compilerOptions": { + "target": "es5", + "noImplicitAny": true, + "noImplicitReturns": true, + "declaration": true, + "outDir": "../built", + "module": "commonjs", + "rootDir": ".", + "newLine": "LF", + "sourceMap": false + } +} diff --git a/docs/SUMMARY.md b/docs/SUMMARY.md new file mode 100644 index 00000000..04e337be --- /dev/null +++ b/docs/SUMMARY.md @@ -0,0 +1,11 @@ +# @extends + +## Reference #reference + +* [Reference](/reference) + * [input](/reference/input) + * [light](/reference/light) + * [music](/reference/music) + * [pins](/reference/pins) + * [control](/reference/control) + * [serial](/reference/serial) diff --git a/docs/about.md b/docs/about.md new file mode 100644 index 00000000..511ca72d --- /dev/null +++ b/docs/about.md @@ -0,0 +1,43 @@ +# About + +Welcome to the **Microsoft MakeCode** editor for the **@boardname@**! + +## Programming: [Blocks](/blocks) or [JavaScript](/javascript) + +You can program the @boardname@ using [Blocks](/blocks) or [JavaScript](/javascript) in your web browser: + +```block +input.buttonA.onEvent(ButtonEvent.Click, () => { + light.showRing(`blue blue blue blue blue blue blue blue blue blue`) +}) +``` +```typescript +input.buttonA.onEvent(ButtonEvent.Click, () => { + light.showRing(`blue blue blue blue blue blue blue blue blue blue`) +}) +``` + +The editor work in [most modern browsers](/browsers), work [offline](/offline) once loaded and do not require any installation. + +## [Compile and Flash: Your Program!](/device/usb) + +When you have your code ready, you connect your @boardname@ to a computer via a USB cable +**then press the reset button** so it appears as a mounted drive (named **CPLAYBOOT**). + +Compilation to machine code from [Blocks](/blocks) or [JavaScript](/javascript) happens in the browser. You save the binary +program to a **.uf2** file, which you then copy to the **CPLAYBOOT** drive, which flashes the device with the new program. + +## Simulator: Test Your Code + +You can run your code using the micro:bit simulator, all within the confines of a web browser. +The simulator has support for the LED screen, buttons, as well as compass, accelerometer, and digital I/O pins. + +```sim +loops.forever(() => { + light.pixels.showAnimation(light.animation(LightAnimation.Rainbow), 1000) +}) +``` + +```package +light +``` diff --git a/docs/beta-ref.json b/docs/beta-ref.json new file mode 100644 index 00000000..58f715cc --- /dev/null +++ b/docs/beta-ref.json @@ -0,0 +1,3 @@ +{ + "appref": "v" +} diff --git a/docs/blocks/loops.md b/docs/blocks/loops.md new file mode 100644 index 00000000..e7ddc85c --- /dev/null +++ b/docs/blocks/loops.md @@ -0,0 +1,8 @@ +# @extends + +### #specific + +```cards +loops.forever(() => {}); +loops.pause(0) +``` \ No newline at end of file diff --git a/docs/docs.md b/docs/docs.md new file mode 100644 index 00000000..5bc2ec6c --- /dev/null +++ b/docs/docs.md @@ -0,0 +1,14 @@ +# Documentation + +### @description Links to the documentation, reference and projects. + +Welcome to the documentation of the Microsoft MakeCode editor +for the @boardname@. + +## Documentation + +* [About](/about) +* [Examples](/examples) +* [Blocks](/blocks) +* [JavaScript](/javascript) +* [Reference](/reference) \ No newline at end of file diff --git a/docs/examples.md b/docs/examples.md new file mode 100644 index 00000000..5936e85c --- /dev/null +++ b/docs/examples.md @@ -0,0 +1,8 @@ +# Examples + +Here are some fun programs for your @boardname@! + +## Fun stuff + + +Coming soon. \ No newline at end of file diff --git a/docs/index-ref.json b/docs/index-ref.json new file mode 100644 index 00000000..58f715cc --- /dev/null +++ b/docs/index-ref.json @@ -0,0 +1,3 @@ +{ + "appref": "v" +} diff --git a/docs/projects.md b/docs/projects.md new file mode 100644 index 00000000..74274b0f --- /dev/null +++ b/docs/projects.md @@ -0,0 +1,9 @@ +# Projects + +Here are some cool projects that you can build with your @boardname@! + +## Basic + +Basic projects to build with your @boardname@. + +Coming soon. \ No newline at end of file diff --git a/docs/reference.md b/docs/reference.md new file mode 100644 index 00000000..0990d1bd --- /dev/null +++ b/docs/reference.md @@ -0,0 +1,19 @@ +# Reference + +```namespaces +input.onGesture(Gesture.Shake, () => {}) +light.showRing('red red red red red red red red red red') +music.playTone(0, 0) +pins.pulseDuration() +control.runInBackground(() => {}) +serial.writeLine(""); +``` + +## See Also + +[blocks](/blocks), [JavaScript](/javascript), [input](/reference/input), [light](/reference/light), [music](/reference/music), +[control](/reference/control), [pins](/reference/pins), [serial](/reference/serial) + +```package +circuit-playground +``` \ No newline at end of file diff --git a/docs/static/Microsoft-logo_rgb_c-gray-square.png b/docs/static/Microsoft-logo_rgb_c-gray-square.png new file mode 100644 index 00000000..f5f83b8c Binary files /dev/null and b/docs/static/Microsoft-logo_rgb_c-gray-square.png differ diff --git a/docs/static/Microsoft-logo_rgb_c-gray.png b/docs/static/Microsoft-logo_rgb_c-gray.png new file mode 100644 index 00000000..6b77415e Binary files /dev/null and b/docs/static/Microsoft-logo_rgb_c-gray.png differ diff --git a/docs/static/Microsoft-logo_rgb_c-white.png b/docs/static/Microsoft-logo_rgb_c-white.png new file mode 100644 index 00000000..e0a49fdb Binary files /dev/null and b/docs/static/Microsoft-logo_rgb_c-white.png differ diff --git a/jenkins.groovy b/jenkins.groovy new file mode 100644 index 00000000..5cdd3180 --- /dev/null +++ b/jenkins.groovy @@ -0,0 +1,40 @@ +import jobs.generation.Utilities; +import jobs.generation.InternalUtilities; + +def project = GithubProject +def projectName = "pxt-ev3" + +[true, false].each { isPR -> + def newJobName = projectName + + if (isPR) { + newJobName += "_PR" + } else { + newJobName += "_Push" + } + + def newJob = job(newJobName) { + steps { + shell("chmod +x ./jenkins.sh") + shell("./jenkins.sh ${isPR}") + } + + if (!isPR) { + wrappers { + credentialsBinding { + string("PXT_ACCESS_TOKEN", "pxt_access_token") + string("PXT_RELEASE_REPO", "pxt_release_repo_ev3") + } + } + } + } + + Utilities.setMachineAffinity(newJob, "Ubuntu", "20161020") + InternalUtilities.standardJobSetup(newJob, project, isPR, "*/*") + + if (isPR) { + Utilities.addGithubPRTrigger(newJob, "Default Testing") + } else { + Utilities.addGithubPushTrigger(newJob) + } +} diff --git a/jenkins.sh b/jenkins.sh new file mode 100755 index 00000000..b708528c --- /dev/null +++ b/jenkins.sh @@ -0,0 +1,56 @@ +#!/usr/bin/env bash + +# Set up NVM +export NVM_DIR="/home/dotnet-bot/.nvm" +[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" + +nvm install 5 + +# Set up build environment variables +echo ---------- Setting build environment variables +echo Git branch: $GIT_BRANCH +echo isPR: $1 + +originRegex="^origin/.*" +branchRegex="^origin/\K.*(?=$)" +releaseBranchRegex="^(master|v\d+)$" + +if [[ "$GIT_BRANCH" =~ $originRegex ]]; then + branchName=$(echo ${GIT_BRANCH} | grep -oP $branchRegex) + echo Setting TRAVIS_BRANCH to ${branchName} + export TRAVIS_BRANCH=${branchName} +else + echo Setting TRAVIS_BRANCH to $GIT_BRANCH + export TRAVIS_BRANCH=$GIT_BRANCH +fi + +if [ "$1" == "false" ]; then + echo Setting TRAVIS_PULL_REQUEST to false + export TRAVIS_PULL_REQUEST=false + + if [[ "$TRAVIS_BRANCH" =~ $releaseBranchRegex ]]; then + if [[ -z $PXT_RELEASE_REPO ]]; then + echo Cannot find release repo\; skipping tag checks + else + gitTag=$(git describe --tags --exact-match 2> /dev/null) + builtTag=$(git ls-remote --tags $PXT_RELEASE_REPO | grep -o "refs/tags/$gitTag$") + + echo Current tag: $gitTag + echo Built tag: $builtTag + + if [[ ! -z $gitTag && -z $builtTag ]]; then + echo Built tag not found\; building tag + echo Setting TRAVIS_BRANCH to $gitTag + export TRAVIS_BRANCH=$gitTag + echo Setting TRAVIS_TAG to $gitTag + export TRAVIS_TAG=$gitTag + else + echo Not a tag build + fi + fi + fi +fi + +# Perform build +npm install +npm test diff --git a/libs/base/pxt.json b/libs/base/pxt.json new file mode 100644 index 00000000..98322f56 --- /dev/null +++ b/libs/base/pxt.json @@ -0,0 +1,28 @@ +{ + "name": "base", + "description": "The base library", + "files": [ + "README.md", + "pxt-core.d.ts", + "pxt.cpp", + "pxtbase.h", + "core.cpp", + "pxt-helpers.ts", + "buffer.cpp", + "shims.d.ts", + "enums.d.ts", + "loops.cpp", + "math.ts", + "ns.ts", + "control.cpp", + "control.ts", + "serial.cpp", + "serial.ts" + ], + "testFiles": [ + "test.ts" + ], + "additionalFilePath": "../../node_modules/pxt-common-packages/libs/base", + "public": true, + "dependencies": {} +} diff --git a/libs/core/README.md b/libs/core/README.md new file mode 100644 index 00000000..7010a9e3 --- /dev/null +++ b/libs/core/README.md @@ -0,0 +1,4 @@ +# core + +The core library for ev3 target. + diff --git a/libs/core/ns.ts b/libs/core/ns.ts new file mode 100644 index 00000000..e1cfb040 --- /dev/null +++ b/libs/core/ns.ts @@ -0,0 +1,4 @@ + +//% color="#B4009E" weight=98 icon="\uf192" +namespace input { +} diff --git a/libs/core/pxt.h b/libs/core/pxt.h new file mode 100644 index 00000000..0f6a0fdc --- /dev/null +++ b/libs/core/pxt.h @@ -0,0 +1,7 @@ +#ifndef __PXT_H +#define __PXT_H + +#include "pxtbase.h" +#undef DMESG + +#endif diff --git a/libs/core/pxt.json b/libs/core/pxt.json new file mode 100644 index 00000000..7cd2c55d --- /dev/null +++ b/libs/core/pxt.json @@ -0,0 +1,17 @@ +{ + "name": "core", + "description": "The core library", + "files": [ + "README.md", + "pxt.h", + "pxtcore.h", + "ns.ts" + ], + "testFiles": [ + "test.ts" + ], + "public": true, + "dependencies": { + "base": "file:../base" + } +} diff --git a/libs/core/pxtcore.h b/libs/core/pxtcore.h new file mode 100644 index 00000000..39e2814c --- /dev/null +++ b/libs/core/pxtcore.h @@ -0,0 +1,7 @@ +#ifndef __PXTCORE_H +#define __PXTCORE_H + +//void codal_dmesg(const char *format, ...); +#define DMESG(...) /* nothing */ + +#endif diff --git a/libs/core/test.ts b/libs/core/test.ts new file mode 100644 index 00000000..c2bde318 --- /dev/null +++ b/libs/core/test.ts @@ -0,0 +1,11 @@ +let i = 1 +let f = 0.5 +let plus = i + f +let minus = i - f + +let r = Math.random() +let ri = Math.randomRange(5, 10) + +loops.forever(() => { + loops.pause(100) +}) diff --git a/libs/ev3/ns.ts b/libs/ev3/ns.ts new file mode 100644 index 00000000..172c4655 --- /dev/null +++ b/libs/ev3/ns.ts @@ -0,0 +1,34 @@ + +//% color="#d65cd6" +namespace input { +} + +//% color="#F55D3E" +namespace music { + +} + +//% color="#1B998B" +namespace control { + +} + +//% color="#EF2D56" +namespace pins { + +} + +//% color="#006E90" +namespace serial { + +} + +//% color="#40bf4a" +namespace loops { + +} + +//% color="#4c97ff" +namespace light { + +} diff --git a/libs/ev3/pxt.json b/libs/ev3/pxt.json new file mode 100644 index 00000000..069669c9 --- /dev/null +++ b/libs/ev3/pxt.json @@ -0,0 +1,13 @@ +{ + "name": "ev3", + "description": "The EV3 library", + "files": [ + "README.md", + "ns.ts" + ], + "dependencies": { + "base": "file:../base", + "core": "file:../core" + }, + "public": true +} diff --git a/package.json b/package.json new file mode 100644 index 00000000..aee9e0a1 --- /dev/null +++ b/package.json @@ -0,0 +1,48 @@ +{ + "name": "pxt-ev3", + "version": "0.0.0", + "description": "LEGO Mindstorms EV3 for Microsoft MakeCode", + "private": true, + "keywords": [ + "JavaScript", + "education", + "lego", + "pxt", + "MakeCode", + "Microsoft" + ], + "repository": { + "type": "git", + "url": "git+https://github.com/Microsoft/pxt-ev3.git" + }, + "author": "", + "license": "MIT", + "homepage": "https://github.com/Microsoft/pxt-ev3#readme", + "files": [ + "README.md", + "pxtarget.json", + "built/*.js", + "built/*.json", + "built/*.d.ts", + "sim/public", + "docs/*.md", + "docs/*/*.md", + "docs/*/*/*.md" + ], + "main": "built/pxtrequire.js", + "typings": "built/pxtrequire.d.ts", + "devDependencies": { + "typescript": "^1.8.7", + "less": "^2.6.0", + "rtlcss": "^2.1.2", + "autoprefixer": "^6.7.6", + "semantic-ui-less": "^2.2.4" + }, + "dependencies": { + "pxt-common-packages": "0.8.1", + "pxt-core": "1.7.4" + }, + "scripts": { + "test": "node node_modules/pxt-core/built/pxt.js travis" + } +} diff --git a/pxtarget.json b/pxtarget.json new file mode 100644 index 00000000..02de03b7 --- /dev/null +++ b/pxtarget.json @@ -0,0 +1,136 @@ +{ + "id": "ev3", + "platformid": "linux", + "nickname": "lego", + "name": "LEGO Mindstorms EV3", + "title": "LEGO Mindstorms EV3 - Blocks / Javascript editor", + "description": "A Blocks / JavaScript code editor for the LEGO Mindstorms EV3.", + "corepkg": "ev3", + "bundleddirs": [ + "libs/base", + "libs/core", + "libs/ev3" + ], + "simulator": { + "autoRun": true, + "streams": true, + "aspectRatio": 1.0, + "parts": false, + "enableTrace": true + }, + "cloud": { + "workspace": false, + "packages": true, + "sharing": true, + "publishing": true, + "importing": false, + "preferredPackages": [], + "githubPackages": true + }, + "compile": { + "isNative": true, + "useUF2": true, + "hasHex": true, + "deployDrives": ".*", + "deployFileMarker": "INFO_UF2.TXT", + "driveName": "LEGO", + "flashCodeAlign": 256, + "floatingPoint": true, + "taggedInts": true + }, + "runtime": { + "mathBlocks": true, + "loopsBlocks": true, + "logicBlocks": true, + "variablesBlocks": true, + "textBlocks": true, + "listsBlocks": true, + "functionBlocks": true, + "onStartNamespace": "loops", + "onStartColor": "#40bf4a" + }, + "compileService": { + "buildEngine": "dockermake", + "serviceId": "ev3" + }, + "appTheme": { + "accentColor": "#0089BF", + "logoUrl": "https://lego.makecode.com", + "logo": "./static/logo.svg", + "docsLogo": "./static/logo.square.svg", + "portraitLogo": "./static/logo.square.svg", + "footerLogo": "./static/logo.square.svg", + "cardLogo": "./static/icons/android-chrome-192x192.png", + "appLogo": "./static/icons/android-chrome-192x192.png", + "organization": "Microsoft MakeCode", + "organizationUrl": "https://makecode.com/", + "organizationLogo": "./static/Microsoft-logo_rgb_c-gray-square.png", + "organizationWideLogo": "./static/Microsoft-logo_rgb_c-white.png", + "homeUrl": "https://lego.makecode.com/", + "embedUrl": "https://lego.makecode.com/", + "privacyUrl": "https://go.microsoft.com/fwlink/?LinkId=521839", + "termsOfUseUrl": "https://go.microsoft.com/fwlink/?LinkID=206977", + "githubUrl": "https://github.com/Microsoft/pxt-ev3", + "boardName": "LEGO Mindstorms EV3 Brick", + "docMenu": [ + { + "name": "About", + "path": "/about" + }, + { + "name": "Examples", + "path": "#projects:Examples" + }, + { + "name": "Blocks", + "path": "/blocks" + }, + { + "name": "JavaScript", + "path": "/javascript" + }, + { + "name": "Reference", + "path": "/reference" + }, + { + "name": "Buy", + "path": "https://www.lego.com/en-us/mindstorms/products/mindstorms-ev3-31313" + } + ], + "galleries": { + "Make": "projects", + "Examples": "examples" + }, + "sideDoc": "tutorials/getting-started", + "invertedMenu": true, + "invertedToolbox": true, + "invertedMonaco": true, + "monacoToolbox": true, + "simAnimationEnter": "roll in", + "simAnimationExit": "roll out", + "exampleGallery": "examples", + "hasAudio": true, + "usbHelp": [], + "extendEditor": true, + "disableBlockIcons": true, + "blocklyOptions": { + "grid": { + "spacing": 20, + "length": 2, + "colour": "rgba(189, 195, 199, 0.20)", + "snap": true + } + }, + "blockColors": { + "loops": "#40bf4a", + "logic": "#4cbfe6", + "math": "#9966ff", + "variables": "#FF6680", + "text": "#ffab19", + "advanced": "#00272B", + "functions": "#005a9e", + "arrays": "#8A1C7C" + } + } +} \ No newline at end of file diff --git a/targetconfig.json b/targetconfig.json new file mode 100644 index 00000000..3ecfe14b --- /dev/null +++ b/targetconfig.json @@ -0,0 +1,10 @@ +{ + "packages": { + "approvedOrgs": [ + "Microsoft", + "LEGO" + ], + "approvedRepos": [ + ] + } +} \ No newline at end of file diff --git a/theme/fieldeditors.less b/theme/fieldeditors.less new file mode 100644 index 00000000..7f4ba0ba --- /dev/null +++ b/theme/fieldeditors.less @@ -0,0 +1,39 @@ + + + +/******************************* + Field Light +*******************************/ +#field-neopixels { + cursor: default; +} + +#field-neopixels .neopixel, #field-neopixels .colorbutton { + cursor:pointer; +} + +#field-neopixels .neopixel { + stroke: #fff; + stroke-width:2px; +} + +#field-neopixels .neopixel:hover { + stroke-width: 4px !important; + stroke:#fc3; +} + +#field-neopixels .colorbutton { + stroke:black; + stroke-width: 2px; + stroke-opacity: 1; +} + +#field-neopixels .colorbutton:hover { + stroke:#fc3; + stroke-width: 3px; +} + +#field-neopixels .colorbutton.active { + stroke:#fc3; + stroke-width: 4px !important; +} diff --git a/theme/site/collections/breadcrumb.overrides b/theme/site/collections/breadcrumb.overrides new file mode 100644 index 00000000..cba59efe --- /dev/null +++ b/theme/site/collections/breadcrumb.overrides @@ -0,0 +1,3 @@ +/******************************* + Site Overrides +*******************************/ diff --git a/theme/site/collections/breadcrumb.variables b/theme/site/collections/breadcrumb.variables new file mode 100644 index 00000000..cba59efe --- /dev/null +++ b/theme/site/collections/breadcrumb.variables @@ -0,0 +1,3 @@ +/******************************* + Site Overrides +*******************************/ diff --git a/theme/site/collections/form.overrides b/theme/site/collections/form.overrides new file mode 100644 index 00000000..cba59efe --- /dev/null +++ b/theme/site/collections/form.overrides @@ -0,0 +1,3 @@ +/******************************* + Site Overrides +*******************************/ diff --git a/theme/site/collections/form.variables b/theme/site/collections/form.variables new file mode 100644 index 00000000..6f085f93 --- /dev/null +++ b/theme/site/collections/form.variables @@ -0,0 +1,3 @@ +/******************************* + User Variable Overrides +*******************************/ diff --git a/theme/site/collections/grid.overrides b/theme/site/collections/grid.overrides new file mode 100644 index 00000000..cba59efe --- /dev/null +++ b/theme/site/collections/grid.overrides @@ -0,0 +1,3 @@ +/******************************* + Site Overrides +*******************************/ diff --git a/theme/site/collections/grid.variables b/theme/site/collections/grid.variables new file mode 100644 index 00000000..6f085f93 --- /dev/null +++ b/theme/site/collections/grid.variables @@ -0,0 +1,3 @@ +/******************************* + User Variable Overrides +*******************************/ diff --git a/theme/site/collections/menu.overrides b/theme/site/collections/menu.overrides new file mode 100644 index 00000000..3b98218c --- /dev/null +++ b/theme/site/collections/menu.overrides @@ -0,0 +1,8 @@ +/******************************* + Site Overrides +*******************************/ + + +.ui.menu.inverted .item { + text-transform: uppercase; +} \ No newline at end of file diff --git a/theme/site/collections/menu.variables b/theme/site/collections/menu.variables new file mode 100644 index 00000000..c71b0599 --- /dev/null +++ b/theme/site/collections/menu.variables @@ -0,0 +1,5 @@ +/******************************* + User Variable Overrides +*******************************/ + +@invertedItemTextColor: @white; \ No newline at end of file diff --git a/theme/site/collections/message.overrides b/theme/site/collections/message.overrides new file mode 100644 index 00000000..96091c36 --- /dev/null +++ b/theme/site/collections/message.overrides @@ -0,0 +1,3 @@ +/******************************* + Site Overrides +*******************************/ diff --git a/theme/site/collections/message.variables b/theme/site/collections/message.variables new file mode 100644 index 00000000..6f085f93 --- /dev/null +++ b/theme/site/collections/message.variables @@ -0,0 +1,3 @@ +/******************************* + User Variable Overrides +*******************************/ diff --git a/theme/site/collections/table.overrides b/theme/site/collections/table.overrides new file mode 100644 index 00000000..cba59efe --- /dev/null +++ b/theme/site/collections/table.overrides @@ -0,0 +1,3 @@ +/******************************* + Site Overrides +*******************************/ diff --git a/theme/site/collections/table.variables b/theme/site/collections/table.variables new file mode 100644 index 00000000..6f085f93 --- /dev/null +++ b/theme/site/collections/table.variables @@ -0,0 +1,3 @@ +/******************************* + User Variable Overrides +*******************************/ diff --git a/theme/site/elements/button.overrides b/theme/site/elements/button.overrides new file mode 100644 index 00000000..cba59efe --- /dev/null +++ b/theme/site/elements/button.overrides @@ -0,0 +1,3 @@ +/******************************* + Site Overrides +*******************************/ diff --git a/theme/site/elements/button.variables b/theme/site/elements/button.variables new file mode 100644 index 00000000..6f085f93 --- /dev/null +++ b/theme/site/elements/button.variables @@ -0,0 +1,3 @@ +/******************************* + User Variable Overrides +*******************************/ diff --git a/theme/site/elements/container.overrides b/theme/site/elements/container.overrides new file mode 100644 index 00000000..cba59efe --- /dev/null +++ b/theme/site/elements/container.overrides @@ -0,0 +1,3 @@ +/******************************* + Site Overrides +*******************************/ diff --git a/theme/site/elements/container.variables b/theme/site/elements/container.variables new file mode 100644 index 00000000..6f085f93 --- /dev/null +++ b/theme/site/elements/container.variables @@ -0,0 +1,3 @@ +/******************************* + User Variable Overrides +*******************************/ diff --git a/theme/site/elements/divider.overrides b/theme/site/elements/divider.overrides new file mode 100644 index 00000000..cba59efe --- /dev/null +++ b/theme/site/elements/divider.overrides @@ -0,0 +1,3 @@ +/******************************* + Site Overrides +*******************************/ diff --git a/theme/site/elements/divider.variables b/theme/site/elements/divider.variables new file mode 100644 index 00000000..6f085f93 --- /dev/null +++ b/theme/site/elements/divider.variables @@ -0,0 +1,3 @@ +/******************************* + User Variable Overrides +*******************************/ diff --git a/theme/site/elements/flag.overrides b/theme/site/elements/flag.overrides new file mode 100644 index 00000000..cba59efe --- /dev/null +++ b/theme/site/elements/flag.overrides @@ -0,0 +1,3 @@ +/******************************* + Site Overrides +*******************************/ diff --git a/theme/site/elements/flag.variables b/theme/site/elements/flag.variables new file mode 100644 index 00000000..e3e125d6 --- /dev/null +++ b/theme/site/elements/flag.variables @@ -0,0 +1,3 @@ +/*------------------- + Flag Variables +--------------------*/ diff --git a/theme/site/elements/header.overrides b/theme/site/elements/header.overrides new file mode 100644 index 00000000..cba59efe --- /dev/null +++ b/theme/site/elements/header.overrides @@ -0,0 +1,3 @@ +/******************************* + Site Overrides +*******************************/ diff --git a/theme/site/elements/header.variables b/theme/site/elements/header.variables new file mode 100644 index 00000000..6f085f93 --- /dev/null +++ b/theme/site/elements/header.variables @@ -0,0 +1,3 @@ +/******************************* + User Variable Overrides +*******************************/ diff --git a/theme/site/elements/icon.overrides b/theme/site/elements/icon.overrides new file mode 100644 index 00000000..cba59efe --- /dev/null +++ b/theme/site/elements/icon.overrides @@ -0,0 +1,3 @@ +/******************************* + Site Overrides +*******************************/ diff --git a/theme/site/elements/icon.variables b/theme/site/elements/icon.variables new file mode 100644 index 00000000..6f085f93 --- /dev/null +++ b/theme/site/elements/icon.variables @@ -0,0 +1,3 @@ +/******************************* + User Variable Overrides +*******************************/ diff --git a/theme/site/elements/image.overrides b/theme/site/elements/image.overrides new file mode 100644 index 00000000..cba59efe --- /dev/null +++ b/theme/site/elements/image.overrides @@ -0,0 +1,3 @@ +/******************************* + Site Overrides +*******************************/ diff --git a/theme/site/elements/image.variables b/theme/site/elements/image.variables new file mode 100644 index 00000000..6f085f93 --- /dev/null +++ b/theme/site/elements/image.variables @@ -0,0 +1,3 @@ +/******************************* + User Variable Overrides +*******************************/ diff --git a/theme/site/elements/input.overrides b/theme/site/elements/input.overrides new file mode 100644 index 00000000..cba59efe --- /dev/null +++ b/theme/site/elements/input.overrides @@ -0,0 +1,3 @@ +/******************************* + Site Overrides +*******************************/ diff --git a/theme/site/elements/input.variables b/theme/site/elements/input.variables new file mode 100644 index 00000000..04b556f8 --- /dev/null +++ b/theme/site/elements/input.variables @@ -0,0 +1,6 @@ +/******************************* + User Variable Overrides +*******************************/ + +@invertedItemTextColor: @primaryColor; +@transparentInvertedColor: @primaryColor; \ No newline at end of file diff --git a/theme/site/elements/label.overrides b/theme/site/elements/label.overrides new file mode 100644 index 00000000..cba59efe --- /dev/null +++ b/theme/site/elements/label.overrides @@ -0,0 +1,3 @@ +/******************************* + Site Overrides +*******************************/ diff --git a/theme/site/elements/label.variables b/theme/site/elements/label.variables new file mode 100644 index 00000000..6f085f93 --- /dev/null +++ b/theme/site/elements/label.variables @@ -0,0 +1,3 @@ +/******************************* + User Variable Overrides +*******************************/ diff --git a/theme/site/elements/list.overrides b/theme/site/elements/list.overrides new file mode 100644 index 00000000..6f085f93 --- /dev/null +++ b/theme/site/elements/list.overrides @@ -0,0 +1,3 @@ +/******************************* + User Variable Overrides +*******************************/ diff --git a/theme/site/elements/list.variables b/theme/site/elements/list.variables new file mode 100644 index 00000000..6f085f93 --- /dev/null +++ b/theme/site/elements/list.variables @@ -0,0 +1,3 @@ +/******************************* + User Variable Overrides +*******************************/ diff --git a/theme/site/elements/loader.overrides b/theme/site/elements/loader.overrides new file mode 100644 index 00000000..cba59efe --- /dev/null +++ b/theme/site/elements/loader.overrides @@ -0,0 +1,3 @@ +/******************************* + Site Overrides +*******************************/ diff --git a/theme/site/elements/loader.variables b/theme/site/elements/loader.variables new file mode 100644 index 00000000..6f085f93 --- /dev/null +++ b/theme/site/elements/loader.variables @@ -0,0 +1,3 @@ +/******************************* + User Variable Overrides +*******************************/ diff --git a/theme/site/elements/rail.overrides b/theme/site/elements/rail.overrides new file mode 100644 index 00000000..cba59efe --- /dev/null +++ b/theme/site/elements/rail.overrides @@ -0,0 +1,3 @@ +/******************************* + Site Overrides +*******************************/ diff --git a/theme/site/elements/rail.variables b/theme/site/elements/rail.variables new file mode 100644 index 00000000..6f085f93 --- /dev/null +++ b/theme/site/elements/rail.variables @@ -0,0 +1,3 @@ +/******************************* + User Variable Overrides +*******************************/ diff --git a/theme/site/elements/reveal.overrides b/theme/site/elements/reveal.overrides new file mode 100644 index 00000000..cba59efe --- /dev/null +++ b/theme/site/elements/reveal.overrides @@ -0,0 +1,3 @@ +/******************************* + Site Overrides +*******************************/ diff --git a/theme/site/elements/reveal.variables b/theme/site/elements/reveal.variables new file mode 100644 index 00000000..6f085f93 --- /dev/null +++ b/theme/site/elements/reveal.variables @@ -0,0 +1,3 @@ +/******************************* + User Variable Overrides +*******************************/ diff --git a/theme/site/elements/segment.overrides b/theme/site/elements/segment.overrides new file mode 100644 index 00000000..cba59efe --- /dev/null +++ b/theme/site/elements/segment.overrides @@ -0,0 +1,3 @@ +/******************************* + Site Overrides +*******************************/ diff --git a/theme/site/elements/segment.variables b/theme/site/elements/segment.variables new file mode 100644 index 00000000..6f085f93 --- /dev/null +++ b/theme/site/elements/segment.variables @@ -0,0 +1,3 @@ +/******************************* + User Variable Overrides +*******************************/ diff --git a/theme/site/elements/step.overrides b/theme/site/elements/step.overrides new file mode 100644 index 00000000..cba59efe --- /dev/null +++ b/theme/site/elements/step.overrides @@ -0,0 +1,3 @@ +/******************************* + Site Overrides +*******************************/ diff --git a/theme/site/elements/step.variables b/theme/site/elements/step.variables new file mode 100644 index 00000000..6f085f93 --- /dev/null +++ b/theme/site/elements/step.variables @@ -0,0 +1,3 @@ +/******************************* + User Variable Overrides +*******************************/ diff --git a/theme/site/globals/reset.overrides b/theme/site/globals/reset.overrides new file mode 100644 index 00000000..cba59efe --- /dev/null +++ b/theme/site/globals/reset.overrides @@ -0,0 +1,3 @@ +/******************************* + Site Overrides +*******************************/ diff --git a/theme/site/globals/reset.variables b/theme/site/globals/reset.variables new file mode 100644 index 00000000..cd955446 --- /dev/null +++ b/theme/site/globals/reset.variables @@ -0,0 +1,3 @@ +/******************************* + User Global Variables +*******************************/ diff --git a/theme/site/globals/site.overrides b/theme/site/globals/site.overrides new file mode 100644 index 00000000..cba59efe --- /dev/null +++ b/theme/site/globals/site.overrides @@ -0,0 +1,3 @@ +/******************************* + Site Overrides +*******************************/ diff --git a/theme/site/globals/site.variables b/theme/site/globals/site.variables new file mode 100644 index 00000000..ac07ffb2 --- /dev/null +++ b/theme/site/globals/site.variables @@ -0,0 +1,90 @@ +/******************************* + User Global Variables +*******************************/ + +@importGoogleFonts: true; + +@fontName : 'Open Sans'; + +@emSize : 14px; +@fontSize : 13px; + +@primaryColor: @blue; +@secondaryColor: @pink; + +@red:#CC2936; +@yellow:#FFC914; +@teal:#08415C; +@violet:#C200C0; +@brown:#2E282A; +@grey:#999; + +/* Adafruit colors */ +@blue:#2EB7ED; +@pink:#FB48C7; + +@green: #40bf4a; /*#00922B;*/ +@purple:#8073E5; +@orange:#FFA702; + +@pageBackground: #ecf0f1; + +/******************************* + PXT Overrides +*******************************/ + +/*------------------- + Menu +--------------------*/ + +@mainMenuInvertedBackground: @blue; +@mainMenuTutorialBackground: @orange; + +@mainMenuBlocksJsToggleColor: @black; + +@tutorialSelectedMenuColor: @blue; + +/*------------------- + Layout +--------------------*/ + +@sideBarWidth: 22rem; +@simulatorWidth: 24rem; +@simulatorWidthSmall: 20rem; + +/*------------------- + Background +--------------------*/ + +@simulatorBackground: #2F2F2F; /*#313638;*/ +@editorToolsBackground: #2F2F2F; /*#1e1e1e;*/ +@blocklySvgColor: #4c4b4d; /*#1e1e1e;*/ + +/*------------------- + Full screen +--------------------*/ + +@fullscreenBackgroundGradientStart: @mainMenuInvertedBackground; +@fullscreenBackgroundGradientEnd: #fff; + +/*------------------- + Side Docs +--------------------*/ + +@sidedocsButtonsTop: (@mainMenuHeight + 1rem); +@sidedocsButtonsRight: 4.25rem; + +/*------------------- + Editor +--------------------*/ + +@blocklyToolboxColor: transparent; +@trashIconColor: @primaryColor; + + +/*------------------- + Blockly +--------------------*/ + +@blocklyRowWidthWide: 160px; +@blocklyRowWidthComputer: 140px; diff --git a/theme/site/modules/accordion.overrides b/theme/site/modules/accordion.overrides new file mode 100644 index 00000000..660e664b --- /dev/null +++ b/theme/site/modules/accordion.overrides @@ -0,0 +1,3 @@ +/******************************* + User Overrides +*******************************/ diff --git a/theme/site/modules/accordion.variables b/theme/site/modules/accordion.variables new file mode 100644 index 00000000..6f085f93 --- /dev/null +++ b/theme/site/modules/accordion.variables @@ -0,0 +1,3 @@ +/******************************* + User Variable Overrides +*******************************/ diff --git a/theme/site/modules/chatroom.overrides b/theme/site/modules/chatroom.overrides new file mode 100644 index 00000000..660e664b --- /dev/null +++ b/theme/site/modules/chatroom.overrides @@ -0,0 +1,3 @@ +/******************************* + User Overrides +*******************************/ diff --git a/theme/site/modules/chatroom.variables b/theme/site/modules/chatroom.variables new file mode 100644 index 00000000..6f085f93 --- /dev/null +++ b/theme/site/modules/chatroom.variables @@ -0,0 +1,3 @@ +/******************************* + User Variable Overrides +*******************************/ diff --git a/theme/site/modules/checkbox.overrides b/theme/site/modules/checkbox.overrides new file mode 100644 index 00000000..cba59efe --- /dev/null +++ b/theme/site/modules/checkbox.overrides @@ -0,0 +1,3 @@ +/******************************* + Site Overrides +*******************************/ diff --git a/theme/site/modules/checkbox.variables b/theme/site/modules/checkbox.variables new file mode 100644 index 00000000..6f085f93 --- /dev/null +++ b/theme/site/modules/checkbox.variables @@ -0,0 +1,3 @@ +/******************************* + User Variable Overrides +*******************************/ diff --git a/theme/site/modules/dimmer.overrides b/theme/site/modules/dimmer.overrides new file mode 100644 index 00000000..660e664b --- /dev/null +++ b/theme/site/modules/dimmer.overrides @@ -0,0 +1,3 @@ +/******************************* + User Overrides +*******************************/ diff --git a/theme/site/modules/dimmer.variables b/theme/site/modules/dimmer.variables new file mode 100644 index 00000000..6f085f93 --- /dev/null +++ b/theme/site/modules/dimmer.variables @@ -0,0 +1,3 @@ +/******************************* + User Variable Overrides +*******************************/ diff --git a/theme/site/modules/dropdown.overrides b/theme/site/modules/dropdown.overrides new file mode 100644 index 00000000..660e664b --- /dev/null +++ b/theme/site/modules/dropdown.overrides @@ -0,0 +1,3 @@ +/******************************* + User Overrides +*******************************/ diff --git a/theme/site/modules/dropdown.variables b/theme/site/modules/dropdown.variables new file mode 100644 index 00000000..6f085f93 --- /dev/null +++ b/theme/site/modules/dropdown.variables @@ -0,0 +1,3 @@ +/******************************* + User Variable Overrides +*******************************/ diff --git a/theme/site/modules/embed.overrides b/theme/site/modules/embed.overrides new file mode 100644 index 00000000..cba59efe --- /dev/null +++ b/theme/site/modules/embed.overrides @@ -0,0 +1,3 @@ +/******************************* + Site Overrides +*******************************/ diff --git a/theme/site/modules/embed.variables b/theme/site/modules/embed.variables new file mode 100644 index 00000000..e69de29b diff --git a/theme/site/modules/modal.overrides b/theme/site/modules/modal.overrides new file mode 100644 index 00000000..cba59efe --- /dev/null +++ b/theme/site/modules/modal.overrides @@ -0,0 +1,3 @@ +/******************************* + Site Overrides +*******************************/ diff --git a/theme/site/modules/modal.variables b/theme/site/modules/modal.variables new file mode 100644 index 00000000..cba59efe --- /dev/null +++ b/theme/site/modules/modal.variables @@ -0,0 +1,3 @@ +/******************************* + Site Overrides +*******************************/ diff --git a/theme/site/modules/nag.overrides b/theme/site/modules/nag.overrides new file mode 100644 index 00000000..660e664b --- /dev/null +++ b/theme/site/modules/nag.overrides @@ -0,0 +1,3 @@ +/******************************* + User Overrides +*******************************/ diff --git a/theme/site/modules/nag.variables b/theme/site/modules/nag.variables new file mode 100644 index 00000000..6f085f93 --- /dev/null +++ b/theme/site/modules/nag.variables @@ -0,0 +1,3 @@ +/******************************* + User Variable Overrides +*******************************/ diff --git a/theme/site/modules/popup.overrides b/theme/site/modules/popup.overrides new file mode 100644 index 00000000..660e664b --- /dev/null +++ b/theme/site/modules/popup.overrides @@ -0,0 +1,3 @@ +/******************************* + User Overrides +*******************************/ diff --git a/theme/site/modules/popup.variables b/theme/site/modules/popup.variables new file mode 100644 index 00000000..6f085f93 --- /dev/null +++ b/theme/site/modules/popup.variables @@ -0,0 +1,3 @@ +/******************************* + User Variable Overrides +*******************************/ diff --git a/theme/site/modules/progress.overrides b/theme/site/modules/progress.overrides new file mode 100644 index 00000000..cba59efe --- /dev/null +++ b/theme/site/modules/progress.overrides @@ -0,0 +1,3 @@ +/******************************* + Site Overrides +*******************************/ diff --git a/theme/site/modules/progress.variables b/theme/site/modules/progress.variables new file mode 100644 index 00000000..6f085f93 --- /dev/null +++ b/theme/site/modules/progress.variables @@ -0,0 +1,3 @@ +/******************************* + User Variable Overrides +*******************************/ diff --git a/theme/site/modules/rating.overrides b/theme/site/modules/rating.overrides new file mode 100644 index 00000000..cba59efe --- /dev/null +++ b/theme/site/modules/rating.overrides @@ -0,0 +1,3 @@ +/******************************* + Site Overrides +*******************************/ diff --git a/theme/site/modules/rating.variables b/theme/site/modules/rating.variables new file mode 100644 index 00000000..cba59efe --- /dev/null +++ b/theme/site/modules/rating.variables @@ -0,0 +1,3 @@ +/******************************* + Site Overrides +*******************************/ diff --git a/theme/site/modules/search.overrides b/theme/site/modules/search.overrides new file mode 100644 index 00000000..cba59efe --- /dev/null +++ b/theme/site/modules/search.overrides @@ -0,0 +1,3 @@ +/******************************* + Site Overrides +*******************************/ diff --git a/theme/site/modules/search.variables b/theme/site/modules/search.variables new file mode 100644 index 00000000..cba59efe --- /dev/null +++ b/theme/site/modules/search.variables @@ -0,0 +1,3 @@ +/******************************* + Site Overrides +*******************************/ diff --git a/theme/site/modules/shape.overrides b/theme/site/modules/shape.overrides new file mode 100644 index 00000000..660e664b --- /dev/null +++ b/theme/site/modules/shape.overrides @@ -0,0 +1,3 @@ +/******************************* + User Overrides +*******************************/ diff --git a/theme/site/modules/shape.variables b/theme/site/modules/shape.variables new file mode 100644 index 00000000..6f085f93 --- /dev/null +++ b/theme/site/modules/shape.variables @@ -0,0 +1,3 @@ +/******************************* + User Variable Overrides +*******************************/ diff --git a/theme/site/modules/sidebar.overrides b/theme/site/modules/sidebar.overrides new file mode 100644 index 00000000..cba59efe --- /dev/null +++ b/theme/site/modules/sidebar.overrides @@ -0,0 +1,3 @@ +/******************************* + Site Overrides +*******************************/ diff --git a/theme/site/modules/sidebar.variables b/theme/site/modules/sidebar.variables new file mode 100644 index 00000000..cba59efe --- /dev/null +++ b/theme/site/modules/sidebar.variables @@ -0,0 +1,3 @@ +/******************************* + Site Overrides +*******************************/ diff --git a/theme/site/modules/sticky.overrides b/theme/site/modules/sticky.overrides new file mode 100644 index 00000000..cba59efe --- /dev/null +++ b/theme/site/modules/sticky.overrides @@ -0,0 +1,3 @@ +/******************************* + Site Overrides +*******************************/ diff --git a/theme/site/modules/sticky.variables b/theme/site/modules/sticky.variables new file mode 100644 index 00000000..cba59efe --- /dev/null +++ b/theme/site/modules/sticky.variables @@ -0,0 +1,3 @@ +/******************************* + Site Overrides +*******************************/ diff --git a/theme/site/modules/tab.overrides b/theme/site/modules/tab.overrides new file mode 100644 index 00000000..660e664b --- /dev/null +++ b/theme/site/modules/tab.overrides @@ -0,0 +1,3 @@ +/******************************* + User Overrides +*******************************/ diff --git a/theme/site/modules/tab.variables b/theme/site/modules/tab.variables new file mode 100644 index 00000000..6f085f93 --- /dev/null +++ b/theme/site/modules/tab.variables @@ -0,0 +1,3 @@ +/******************************* + User Variable Overrides +*******************************/ diff --git a/theme/site/modules/transition.overrides b/theme/site/modules/transition.overrides new file mode 100644 index 00000000..0b78a5f9 --- /dev/null +++ b/theme/site/modules/transition.overrides @@ -0,0 +1,216 @@ +/******************************* + Site Overrides +*******************************/ + + +/*-------------- + Rotate In +---------------*/ + +/* Inward */ +.transition.rotate { + animation-duration: 0.6s; + transition-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000); +} +.transition.rotate.in { + animation-name: rotateIn; +} +.transition[class*="rotate down left"].in { + animation-name: rotateInDownLeft; +} +.transition[class*="rotate down right"].in { + animation-name: rotateInDownRight; +} +.transition[class*="rotate up left"].in { + animation-name: rotateInUpLeft; +} +.transition[class*="rotate up right"].in { + animation-name: rotateInUpRight; +} + +/* Outward */ +.transition.rotate.out { + animation-name: rotateOut; +} +.transition[class*="rotate down left"].out { + animation-name: rotateOutDownLeft; +} +.transition[class*="rotate down right"].out { + animation-name: rotateOutDownRight; +} +.transition[class*="rotate up left"].out { + animation-name: rotateOutUpLeft; +} +.transition[class*="rotate up right"].out { + animation-name: rotateOutUpRight; +} + +/* In */ +@keyframes rotateIn { + from { + transform-origin: center; + transform: rotate3d(0, 0, 1, -200deg); + opacity: 0; + } + + to { + transform-origin: center; + transform: none; + opacity: 1; + } +} +@keyframes rotateInDownLeft { + from { + transform-origin: left bottom; + transform: rotate3d(0, 0, 1, -45deg); + opacity: 0; + } + + to { + transform-origin: left bottom; + transform: none; + opacity: 1; + } +} +@keyframes rotateInDownRight { + from { + transform-origin: right bottom; + transform: rotate3d(0, 0, 1, 45deg); + opacity: 0; + } + + to { + transform-origin: right bottom; + transform: none; + opacity: 1; + } +} +@keyframes rotateInUpLeft { + from { + transform-origin: left bottom; + transform: rotate3d(0, 0, 1, 45deg); + opacity: 0; + } + + to { + transform-origin: left bottom; + transform: none; + opacity: 1; + } +} +@keyframes rotateInUpRight { + from { + transform-origin: right bottom; + transform: rotate3d(0, 0, 1, -90deg); + opacity: 0; + } + + to { + transform-origin: right bottom; + transform: none; + opacity: 1; + } +} + +/* Out */ +@keyframes rotateOut { + from { + transform-origin: center; + opacity: 1; + } + + to { + transform-origin: center; + transform: rotate3d(0, 0, 1, 200deg); + opacity: 0; + } +} +@keyframes rotateOutDownLeft { + from { + transform-origin: left bottom; + opacity: 1; + } + + to { + transform-origin: left bottom; + transform: rotate3d(0, 0, 1, 45deg); + opacity: 0; + } +} +@keyframes rotateOutDownRight { + from { + transform-origin: right bottom; + opacity: 1; + } + + to { + transform-origin: right bottom; + transform: rotate3d(0, 0, 1, -45deg); + opacity: 0; + } +} +@keyframes rotateOutUpLeft { + from { + transform-origin: left bottom; + opacity: 1; + } + + to { + transform-origin: left bottom; + transform: rotate3d(0, 0, 1, -45deg); + opacity: 0; + } +} +@keyframes rotateOutUpRight { + from { + transform-origin: right bottom; + opacity: 1; + } + + to { + transform-origin: right bottom; + transform: rotate3d(0, 0, 1, 90deg); + opacity: 0; + } +} + + + +/*-------------- + Roll in +---------------*/ + +/* Inward */ +.transition.roll { + animation-duration: 2s; + transition-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000); +} +.transition.roll.in { + animation-name: rollIn; +} +.transition.roll.out { + animation-name: rollOut; +} + +@keyframes rollIn { + from { + opacity: 0; + transform: translate3d(-100%, 0, 0) rotate3d(0, 0, 1, -120deg); + } + + to { + opacity: 1; + transform: none; + } +} + +@keyframes rollOut { + from { + opacity: 1; + } + + to { + opacity: 0; + transform: translate3d(-100%, 0, 0) rotate3d(0, 0, 1, -120deg); + } +} \ No newline at end of file diff --git a/theme/site/modules/transition.variables b/theme/site/modules/transition.variables new file mode 100644 index 00000000..6f085f93 --- /dev/null +++ b/theme/site/modules/transition.variables @@ -0,0 +1,3 @@ +/******************************* + User Variable Overrides +*******************************/ diff --git a/theme/site/modules/video.overrides b/theme/site/modules/video.overrides new file mode 100644 index 00000000..cba59efe --- /dev/null +++ b/theme/site/modules/video.overrides @@ -0,0 +1,3 @@ +/******************************* + Site Overrides +*******************************/ diff --git a/theme/site/modules/video.variables b/theme/site/modules/video.variables new file mode 100644 index 00000000..e69de29b diff --git a/theme/site/views/ad.overrides b/theme/site/views/ad.overrides new file mode 100644 index 00000000..6f085f93 --- /dev/null +++ b/theme/site/views/ad.overrides @@ -0,0 +1,3 @@ +/******************************* + User Variable Overrides +*******************************/ diff --git a/theme/site/views/ad.variables b/theme/site/views/ad.variables new file mode 100644 index 00000000..6f085f93 --- /dev/null +++ b/theme/site/views/ad.variables @@ -0,0 +1,3 @@ +/******************************* + User Variable Overrides +*******************************/ diff --git a/theme/site/views/card.overrides b/theme/site/views/card.overrides new file mode 100644 index 00000000..6f085f93 --- /dev/null +++ b/theme/site/views/card.overrides @@ -0,0 +1,3 @@ +/******************************* + User Variable Overrides +*******************************/ diff --git a/theme/site/views/card.variables b/theme/site/views/card.variables new file mode 100644 index 00000000..6f085f93 --- /dev/null +++ b/theme/site/views/card.variables @@ -0,0 +1,3 @@ +/******************************* + User Variable Overrides +*******************************/ diff --git a/theme/site/views/comment.overrides b/theme/site/views/comment.overrides new file mode 100644 index 00000000..6f085f93 --- /dev/null +++ b/theme/site/views/comment.overrides @@ -0,0 +1,3 @@ +/******************************* + User Variable Overrides +*******************************/ diff --git a/theme/site/views/comment.variables b/theme/site/views/comment.variables new file mode 100644 index 00000000..6f085f93 --- /dev/null +++ b/theme/site/views/comment.variables @@ -0,0 +1,3 @@ +/******************************* + User Variable Overrides +*******************************/ diff --git a/theme/site/views/feed.overrides b/theme/site/views/feed.overrides new file mode 100644 index 00000000..6f085f93 --- /dev/null +++ b/theme/site/views/feed.overrides @@ -0,0 +1,3 @@ +/******************************* + User Variable Overrides +*******************************/ diff --git a/theme/site/views/feed.variables b/theme/site/views/feed.variables new file mode 100644 index 00000000..6f085f93 --- /dev/null +++ b/theme/site/views/feed.variables @@ -0,0 +1,3 @@ +/******************************* + User Variable Overrides +*******************************/ diff --git a/theme/site/views/item.overrides b/theme/site/views/item.overrides new file mode 100644 index 00000000..6f085f93 --- /dev/null +++ b/theme/site/views/item.overrides @@ -0,0 +1,3 @@ +/******************************* + User Variable Overrides +*******************************/ diff --git a/theme/site/views/item.variables b/theme/site/views/item.variables new file mode 100644 index 00000000..6f085f93 --- /dev/null +++ b/theme/site/views/item.variables @@ -0,0 +1,3 @@ +/******************************* + User Variable Overrides +*******************************/ diff --git a/theme/site/views/statistic.overrides b/theme/site/views/statistic.overrides new file mode 100644 index 00000000..6f085f93 --- /dev/null +++ b/theme/site/views/statistic.overrides @@ -0,0 +1,3 @@ +/******************************* + User Variable Overrides +*******************************/ diff --git a/theme/site/views/statistic.variables b/theme/site/views/statistic.variables new file mode 100644 index 00000000..6f085f93 --- /dev/null +++ b/theme/site/views/statistic.variables @@ -0,0 +1,3 @@ +/******************************* + User Variable Overrides +*******************************/ diff --git a/theme/style.less b/theme/style.less new file mode 100644 index 00000000..a21b510a --- /dev/null +++ b/theme/style.less @@ -0,0 +1,149 @@ +/* Import all components */ +@import 'semantic'; +@import 'pxt'; +@import 'themes/default/globals/site.variables'; +@import 'themes/pxt/globals/site.variables'; +@import 'site/globals/site.variables'; +@import 'themes/default/collections/menu.variables'; + +@import 'fieldeditors'; + +/* Reference import */ +@import (reference) "semantic.less"; + +/******************************* + Add your custom CSS here +*******************************/ + +.ui.button.download-button { + &:extend(.ui.secondary.button all); +} + +.ui.button.editortools-btn { + &:extend(.ui.blue.button all); +} + +.projectname-input { + &:extend(.inverted all); +} + +.ui.button.getting-started-btn { + &:extend(.ui.green.button all); +} + +.ui.button.exit-tutorial-btn { + &:extend(.ui.blue.button all); +} + + +/* Remove shadow around blockly blocks */ +.blocklyPathDark, .blocklyPathLight { + display: none; +} + +/* Specifying rounded toolbox borders. */ +div.blocklyTreeRow { + border-radius: 3px; + margin-bottom: 3px !important; + border: 1px solid #1e1e1e; + border-left-width: 1px !important; +} +div.blocklyTreeRoot div div div div div.blocklyTreeRow { + border-left-width: 1px !important; +} + +/* Highlight category item */ +div.blocklyTreeRow.blocklyTreeSelected, div.blocklyTreeRoot div div div div div.blocklyTreeRow.blocklyTreeSelected { + border: 2px solid #fc3; + border-left-width: 2px !important; +} + +/* This removes any padding at the top of the toolbox */ +div.blocklyTreeRoot { + padding: 0px !important; +} + +/* Blockly Text */ +span.blocklyTreeLabel { + font-family: "Gotham SSm A","Gotham SSm B","Montserrat","Lucida Grande","Lucida Sans Unicode","Lucida Sans",Geneva,Verdana,sans-serif !important; + text-transform: uppercase !important; + font-size:1rem !important; +} + +svg.blocklySvg { + background: #00487C; /* For browsers that do not support gradients */ +} + +.blocklyFlyoutBackground { + fill: #282828 !important; +} +.monacoFlyout { + background: rgba(40, 40, 40, 0.9); +} + +.blocklyToolboxDiv, .monacoToolboxDiv { + padding: 0.5rem; + border-right: solid 1px #282828; + background-color: #383838 !important; +} + +.blocklyScrollbarHandle { + fill: #000 !important; + fill-opacity:.8; +} + +/* Editor menu toggle */ +.ui.menu .item.editor-menuitem { + background: fade(@black, 20%) !important; +} + +/* Search box */ +#blocklySearchArea { + margin: 0.5rem; +} +.blocklySearchInputField { + border-radius: 0.2rem !important; +} + +.sandboxfooter a:not(.thin) { + color:white !important; +} + +/* Scrollbars */ +::-webkit-scrollbar-thumb { + border-radius: 5px; + background-color: rgba(0, 0, 0, 0.8); + box-shadow: 0 0 1px rgba(0, 0, 0, 0.8); + -webkit-box-shadow: 0 0 1px rgba(0, 0, 0, 0.8); +} + +/* Mobile */ +@media only screen and (max-width: @largestMobileScreen) { + #filelist { + background: transparent; + } + div.blocklyTreeRow { + padding-bottom: 2rem !important; + } + #blocklyTrashIcon { + margin: 0.2rem; + } +} + +/* Tablet */ +@media only screen and (min-width: @tabletBreakpoint) and (max-width: @largestTabletScreen) { +} + +/* Small Monitor */ +@media only screen and (min-width: @computerBreakpoint) and (max-width: @largestSmallMonitor) { +} + +/* Large Monitor */ +@media only screen and (min-width: @largeMonitorBreakpoint) { +} +/* Mobile, Tablet AND thin screen */ +@media only screen and (max-width: @largestTabletScreen) and (max-height: @thinEditorBreakpoint) { + .sandboxfooter a:not(.thin) { + color: @black !important; + } +} \ No newline at end of file diff --git a/theme/theme.config b/theme/theme.config new file mode 100644 index 00000000..53510589 --- /dev/null +++ b/theme/theme.config @@ -0,0 +1,94 @@ +/* + +████████╗██╗ ██╗███████╗███╗ ███╗███████╗███████╗ +╚══██╔══╝██║ ██║██╔════╝████╗ ████║██╔════╝██╔════╝ + ██║ ███████║█████╗ ██╔████╔██║█████╗ ███████╗ + ██║ ██╔══██║██╔══╝ ██║╚██╔╝██║██╔══╝ ╚════██║ + ██║ ██║ ██║███████╗██║ ╚═╝ ██║███████╗███████║ + ╚═╝ ╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝╚══════╝╚══════╝ + +*/ + +/******************************* + Theme Selection +*******************************/ + +/* To override a theme for an individual element + specify theme name below +*/ + +/* Global */ +@site : 'pxt'; +@reset : 'default'; + +/* Elements */ +@button : 'pxt'; +@container : 'pxt'; +@divider : 'pxt'; +@flag : 'pxt'; +@header : 'pxt'; +@icon : 'default'; +@image : 'pxt'; +@input : 'pxt'; +@label : 'pxt'; +@list : 'pxt'; +@loader : 'pxt'; +@rail : 'pxt'; +@reveal : 'pxt'; +@segment : 'pxt'; +@step : 'pxt'; + +/* Collections */ +@breadcrumb : 'default'; +@form : 'default'; +@grid : 'pxt'; +@menu : 'pxt'; +@message : 'default'; +@table : 'default'; + +/* Modules */ +@accordion : 'default'; +@checkbox : 'default'; +@dimmer : 'default'; +@dropdown : 'default'; +@embed : 'default'; +@modal : 'default'; +@nag : 'default'; +@popup : 'default'; +@progress : 'default'; +@rating : 'default'; +@search : 'default'; +@shape : 'default'; +@sidebar : 'default'; +@sticky : 'default'; +@tab : 'default'; +@transition : 'default'; + +/* Views */ +@ad : 'default'; +@card : 'default'; +@comment : 'default'; +@feed : 'default'; +@item : 'default'; +@statistic : 'default'; + +/******************************* + Folders +*******************************/ + +/* Path to theme packages */ +@themesFolder : 'themes'; + +/* Path to site override folder */ +@siteFolder : 'site'; + + +/******************************* + Import Theme +*******************************/ + +@import "theme.less"; + +@fontPath : 'fonts'; + +/* End Config */ diff --git a/tslint.json b/tslint.json new file mode 100644 index 00000000..6d9bd5e2 --- /dev/null +++ b/tslint.json @@ -0,0 +1,56 @@ +{ + "rules": { + "class-name": true, + "comment-format": [ + true + ], + "indent": [ + true, + "spaces" + ], + "no-duplicate-variable": true, + "no-eval": true, + "no-internal-module": true, + "no-trailing-whitespace": true, + "no-var-keyword": true, + "one-line": [ + true, + "check-open-brace", + "check-whitespace" + ], + "quotemark": [ + true, + "double" + ], + "semicolon": [ + false, + "always" + ], + "triple-equals": [ + false, + "allow-null-check" + ], + "typedef-whitespace": [ + true, + { + "call-signature": "nospace", + "index-signature": "nospace", + "parameter": "nospace", + "property-declaration": "nospace", + "variable-declaration": "nospace" + } + ], + "variable-name": [ + true, + "ban-keywords" + ], + "whitespace": [ + true, + "check-branch", + "check-decl", + "check-operator", + "check-separator", + "check-type" + ] + } +} \ No newline at end of file