-
Notifications
You must be signed in to change notification settings - Fork 1
/
news.html
executable file
·83 lines (73 loc) · 3.66 KB
/
news.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
<!doctype html>
<html class="no-js" lang="">
<head>
<meta charset="utf-8">
<title>GoAi | GPU Open Analytics Imitative</title>
<meta name="description" content="GPU Open Analytics Initiative">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="apple-touch-icon" href="icon.png">
<link rel="stylesheet" href="https://unpkg.com/[email protected]/build/pure-min.css" integrity="sha384-oAOxQR6DkCoMliIh8yFnu25d7Eq/PHS21PClpwjOTeU2jRSq11vu66rf90/cZr47" crossorigin="anonymous">
<link rel="stylesheet" href="https://unpkg.com/[email protected]/build/grids-responsive-min.css">
<link href="https://fonts.googleapis.com/css?family=Montserrat:500|Raleway:300,600" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/material-design-iconic-font/2.2.0/css/material-design-iconic-font.min.css">
<link rel="stylesheet" href="css/main.css">
<script src="https://code.jquery.com/jquery-3.4.1.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script>
<meta name="theme-color" content="#fff">
</head>
<body>
<div id="nav"></div>
<div class="header-min">
<h2 class="header-title"> News </h2>
<div class="header-min-icon"><img src="img/GoAi-group-speak.png" class="pure-img"></div>
</div>
</div>
<section class="mb-1">
<div class="pure-g">
<div class="pure-u-1 pure-u-md-1-3"></div>
<div class="pure-u-1 pure-u-md-1-3">
<h3>News and Press</h3>
<p>Keep up to date with events, blog posts, and news around GoAi.</p>
<a href="https://twitter.com/gpuoai"> <i class="zmdi zmdi-twitter"></i> Want news faster? <br/> Look for #GoAi on twitter.</a>
</div>
<div class="pure-u-1 pure-u-md-1-3"></div>
</div>
</section>
<section>
<div class="pure-g">
<div class="pure-u-1 pure-u-md-1-3"></div>
<div class="pure-u-1 pure-u-md-1-3">
<div id="news-content"> <i class="zmdi zmdi-spinner zmdi-rotate-right zmdi-hc-spin"></i> Loading... </div>
</div>
<div class="pure-u-1 pure-u-md-1-3"></div>
</div>
</section>
<div id="footer"></div>
<script>
// load nav and footer html via jQuery
$('#nav').load("nav.html")
$('#footer').load("footer.html")
</script>
<script src="/js/papaparse.min.js"></script>
<script type="text/javascript">
Papa.parse("https://docs.google.com/spreadsheets/d/e/2PACX-1vREYtIIJ4K-cu-qfNu_9pZUpmcLJ46evvpaowRkz-ut4y2qzVAzXgwtQWGiRFf0lpZ-ZekQ366Q6nqw/pub?output=csv", {
download: true,
header: true,
complete: function(results) {
$('#news-content').html(function(){
var content = results.data.map(function(row,index){
var item = '<a href="'+ row.URL +'" class="news-link" target="_blank"> <div class="news-item"> <img src="'+ row.ImageURL +'" class="item-img" onerror="this.onerror=null; this.src=\'img/poly-place.jpg\'" /> <div class="item-title">'+ row.Title +'</div> <div class="item-tag">'+ row.Tags +'</div> <div class="item-date">'+ row.Date +'</div> </div> </a>';
return item
})
return content
})
},
error: function(error) {
console.log("CSV parse error:", error)
$('#news-content').html('<h3> Could not find any news :( </h3>')
}
});
</script>
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-114387697-1"></script>
</body>
</html>