Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit ef34c5e

Browse files
authored
Add files via upload
1 parent 1b101bb commit ef34c5e

File tree

6 files changed

+266
-0
lines changed

6 files changed

+266
-0
lines changed

addnew.js

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
var loc=document.getElementById(""); //add id of div ->id:addnew1 ,addnew2 ,addnew3 ,addnew4
2+
// chnage css with class name="add-new-link"
3+
4+
var ul=document.createElement('ul');
5+
var li=document.createElement('li');
6+
7+
loc.appendChild(ul);
8+
loc.appendChild(li);
9+
10+
var link=document.createElement('a');
11+
link.href="https://coderpad.blogspot.com";
12+
link.target="_blank";
13+
link.text="coderpad";
14+
15+
loc.appendChild(link);
16+
17+
var link=document.createElement('a');
18+
link.href="https://coderpad.blogspot.com";
19+
link.target="_blank";
20+
link.text="blog";
21+
22+
loc.appendChild(li);
23+
loc.appendChild(link);

copytoclipboard.js

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
//<script>
2+
function copyToClipboard(element) {
3+
var $temp = $("<input>");
4+
$("body").append($temp);
5+
$temp.val($(element).text()).select();
6+
document.execCommand("copy");
7+
$temp.remove();
8+
}
9+
//</script>

dropdown.js

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
//<!--navbar dropdown------------>
2+
//<script>
3+
/* When the user clicks on the button,
4+
toggle between hiding and showing the dropdown content */
5+
function myFunction() {
6+
document.getElementById("myDropdown").classList.toggle("show");
7+
}
8+
9+
// Close the dropdown if the user clicks outside of it
10+
window.onclick = function(e) {
11+
if (!e.target.matches('.dropbtn')) {
12+
var myDropdown = document.getElementById("myDropdown");
13+
if (myDropdown.classList.contains('show')) {
14+
myDropdown.classList.remove('show');
15+
}
16+
}
17+
}
18+
// </script>
19+
//<!--navbar dropdown------------>

navbar.css

+63
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
.navbar {
2+
overflow: hidden;
3+
background-color: #333;
4+
font-family: Arial, Helvetica, sans-serif;
5+
}
6+
7+
.navbar a {
8+
float: left;
9+
font-size: 16px;
10+
color: white;
11+
text-align: center;
12+
padding: 14px 16px;
13+
text-decoration: none;
14+
}
15+
16+
.dropdown {
17+
float: left;
18+
overflow: hidden;
19+
}
20+
21+
.dropdown .dropbtn {
22+
cursor: pointer;
23+
font-size: 16px;
24+
border: none;
25+
outline: none;
26+
color: white;
27+
padding: 14px 16px;
28+
background-color: inherit;
29+
font-family: inherit;
30+
margin: 0;
31+
}
32+
33+
.navbar a:hover, .dropdown:hover .dropbtn, .dropbtn:focus {
34+
background-color:black;
35+
}
36+
37+
.dropdown-content {
38+
display: none;
39+
position: absolute;
40+
background-color: #f9f9f9;
41+
min-width: 160px;
42+
box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
43+
z-index: 1;
44+
}
45+
46+
.dropdown-content a {
47+
float: none;
48+
color: black;
49+
padding: 12px 16px;
50+
text-decoration: none;
51+
display: block;
52+
text-align: left;
53+
}
54+
55+
.dropdown-content a:hover {
56+
background-color: #ddd;
57+
}
58+
59+
.show {
60+
display: block;
61+
}
62+
63+

sidebar.js

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
//<script>
2+
function openNav() {
3+
document.getElementById("mySidebar").style.width = "250px";
4+
document.getElementById("main").style.marginLeft = "250px";
5+
}
6+
7+
function closeNav() {
8+
document.getElementById("mySidebar").style.width = "0";
9+
document.getElementById("main").style.marginLeft= "0";
10+
}
11+
// </script>

style.css

+141
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,141 @@
1+
body {
2+
font-family: "Lato", sans-serif;
3+
background-color:whitesmoke;
4+
}
5+
.sidebar {
6+
height: 100%;
7+
width: 0;
8+
position: fixed;
9+
z-index: 1;
10+
top: 0;
11+
left: 0;
12+
background-color: #111;
13+
overflow-x: hidden;
14+
transition: 0.5s;
15+
padding-top: 60px;
16+
}
17+
18+
.sidebar a {
19+
padding: 8px 8px 8px 32px;
20+
text-decoration: none;
21+
font-size: 20px;
22+
color: #818181;
23+
display: block;
24+
transition: 0.3s;
25+
}
26+
27+
.sidebar a:hover {
28+
color: #f1f1f1;
29+
}
30+
31+
.sidebar .closebtn {
32+
position: absolute;
33+
top: 0;
34+
right: 25px;
35+
font-size: 36px;
36+
margin-left: 50px;
37+
}
38+
39+
.openbtn {
40+
font-size: 20px;
41+
cursor: pointer;
42+
background-color: #111;
43+
color: white;
44+
padding: 10px 15px;
45+
border: none;
46+
border-radius: 10px 10px 10px 10px;
47+
}
48+
49+
.openbtn:hover {
50+
background-color: #444;
51+
}
52+
53+
#main {
54+
transition: margin-left .5s;
55+
padding: 16px;
56+
}
57+
58+
/* On smaller screens, where height is less than 450px, change the style of the sidenav (less padding and a smaller font size) */
59+
@media screen and (max-height: 450px) {
60+
.sidebar {padding-top: 15px;}
61+
.sidebar a {font-size: 18px;}
62+
}
63+
64+
.btn-lan{
65+
background-color: #333;
66+
color: aliceblue;
67+
border-radius: 10px;
68+
border: none;
69+
height: 30px;
70+
width: 100px;
71+
font-size: 25px;
72+
}
73+
.btn{
74+
background-color: white;
75+
color: black;
76+
border-radius: 10px;
77+
border: none;
78+
height: 30px;
79+
width: 100px;
80+
font-size: 25px;
81+
box-shadow: 0 5px #999;
82+
}
83+
.btn:active {
84+
background-color: rgb(156, 69, 238);
85+
box-shadow: 0 5px #666;
86+
transform: translateY(4px);
87+
}
88+
89+
footer ul {
90+
list-style-type: none;
91+
margin: 0;
92+
padding: 0;
93+
overflow: hidden;
94+
background-color: #333333;
95+
}
96+
97+
footer li {
98+
float: left;
99+
}
100+
101+
footer li a {
102+
display: block;
103+
color: white;
104+
text-align: center;
105+
padding: 16px;
106+
text-decoration: none;
107+
}
108+
109+
footer li a:hover {
110+
background-color: #111111;
111+
}
112+
.add-new-link ul {
113+
list-style-type: none;
114+
margin: 0;
115+
padding: 0;
116+
overflow: hidden;
117+
background-color: #333333;
118+
}
119+
.add-new-link {
120+
121+
list-style-type: none;
122+
margin-bottom: 20px;
123+
padding: 0px;
124+
overflow: hidden;
125+
background-color: #333333;
126+
127+
}
128+
129+
.add-new-link a{
130+
float: left;
131+
display: block;
132+
color: white;
133+
text-align: center;
134+
padding: 20px;
135+
text-decoration: none;
136+
137+
}
138+
.add-new-link a:hover {
139+
background-color: #111111;
140+
}
141+

0 commit comments

Comments
 (0)