From 04129aeba3e90247814981411616d39be28d4b25 Mon Sep 17 00:00:00 2001 From: Kayne Ruse Date: Sun, 26 May 2019 05:01:00 +1000 Subject: [PATCH] Added blurb, tweaked styling --- public/news/2019-05-26-01.md | 7 +++++++ public/styles/shared.css | 3 +++ src/components/pages/home.jsx | 2 ++ src/components/panels/blurb.jsx | 25 +++++++++++++++++++++++++ src/components/panels/news_panel.jsx | 2 +- 5 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 public/news/2019-05-26-01.md create mode 100644 src/components/panels/blurb.jsx diff --git a/public/news/2019-05-26-01.md b/public/news/2019-05-26-01.md new file mode 100644 index 0000000..4617d1a --- /dev/null +++ b/public/news/2019-05-26-01.md @@ -0,0 +1,7 @@ +A New Page Structure +--- +_26 May 2019_ + +I keep wanting to start working on the combat, but I keep getting feedback about the site as a whole. I'm happy to receive it, of course, it just means I'll have to work even harder! + +I've removed the forms to the right, and moved them into their own pages. This should make it cleaner to signup and login. I've also added a blurb to the main page, and tweaked the styling so it's not simply a wall of text. Hopefully, it looks better - I really can't tell, since I'm too close to the project. diff --git a/public/styles/shared.css b/public/styles/shared.css index fa43c4a..7e9cc20 100644 --- a/public/styles/shared.css +++ b/public/styles/shared.css @@ -23,6 +23,7 @@ body { margin-left: auto; margin-right: auto; margin-top: .5em; + margin-bottom: 2em; } @media screen and (max-width: 480px) { @@ -50,6 +51,8 @@ hr { height: 1px; color: lightblue; background-color: lightblue; + margin-top: 1em; + margin-bottom: 2em; } ul { diff --git a/src/components/pages/home.jsx b/src/components/pages/home.jsx index c492f11..ccf059d 100644 --- a/src/components/pages/home.jsx +++ b/src/components/pages/home.jsx @@ -4,6 +4,7 @@ import { withRouter, Link } from 'react-router-dom'; //panels import CommonLinks from '../panels/common_links.jsx'; +import Blurb from '../panels/blurb.jsx'; import NewsPanel from '../panels/news_panel.jsx'; class Home extends React.Component { @@ -46,6 +47,7 @@ class Home extends React.Component {
+

News

diff --git a/src/components/panels/blurb.jsx b/src/components/panels/blurb.jsx new file mode 100644 index 0000000..52b8b0f --- /dev/null +++ b/src/components/panels/blurb.jsx @@ -0,0 +1,25 @@ +import React from 'react'; + +export default class Blurb extends React.Component { + render() { + let Link = (props) => {props.to}; + + return ( +
+

A game in early development.

+
+

This is a resource accumulation game, with some similarities to idle games. The idea is that you recruit new units once per day, train them as soldiers, and send them to attack other players. You can also train spies and scientists, which each grant their own benefits.

+

Untrained recruits gain you 1 gold piece evey half hour - the only unit type that grants a passive income.

+

You can follow the developer KR Game Studios here:

+
    +
  • +
  • +
  • +
  • +
  • +
+
+ ); + } +} + diff --git a/src/components/panels/news_panel.jsx b/src/components/panels/news_panel.jsx index ad99ebe..79df07d 100644 --- a/src/components/panels/news_panel.jsx +++ b/src/components/panels/news_panel.jsx @@ -9,7 +9,7 @@ class NewsPanel extends React.Component { data: {} }; - this.fetchNews(3); + this.fetchNews(this.props.length || 10); } render() {