-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
190 lines (164 loc) · 7.48 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
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Hacker News | Home</title>
<link href="https://fonts.googleapis.com/css?family=Varela+Round&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Montserrat:700|Varela+Round&display=swap" rel="stylesheet">
<link href="css/index.css" rel="stylesheet">
<link
rel="stylesheet"
href="https://maxcdn.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css"
integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T"
crossorigin="anonymous" />
<!-- Icon library to show a hamburger menu (bars) on small screens -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<!-- This script creates a 'smooth scroll' feature when clicking navbar links that scroll down to a specific section of the page -->
<script>
$(document).ready(function () {
$('a[href^="#"]').on('click', function (e) {
e.preventDefault();
var target = this.hash,
$target = $(target);
$('html, body').stop().animate({
'scrollTop': $target.offset().top - 140
}, 900, 'swing', function () {
window.location.hash = target;
});
});
});
</script>
<!--[if lt IE 9]>
<script src="https://cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv.js"></script>
<![endif]-->
</head>
<body>
<!-- This section includes all elements inside of the background image of landing page, including the fixed navbar prior to scroll -->
<header id="home">
<div class="nav-container">
<div id="navbar">
<a class="logo" href="/index.html"><h2>Hacker News</h2></a>
<nav id="nav">
<a class="navlinks" href="/index.html">Home</a>
<a class="navlinks" href="#features">Features</a>
<a class="navlinks" href="#news">Top News</a>
<a class="navlinks" href="#contact">Contact Us</a>
<a class="navlinks" href="/team.html">Our Team</a>
<a class="navlinks" href="https://hackernewsmatrix.netlify.com/">Sign In/Up</a>
</nav>
</div>
</div>
<div class="bg-img" style="background-image: url(img/bg1.jpg);">
</div>
<div class="main-header">
<h1>Hacker News</h1>
<h3><u>The</u> social news site for computer science and entrepreneurship</h3>
<div class="buttons">
<button class="cta1" onclick="window.location.href = 'https://hackernewsmatrix.netlify.com/';">Sign In</button>
<button class="cta2" onclick="window.location.href = 'https://hackernewsmatrix.netlify.com/';">Sign Up</button>
</div>
</div>
</header>
<!-- This section includes all elements in first section (Services: white background) -->
<section id="features" name="features" class="section1-container">
<div class="section1-title">
<h2>Redesigned for 2019</h2>
<div class="line-break"></div>
</div>
<!-- This container includes the three boxes arranged horizontally in content section -->
<div class="box-container">
<div class="box">
<img class="icons" src="img/news.png" alt="Newspaper icon" />
<h3>Today's Top News</h3>
<p>The ideal source for breaking news in tech and startups.</p>
<a href="#news">View News</a>
</div>
<div class="box">
<img class="icons" src="img/jobs.png" alt="Job search icon" />
<h3>Startup Job Listings</h3>
<p>Looking to work at a hot new tech startup? Look no further.</p>
<a href="https://news.ycombinator.com/jobs" target="_blank">Find Jobs</a>
</div>
<div class="box">
<img class="icons" src="img/questions.png" alt="Question mark icon" />
<h3>Ask the Community</h3>
<p>Get your questions answered by our community of experts.</p>
<a href="https://news.ycombinator.com/ask" target="_blank">Ask Now</a>
</div>
</div>
</section>
<!-- This section includes all elements in second section (Featured News: grey background) -->
<section id="news" name="news" class="section2-container">
<div class="section2-title">
<h2>Breaking News & Top Stories</h2>
<div class="line-break"></div>
</div>
<div class="news-container">
<a class="top-news" href="https://www.eetimes.com/document.asp?doc_id=1335297" target="_blank">
<img src="img/microsoft-gpu.png" alt="Screenshot of article about Microsoft's new Graphcore AI chips" />
</a>
<a class="top-news" href="https://pursuit.unimelb.edu.au/articles/how-do-you-crack-the-code-to-a-lost-ancient-script" target="_blank">
<img src="img/ancient-script.png" alt="Screenshot of article about cracking the code of lost ancient scripts" />
</a>
<a class="top-news" href="https://www.bbc.com/future/article/20140905-the-women-with-super-human-vision" target="_blank">
<img src="img/supervision.png" alt="Screenshot of article about women with superhuman vision" />
</a>
<a class="top-news" href="https://www.wbur.org/hereandnow/2019/11/15/amtrak-profit-train-ceo-richard-anderson" target="_blank">
<img src="img/amtrak.png" alt="Screenshot of article about Amtrak turning a profit for the first time ever" />
</a>
<a class="top-news" href="https://blog.benjojo.co.uk/post/userspace-usb-drivers" target="_blank">
<img src="img/usb.png" alt="Screenshot of article about writing userspace USB drives to abandoned devices" />
</a>
<a class="top-news" href="https://www.1843magazine.com/food-drink/world-in-a-dish/how-turkish-coffee-destroyed-an-empire" target="_blank">
<img src="img/turkish.png" alt="Screenshot of article about how Turkish coffee destroyed an empire" />
</a>
</div>
</section>
<!-- This section includes all elements in third section (Contact form: white background) -->
<section id="contact" name="contact" class="section3-container">
<div class="section3-title">
<h2>Get In Touch</h2>
<div class="line-break"></div>
</div>
<div class="contact-container">
<form class="cf">
<div class="half left cf">
<input type="text" id="input-name" class="input-box" placeholder="Name">
<input type="email" id="input-email" class="input-box" placeholder="Email address">
<input type="text" id="input-subject" placeholder="Subject">
</div>
<div class="half right cf">
<textarea name="message" type="text" id="input-message" placeholder="Message"></textarea>
</div>
<input type="submit" value="Submit" id="input-submit">
</form>
</div>
</section>
<footer>
<p>Copyright Ⓒ Lambda School Build Week 2019</p>
</footer>
<!-- This script changes the background color of the navbar to black after scrolling 50px, by changing it's class to .navbar1 -->
<script>
window.onscroll = function() {
var nav = document.getElementById('navbar');
if ( window.pageYOffset > 50 ) {
nav.classList.add("navbar1");
} else {
nav.classList.remove("navbar1");
}
}
</script>
<!-- This script creates a mobile 'hamburger' navigation menu when at 500px or less -->
<script>
function myFunction() {
var x = document.getElementById("nav");
if (x.style.display === "block") {
x.style.display = "none";
} else {
x.style.display = "block";
}
}
</script>
</body>
</html>