-
Notifications
You must be signed in to change notification settings - Fork 0
/
home.php
287 lines (272 loc) · 13.3 KB
/
home.php
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
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
<?php
include('htmlhead.php');
?>
<script type="text/javascript">
$(function(){
$('.p-home-captionleft').css('opacity','0');
$('.p-home-captionright').css('opacity','0');
setTimeout(function(){
$('.p-home-captionleft').animate({
opacity:1.0
},1000);
},500);
setTimeout(function(){
$('.p-home-captionright').animate({
opacity:1.0
},1000);
},1500);
$.get('http://mspjp.hatenablog.com/rss',function(data) {
$(data).find('item').each(function (index) {
if(index >= 6){
return false;
}
var entry = $(this);
var entryElement =
'<div class="col-sm-4 div-home-blog">' +
'<a class="link-home-blog" href="{url}">' +
'<img width="100%" height="auto" src="{img}" class="img-home-blog" />' +
'<p class="date-home-blog">{date}</p>' +
'<div class="title-home-blog">' +
' <p>{title}</p>' +
' </div>' +
'</a>' +
'</div>';
var pubDate = new Date(entry.find('pubDate').text());
pubDate = pubDate.getFullYear()+'/'+(pubDate.getMonth()+1)+'/'+pubDate.getDate();
entryElement = entryElement.replace('{img}',entry.find('enclosure').attr('url'));
entryElement = entryElement.replace('{url}',entry.find('link').text());
entryElement = entryElement.replace('{title}',entry.find('title').text());
//entryElement = entryElement.replace('{category}',entry.find('category').first().text());
entryElement = entryElement.replace('{date}',pubDate);
if(index<3) {
$('.div-home-section-recent1').append(entryElement);
}else{
$('.div-home-section-recent2').append(entryElement);
}
});
});
});
</script>
<div class="div-home-eyecatch">
<div class="div-home-eyecatchback">
<img src="<?php echo get_template_directory_uri() . "/img/top-eyecatch.jpg" ?>" width="100%"/>
<div class="div-home-eyecatchover">
<div class="p-home-captionleft">
<p>Microsoftテクノロジーの</p>
<p>"楽しさ"を伝えることが</p>
<p>我々のミッションです</p>
</div>
<p class="p-home-captionright">Microsoft Student Partners Japan</p>
</div>
</div>
</div>
<div class="container">
<div class="row div-home-nav">
<?php include('navbar.php'); ?>
</div>
<div class="row div-home-intro">
<div class="col-sm-4 dic-home-topbutton-container">
<a class="btn" href="<?php echo get_seminar_url() ?>" target="_blank">
<div class="div-home-topbutton div-home-topbutton-left">
<i class="fa fa-laptop i-home-topbutton-icon" aria-hidden="true"></i>
<p class="p-home-topbutton-title">勉強系に行く</p>
<p class="p-home-topbutton-caption">MSPは全国で学生向け勉強会を開催しています</p>
</div>
</a>
</div>
<div class="col-sm-4 dic-home-topbutton-container">
<a class="btn" href="<?php echo get_imagine_url() ?>">
<div class="div-home-topbutton div-home-topbutton-center">
<i class="fa fa-trophy i-home-topbutton-icon" aria-hidden="true"></i>
<p class="p-home-topbutton-title">コンテストに出る</p>
<p class="p-home-topbutton-caption">ImagineCupはあなたのアイデアで世界と競うことができます</p>
</div>
</a>
</div>
<div class="col-sm-4 dic-home-topbutton-container">
<a class="btn" href="<?php echo get_twitter_url() ?>" target="_blank">
<div class="div-home-topbutton div-home-topbutton-right">
<i class="fa fa-twitter i-home-topbutton-icon" aria-hidden="true"></i>
<p class="p-home-topbutton-title">フォローする</p>
<p class="p-home-topbutton-caption">学生に役に立つMSテクノロジー情報を発信しています</p>
</div>
</a>
</div>
</div>
<div class="row div-section">
<div class="div-section-title div-home-section-title-about">
<div>
<p>Microsoft Student Partnersとは</p>
</div>
</div>
<p class="p-section-description">
Microsoftの製品技術(VisualStudioやOfficeなど)の楽しさを学生に伝えるために活動を行う有志の学生団体です。</p>
<p class="p-section-description">SNSで情報発信を行ったり、全国でハンズオンを開いたりしています。</p>
<div class="div-section-button">
<a class="btn a-section-button a-home-section-button-about" href="/profile">
<p>もっと詳しく知る <i class="fa fa-angle-right" aria-hidden="true"></i></p>
</a>
</div>
</div>
<div class="row div-section">
<div class="div-section-title div-home-section-title-recent">
<div>
<p>最新情報</p>
</div>
</div>
<div class="div-home-section-recent1 row">
</div>
<div class="div-home-section-recent2 row">
</div>
<div class="div-section-button">
<a class="btn a-section-button a-home-section-button-recent" href="https://msp-times.net/">
<p>グローバルサイト <i class="fa fa-angle-right" aria-hidden="true"></i></p>
</a>
<a class="btn a-section-button a-home-section-button-recent" href="<?php echo get_blog_url() ?>">
<p>もっと詳しく知る <i class="fa fa-angle-right" aria-hidden="true"></i></p>
</a>
</div>
</div>
<div class="row div-section">
<div class="row div-section-title div-home-section-title-imagine">
<div>
<p>Imagine Cup</p>
</div>
</div>
<div class="row div-section-imagine-description">
<div class="col-sm-6">
<img src="<?php echo get_template_directory_uri() . "/img/imaginecup.jpg" ?>" width="80%"/>
</div>
<div class="col-sm-6">
<img src="<?php echo get_template_directory_uri() . "/img/imagine_logo.jpg" ?>" width="50%"/>
<p>ImagineCupはMicrosoftのテクノロジーを利用して出場できる世界最大規模の学生向けITコンテストです</p>
</div>
</div>
<div class="div-home-section-imagine-register">
<p>ImagineCup出場の流れ</p>
<div>
<img width="60%" src="<?php echo get_template_directory_uri() . "/img/imagine_register.png" ?>">
<div class="div-home-section-imagine-register-caption">
<div class="col-sm-4">
<p class="p-home-section-imagine-register-title">アイデアの提出</p>
<p class="p-home-section-imagine-register-sub">未定</p>
</div>
<div class="col-sm-4">
<p class="p-home-section-imagine-register-title">開発</p>
</div>
<div class="col-sm-4">
<p class="p-home-section-imagine-register-title">プレゼンビデオの作成</p>
<p class="p-home-section-imagine-register-sub">未定</p>
</div>
</div>
</div>
</div>
<div class="div-section-button">
<a class="btn a-section-button a-home-section-button-imagine" href="<?php echo get_imagine_url() ?>">
<p>もっと詳しく知る <i class="fa fa-angle-right" aria-hidden="true"></i></p>
</a>
</div>
</div>
<div class="row div-section">
<div class="div-section-title div-home-section-title-tech">
<div>
<p>技術情報</p>
</div>
</div>
<p class="p-section-description">MSP JapanのQiita Organizationができました!今後はこちらに技術情報を投稿していきます!</p>
<div class="div-section-button">
<a class="btn a-section-button a-home-section-button-tech" href="http://qiita.com/organizations/mspjp/activities">
<p>Qiita <i class="fa fa-angle-right" aria-hidden="true"></i></p>
</a>
</div>
<div class="div-home-section-tech">
<div class="col-sm-6">
<p><i class="fa fa-code" aria-hidden="true"></i> デベロッパー向け</p>
<?php
// query_posts( $query_string . "&posts_per_page=10&paged=0");
$myQuery = new WP_Query();
$param = array(
'paged' => 0,
'posts_per_page' => '3',
'post_type' => array('article'),
'post_status' => 'publish',
'orderby' => 'date',
'order' => 'DESC',
'tax_query' => array(
array(
'taxonomy' => 'tech',
'field' => 'slug',
'terms' => array( 'program' ),
'include_children' => true,
)
)
);
$myQuery->query($param);
if ($myQuery->have_posts()) :
while ($myQuery->have_posts()) : $myQuery->the_post(); ?>
<a class="btn" href="<?php the_permalink(); ?>">
<img class="" height="60px" src="<?php echo get_thumbnail_url(has_post_thumbnail()) ?>" alt="">
<div>
<p class="p-home-section-tech-date"><?php the_time('Y/n/j'); ?></p>
<p><?php echo mb_substr(get_the_title(), 0, 100); ?></p>
</div>
</a>
<?php
endwhile; // 繰り返し処理終了
else : // ここから記事が見つからなかった場合の処理
include('no-article.php');
endif;
?>
<div class="div-section-button">
<a class="btn a-section-button a-home-section-button-tech" href="/article">
<p>他の情報 <i class="fa fa-angle-right" aria-hidden="true"></i></p>
</a>
</div>
</div>
<div class="col-sm-6">
<p><i class="fa fa-laptop" aria-hidden="true"></i> PCユーザー向け</p>
<?php
// query_posts( $query_string . "&posts_per_page=10&paged=0");
$myQuery = new WP_Query();
$param = array(
'paged' => 0,
'posts_per_page' => '3',
'post_type' => array('article'),
'post_status' => 'publish',
'orderby' => 'date',
'order' => 'DESC',
'tax_query' => array(
array(
'taxonomy' => 'tech',
'field' => 'slug',
'terms' => array( 'it' ),
'include_children' => true,
)
)
);
$myQuery->query($param);
if ($myQuery->have_posts()) :
while ($myQuery->have_posts()) : $myQuery->the_post(); ?>
<a class="btn" href="<?php the_permalink(); ?>">
<img class="" height="60px" src="<?php echo get_thumbnail_url(has_post_thumbnail()) ?>" alt="">
<div>
<p class="p-home-section-tech-date"><?php the_time('Y/n/j'); ?></p>
<p><?php echo mb_substr(get_the_title(), 0, 100); ?></p>
</div>
</a>
<?php
endwhile; // 繰り返し処理終了
else : // ここから記事が見つからなかった場合の処理
include('no-article.php');
endif;
?>
<div class="div-section-button">
<a class="btn a-section-button a-home-section-button-tech" href="/article">
<p>他の情報 <i class="fa fa-angle-right" aria-hidden="true"></i></p>
</a>
</div>
</div>
</div>
</div>
</div>
<?php get_footer(); ?>