Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added css, dec, incby5, decby5 #396

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
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
60 changes: 60 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
<!DOCTYPE html>
<html>
<head>
link rel="stylesheet" type="text/css" href="style.css" />
<title>GMETRIX Study Guide</title>
<style>
body {
background-color: black;
color: white;
}
</style>
</head>
<body>
<h1>Domain 1</h1>
<h2>Assignment and Arithmetic Operators</h2>
<p>
<div class="snippet"></div>
<div>
<script src="https://gist.github.com/JPT-Gross/64c896e02198b9cedc8c754e49faf032.js"></script>
<div>
</div>
Using JavaScript, I set a varible named x to
<span id="assignment">x</span>
</p>
<div class="snippet">
<div>
<script src="https://gist.github.com/JPT-Gross/64c896e02198b9cedc8c754e49faf032.js"></script>
</div>
</div>
<p>Using these two buttons we can make x go up by 1 or down by 1</p>
<button type="button" onclick="incX">+</button>
<button type="button" onclick="decX">-</button>
<div class=""snippet"
<div>
<script src="https://gist.github.com/sirnajid/d27675e410beeecaf23123509e093876.js"></script>
</div>
</div>
<P>Using these two buttons we can make x go up by 5 or down by 5</P>
button type="button" onclick="incXBy5()">+5</button>
<button type="button" onclick="decXBy5()">-5</button>
</body>
<script>
var x = 500;
document.getElementById('assignment').innerHTML = x;
function incX(){
x++;
}function decX(){
x--;
document.getElementById('assignment').innerHTML = x;
}
function incXBy5(){
x +=5;
document.getElementById('assignment').innerHTML = x;
}
function decXBy5(){
x -=5;
} document.getElementById('assignment').innerHTML = x;
</script>
</html>

39 changes: 39 additions & 0 deletions style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
/* https://github.com/lonekorean/gist-syntax-themes */
@import url('https://cdn.rawgit.com/lonekorean/gist-syntax-themes/d49b91b3/stylesheets/idle-fingers.css');

@import url('https://fonts.googleapis.com/css?family=Open+Sans');
body {
font: 16px 'Open Sans', sans-serif;
}
body .gist .gist-file {
border-color: #373737;
}
body .gist .gist-data {
border-color: #373737;
}
body .gist .gist-meta {
color: #ffffff;
background: #373737;
}
body .gist .gist-meta a {
color: #ffffff;
}
body .gist .gist-data .pl-s .pl-s1 {
color: #a5c261;
}

div.snippet {
width: 480px;
height: 240px;
padding: 10px;
border: 4px solid black;
border-radius: 15px;
background: #323232;
}

div > div.snippet {
width: 480px;
height: 240px;
overflow-y: scroll;
overflow-x: hidden;
}