html
html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<!DOCTYPE html>
<!--
This is my first web project on sololearn and my second one overall. First one using CSS in fact ^^
This code was made to register all officials GSC5 submitions
If you have any idea of how to make it less ugly, know that I am more than welcoming you to tell me !
-->
<html>
<head>
<title>Page Title</title>
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Dancing+Script"/>
</head>
<body>
<header>
<h1>GSC 5TH EDITION</h1>
<p>Only none empty divisions and languages are shown</p>
</header>
<section>
<article>
<h2>C#</h2>
<input type="checkbox" id="hwbcs"/>
<label for="hwbcs">
<h3 class="hwb">
<span class="unchecked">
▶
</span>
<span class="checked">
▼
Enter to Rename, Shift+Enter to Preview
css
css
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
html{
min-height:100%;
}
body {
height:100%;
width:100%;
/* background gradient*/
margin: 0;
background-repeat: no-repeat;
background-attachment: fixed;
background: #00E0E0;
background: -webkit-radial-gradient( #fff, #fff, #00E0E0);
background: -o-radial-gradient( #fff, #fff, #00E0E0);
background: -moz-radial-gradient( #fff, #fff, #00e0e0);
background:radial-gradient( #fff, #fff, #00e0e0);
/* default text property */
text-align:center;
color: #000055;
}
header p{
color: #0000a0;
font-style:italic;
margin-top:0;
padding-top:0;
Enter to Rename, Shift+Enter to Preview
js
js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
//should have been php as it only depends of the content of the html file
window.onload = function(){
var languages = document.getElementsByTagName("article");
var weight_divs, labels, inputs;
var count, shown_languages = 0;
for(var i = 0; i < languages.length; ++i){
count = 0;
weight_divs = languages[i].getElementsByTagName("ul");
labels = languages[i].getElementsByTagName("label");
inputs = languages[i].getElementsByTagName("input");
for(var j = 0; j < weight_divs.length; ++j){
if(weight_divs[j]. getElementsByTagName("li").length)
++count;
else{
labels[j].style.display = "none";
inputs[j].disabled = true;
}
}
if(count == 0)
languages[i].style.display = "none";
else
++shown_languages;
}
if(!shown_languages)
document.getElementById("no-submition").style.display = "inline-block";
};
Enter to Rename, Shift+Enter to Preview
BROWSER
Console
Run