List classes and dummy forum data
This commit is contained in:
1 parent
9e88608877
commit
5107775913
7 files changed
+2006
-282
No files matched your search
Vendored
+99
@@ -0,0 +1,99 @@
|
||||
@font-face {
|
||||
font-family: 'LCARS';
|
||||
src: url('./fonts/lcarsgtj3-webfont.eot');
|
||||
src: url('./fonts/lcars.ttf') format('embedded-opentype'), url('/fonts/lcars.ttf') format('truetype');
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'LCARS Lower';
|
||||
src: url('/web/20160330232832im_/http://lcarssdk.org/lcarssdk/fonts/lcarsunknown.eot');
|
||||
src: url('/web/20160330232832im_/http://lcarssdk.org/lcarssdk/fonts/lcarsunknown.eot#iefix') format('embedded-opentype'), url('/web/20160330232832im_/http://lcarssdk.org/lcarssdk/fonts/lcarsunknown.ttf') format('truetype');
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'LCARS Block';
|
||||
src: url('/web/20160330232832im_/http://lcarssdk.org/lcarssdk/fonts/LCARS-Block.eot');
|
||||
src: url('/web/20160330232832im_/http://lcarssdk.org/lcarssdk/fonts/LCARS-Block.eot#iefix') format('embedded-opentype'), url('/web/20160330232832im_/http://lcarssdk.org/lcarssdk/fonts/LCARS-Block.ttf') format('truetype');
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
|
||||
:root{
|
||||
--space1: 5px;
|
||||
--textpadding1: 5px 10px;
|
||||
--regText: 'Open Sans', sans-serif;
|
||||
--fancyText: 'LCARS', sans-serif;
|
||||
--hoverBack: #cdf;
|
||||
--hoverText: #821;
|
||||
--lcarsFirst: #cc6699;
|
||||
--lcarsSecond: #ff9933;
|
||||
--lcarsThird: #99ccff;
|
||||
--lcarsGrey: #171113;
|
||||
--lcarsMid: #241721;
|
||||
}
|
||||
|
||||
|
||||
html, body{
|
||||
margin:0;
|
||||
padding:0;
|
||||
background: var(--lcarsGrey);
|
||||
color:#fff;
|
||||
font-family: var(--fancyText);
|
||||
|
||||
font-size:1.4em;
|
||||
letter-spacing: 0.05em;
|
||||
}
|
||||
|
||||
h1,h2,h3,h4,h5 {
|
||||
letter-spacing: 0.05em;
|
||||
font-family: var(--regText);
|
||||
text-transform: uppercase;
|
||||
margin: 0.5em;
|
||||
padding: 0.5em;
|
||||
}
|
||||
|
||||
/* Layout Related */
|
||||
|
||||
.mainContainer{
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
}
|
||||
|
||||
.left {
|
||||
flex: 4;
|
||||
}
|
||||
|
||||
.right {
|
||||
flex: 5;
|
||||
}
|
||||
|
||||
/* Other Shit */
|
||||
|
||||
.heading {
|
||||
margin: 1em;
|
||||
font-size: 2em;
|
||||
}
|
||||
|
||||
.course-list {
|
||||
margin: 2em;
|
||||
border-radius: 0.6em;
|
||||
border: 1px solid var(--lcarsMid);
|
||||
padding: 1em;
|
||||
}
|
||||
|
||||
.subject {
|
||||
font-family: var(--regText);
|
||||
text-transform: uppercase;
|
||||
font-size: 0.7em;
|
||||
color: var(--lcarsSecond);
|
||||
}
|
||||
|
||||
.course-list:hover {
|
||||
background: var(--lcarsMid);
|
||||
color: var(--hoverBack);
|
||||
}
|
||||
Vendored
+1
-1
@@ -1,7 +1,7 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>LCARS</title>
|
||||
<link rel="stylesheet" type="text/css" href="./css/main.css">
|
||||
<link rel="stylesheet" type="text/css" href="./css/dev.css">
|
||||
<link href="https://fonts.googleapis.com/css?family=Open+Sans|Orbitron" rel="stylesheet">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
Vendored
+5
@@ -0,0 +1,5 @@
|
||||
<html>
|
||||
<body>
|
||||
<table role="list" class="F0XO1GC-p-o" cellspacing="0" cellpadding="0"><colgroup><col class=""></colgroup><tbody class="F0XO1GC-p-w"><tr class="F0XO1GC-p-Y selected"><td><div tabindex="0" id="topic_row_MSXGLTIwI4Y" role="listitem"><input tabindex="-1" aria-hidden="true" style="opacity: 0; height: 1px; width: 1px; z-index: -1; overflow: hidden; position: absolute;" type="text"><div class="F0XO1GC-p-p F0XO1GC-p-t"><div class="F0XO1GC-rb-w"> <div class="F0XO1GC-rb-e"><div aria-label="Byron Hynes's profile photo" class="g-hovercard" data-userid="104074696437323582937" data-name="Byron Hynes"><img class="gwt-Image" src="https://www.google.com/s2/photos/public/AIbEiAIAAABDCNmb45Gj2o7GOCILdmNhcmRfcGhvdG8qKGZjZTYzNTdiNmY0ZDA0MTgzNzEzY2U4NmNhNTEzMWE2NmNkNzk0MjAwAWDhzDZ_xB5qMU9xtIfRCTlzNAN_?authuser=0&sz=34" style="width: 34px; height: 34px;"></div></div> <div tabindex="0" class="F0XO1GC-H-d F0XO1GC-rb-q" role="button" aria-pressed="false" title="Star this topic" style="display: none;" aria-hidden="true"><input tabindex="-1" aria-hidden="true" style="opacity: 0; height: 1px; width: 1px; z-index: -1; overflow: hidden; position: absolute;" type="text"><div class="F0XO1GC-H-c"></div><span></span></div> <span style="display: none;" class="F0XO1GC-rb-x" aria-hidden="true"><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAWElEQVR4XmOYOXPmeyD+TwZ+zwACWCSIxoPUAGSAjT8EDADhnTt3omhA5xM0AARu3ryJk0/QAGLx4DGAsryADJAkz0+fPl0BXZ4ggGmeP3++ALocUYAczQAcPFI0HUr25QAAAABJRU5ErkJggg==" class="F0XO1GC-b-ac" id="i_discussion_MSXGLTIwI4Y" title="Discussion" width="16" height="16"></span> <div class="F0XO1GC-rb-h" style="right: 67px;"> <div class="F0XO1GC-rb-u"> <div class="F0XO1GC-rb-v"> <span style="display: none"></span> </div> <div class="F0XO1GC-rb-t"> <a class="F0XO1GC-p-Q" href="#!topic/protospace-discuss/MSXGLTIwI4Y" id="l_topic_title_MSXGLTIwI4Y">More parking problems - Photos and an important message</a> <span class="F0XO1GC-rb-z" style="">(21)</span> <span class="gwt-InlineLabel F0XO1GC-b-Qb F0XO1GC-b-l" style="display: none;" aria-hidden="true">Completed</span> </div> </div> <div class="F0XO1GC-rb-p" style="display: none" aria-hidden="true"></div> <div class="F0XO1GC-rb-c"> <div class="F0XO1GC-rb-d"> <div class="F0XO1GC-rb-b">By Byron Hynes</div> <span class="F0XO1GC-rb-r">21 posts</span> <span class="F0XO1GC-rb-r" style="">101 views</span> <span class="F0XO1GC-rb-r" style="display: none;" aria-hidden="true"> updated <span title="Sunday, March 11, 2018 at 10:53:46 PM UTC-6">Mar 11</span> </span> <span class="F0XO1GC-b-Qb F0XO1GC-b-L" style="display: none;" aria-hidden="true"></span> <span style="display: none;" aria-hidden="true" class="F0XO1GC-b-Qb F0XO1GC-b-S"></span> <span class="gwt-InlineLabel F0XO1GC-b-Qb F0XO1GC-b-qb" style="display: none;" aria-hidden="true"></span> <span class="gwt-InlineLabel F0XO1GC-b-Qb F0XO1GC-b-fb" style="display: none;" aria-hidden="true"></span> <span style="display: none;" aria-hidden="true" class="F0XO1GC-b-Qb F0XO1GC-b-mb"><span></span></span> <span style="display: none;" aria-hidden="true" class="F0XO1GC-b-lb" aria-label="Locked"></span> <span style=""><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA8AAAAQCAYAAADJViUEAAAAXUlEQVR4XmNgoCZIS0v7jwujq8UAQEXv0TVB8Xt0tRggNTXVAIvG/yBxdLVYAbpGEEZXgxOgaxwimskC0JDGGVV4QxyooB+LJmTcgK4HJwBpQBcjGgyo5vvoYlQDALughXmEE5kZAAAAAElFTkSuQmCC" class="gwt-Image" width="15" height="16"></span> <span style="display:none;"> <span style="" class="F0XO1GC-rb-y"><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAWElEQVR4XmOYOXPmeyD+TwZ+zwACWCSIxoPUAGSAjT8EDADhnTt3omhA5xM0AARu3ryJk0/QAGLx4DGAsryADJAkz0+fPl0BXZ4ggGmeP3++ALocUYAczQAcPFI0HUr25QAAAABJRU5ErkJggg==" class="F0XO1GC-b-ac" id="i_discussion_MSXGLTIwI4Y" title="Discussion" width="16" height="16"></span> </span> <span class="F0XO1GC-rb-i" style="display:none;"> In <a class="gwt-Anchor F0XO1GC-c-a" href="javascript:;"></a> </span> </div> </div> </div> <div aria-hidden="true" class="F0XO1GC-rb-f" style="display:none;"> </div> <div aria-hidden="true" class="F0XO1GC-rb-n" style="display: none;"> <span><span class="F0XO1GC-Ub-a" style="display: none;" aria-hidden="true"><span></span> -</span> <span class="F0XO1GC-Ub-c"><div aria-label="Matt Mulrooney's profile photo" class="g-hovercard" data-userid="101904165164399468279" data-name="Matt Mulrooney"><img class="gwt-Image" src="https://www.google.com/s2/photos/public/AIbEiAIAAABDCPe90M2NhL22GiILdmNhcmRfcGhvdG8qKDBlYTFlNWNhNDVhNzA0MGVlODUyMDI0ODFiYWMxMWE5ZTZkYjgwZmMwAQmWbeOSG9zWBOfNGFhHzZ4fJ870?authuser=0&sz=19" style="width: 19px; height: 19px;"></div><div aria-label="Byron Hynes's profile photo" class="g-hovercard" data-userid="104074696437323582937" data-name="Byron Hynes"><img class="gwt-Image" src="https://www.google.com/s2/photos/public/AIbEiAIAAABDCNmb45Gj2o7GOCILdmNhcmRfcGhvdG8qKGZjZTYzNTdiNmY0ZDA0MTgzNzEzY2U4NmNhNTEzMWE2NmNkNzk0MjAwAWDhzDZ_xB5qMU9xtIfRCTlzNAN_?authuser=0&sz=19" style="wiLine truncated
|
||||
</body>
|
||||
</html>
|
||||
Generated
+1833
-276
File diff suppressed because it is too large.
Load diff
@@ -3,12 +3,42 @@ const cheerio = require('cheerio');
|
||||
const express = require('express')
|
||||
const app = express()
|
||||
|
||||
app.use((req, res, next) => {
|
||||
res.header('Access-Control-Allow-Origin', '*');
|
||||
res.header('Access-Control-Allow-Headers', 'Origin, X-Requested-With, Content-Type, Accept');
|
||||
next();
|
||||
});
|
||||
|
||||
app.use('/', express.static('dist'))
|
||||
app.use('/psboard', express.static('dist/shit/psboard.html'))
|
||||
|
||||
app.get('/hello', (req, res) => {
|
||||
res.send('Hello World!')
|
||||
})
|
||||
|
||||
app.get('/api/data/psboard', (req, res) => {
|
||||
request('http://localhost:3000/psboard', (error, response, html) => {
|
||||
if (!error && response.statusCode == 200) {
|
||||
const $ = cheerio.load(html);
|
||||
let psboard = [];
|
||||
|
||||
$('.F0XO1GC-p-w').children().each((i, elem) => {
|
||||
psboard[i] = {
|
||||
subject: $(elem).find('.F0XO1GC-p-Q').text(),
|
||||
author: $(elem).find('.F0XO1GC-rb-b').text(),
|
||||
last_update: $(elem).find('.F0XO1GC-rb-g').children().attr('title'),
|
||||
number_of_posts: $(elem).find('.F0XO1GC-rb-r').eq(0).text(),
|
||||
number_of_views: $(elem).find('.F0XO1GC-rb-r').eq(1).text(),
|
||||
user_pic: $(elem).find('.gwt-Image').attr('src')
|
||||
}
|
||||
});
|
||||
|
||||
res.setHeader('Content-Type', 'application/json');
|
||||
res.send(psboard);
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
app.get('/api/data/classes', (req, res) => {
|
||||
request('https://my.protospace.ca/school', (error, response, html) => {
|
||||
if (!error && response.statusCode == 200) {
|
||||
@@ -29,6 +59,7 @@ app.get('/api/data/classes', (req, res) => {
|
||||
});
|
||||
})
|
||||
|
||||
|
||||
app.listen(3000, function () {
|
||||
console.log('Example app listening on port 3000!')
|
||||
})
|
||||
+5
-1
@@ -14,7 +14,11 @@ class RightBottom extends Component {
|
||||
|
||||
<div className="dataBottomRight">
|
||||
<div className="lcarsHorizontalBottom">lcars horiz</div>
|
||||
<div className="dataRightLower">Main Data</div>
|
||||
<div className="dataRightLower">
|
||||
|
||||
Shit.
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
||||
+32
-4
@@ -1,21 +1,49 @@
|
||||
import React from 'react';
|
||||
import LeftColumn from './LeftColumn';
|
||||
import RightContainer from './RightContainer';
|
||||
|
||||
const SERVER_URL = 'http://localhost:3000/'
|
||||
|
||||
export default class Site extends React.Component {
|
||||
|
||||
constructor(props){
|
||||
super(props);
|
||||
|
||||
this.state = {};
|
||||
this.state = {
|
||||
classesData: [],
|
||||
componentMounted: false
|
||||
};
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
fetch(SERVER_URL + 'api/data/classes')
|
||||
.then(response => response.json())
|
||||
.then(data => this.setState({classesData: data}))
|
||||
}
|
||||
|
||||
// <LeftColumn />}
|
||||
// <RightContainer />
|
||||
|
||||
render() {
|
||||
|
||||
console.log(this.state)
|
||||
|
||||
return (
|
||||
<div className="mainContainer">
|
||||
<LeftColumn />
|
||||
<RightContainer />
|
||||
|
||||
<div className="left">
|
||||
<div className="heading">Upcoming Classes</div>
|
||||
{this.state.classesData.map((item, i) =>
|
||||
<div className='course-list'>
|
||||
<div className='subject'>{item.subject}</div>
|
||||
<div className='date'>{item.date}</div>
|
||||
</div>)}
|
||||
</div>
|
||||
|
||||
<div className="right">
|
||||
<div className="heading">Posts</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user