diff --git a/NOTICE.md b/NOTICE.md index 28390dcb8644..6d13be6a19ce 100644 --- a/NOTICE.md +++ b/NOTICE.md @@ -41,7 +41,7 @@ Crystal playground includes the following libraries, which have their own licens * [jQuery][] - [MIT][] `Copyright JS Foundation and other contributors, https://js.foundation/` - * [Octicons][] - [MIT][] (for codes) or [OFL-1.1][] (for fonts) `(c) 2012-2016 GitHub, Inc.` + * [Octicons][] - [MIT][] `(c) 2023 GitHub Inc.` * [Materialize][] - [MIT][] `Copyright (c) 2014-2015 Materialize` * [CodeMirror][] - [MIT][] `Copyright (C) 2016 by Marijn Haverbeke and others` * [ansi\_up][] - [MIT][] `Copyright (c) 2011 Dru Nelson` diff --git a/src/compiler/crystal/tools/playground/public/application.css b/src/compiler/crystal/tools/playground/public/application.css index a8bc47b74023..962a30835b94 100644 --- a/src/compiler/crystal/tools/playground/public/application.css +++ b/src/compiler/crystal/tools/playground/public/application.css @@ -183,11 +183,6 @@ h4 { .code-btn .icon { margin-right: 3px; } .code-btn .icon :before { font-size:14px;} -.run-button { - padding-top: 5px; - padding-left: 2px; -} - .run-button-preloader { position: absolute; top: 11px; diff --git a/src/compiler/crystal/tools/playground/public/application.js b/src/compiler/crystal/tools/playground/public/application.js index 13e9facb5971..8799fdf41300 100644 --- a/src/compiler/crystal/tools/playground/public/application.js +++ b/src/compiler/crystal/tools/playground/public/application.js @@ -84,8 +84,7 @@ $(function(){ .attr("href", msg.html_url) .attr("target", "_blank") .append($("").text(msg.html_url)) - .append(" ") - .append($("").addClass("octicon octicon-link-external")) + .append(` `) )).openModal(); } }); @@ -132,7 +131,9 @@ function initDemoPlayground(dom) { output = $("").addClass("output").css("min-height", "1.5em") ))) ).append( - outputIndicator = $("
").addClass("col s1") + `
` + ).append( + outputIndicator = $("
") ).append( $("
").addClass("col s4").append(buttonsContainer = $("
").addClass("demoButtonsContainer")) )); diff --git a/src/compiler/crystal/tools/playground/public/session.js b/src/compiler/crystal/tools/playground/public/session.js index d605b2f66d34..3da8fa06433d 100644 --- a/src/compiler/crystal/tools/playground/public/session.js +++ b/src/compiler/crystal/tools/playground/public/session.js @@ -60,7 +60,7 @@ Playground.RunButtons = function(options) { return $("").addClass("run-button btn-floating btn-large waves-effect waves-light tooltipped") .attr("href", "#") .attr("data-position", "left").attr("data-delay", "50").attr("data-tooltip", tooltip) - .append($("").addClass("mega-octicon " + octicon)); + .append(``); } var buildProgress = function() { @@ -81,8 +81,8 @@ Playground.RunButtons = function(options) { var mac = /Mac/.test(navigator.platform); options.container - .prepend(this.stopButton = buildAnchor("Stops code", "octicon-primitive-square")) - .prepend(this.playButton = buildAnchor(mac ? "⌘ + Enter" : "Ctrl + Enter", "octicon-triangle-right")) + .prepend(this.stopButton = buildAnchor("Stops code", "square-fill")) + .prepend(this.playButton = buildAnchor(mac ? "⌘ + Enter" : "Ctrl + Enter", "triangle-right")) .prepend(this.progress = buildProgress()); this.stopButton.hide().tooltip(); @@ -130,8 +130,6 @@ Playground.OutputIndicator = function(dom) { this.dom = dom; this.blinkTimeout = null; - this.dom.addClass("octicon octicon-terminal"); - this.turnOnWithBlink = function () { this.dom.removeClass('teal-text red-text'); this.blinkTimeout = window.setTimeout(function(){ @@ -632,11 +630,6 @@ Playground.Session = function(options) { run(); }); - var iconCont = btn.getElementsByClassName('icon')[0]; - if (iconCont) { - iconCont.classList.add('octicon', 'octicon-checklist'); - } - function run() { if (isRunning) { return console.info('code formatter is already running. Attempt aborted...'); diff --git a/src/compiler/crystal/tools/playground/public/vendor/octicons-19.5.0/octicons.css b/src/compiler/crystal/tools/playground/public/vendor/octicons-19.5.0/octicons.css new file mode 100644 index 000000000000..3bc71a4b43e8 --- /dev/null +++ b/src/compiler/crystal/tools/playground/public/vendor/octicons-19.5.0/octicons.css @@ -0,0 +1,22 @@ +/* + +.octicon is optimized for 16px. +.mega-octicon is optimized for larger sizes. + +*/ +.octicon, .mega-octicon { + display: inline-block; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + width: 16px; + height: 16px; + vertical-align: text-bottom; +} + +.mega-octicon { + width: 50px; + height: 50px; + vertical-align: middle; +} diff --git a/src/compiler/crystal/tools/playground/public/vendor/octicons-19.5.0/octicons.svg b/src/compiler/crystal/tools/playground/public/vendor/octicons-19.5.0/octicons.svg new file mode 100644 index 000000000000..c072c9af1106 --- /dev/null +++ b/src/compiler/crystal/tools/playground/public/vendor/octicons-19.5.0/octicons.svg @@ -0,0 +1,31 @@ + + + Copyright (c) 2023 GitHub Inc. + + MIT License (https://raw.githubusercontent.com/primer/octicons/v19.5.0/LICENSE) + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/compiler/crystal/tools/playground/public/vendor/octicons-3.5.0/octicons.css b/src/compiler/crystal/tools/playground/public/vendor/octicons-3.5.0/octicons.css deleted file mode 100644 index c49658ebecdf..000000000000 --- a/src/compiler/crystal/tools/playground/public/vendor/octicons-3.5.0/octicons.css +++ /dev/null @@ -1,226 +0,0 @@ -@font-face { - font-family: 'octicons'; - src: url('octicons.eot?#iefix') format('embedded-opentype'), - url('octicons.woff') format('woff'), - url('octicons.ttf') format('truetype'), - url('octicons.svg#octicons') format('svg'); - font-weight: normal; - font-style: normal; -} - -/* - -.octicon is optimized for 16px. -.mega-octicon is optimized for 32px but can be used larger. - -*/ -.octicon, .mega-octicon { - font: normal normal normal 16px/1 octicons; - display: inline-block; - text-decoration: none; - text-rendering: auto; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; -} -.mega-octicon { font-size: 32px; } - -.octicon-alert:before { content: '\f02d'} /*  */ -.octicon-arrow-down:before { content: '\f03f'} /*  */ -.octicon-arrow-left:before { content: '\f040'} /*  */ -.octicon-arrow-right:before { content: '\f03e'} /*  */ -.octicon-arrow-small-down:before { content: '\f0a0'} /*  */ -.octicon-arrow-small-left:before { content: '\f0a1'} /*  */ -.octicon-arrow-small-right:before { content: '\f071'} /*  */ -.octicon-arrow-small-up:before { content: '\f09f'} /*  */ -.octicon-arrow-up:before { content: '\f03d'} /*  */ -.octicon-microscope:before, -.octicon-beaker:before { content: '\f0dd'} /*  */ -.octicon-bell:before { content: '\f0de'} /*  */ -.octicon-bold:before { content: '\f0e2'} /*  */ -.octicon-book:before { content: '\f007'} /*  */ -.octicon-bookmark:before { content: '\f07b'} /*  */ -.octicon-briefcase:before { content: '\f0d3'} /*  */ -.octicon-broadcast:before { content: '\f048'} /*  */ -.octicon-browser:before { content: '\f0c5'} /*  */ -.octicon-bug:before { content: '\f091'} /*  */ -.octicon-calendar:before { content: '\f068'} /*  */ -.octicon-check:before { content: '\f03a'} /*  */ -.octicon-checklist:before { content: '\f076'} /*  */ -.octicon-chevron-down:before { content: '\f0a3'} /*  */ -.octicon-chevron-left:before { content: '\f0a4'} /*  */ -.octicon-chevron-right:before { content: '\f078'} /*  */ -.octicon-chevron-up:before { content: '\f0a2'} /*  */ -.octicon-circle-slash:before { content: '\f084'} /*  */ -.octicon-circuit-board:before { content: '\f0d6'} /*  */ -.octicon-clippy:before { content: '\f035'} /*  */ -.octicon-clock:before { content: '\f046'} /*  */ -.octicon-cloud-download:before { content: '\f00b'} /*  */ -.octicon-cloud-upload:before { content: '\f00c'} /*  */ -.octicon-code:before { content: '\f05f'} /*  */ -.octicon-comment-add:before, -.octicon-comment:before { content: '\f02b'} /*  */ -.octicon-comment-discussion:before { content: '\f04f'} /*  */ -.octicon-credit-card:before { content: '\f045'} /*  */ -.octicon-dash:before { content: '\f0ca'} /*  */ -.octicon-dashboard:before { content: '\f07d'} /*  */ -.octicon-database:before { content: '\f096'} /*  */ -.octicon-clone:before, -.octicon-desktop-download:before { content: '\f0dc'} /*  */ -.octicon-device-camera:before { content: '\f056'} /*  */ -.octicon-device-camera-video:before { content: '\f057'} /*  */ -.octicon-device-desktop:before { content: '\f27c'} /*  */ -.octicon-device-mobile:before { content: '\f038'} /*  */ -.octicon-diff:before { content: '\f04d'} /*  */ -.octicon-diff-added:before { content: '\f06b'} /*  */ -.octicon-diff-ignored:before { content: '\f099'} /*  */ -.octicon-diff-modified:before { content: '\f06d'} /*  */ -.octicon-diff-removed:before { content: '\f06c'} /*  */ -.octicon-diff-renamed:before { content: '\f06e'} /*  */ -.octicon-ellipsis:before { content: '\f09a'} /*  */ -.octicon-eye-unwatch:before, -.octicon-eye-watch:before, -.octicon-eye:before { content: '\f04e'} /*  */ -.octicon-file-binary:before { content: '\f094'} /*  */ -.octicon-file-code:before { content: '\f010'} /*  */ -.octicon-file-directory:before { content: '\f016'} /*  */ -.octicon-file-media:before { content: '\f012'} /*  */ -.octicon-file-pdf:before { content: '\f014'} /*  */ -.octicon-file-submodule:before { content: '\f017'} /*  */ -.octicon-file-symlink-directory:before { content: '\f0b1'} /*  */ -.octicon-file-symlink-file:before { content: '\f0b0'} /*  */ -.octicon-file-text:before { content: '\f011'} /*  */ -.octicon-file-zip:before { content: '\f013'} /*  */ -.octicon-flame:before { content: '\f0d2'} /*  */ -.octicon-fold:before { content: '\f0cc'} /*  */ -.octicon-gear:before { content: '\f02f'} /*  */ -.octicon-gift:before { content: '\f042'} /*  */ -.octicon-gist:before { content: '\f00e'} /*  */ -.octicon-gist-secret:before { content: '\f08c'} /*  */ -.octicon-git-branch-create:before, -.octicon-git-branch-delete:before, -.octicon-git-branch:before { content: '\f020'} /*  */ -.octicon-git-commit:before { content: '\f01f'} /*  */ -.octicon-git-compare:before { content: '\f0ac'} /*  */ -.octicon-git-merge:before { content: '\f023'} /*  */ -.octicon-git-pull-request-abandoned:before, -.octicon-git-pull-request:before { content: '\f009'} /*  */ -.octicon-globe:before { content: '\f0b6'} /*  */ -.octicon-graph:before { content: '\f043'} /*  */ -.octicon-heart:before { content: '\2665'} /* ♥ */ -.octicon-history:before { content: '\f07e'} /*  */ -.octicon-home:before { content: '\f08d'} /*  */ -.octicon-horizontal-rule:before { content: '\f070'} /*  */ -.octicon-hubot:before { content: '\f09d'} /*  */ -.octicon-inbox:before { content: '\f0cf'} /*  */ -.octicon-info:before { content: '\f059'} /*  */ -.octicon-issue-closed:before { content: '\f028'} /*  */ -.octicon-issue-opened:before { content: '\f026'} /*  */ -.octicon-issue-reopened:before { content: '\f027'} /*  */ -.octicon-italic:before { content: '\f0e4'} /*  */ -.octicon-jersey:before { content: '\f019'} /*  */ -.octicon-key:before { content: '\f049'} /*  */ -.octicon-keyboard:before { content: '\f00d'} /*  */ -.octicon-law:before { content: '\f0d8'} /*  */ -.octicon-light-bulb:before { content: '\f000'} /*  */ -.octicon-link:before { content: '\f05c'} /*  */ -.octicon-link-external:before { content: '\f07f'} /*  */ -.octicon-list-ordered:before { content: '\f062'} /*  */ -.octicon-list-unordered:before { content: '\f061'} /*  */ -.octicon-location:before { content: '\f060'} /*  */ -.octicon-gist-private:before, -.octicon-mirror-private:before, -.octicon-git-fork-private:before, -.octicon-lock:before { content: '\f06a'} /*  */ -.octicon-logo-gist:before { content: '\f0ad'} /*  */ -.octicon-logo-github:before { content: '\f092'} /*  */ -.octicon-mail:before { content: '\f03b'} /*  */ -.octicon-mail-read:before { content: '\f03c'} /*  */ -.octicon-mail-reply:before { content: '\f051'} /*  */ -.octicon-mark-github:before { content: '\f00a'} /*  */ -.octicon-markdown:before { content: '\f0c9'} /*  */ -.octicon-megaphone:before { content: '\f077'} /*  */ -.octicon-mention:before { content: '\f0be'} /*  */ -.octicon-milestone:before { content: '\f075'} /*  */ -.octicon-mirror-public:before, -.octicon-mirror:before { content: '\f024'} /*  */ -.octicon-mortar-board:before { content: '\f0d7'} /*  */ -.octicon-mute:before { content: '\f080'} /*  */ -.octicon-no-newline:before { content: '\f09c'} /*  */ -.octicon-octoface:before { content: '\f008'} /*  */ -.octicon-organization:before { content: '\f037'} /*  */ -.octicon-package:before { content: '\f0c4'} /*  */ -.octicon-paintcan:before { content: '\f0d1'} /*  */ -.octicon-pencil:before { content: '\f058'} /*  */ -.octicon-person-add:before, -.octicon-person-follow:before, -.octicon-person:before { content: '\f018'} /*  */ -.octicon-pin:before { content: '\f041'} /*  */ -.octicon-plug:before { content: '\f0d4'} /*  */ -.octicon-repo-create:before, -.octicon-gist-new:before, -.octicon-file-directory-create:before, -.octicon-file-add:before, -.octicon-plus:before { content: '\f05d'} /*  */ -.octicon-primitive-dot:before { content: '\f052'} /*  */ -.octicon-primitive-square:before { content: '\f053'} /*  */ -.octicon-pulse:before { content: '\f085'} /*  */ -.octicon-question:before { content: '\f02c'} /*  */ -.octicon-quote:before { content: '\f063'} /*  */ -.octicon-radio-tower:before { content: '\f030'} /*  */ -.octicon-repo-delete:before, -.octicon-repo:before { content: '\f001'} /*  */ -.octicon-repo-clone:before { content: '\f04c'} /*  */ -.octicon-repo-force-push:before { content: '\f04a'} /*  */ -.octicon-gist-fork:before, -.octicon-repo-forked:before { content: '\f002'} /*  */ -.octicon-repo-pull:before { content: '\f006'} /*  */ -.octicon-repo-push:before { content: '\f005'} /*  */ -.octicon-rocket:before { content: '\f033'} /*  */ -.octicon-rss:before { content: '\f034'} /*  */ -.octicon-ruby:before { content: '\f047'} /*  */ -.octicon-search-save:before, -.octicon-search:before { content: '\f02e'} /*  */ -.octicon-server:before { content: '\f097'} /*  */ -.octicon-settings:before { content: '\f07c'} /*  */ -.octicon-shield:before { content: '\f0e1'} /*  */ -.octicon-log-in:before, -.octicon-sign-in:before { content: '\f036'} /*  */ -.octicon-log-out:before, -.octicon-sign-out:before { content: '\f032'} /*  */ -.octicon-smiley:before { content: '\f0e7'} /*  */ -.octicon-squirrel:before { content: '\f0b2'} /*  */ -.octicon-star-add:before, -.octicon-star-delete:before, -.octicon-star:before { content: '\f02a'} /*  */ -.octicon-stop:before { content: '\f08f'} /*  */ -.octicon-repo-sync:before, -.octicon-sync:before { content: '\f087'} /*  */ -.octicon-tag-remove:before, -.octicon-tag-add:before, -.octicon-tag:before { content: '\f015'} /*  */ -.octicon-tasklist:before { content: '\f0e5'} /*  */ -.octicon-telescope:before { content: '\f088'} /*  */ -.octicon-terminal:before { content: '\f0c8'} /*  */ -.octicon-text-size:before { content: '\f0e3'} /*  */ -.octicon-three-bars:before { content: '\f05e'} /*  */ -.octicon-thumbsdown:before { content: '\f0db'} /*  */ -.octicon-thumbsup:before { content: '\f0da'} /*  */ -.octicon-tools:before { content: '\f031'} /*  */ -.octicon-trashcan:before { content: '\f0d0'} /*  */ -.octicon-triangle-down:before { content: '\f05b'} /*  */ -.octicon-triangle-left:before { content: '\f044'} /*  */ -.octicon-triangle-right:before { content: '\f05a'} /*  */ -.octicon-triangle-up:before { content: '\f0aa'} /*  */ -.octicon-unfold:before { content: '\f039'} /*  */ -.octicon-unmute:before { content: '\f0ba'} /*  */ -.octicon-unverified:before { content: '\f0e8'} /*  */ -.octicon-verified:before { content: '\f0e6'} /*  */ -.octicon-versions:before { content: '\f064'} /*  */ -.octicon-watch:before { content: '\f0e0'} /*  */ -.octicon-remove-close:before, -.octicon-x:before { content: '\f081'} /*  */ -.octicon-zap:before { content: '\26A1'} /* ⚡ */ diff --git a/src/compiler/crystal/tools/playground/public/vendor/octicons-3.5.0/octicons.eot b/src/compiler/crystal/tools/playground/public/vendor/octicons-3.5.0/octicons.eot deleted file mode 100644 index c1d2f2927173..000000000000 Binary files a/src/compiler/crystal/tools/playground/public/vendor/octicons-3.5.0/octicons.eot and /dev/null differ diff --git a/src/compiler/crystal/tools/playground/public/vendor/octicons-3.5.0/octicons.svg b/src/compiler/crystal/tools/playground/public/vendor/octicons-3.5.0/octicons.svg deleted file mode 100644 index 090870663f31..000000000000 --- a/src/compiler/crystal/tools/playground/public/vendor/octicons-3.5.0/octicons.svg +++ /dev/null @@ -1,188 +0,0 @@ - - - - -(c) 2012-2016 GitHub - -When using the GitHub logos, be sure to follow the GitHub logo guidelines (https://github.com/logos) - -Font License: SIL OFL 1.1 (http://scripts.sil.org/OFL) -Applies to all font files - -Code License: MIT (http://choosealicense.com/licenses/mit/) -Applies to all other files - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/compiler/crystal/tools/playground/public/vendor/octicons-3.5.0/octicons.ttf b/src/compiler/crystal/tools/playground/public/vendor/octicons-3.5.0/octicons.ttf deleted file mode 100644 index 3dab5b6698d2..000000000000 Binary files a/src/compiler/crystal/tools/playground/public/vendor/octicons-3.5.0/octicons.ttf and /dev/null differ diff --git a/src/compiler/crystal/tools/playground/public/vendor/octicons-3.5.0/octicons.woff b/src/compiler/crystal/tools/playground/public/vendor/octicons-3.5.0/octicons.woff deleted file mode 100644 index 0cd624c86d77..000000000000 Binary files a/src/compiler/crystal/tools/playground/public/vendor/octicons-3.5.0/octicons.woff and /dev/null differ diff --git a/src/compiler/crystal/tools/playground/views/_about.html b/src/compiler/crystal/tools/playground/views/_about.html index 9d79019eb7ce..9308a739793e 100644 --- a/src/compiler/crystal/tools/playground/views/_about.html +++ b/src/compiler/crystal/tools/playground/views/_about.html @@ -35,7 +35,7 @@

Usage

puts s

-In the main playground this is hidden by default and will appear when is pressed. Since the sidebar will likely show all the needed information you won't need this output all the time. Also, puts returns nil, but the sidebar will show the argument instead of the returned value. The same applies for print and raises. +In the main playground this is hidden by default and will appear when is pressed. Since the sidebar will likely show all the needed information you won't need this output all the time. Also, puts returns nil, but the sidebar will show the argument instead of the returned value. The same applies for print and raises.

@@ -54,7 +54,7 @@

Usage

sample 5

-And you can use the whole standard library. Seriously. Run the next sample and click here . Once you finish you can stop the long running process with the stop button. That will kill the process, hence display an exit status and a . +And you can use the whole standard library. Seriously. Run the next sample and click here . Once you finish you can stop the long running process with the stop button. That will kill the process, hence display an exit status and a .

@@ -129,17 +129,17 @@ 

Load, Store and Share

- +
diff --git a/src/compiler/crystal/tools/playground/views/_index.html b/src/compiler/crystal/tools/playground/views/_index.html index 7c921596a51b..07d164ad3fe7 100644 --- a/src/compiler/crystal/tools/playground/views/_index.html +++ b/src/compiler/crystal/tools/playground/views/_index.html @@ -7,13 +7,13 @@
@@ -23,12 +23,12 @@ diff --git a/src/compiler/crystal/tools/playground/views/_settings.html b/src/compiler/crystal/tools/playground/views/_settings.html index f89bda2818e8..6964b609fc01 100644 --- a/src/compiler/crystal/tools/playground/views/_settings.html +++ b/src/compiler/crystal/tools/playground/views/_settings.html @@ -6,7 +6,7 @@

Settings

- Create a GitHub Access Token in order to use the share as gist button. + Create a GitHub Access Token in order to use the share as gist button.
diff --git a/src/compiler/crystal/tools/playground/views/layout.html.ecr b/src/compiler/crystal/tools/playground/views/layout.html.ecr index e0d3ae9eb851..0f5a75a150de 100644 --- a/src/compiler/crystal/tools/playground/views/layout.html.ecr +++ b/src/compiler/crystal/tools/playground/views/layout.html.ecr @@ -5,7 +5,7 @@ - + <% styles.each do |path| %> @@ -28,7 +28,13 @@
  • Playground
  • Workbook
  • About
  • -
  • +
  • + + + + + +