-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: version selector + define_text_rewriter
- Loading branch information
Showing
4 changed files
with
93 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,10 @@ | |
<title>Ruby Next Playground</title> | ||
<link rel="stylesheet" type="text/css" href="/app.css"> | ||
<link rel="stylesheet" type="text/css" href="/index.css"> | ||
|
||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@shoelace-style/[email protected]/cdn/themes/light.css" /> | ||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@shoelace-style/[email protected]/cdn/themes/dark.css" /> | ||
<script type="module" src="https://cdn.jsdelivr.net/npm/@shoelace-style/[email protected]/cdn/shoelace-autoloader.js"></script> | ||
</head> | ||
<body class="w-full min-h-full"> | ||
<main class="w-full h-full bg-slate-100 dark:bg-slate-900 text-slate-800 dark:text-slate-200"> | ||
|
@@ -43,16 +47,33 @@ <h2>Initializing Ruby Next playground...</h2> | |
</div> | ||
<div id="app" class="hidden w-full h-screen flex flex-col"> | ||
<nav class="flex-shrink flex flex-row justify-between items-middle border-b-1 border-slate-300 shadow-md"> | ||
<div class="flex flex-row items-center justify-start"> | ||
<div class="flex flex-row items-center justify-start ml-2"> | ||
<img class="mx-2 p-1 h-12 w-auto" src="/assets/logo.png" alt="Ruby Next"> | ||
<h1 class="text-2xl">Playground</h1> | ||
<span class="text-sm ml-4 h-4" id="currentVersion"></span> | ||
</div> | ||
<div class="flex flex-row space-x-2 self-center justify-center items-center px-2"> | ||
<button target="transpile-btn">Transpile</button> | ||
<button target="run-btn">Run</button> | ||
<div class="flex flex-row space-x-2 self-center justify-center items-center px-2 align-middle"> | ||
<button target="transpile-btn" class="bg-purple-500 hover:bg-purple-400 active:bg-purple-600 text-slate-50 dark:bg-purple-700 dark:hover:bg-purple-600 dark:active:bg-purple-800 dark:text-slate-100 py-2 px-4 font-semibold rounded inline-flex items-center"> | ||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" data-slot="icon" class="w-6 h-6 mr-2"> | ||
<path stroke-linecap="round" stroke-linejoin="round" d="M9.813 15.904 9 18.75l-.813-2.846a4.5 4.5 0 0 0-3.09-3.09L2.25 12l2.846-.813a4.5 4.5 0 0 0 3.09-3.09L9 5.25l.813 2.846a4.5 4.5 0 0 0 3.09 3.09L15.75 12l-2.846.813a4.5 4.5 0 0 0-3.09 3.09ZM18.259 8.715 18 9.75l-.259-1.035a3.375 3.375 0 0 0-2.455-2.456L14.25 6l1.036-.259a3.375 3.375 0 0 0 2.455-2.456L18 2.25l.259 1.035a3.375 3.375 0 0 0 2.456 2.456L21.75 6l-1.035.259a3.375 3.375 0 0 0-2.456 2.456ZM16.894 20.567 16.5 21.75l-.394-1.183a2.25 2.25 0 0 0-1.423-1.423L13.5 18.75l1.183-.394a2.25 2.25 0 0 0 1.423-1.423l.394-1.183.394 1.183a2.25 2.25 0 0 0 1.423 1.423l1.183.394-1.183.394a2.25 2.25 0 0 0-1.423 1.423Z" /> | ||
</svg> | ||
<span>Transpile</span> | ||
</button> | ||
<sl-select id="versionSelect" value="2.5.0" class="w-32"> | ||
<sl-option value="2.5.0">2.5.0</sl-option> | ||
<sl-option value="2.7.0">2.7.0</sl-option> | ||
<sl-option value="3.1.0">3.1.0</sl-option> | ||
<sl-option value="3.2.0">3.2.0</sl-option> | ||
<sl-option value="3.3.0">3.3.0</sl-option> | ||
</sl-select> | ||
<button target="run-btn" class="bg-green-500 hover:bg-green-400 active:bg-green-600 text-slate-50 dark:bg-green-700 dark:hover:bg-green-600 dark:active:bg-green-800 dark:text-slate-100 py-2 px-4 font-semibold rounded inline-flex items-center"> | ||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-6 h-6 mr-2"> | ||
<path stroke-linecap="round" stroke-linejoin="round" d="M5.25 5.653c0-.856.917-1.398 1.667-.986l11.54 6.347a1.125 1.125 0 0 1 0 1.972l-11.54 6.347a1.125 1.125 0 0 1-1.667-.986V5.653Z" /> | ||
</svg> | ||
<span>Run</span> | ||
</button> | ||
</div> | ||
<div class="flex flex-row space-x-2 justify-center items-center px-2"> | ||
<div class="flex flex-row space-x-2 justify-center items-center px-2 mr-4"> | ||
<a href="https://github.com/ruby-next/ruby-next" target="_blank" class="flex flex-row items-center space-x-1 hover:opacity-75 cursor-pointer"> | ||
<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 20 20" stroke="none" class="w-6 h-6 inline" data-slot="icon"> | ||
<g buffered-rendering="static"> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters