-
Notifications
You must be signed in to change notification settings - Fork 17
Expand file tree
/
Copy pathIndex.jsx
More file actions
139 lines (132 loc) · 3.89 KB
/
Index.jsx
File metadata and controls
139 lines (132 loc) · 3.89 KB
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
import React from "react";
import { Row, Col } from "reactstrap";
import { graphql, useStaticQuery } from "gatsby";
import { FaRegArrowAltCircleRight } from "react-icons/fa";
import Section from "../Section";
import PostListing from "../PostListing/PostListing";
import Link from "../common/Link";
function Index() {
const data = useStaticQuery(graphql`
query homePageQuery {
allMarkdownRemark(
sort: { frontmatter: { date: DESC } }
filter: { frontmatter: { posttype: { eq: "blog" } } }
limit: 3
) {
edges {
node {
fields {
slug
date
}
excerpt(format: PLAIN, pruneLength: 120, truncate: true)
timeToRead
frontmatter {
title
date
author
tags
posttype
description
cover {
childImageSharp {
gatsbyImageData
}
}
}
}
}
}
}
`);
const recentPostEdges = data.allMarkdownRemark.edges;
const recentPostList = recentPostEdges.map(({ node }) => {
const { frontmatter, fields, excerpt } = node;
const { posttype, tags, cover, title, author } = frontmatter;
const { slug, date } = fields;
return {
posttype,
title,
path: `/blog${slug}`,
cover,
tags,
excerpt,
date,
author,
};
});
return (
<section className="sect-home">
<Row>
<Col md="6">
<h3>What is Terasology?</h3>
<p className="p-title">
An open source voxel world - imagine the possibilities!
</p>
<p className="p-description">
The Terasology project was born from a Minecraft-inspired tech demo
and is becoming a stable platform for various types of gameplay
settings in a voxel world. The creators and maintainers are a
diverse mix of software developers, designers, game testers, graphic
artists, and musicians. We encourage others to join!
</p>
<div className="my-5">
<button
type="button"
className="font-weight-bold btn btn-lg btn-success home-btn"
>
<Link to="/game" className="link-about">
Learn More
</Link>
</button>
</div>
</Col>
<Col md="6">
<div className="index">
<iframe
src="https://www.youtube.com/embed/Wpa2aiadwE8"
title="Terasology trailer"
allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture"
webkitallowfullscreen="true"
mozallowfullscreen="true"
allowFullScreen
style={{ border: "0px" }}
/>
</div>
</Col>
</Row>
<Section title="Recent News">
<Col lg="12">
<Row className="justify-content-center ">
<PostListing postList={recentPostList} />
</Row>
</Col>
<div className="d-flex justify-content-center mb-4">
<div>
<Link
to="/blog"
className="btn-primary home-btn-read-more-blog font-weight-bold"
>
Find More Blogs
<FaRegArrowAltCircleRight
style={{
fontSize: "28px",
marginBottom: "4px",
marginLeft: "6px",
}}
/>
</Link>
</div>
</div>
</Section>
<Link
to="https://github.com/MovingBlocks"
className="btn-primary home-btn-read-more-blog font-weight-bold"
>
MovingBlocks
</Link>
<Link to="https://github.com/MovingBlocks">MovingBlocks</Link>
</section>
);
}
export default Index;