Skip to content

Commit

Permalink
style 개선?
Browse files Browse the repository at this point in the history
  • Loading branch information
ramen4598 committed Mar 27, 2023
1 parent 3dba6a6 commit a826580
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 6 deletions.
12 changes: 11 additions & 1 deletion src/lib/color.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,26 @@ var Links = {
}
},
};
var Lists = {
setColor: function (color) {
var Lists = document.querySelectorAll("li");
for (var i = 0; i < Lists.length; i++) {
Lists[i].style.backgroundColor = color;
}
},
}
function nightDayHandler(self) {
if (self.value === "night") {
Body.setBackgroundColor("black");
Body.setColor("white");
self.value = "day";
Links.setColor("white");
Lists.setColor("black");
} else {
Body.setBackgroundColor("white");
Body.setColor("black");
self.value = "night";
Links.setColor("black");
Lists.setColor("white");
}
}
}
47 changes: 42 additions & 5 deletions src/style.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
* {
box-sizing: border-box;
}
html{
height: 100%;
width : 100%;
}
body {
height: 100%;
margin: 0;
}
a {
Expand All @@ -19,17 +27,46 @@ h1 {
}
#grid ul {
border-right: 1px solid gray;
width: 100px;
border-bottom: 1px solid gray;
width: 100%;
height: 90%;
margin: 0;
margin-left: 10px;
padding: 30px;
font-size: 30px;
padding: 5%;
font-size: 25px;
}

#grid ul :hover {
width: 100%;
border: 1px solid gray;
background-color: #f0f0f0;
}

#grid ul li{
list-style: none;
width: 100%;
margin-top : 5px;
margin-bottom: 5px;
padding-left: 2%;
padding-right: 2%;
border: 1px solid #E0E0E0;
background-color: #f9f9f9;
}
#grid ul li :hover {
border-style: none;
}

#grid ul li a{
display: inline-block;
width: 100%;
}

#grid {
height: 100%;
display: grid;
grid-template-columns: 170px 1fr;
grid-template-columns: 25% 1fr;
}
#article {
height: 90%;
padding-left: 20px;
}

Expand Down

0 comments on commit a826580

Please sign in to comment.