mirror of
https://github.com/jorenchik/mdemory.git
synced 2026-03-22 00:26:21 +00:00
Deck listing frontend layout
This commit is contained in:
@@ -6,7 +6,55 @@
|
||||
<title>mdemory-app</title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
<div id="app">
|
||||
<div class="main-layout">
|
||||
<div>
|
||||
<h3>Memorybase</h3>
|
||||
<div class="deck-list">
|
||||
<a href="#">
|
||||
<div class="deck">
|
||||
<span>></span>
|
||||
<span>math</span>
|
||||
</div>
|
||||
</a>
|
||||
<a href="#">
|
||||
<div class="deck">
|
||||
<span>></span>
|
||||
<span>2nd_semester</span>
|
||||
</div>
|
||||
</a>
|
||||
<a href="#">
|
||||
<div class="deck">
|
||||
python
|
||||
</div>
|
||||
</a>
|
||||
<a href="#">
|
||||
<div class="deck">
|
||||
combinatorics
|
||||
</div>
|
||||
</a>
|
||||
<a href="#">
|
||||
<div class="deck">
|
||||
cpp
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<h2>countries: Flashcards</h2>
|
||||
<div class="deck-listing">
|
||||
<div class="flashcard">
|
||||
<span>></span>
|
||||
<span>What is the capital of Latvia?</span>
|
||||
</div>
|
||||
<div class="flashcard">
|
||||
<span>></span>
|
||||
<span>What is the capital of Lithuania?</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script src="./src/main.ts" type="module"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -1,54 +1,62 @@
|
||||
#logo {
|
||||
display: block;
|
||||
width: 50%;
|
||||
height: 50%;
|
||||
margin: auto;
|
||||
padding: 10% 0 0;
|
||||
background-position: center;
|
||||
background-repeat: no-repeat;
|
||||
background-size: 100% 100%;
|
||||
background-origin: content-box;
|
||||
.main-layout {
|
||||
display: grid;
|
||||
grid-template-columns: .35fr 1fr; /* Creates 3 equal columns */
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.result {
|
||||
height: 20px;
|
||||
line-height: 20px;
|
||||
margin: 1.5rem auto;
|
||||
.main-layout > div:nth-child(1) {
|
||||
/*background: white;*/
|
||||
border-right: 1px solid gray;
|
||||
}
|
||||
|
||||
.input-box .btn {
|
||||
width: 60px;
|
||||
.main-layout .deck-list {
|
||||
padding: 1rem;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
/*gap: .5rem;*/
|
||||
}
|
||||
|
||||
a {
|
||||
color: unset;
|
||||
text-decoration: unset;
|
||||
}
|
||||
|
||||
.main-layout .deck {
|
||||
border: 1px solid gray;
|
||||
border-top: none;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
height: 30px;
|
||||
line-height: 30px;
|
||||
border-radius: 3px;
|
||||
border: none;
|
||||
margin: 0 0 0 20px;
|
||||
padding: 0 8px;
|
||||
cursor: pointer;
|
||||
padding-left: .5rem;
|
||||
font-size: .8rem;
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
.input-box .btn:hover {
|
||||
background-image: linear-gradient(to top, #cfd9df 0%, #e2ebf0 100%);
|
||||
color: #333333;
|
||||
.main-layout .deck:nth-child(1) {
|
||||
border-top: 1px solid gray;
|
||||
}
|
||||
|
||||
.input-box .input {
|
||||
border: none;
|
||||
border-radius: 3px;
|
||||
outline: none;
|
||||
height: 30px;
|
||||
line-height: 30px;
|
||||
padding: 0 10px;
|
||||
background-color: rgba(240, 240, 240, 1);
|
||||
-webkit-font-smoothing: antialiased;
|
||||
h1, h2, h3, h4 {
|
||||
font-size: 1.1rem;
|
||||
}
|
||||
|
||||
.input-box .input:hover {
|
||||
border: none;
|
||||
background-color: rgba(255, 255, 255, 1);
|
||||
|
||||
.deck-listing {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding: 1rem;
|
||||
gap: 1rem;
|
||||
}
|
||||
|
||||
.input-box .input:focus {
|
||||
border: none;
|
||||
background-color: rgba(255, 255, 255, 1);
|
||||
.deck-listing .flashcard {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
border: 1px solid white;
|
||||
height: 80px;
|
||||
border-radius: .3rem;
|
||||
}
|
||||
|
||||
.deck-listing .flashcard > * {
|
||||
margin-left: 15px;
|
||||
}
|
||||
|
||||
|
||||
@@ -27,15 +27,9 @@ window.greet = function () {
|
||||
}
|
||||
};
|
||||
|
||||
document.querySelector('#app')!.innerHTML = `
|
||||
<img id="logo" class="logo">
|
||||
<div class="result" id="result">Please enter your name below 👇</div>
|
||||
<div class="input-box" id="input">
|
||||
<input class="input" id="name" type="text" autocomplete="off" />
|
||||
<button class="btn" onclick="greet()">Greet</button>
|
||||
</div>
|
||||
</div>
|
||||
`;
|
||||
|
||||
//document.querySelector('#app')!.innerHTML = `
|
||||
//`;
|
||||
(document.getElementById('logo') as HTMLImageElement).src = logo;
|
||||
|
||||
let nameElement = (document.getElementById("name") as HTMLInputElement);
|
||||
|
||||
Reference in New Issue
Block a user