Skip to content

Commit 1c4036d

Browse files
author
codeblogger
committed
bootstrap, sass, jquery
1 parent 361b0b5 commit 1c4036d

File tree

11 files changed

+500
-0
lines changed

11 files changed

+500
-0
lines changed

Library System/CSS/book_list.css

Lines changed: 18 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Library System/CSS/book_list.css.map

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Library System/CSS/book_list.scss

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#book_list{
2+
background: rgba(0,0,0,.75);
3+
width: 92.5%;
4+
height: 385px;
5+
left: 25px;
6+
overflow-y: scroll;
7+
border-radius: 7.5px;
8+
&::-webkit-scrollbar {
9+
display: none;
10+
}
11+
table{
12+
background: rgba(256,256,256,.75);
13+
border-radius: 7.5px;
14+
15+
thead{
16+
color: #1a1a1a;
17+
}
18+
tbody{
19+
color: #262626;
20+
}
21+
22+
}
23+
}

Library System/CSS/insertion_section.css

Lines changed: 22 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Library System/CSS/insertion_section.css.map

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
#insertion_section{
2+
background: rgba(0,0,0,.75);
3+
border-radius: 7.5px;
4+
padding: 15px 10px 15px 10px;
5+
width: 100%;
6+
.form-group{
7+
width: 90%;
8+
margin-left: 10%;
9+
10+
input,label{
11+
width: 90%;
12+
}
13+
input{
14+
opacity: .20;
15+
transition: .5s;
16+
outline: none;
17+
}
18+
19+
#two-section{
20+
margin-left: -7.5%;
21+
input{
22+
width: 85%;
23+
}
24+
}
25+
button{
26+
margin-left: -5%;
27+
}
28+
29+
}
30+
31+
}

Library System/CSS/main.css

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
body{
2+
padding: 0;
3+
margin: 0;
4+
height: 100vh;
5+
}
6+
/*
7+
Wallpaper
8+
Source: https://wallpapersafari.com/hd-library-wallpaper/
9+
*/
10+
#one-page{
11+
height: 100%;
12+
background-image: url("/images/wallpaper.jpg");
13+
background-size: auto;
14+
-webkit-background-size: auto;
15+
-moz-background-size: auto;
16+
-o-background-size: auto ;
17+
18+
}
19+
.container{
20+
position: relative;
21+
top: 15%;
22+
}
23+
h1{
24+
font-size: 50px;
25+
}
26+
27+
@media (max-width: 976px){
28+
#one-page{
29+
height: 150%;
30+
background-image: url("/images/wallpaper.jpg");
31+
background-size: auto;
32+
-webkit-background-size: auto;
33+
-moz-background-size: auto;
34+
-o-background-size: auto ;
35+
}
36+
}

Library System/JS/main.js

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
$(document).ready(function(){
2+
3+
// insertion_section
4+
$("input").focus(function() {
5+
$(this).css("opacity",1)
6+
})
7+
$("input").blur(function() {
8+
$(this).css("opacity",.2)
9+
})
10+
11+
// close tr event
12+
$(".close").click(function(){
13+
$(this).parents(".tab").hide(500)
14+
})
15+
16+
// add book info
17+
$("#add").click(function(){
18+
let book_name = $("#bookName").val(),
19+
book_author = $("#authorName").val(),
20+
book_publisher = $("#publisherName").val(),
21+
book_number = $("#numberPage").val(),
22+
book_serial = $("#serialNumber").val(),
23+
new_tr = document.createElement("tr"),
24+
new_th_book_name = document.createElement("th"),
25+
new_th_book_author = document.createElement("td"),
26+
new_th_book_publisher = document.createElement("td"),
27+
new_th_book_page = document.createElement("td"),
28+
new_th_book_serial = document.createElement("td"),
29+
table_book_name = document.createTextNode(book_name),
30+
table_book_author = document.createTextNode(book_author),
31+
table_book_publisher = document.createTextNode(book_publisher),
32+
table_book_number = document.createTextNode(book_number),
33+
table_book_serial = document.createTextNode(book_serial);
34+
35+
// add txt
36+
new_th_book_name.appendChild(table_book_name);
37+
new_th_book_author.appendChild(table_book_author);
38+
new_th_book_publisher.appendChild(table_book_publisher);
39+
new_th_book_page.appendChild(table_book_number);
40+
new_th_book_serial.appendChild(table_book_serial);
41+
42+
43+
// add new_tr --> td
44+
let name_tab = new_tr.appendChild(new_th_book_name);
45+
let author_tab = new_tr.appendChild(new_th_book_author);
46+
let publisher_tab = new_tr.appendChild(new_th_book_publisher);
47+
let page_tab = new_tr.appendChild(new_th_book_page);
48+
let serial_tab = new_tr.appendChild(new_th_book_serial);
49+
new_th_book_name.setAttribute("scope","row")
50+
51+
// add new_tr --> table
52+
let new_table = document.getElementById("tabs");
53+
new_table.appendChild(new_tr);
54+
new_tr.setAttribute("class","tab");
55+
56+
57+
// close button
58+
let but_td = document.createElement("td"),
59+
but = document.createElement("button"),
60+
but_span = document.createElement("span"),
61+
span_txt = document.createTextNode("X");
62+
63+
but_td.appendChild(but);
64+
but.appendChild(but_span);
65+
but_span.appendChild(span_txt);
66+
new_tr.appendChild(but_td);
67+
68+
but.setAttribute("type","button");
69+
but.setAttribute("class","close");
70+
but.setAttribute("aria-label","Close");
71+
but_span.setAttribute("aria-hidden","true");
72+
73+
// click --> form reset
74+
this.form.reset();
75+
76+
// close form item
77+
$(".close").click(function(){
78+
$(this).parents(".tab").hide(500)
79+
80+
})
81+
82+
83+
})
84+
85+
})
86+

Library System/LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) 2016 Jessica Eldredge
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

Library System/images/wallpaper.jpg

621 KB
Loading

0 commit comments

Comments
 (0)