-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
executable file
·169 lines (143 loc) · 6.44 KB
/
index.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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
<!DOCTYPE HTML>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Astronomy Ireland | Home</title>
<link href="css/style_Index.css" rel="stylesheet">
<link href="css/style_General.css" rel="stylesheet">
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Fascinate&display=swap" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<style>
</style>
<script>
function myFunction() {
var x = document.getElementById("myTopnav");
if (x.className === "topnav") {
x.className += " responsive";
} else {
x.className = "topnav";
}
}
function setCookie() {
var date = new Date();
var d = date.getDate();
var m = date.getMonth() +1;
var y = date.getFullYear();
var hr = date.getHours();
var min = date.getMinutes();
min = min > 9 ? min : '0' + min;
var sec = date.getSeconds();
sec = sec > 9 ? sec : '0' + sec;
var visitDate = d+"/"+m+"/"+y+" at "+hr+":"+min+":"+sec;
//alert("date is " + visitDate);
document.cookie = "Date="+visitDate;
}
function getCookie(cname) {
var name = cname + "=";
var decodedCookie = decodeURIComponent(document.cookie);
var ca = decodedCookie.split(';');
for(var i = 0; i <ca.length; i++) {
var c = ca[i];
while (c.charAt(0) == ' ') {
c = c.substring(1);
}
if (c.indexOf(name) == 0) {
return c.substring(name.length, c.length);
}
}
return "";
}
function checkCookie() {
var date=getCookie("Date");
if (date != "") {
document.getElementById("dateCookie").innerHTML = "Date and time of last visit: "+date;
setCookie();
} else {
document.getElementById("dateCookie").innerHTML = "This is your first time on the site. Have fun!";
setCookie();
}
}
</script>
</head>
<body>
<header>
<section class="heroimage">
<a href=shop.html class="shopBanner">Limited time sale on now!</a>
<div class="herotext">
<h1>Astronomy Ireland</h1>
</div>
</section>
<!-- Main Nav List-->
<nav class="topnav" id="myTopnav">
<ul>
<li class="listLogo"><a href="index.html" class="logo"><img src="images/wixLogoCrop.jpg" alt="Astronomy Ireland logo" id="logoImg"></a><!--logo made with wix logo maker -->
</li>
<li class="narrow"><a href="fun.html">Fun</a></li>
<li class="wide"><a href="gallery.html">Gallery</a></li>
<li class="narrow"><a href="w3c.html">W3C</a></li>
<li class="narrow"><a href="style.html">Style</a></li>
<li class="narrow"><a href="shop.html">Shop</a></li>
<li class="wide"><a href="contact.html">Contact</a></li>
<li><a href="javascript:void(0);" class="icon" onclick="myFunction()"><i class="fa fa-bars"></i></a></li>
</ul>
</nav>
</header>
<main>
<div class="grid-container">
<div id="welcomeMessage">
<h2>Welcome to Astronomy Ireland!</h2>
<p id="dateCookie">Donec rhoncus ipsum eu ligula finibus, vel vestibulum dui gravida. Sed viverra tincidunt magna at vestibulum. Quisque nec consectetur quam.</p>
</div>
<article class="article1">
<img class="imgs" src="images/pexels-jaymantri-5439.jpg" alt="earthfromspace">
<!-- img sourced from pexels. Free to use. -->
<h3>Exploration</h3>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. In congue nisi lorem, eu sollicitudin justo congue a. Vivamus et consectetur nisi, a posuere.</p>
<a href=#>Read More</a>
</article>
<article class="article2">
<img class="imgs" src="images/pexels-pixabay-220201.jpg" alt="italyfromspace">
<!-- img sourced from pexels. Free to use. -->
<h3>Images</h3>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. In congue nisi lorem, eu sollicitudin justo congue a. Vivamus et consectetur nisi, a posuere.</p>
<a href=#>Read More</a>
</article>
<article class=article3>
<img class="imgs" src="images/pexels-pixabay-41951.jpg" alt="galaxyimage">
<!-- img sourced from pexels. Free to use. -->
<h3>Galaxies</h3>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. In congue nisi lorem, eu sollicitudin justo congue a. Vivamus et consectetur nisi, a posuere.</p>
<a href=#>Read More</a>
</article>
<article class=article4>
<img class="imgs" src="images/pexels-pixabay-astronaut.jpg" alt="astronaut in space">
<!-- img sourced from pexels. Free to use. -->
<div class="article4text">
<h3>Meet the astronauts!</h3>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. In congue nisi lorem, eu sollicitudin justo congue a. Vivamus et consectetur nisi, a posuere.</p>
<a href=#>Read More</a>
</div>
</article>
</div>
</main>
<footer>
<div class="grid-footer">
<a href="#" id="item1">About Us</a>
<a href="#" id="item2">Terms and Conditions</a>
<a href="#" id="item3">Privacy Policy</a>
<a href="index.html" id="footerLogo"><img src="images/wixLogoCrop.jpg" alt="Astronomy Ireland logo"></a>
<!--logo made with wix logo maker -->
<div class="footerIcons">
<a href="#" id="item7"><i class="fab fa-twitter"></i></a>
<a href="#" id="item8"><i class="fab fa-facebook"></i></a>
<a href="#" id="item9"><i class="fab fa-instagram"></i></a>
</div>
<p id="authorRow">Author: Eoin Conway</p>
</div>
</footer>
<script>
window.addEventListener("load", checkCookie);
</script>
</body>
</html>