Skip to content

Commit

Permalink
Using font awesome for toolbar
Browse files Browse the repository at this point in the history
  • Loading branch information
fdodino committed Oct 13, 2024
1 parent 936aa7b commit fdd9dd4
Show file tree
Hide file tree
Showing 10 changed files with 30 additions and 13 deletions.
Binary file removed public/repl/open.png
Binary file not shown.
Binary file removed public/repl/save.png
Binary file not shown.
Binary file removed public/repl/synced.png
Binary file not shown.
Binary file removed public/repl/synced_1.png
Binary file not shown.
Binary file removed public/repl/unsynced.png
Binary file not shown.
Binary file removed public/repl/unsynced_1.png
Binary file not shown.
Binary file removed public/repl/zoom_in.png
Binary file not shown.
Binary file removed public/repl/zoom_out.png
Binary file not shown.
2 changes: 2 additions & 0 deletions src/content/components/landing-page/repl/dynamicDiagram.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
display: block;
height: 30rem;
width: 50vw;
resize: vertical;
overflow: auto;
}
</style>
</head>
Expand Down
41 changes: 28 additions & 13 deletions src/content/components/landing-page/repl/replEditor.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

<head>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/notyf@3/notyf.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.6.0/css/all.min.css">
<style type="text/css" media="screen">
.file {
display: flex;
Expand All @@ -12,23 +13,29 @@
#editor {
padding: 0.5rem 0;
z-index: 10;
resize: vertical;
overflow: auto;
}

.sl-markdown-content :not(a, strong, em, del, span, input, code)+ :not(a, strong, em, del, span, input, code, :where(.not-content *)) {
margin-top: 0;
}

.menu_option {
color: black;
width: 25px;
height: 25px !important;
color: indianred;
border-radius: 5px;
}

.save {
color: steelblue;
}

.zoom {
color: var(--sl-color-banner-bg);
}

.menu_option:hover {
cursor: pointer;
box-shadow: 0 0 5px gray;
text-shadow: 0 0 5px gray;
}

.theme {
Expand Down Expand Up @@ -130,8 +137,12 @@

<div class="file">
<div class="toolbar">
<img class="menu_option" src="/repl/zoom_in.png" title="Agrandar la letra" onclick="zoomInFont()" />
<img class="menu_option" src="/repl/zoom_out.png" title="Achicar la letra" onclick="zoomOutFont()" />
<div class="menu_option zoom" title="Agrandar la letra" onclick="zoomInFont()">
<i class="fa-solid fa-font fa-xl"></i>
</div>
<div class="menu_option zoom" title="Achicar la letra" onclick="zoomOutFont()">
<i class="fa-solid fa-font fa-md"></i>
</div>
<select id="theme" class="theme" onchange="changeTheme()" title="Cambiar tema del editor">
<option value="ambiance">Ambiance</option>
<option value="chaos">Chaos</option>
Expand Down Expand Up @@ -182,9 +193,13 @@
<option value="vibrant_ink">Vibrant Ink</option>
<option value="xcode">Xcode</option>
</select>
<img class="menu_option" id="editor_synced"/>
<img class="menu_option" src="/repl/save.png" title="Guardar los cambios en el navegador" onclick="saveFile()" />
<img class="menu_option" src="/repl/open.png" title="Cargar un archivo Wollok" onclick="openFile()" />
<!-- triangle-exclamation -->
<div class="menu_option save" title="Guardar los cambios en el navegador" onclick="saveFile()">
<i class="fa-solid fa-download fa-xl"></i>
</div>
<div class="menu_option" title="Cargar un archivo Wollok" onclick="openFile()">
<i class="fa-solid fa-file-arrow-up fa-xl"></i>
</div>
</div>
<div id="editor" style="margin: 0.5rem; height: 35rem; border: 1px solid gray;"></div>
<input type="file" id="customFile" name="customFile" accept=".wlk" style="display: none;" onchange="fileSelected()" />
Expand Down Expand Up @@ -314,9 +329,9 @@
}

const loadSyncedImage = () => {
const imgSynced = document.getElementById('editor_synced')
imgSynced.src = synced ? '/repl/synced.png' : '/repl/unsynced.png'
imgSynced.title = synced ? 'El editor está actualizado' : 'El editor tiene cambios pendientes sin guardar'
// const imgSynced = document.getElementById('editor_synced')
// imgSynced.src = synced ? '/repl/synced.png' : '/repl/unsynced.png'
// imgSynced.title = synced ? 'El editor está actualizado' : 'El editor tiene cambios pendientes sin guardar'
}

let editor = ace.edit("editor")
Expand Down

0 comments on commit fdd9dd4

Please sign in to comment.