Add start of computer science blog
This commit is contained in:
4
computer-science-blog/css/main.css
Normal file
4
computer-science-blog/css/main.css
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
/* Reading School 2018, CSS*/
|
||||||
|
iframe {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
102
computer-science-blog/index.html
Normal file
102
computer-science-blog/index.html
Normal file
@@ -0,0 +1,102 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no">
|
||||||
|
<meta name="HandheldFriendly" content="True">
|
||||||
|
<link rel="icon" sizes="192x192" href="https://matthew-grove.ml/logo.png">
|
||||||
|
|
||||||
|
<!-- add to homescreen for Chrome on Android -->
|
||||||
|
<meta name="mobile-web-app-capable" content="yes">
|
||||||
|
<link rel="icon" sizes="192x192" href="https://matthew-grove.ml/logo.png">
|
||||||
|
|
||||||
|
<!-- add to homescreen for Safari on iOS -->
|
||||||
|
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||||
|
<meta name="apple-mobile-web-app-status-bar-style" content="black">
|
||||||
|
<meta name="apple-mobile-web-app-title" content="Computer Science Blog | Matthew Grove">
|
||||||
|
<link rel="apple-touch-icon-precomposed" href="https://matthew-grove.ml/logo.png">
|
||||||
|
|
||||||
|
<!-- tile icon & colour for Windows 8 -->
|
||||||
|
<meta name="msapplication-TileImage" content="https://matthew-grove.ml/logo.png">
|
||||||
|
<meta name="msapplication-TileColor" content="#d84315">
|
||||||
|
|
||||||
|
<title>Computer Science Blog | Matthew Grove</title>
|
||||||
|
<meta name="description" content="GCSE Computer Science Blog - by Matthew Grove">
|
||||||
|
|
||||||
|
<!-- import Roboto (font) -->
|
||||||
|
<link href="/assets/roboto.css" rel="stylesheet" type="text/css">
|
||||||
|
|
||||||
|
<!-- import jQuery -->
|
||||||
|
<script src="/assets/jquery.min.js" type="text/javascript"></script>
|
||||||
|
|
||||||
|
<!-- import cookie JavaScript -->
|
||||||
|
<script src="/assets/cookies.js" type="text/javascript"></script>
|
||||||
|
|
||||||
|
<!-- import Material Design components & icons -->
|
||||||
|
<link href="/assets/material-components-web.min.css" rel="stylesheet" type="text/css">
|
||||||
|
<link href="/assets/material_icons.css" rel="stylesheet" type="text/css">
|
||||||
|
<script src="/assets/material-components-web.min.js" type="text/javascript"></script>
|
||||||
|
|
||||||
|
<!-- import local styling & scripts -->
|
||||||
|
<script src="scripts/scripts.js" type="text/javascript"></script>
|
||||||
|
<script src="/assets/global.js" type="text/javascript"></script>
|
||||||
|
<link href="/assets/global.css" rel="stylesheet" type="text/css">
|
||||||
|
|
||||||
|
<!-- Global site tag (gtag.js) - Google Analytics -->
|
||||||
|
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-124505000-1" type="text/javascript"></script>
|
||||||
|
<script type="text/javascript">
|
||||||
|
window.dataLayer = window.dataLayer || [];
|
||||||
|
function gtag(){dataLayer.push(arguments);}
|
||||||
|
gtag('js', new Date());
|
||||||
|
gtag('config', 'UA-124505000-1');
|
||||||
|
</script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<!-- cookie notice is included via jQuery -->
|
||||||
|
<div id="cookies"></div>
|
||||||
|
|
||||||
|
<!-- content of navbar is included via jQuery -->
|
||||||
|
<aside class="navbar-insert mdc-drawer mdc-drawer--modal"></aside>
|
||||||
|
|
||||||
|
<div class="mdc-drawer-scrim"></div>
|
||||||
|
|
||||||
|
<div class="mdc-drawer-app-content">
|
||||||
|
<header class="mdc-top-app-bar app-bar" id="app-bar"></header>
|
||||||
|
|
||||||
|
<main class="main-content" id="main-content">
|
||||||
|
<div class="mdc-top-app-bar--fixed-adjust">
|
||||||
|
<iframe src="pages/blog.html"></iframe>
|
||||||
|
<!-- input field (in a container so that unwanted overflow from :before & :after is hidden) -->
|
||||||
|
<div class="mdc-text-field-container">
|
||||||
|
<div class="mdc-text-field mdc-text-field--outlined" data-mdc-auto-init="MDCTextField">
|
||||||
|
<input type="number" id="number-input-field" class="mdc-text-field__input">
|
||||||
|
<label for="number-input-field" class="mdc-floating-label ">Your Number</label>
|
||||||
|
<div class="mdc-notched-outline">
|
||||||
|
<svg>
|
||||||
|
<path class="mdc-notched-outline__path"/>
|
||||||
|
</svg>
|
||||||
|
</div>
|
||||||
|
<div class="mdc-notched-outline__idle"></div>
|
||||||
|
</div>
|
||||||
|
<!-- input field helper text -->
|
||||||
|
<p class="mdc-text-field-helper-text" aria-hidden="true">
|
||||||
|
Validate with the Luhn Algorithm
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<!-- button to submit & check number with Luhn algorithm -->
|
||||||
|
<button class="validation_button mdc-button mdc-button--outlined" onclick="checkNumber()" data-mdc-auto-init="MDCRipple">
|
||||||
|
<i class="material-icons mdc-button__icon">check_circle_outline</i>
|
||||||
|
Check
|
||||||
|
</button>
|
||||||
|
|
||||||
|
<!-- link to source code on GitHub -->
|
||||||
|
<a href="https://github.com/mgrove36/demo-code/blob/master/computer-science-blog/index.html" class="source-code-link mdc-fab mdc-fab--extended" data-mdc-auto-init="MDCRipple"></a>
|
||||||
|
</div>
|
||||||
|
</main>
|
||||||
|
<footer>
|
||||||
|
© Matthew Grove 2018
|
||||||
|
</footer>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
49
computer-science-blog/pages/blog.html
Normal file
49
computer-science-blog/pages/blog.html
Normal file
@@ -0,0 +1,49 @@
|
|||||||
|
<!-- Reading School 2018, HTML page by Matthew Grove, Year 10 -->
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1.0">
|
||||||
|
|
||||||
|
<!-- styles -->
|
||||||
|
<link rel="stylesheet" type="text/css" href="../css/pages.css">
|
||||||
|
|
||||||
|
<!-- scripts -->
|
||||||
|
<script type="text/javascript" src="../scripts/scripts.js"></script>
|
||||||
|
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<h1>HTML Basics</h1>
|
||||||
|
<p>I know that:
|
||||||
|
<ul>
|
||||||
|
<li>inline styles override all others.</li>
|
||||||
|
<li>index.html is one of the industry standard default file names, as well as index.htm, index.php, index.asp, index.aspx and more.</li>
|
||||||
|
<li>iframes are used to embed documents within other documents.</p>
|
||||||
|
<li>
|
||||||
|
CSS files are linked by using the following code:
|
||||||
|
<br>
|
||||||
|
<code><link rel="stylesheet" type="text/css" href="../css/main.css"></code>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
JS files are linked by using the following code:
|
||||||
|
<code><script type="text/javascript" src="scripts/scripts.js"></script></code>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
Adding the date when the window loads:
|
||||||
|
<code>
|
||||||
|
// onload of window
|
||||||
|
<br>
|
||||||
|
window.onload = dateInsert;
|
||||||
|
</code>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
Ternary operators work by using:
|
||||||
|
<code>[condition] ? [value if true] : [value if false]</code>
|
||||||
|
</li>
|
||||||
|
<li>The later a CSS file is imported, the more power it has over the document - i.e. the last stylesheet imported will overwrite the styling in all of the other stylesheets.</li>
|
||||||
|
</ul>
|
||||||
|
</p>
|
||||||
|
<h1>_____AREA_OF_STUDY_____ Presentation</h1>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
31
computer-science-blog/scripts/scripts.js
Normal file
31
computer-science-blog/scripts/scripts.js
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
// set page title
|
||||||
|
window.page_title = "Computer Science Blog | Matthew Grove";
|
||||||
|
|
||||||
|
window.onload = function() {
|
||||||
|
// set the current date
|
||||||
|
var date = new Date();
|
||||||
|
|
||||||
|
// ternary operator: if the date < 10 then add 0 to the start of it, else display the date
|
||||||
|
var day = date.getDate() < 10 ? "0" + date.getDate() : date.getDate();
|
||||||
|
|
||||||
|
// set current date
|
||||||
|
var current_date = day + "-" + (date.getMonth() + 1) + "-" + date.getFullYear();
|
||||||
|
|
||||||
|
// display date
|
||||||
|
document.getElementById("current_date").innerHTML = current_date;
|
||||||
|
}
|
||||||
|
|
||||||
|
function nextPage() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function previousPage() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function displayPage(page) {
|
||||||
|
document.getElementById("iframe").src = "pages/" + page + ".html";
|
||||||
|
}
|
||||||
|
|
||||||
|
var pages = ["page_01", "page_02", "page_03"];
|
||||||
|
var pageIndex = 0;
|
||||||
Reference in New Issue
Block a user