Changed the color scheme

This commit is contained in:
2019-05-23 11:26:54 +10:00
parent 8b6c506790
commit 378520d50a
3 changed files with 21 additions and 10 deletions
+1
View File
@@ -1,5 +1,6 @@
Hello World! Hello World!
--- ---
_22 May 2019_
Oh, um... OK, let's start then! Welcome to Kingdom Battles where you can fight for your life and the honour of being at the top of the ladder! Well, as soon as the ladder is implemented... Oh, um... OK, let's start then! Welcome to Kingdom Battles where you can fight for your life and the honour of being at the top of the ladder! Well, as soon as the ladder is implemented...
+16 -4
View File
@@ -13,13 +13,13 @@ body {
flex-direction: column; flex-direction: column;
overflow-x: hidden; overflow-x: hidden;
overflow-y: auto; overflow-y: auto;
background-color: #000000; background-color: #111111;
color: white; color: white;
} }
h1 { h1 {
font-size: 24pt; font-size: 24pt;
color: red; color: pink;
} }
h2 { h2 {
@@ -44,6 +44,10 @@ ul {
padding-bottom: .5rem; padding-bottom: .5rem;
} }
a {
color: lightblue;
}
.centered { .centered {
text-align: center; text-align: center;
} }
@@ -171,22 +175,30 @@ footer {
} }
} }
/* News panel */ /* main panel */
.mainPanel { .mainPanel {
margin-left: 15px; margin-left: 30px;
flex: 1; flex: 1;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
justify-content: flex-start; justify-content: flex-start;
} }
@media screen and (max-width: 768px) {
.mainPanel {
margin-left: 15px;
}
}
@media screen and (max-width: 480px) { @media screen and (max-width: 480px) {
.mainPanel { .mainPanel {
margin-left: 0;
align-self: stretch; align-self: stretch;
width: auto; width: auto;
} }
} }
/* profile page */
.table { .table {
flex: 1; flex: 1;
display: flex; display: flex;
+4 -6
View File
@@ -9,18 +9,18 @@ class NewsPanel extends React.Component {
data: {} data: {}
}; };
this.fetchNews(); this.fetchNews(3);
} }
render() { render() {
return ( return (
<div> <div>
{Object.keys(this.state.data).map((key, index) => <div key={key}><ReactMarkdown source={this.state.data[key]} escapeHTML={false} /><hr /></div> )} {Object.keys(this.state.data).map((key) => <div key={key}><ReactMarkdown source={this.state.data[key]} escapeHTML={false} /><hr /></div> )}
</div> </div>
); );
} }
fetchNews() { fetchNews(max = 3) {
//build the XHR //build the XHR
let xhr = new XMLHttpRequest(); let xhr = new XMLHttpRequest();
@@ -34,9 +34,7 @@ class NewsPanel extends React.Component {
xhr.open('POST', '/newsrequest', true); xhr.open('POST', '/newsrequest', true);
xhr.setRequestHeader('Content-Type', 'application/json; charset=UTF-8'); xhr.setRequestHeader('Content-Type', 'application/json; charset=UTF-8');
xhr.send(JSON.stringify({ xhr.send(JSON.stringify({ max: max }));
max: 3
}));
} }
}; };