Skip to content

Commit

Permalink
feat: custom scrollbar
Browse files Browse the repository at this point in the history
  • Loading branch information
maelgangloff committed Apr 28, 2023
1 parent b9d2313 commit 7b451d3
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 11 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "scolengo-token",
"description": "Application Electron pour obtenir des jetons Skolengo API",
"version": "1.2.0",
"version": "1.2.1",
"private": true,
"repository": {
"type": "git",
Expand Down
26 changes: 22 additions & 4 deletions src/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,6 @@ pre {
word-wrap: break-word;
}

.scroll-schools {
overflow-y: scroll;
}

ul.schools {
list-style-type: none;
}
Expand Down Expand Up @@ -119,3 +115,25 @@ button:hover {
ul.schools li:hover { background-color: #333333; }
}

.scroll_enabled {
overflow: scroll;
height: 1000px;
}

.scroll_enabled::-webkit-scrollbar {
width: 25px;
}
.scroll_enabled::-webkit-scrollbar-corner {
background: rgba(0,0,0,0);
}
.scroll_enabled::-webkit-scrollbar-thumb {
background-color: #ccc;
border-radius: 7px;
border: 4px solid rgba(0,0,0,0);
background-clip: content-box;
min-width: 32px;
min-height: 32px;
}
.scroll_enabled::-webkit-scrollbar-track {
background-color: rgba(0,0,0,0);
}
2 changes: 1 addition & 1 deletion src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ <h1>🏫 Trouver mon établissement</h1>
<input type="text" id="schoolName" placeholder="Nom de votre établissement et/ou code postal" autofocus>
<button type="submit">Valider</button>
</form>
<div class="scroll-schools">
<div class="scroll_enabled">
<ul class="schools"></ul>
</div>
<footer>
Expand Down
10 changes: 5 additions & 5 deletions src/success.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,16 @@ <h1>💖 Félicitations !</h1>
<p><b>🚨 ATTENTION: Ne communiquez jamais vos jetons à un tiers. Ils vous sont strictement personnels. Si vous pensez que vos jetons ont été dérobés, révoquez-les immédiatement.</b></p>
<p>Vous pouvez utiliser ces informations d'authentification avec la librairie <a href="https://github.com/maelgangloff/scolengo-api">scolengo-api</a>.</p>
<a class="dllink">📁 Télecharger le fichier de configuration</a>
<pre>
<pre class="scroll_enabled">
<code id="auth"></code>
</pre>
<script>
const auth = document.getElementById('auth')
const dllink = document.querySelector('.dllink');
const auth = document.getElementById('auth')
const dllink = document.querySelector('.dllink');
window.electronAPI.sendToken((event, token) => {
auth.innerHTML = JSON.stringify(token, null, 2)
dllink.setAttribute('href', 'data:text/plain;charset=utf-8,' + encodeURIComponent(JSON.stringify(token, null, 2)));
dllink.setAttribute('download', "config.json");
dllink.setAttribute('href', 'data:text/plain;charset=utf-8,' + encodeURIComponent(JSON.stringify(token, null, 2)));
dllink.setAttribute('download', "config.json");
})
</script>
</body>
Expand Down

0 comments on commit 7b451d3

Please # to comment.