Skip to content

Commit

Permalink
feat: add favicons and fix keyboard mobile
Browse files Browse the repository at this point in the history
  • Loading branch information
Igorcbraz committed Sep 5, 2024
1 parent 98691fc commit 2712b6c
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 1 deletion.
Binary file added images/apple-touch-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/favicon-16x16.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified images/favicon-32x32.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions images/site.webmanifest
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"name":"","short_name":"","icons":[{"src":"/android-chrome-192x192.png","sizes":"192x192","type":"image/png"},{"src":"/android-chrome-512x512.png","sizes":"512x512","type":"image/png"}],"theme_color":"#ffffff","background_color":"#ffffff","display":"standalone"}
6 changes: 5 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@
<meta name="googlebot" content="index, follow">
<meta name="google" content="notranslate">
<title>Calculator</title>
<link rel="shortcut icon" href="images/favicon-32x32.png" type="image/x-icon">
<link rel="apple-touch-icon" sizes="180x180" href="images/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="images/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="images/favicon-16x16.png">
<link rel="manifest" href="site.webmanifest">
<link rel="canonical" href="https://github.com/Igorcbraz/Calculadora">

<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css" integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">
Expand All @@ -27,6 +30,7 @@
<span class="col-1 key-selector" data-key="1">1</span>
<span class="col-1 key-selector" data-key="2">2</span>
<span class="col-1 key-selector" data-key="3">3</span>
<input type="text" id="hiddenInput" style="position: absolute; left: -9999px;">
</div>

<div class="calc-top row">
Expand Down
3 changes: 3 additions & 0 deletions src/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ document.addEventListener('DOMContentLoaded', () => {
selector.addEventListener('click', () => {
alert('Ao clicar em OK, pressione uma tecla para associar a este tema.')

const hiddenInput = document.getElementById('hiddenInput')
hiddenInput.focus()

const captureKey = (event) => {
themeManager.setKeyForTheme(selector, event.key)
document.removeEventListener('keydown', captureKey)
Expand Down

0 comments on commit 2712b6c

Please sign in to comment.