-
Notifications
You must be signed in to change notification settings - Fork 0
/
news.html
158 lines (145 loc) · 6.05 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
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
<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="utf-8">
<title>ニュース</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<!-- Bootstrap -->
<link href="css/bootstrap.min.css" rel="stylesheet">
<link href="css/style.css" rel="stylesheet">
<!-- HTML5 shim, for IE6-8 support of HTML5 elements -->
<!--[if lt IE 9]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-105140968-2"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag() { dataLayer.push(arguments); }
gtag('js', new Date());
gtag('config', 'UA-105140968-2');
</script>
</head>
<body style="background: #eee">
<!--上から出てくるヘッダ(内容同じ)-->
<div class="fix-header">
<div class="fix-header-contents">
<nav class="navbar navbar-expand-lg navbar-light">
<div class="container">
<a class="navbar-brand" href="index.html">
<img src="img/MikuMikuOpenWorld-logo.png" width="60%" height="60%" class="img-fluid" alt="...">
</a>
<button type="button" class="navbar-toggler" data-toggle="collapse" data-target="#navbarNavfix" aria-controls="navbarNavfix"
aria-expanded="false" aria-label="">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarNavfix">
<div class="navbar-nav ml-auto mt-5">
<a class="nav-item nav-link pr-3 text-nav-index" href="index.html">Home
<span class="sr-only">(現位置)</span>
</a>
<a class="nav-item nav-link pr-3 text-nav-index" href="#">News</a>
<a class="nav-item nav-link pr-3 text-nav-index" href="download.html">Download</a>
<a class="nav-item nav-link pr-3 text-nav-index" href="contact.html">Contact</a>
</div>
<div style="padding-top: 42px; padding-left: 10px;">
<a class="btn btn-primary badge-pill" href="submit.html" role="button">ユーザー登録</a>
</div>
</div>
</div>
</nav>
</div>
</div>
<nav class="navbar navbar-expand-lg navbar-light">
<div class="container">
<a class="navbar-brand" href="index.html">
<img src="img/MikuMikuOpenWorld-logo.png" width="80%" height="80%" class="img-fluid" alt="...">
</a>
<button type="button" class="navbar-toggler" data-toggle="collapse" data-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false"
aria-label="">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarNav">
<div class="navbar-nav ml-auto mt-5">
<a class="nav-item nav-link pr-3 text-nav-index" href="index.html">Home
<span class="sr-only">(現位置)</span>
</a>
<a class="nav-item nav-link pr-3 text-nav-index" href="#">News</a>
<a class="nav-item nav-link pr-3 text-nav-index" href="download.html">Download</a>
<a class="nav-item nav-link pr-3 text-nav-index" href="contact.html">Contact</a>
</div>
</div>
</div>
</nav>
<div class="container text-center">
<div class="row">
<div class="col">
<h1>ニュース</h1>
</div>
</div>
</div>
<section class="contents">
<div class="contents_inner">
<div class="container">
<div class="row">
<div class="col text-left">
<div class="card-columns" id="newscolums">
</div>
</div>
</div>
</div>
</div>
</section>
<footer class="footer" style="margin-top: 0">
<div class="container">
<div class="row ">
<div class="col text-center">
<small class="text-muted">Copyright (C) july. All rights reserved.</small>
</div>
<a href="https://twitter.com/share?ref_src=twsrc%5Etfw" class="twitter-share-button" data-text="MMDを利用したオンラインゲーム|MikuMikuOpenWorld"
data-url="https://july1997.github.io/" data-lang="ja" data-hashtags="MikuMikuOpenWorld" data-show-count="false">Tweet</a>
<script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>
</div>
</div>
</footer>
<script src="js/jquery-3.3.1.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/scroll.js"></script>
<script>
$(function () {
$.ajax({
url:'news.txt',
success: function(data){
var data_array = data.split(/\r\n|\r|\n/); // 改行コードで分割
var len = data_array.length;
var rowlengh = 6;
for (var i = 0; i < len; i++){
switch(i % rowlengh){
case 0:
$("#newscolums").append('<div class="card border-' + data_array[i] + '"><div class="card-body"' + 'id=colums' + Math.floor(i/rowlengh) +
'><h4 class="card-title text-' + data_array[i] + '"' + 'id=columstitle' + Math.floor(i/rowlengh) + '>');
break;
case 1:
$("#columstitle" + Math.floor(i/rowlengh)).append(data_array[i]);
break;
case 2:
$("#colums" + Math.floor(i/rowlengh)).append('<p class="card-text">' + data_array[i]);
break;
case 3:
$("#colums" + Math.floor(i/rowlengh)).append('<a href="' + data_array[i] + '" class="card-link" ' + 'id=columslink' + Math.floor(i/rowlengh) + '>');
break;
case 4:
$("#columslink" + Math.floor(i/rowlengh)).append(data_array[i] + "</a>");
break;
case 5:
$("#colums" + Math.floor(i/rowlengh)).append("<p class=\"card-text\"><small class=\"text-muted\">" + data_array[i] + "</small></p>");
break;
}
}
}
});
});
</script>
</body>
</html>