Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion assets/base.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
/* Base css */

li, ul{
line-height: 1;

}

:root {
--block-width: 100%;
--block-height: 0.6*var(--block-width);
Expand All @@ -10,6 +15,12 @@
--color-light-green: rgba(76, 175, 80, 0.5);
--color-orange: rgb(255, 152, 0);
--color-light-orange: rgb(255, 152, 0, 0.5);
--color-purple: rgb(152, 0, 152);
--color-light-purple: rgb(152, 0, 152, 0.5);
--color-cyan: rgb(130, 130, 231);
--color-light-cyan: rgb(130, 130, 231, 0.5);
--color-red: rgb(215, 72, 49);
--color-light-red: rgb(215, 72, 49, 0.7);
}
a,a:hover {
transition: all 0.5s;
Expand All @@ -29,6 +40,7 @@ header {
display: flex;
justify-content: space-between;
align-items: center;
height: 20px;
}

.user-profile img {
Expand Down Expand Up @@ -63,7 +75,7 @@ main {

main>div {
background-color: white;
border-radius: 10px;
border-radius: 20px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
padding: 20px;
}
Expand Down
34 changes: 27 additions & 7 deletions home/home.css
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ header {
.user-profile {
display: flex;
align-items: center;
margin-bottom: 10px;
}

.user-profile span {
Expand All @@ -16,18 +15,20 @@ header {


.function-buttons {
width: var(--block-width);
height: var(--block-height);
display: flex;
justify-content: center;
justify-content: space-between;
flex-wrap: wrap;
}

.button {
margin: 10px;
padding: 100px;
margin: 20px 18px;
padding: 90px;
text-decoration: none;
font-weight: bold;
border-radius: 0;
display: flexbox;
border-radius: 10px;
width: 72px;
height: 36px;
}
.button a{
color: white;
Expand All @@ -52,4 +53,23 @@ header {
&:hover{
background-color: var(--color-light-orange);
}
}

.purple{
background-color: var(--color-purple);
&:hover{
background-color: var(--color-light-purple);
}
}
.cyan{
background-color: var(--color-cyan);
&:hover{
background-color: var(--color-light-cyan);
}
}
.red{
background-color: var(--color-red);
&:hover{
background-color: var(--color-light-red);
}
}
3 changes: 3 additions & 0 deletions home/home.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@
<a class="button blue" href="../wordrecognize/wordRecognize.html">单词学习</a>
<a class="button green" href="../wordbook/wordBook.html">错题本和简单词</a>
<a class="button orange" href="../userdata/userdata.html">用户数据</a>
<a class="button purple" href="../article/article.html">文章阅读</a>
<a class="button red" href="../login/login.html">登录</a>
<a class="button cyan" href="../register/register.html">注册</a>
</div>
</main>
</body>
Expand Down
2 changes: 2 additions & 0 deletions wordrecognize/wordRecognize.js
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,8 @@ window.addEventListener("load", function () {
.addEventListener("click", function () {
translationElement.style.display = "inline";
wordElement.style.display = "inline";
spellInput.style.display = "none";
submitButton.style.display = "none";
simpleWordButton.style.display = "none";
});

Expand Down