Commit 85327198 authored by Mark Repka's avatar Mark Repka

Improvements

parent 48fb1145
......@@ -5,7 +5,7 @@ import { Helmet } from "react-helmet";
import Header from "./header";
import Footer from "./footer";
const Layout = ({ children, pagetitle, description }) => {
const Layout = ({ children, pagetitle, description, displayClass = null }) => {
if (!pagetitle) {
pagetitle = "Mark R. Repka";
}
......@@ -14,6 +14,11 @@ const Layout = ({ children, pagetitle, description }) => {
description = "";
}
let classes = ["main-page-area"];
if (displayClass) {
classes.push(displayClass);
}
return (
<>
<Helmet>
......@@ -39,7 +44,7 @@ const Layout = ({ children, pagetitle, description }) => {
<link rel="manifest" href="/icons/repkam09.webmanifest"></link>
</Helmet>
<Header />
<section className="main-page-area">{children}</section>
<section className={classes.join(" ")}>{children}</section>
<Footer />
</>
);
......
......@@ -77,6 +77,8 @@ const PageTemplate = ({ path, location, uri, pageContext, pathContext }) => {
return (
<Layout pagetitle="RepCast Browser" description="RepCast File Browser">
<section className="page-content-wrapper">
<h1 className="page-content-title">RepCast File Browser</h1>
<p className="page-content-subtitle">This page is currently under construction and is not completely functional yet, if at all.</p>
<section className="page-content">
{controls}
{files}
......
......@@ -5,18 +5,30 @@ import RepLink from "src/components/generic/replink";
const PageTemplate = () => {
return (
<Layout pagetitle="RepCast Download" description="RepCast Download">
<section className="page-content-wrapper center">
<h1 className="page-content-title">RepCast Download</h1>
<section className="page-content">
<h1>
<RepLink url="https://repkam09.com/dl/repcast/repcast.apk">
Android Application Download
</RepLink>
</h1>
<section className="page-content-wrapper">
<h1 className="page-content-title">RepCast Downloads</h1>
<div className="page-content-spacer-1" />
<section className="page-content-flex">
{createProjectEntry("Android Application", "https://repkam09.com/dl/repcast/repcast.apk", "Download", "Download and install the RepCast Android application to play, cast, and download media to your phone", 1)}
{createProjectEntry("Web Application", "/dl/browser/", "View in Browser", "View the RepCast file list here in your browser, this is a work in progress and not yet complete", 1)}
{createProjectEntry("Upload Files", "/dl/repcast/upload/", "View in Browser", "Add files to RepCast in the form of a file upload, magnet link, or torrent file", 1)}
</section>
</section>
</Layout>
);
};
function createProjectEntry(title, link, linktext, paragraph, key) {
return (
<div className="tools-feature-wrapper" key={key}>
<h1 className="page-content-subtitle">{title}</h1>
<p>{paragraph}</p>
<RepLink url={link} >
<span>{linktext}</span>
</RepLink>
</div>
);
}
export default PageTemplate;
import React from "react";
import Layout from "src/components/generic/layout";
import RepLink from "src/components/generic/replink";
const PageTemplate = () => {
return (
<Layout pagetitle="RepCast Download" description="RepCast Download">
<section className="page-content-wrapper center">
<h1 className="page-content-title">RepCast File Upload</h1>
<p className="page-content-subtitle">This page is currently under construction and is not completely functional yet, if at all.</p>
<section className="page-content">
</section>
</section>
</Layout>
);
};
export default PageTemplate;
import React, { useEffect, useState } from "react";
import Layout from "src/components/generic/layout";
import RepLink from "src/components/generic/replink";
import Helmet from "react-helmet";
import Header from "src/components/generic/header";
import Footer from "src/components/generic/footer";
const VideLivestream = ({ path, location, uri, pageContext, pathContext }) => {
......@@ -37,37 +33,15 @@ const VideLivestream = ({ path, location, uri, pageContext, pathContext }) => {
return (
<>
<Helmet>
<title>Livestream</title>
<meta name="Description" content="Video Livestream" />
<link
rel="apple-touch-icon"
sizes="180x180"
href="/icons/apple-touch-icon.png"
/>
<link
rel="icon"
type="image/png"
sizes="32x32"
href="/icons/favicon-32x32.png"
/>
<link
rel="icon"
type="image/png"
sizes="16x16"
href="/icons/favicon-16x16.png"
/>
<link rel="manifest" href="/icons/repkam09.webmanifest"></link>
<script src="/js/dash.all.min.js"></script>
</Helmet>
<Header />
<section className="main-page-area bgdark">
<Layout pagetitle="Livestream" description="Livestream" displayClass="bgdark">
<section className="page-content-wrapper">
<section className="page-content">
{videoPlayer}
</section>
</section>
</section>
<Footer />
</Layout>
</>
);
};
......
......@@ -11,11 +11,13 @@ const PageTemplate = () => {
return;
}
updateWeather(null)
//updateWeather(null)
fetch("https://api.repkam09.com/api/weather/current/zip/" + zipcode)
.then(response => response.json()) // parse JSON from request
.then(response => { if (response.ok) { return response.json() } else { return false } }) // parse JSON from request
.then(resultData => {
updateWeather(resultData);
if (resultData) {
updateWeather(resultData);
}
});
}, [zipcode]);
......@@ -34,6 +36,7 @@ const PageTemplate = () => {
weatherdata = (
<>
<img src={"http://openweathermap.org/img/wn/" + weather.icon + "@2x.png"}></img>
<h1>{name}</h1>
<h1>{capFirst(weather.description)}</h1>
<h3>
......@@ -53,19 +56,20 @@ const PageTemplate = () => {
)
}
return (
<Layout pagetitle={"Weather " + name} description="Weather">
<section className="page-content-wrapper">
<section className="page-content center">
<span>
<input inputmode="numeric" pattern="[0-9]{5}" className="weather-user-input" id="zip-code-input" defaultValue="14586" onChange={(event) => { updateZipcode(event.currentTarget.value) }} />
</span>
<div className="page-content-spacer-3" />
<div className="page-content-spacer-3" />
{weatherdata}
<div className="page-content-spacer-3" />
<span>
<input inputmode="numeric" pattern="[0-9]{5}" className="weather-user-input" id="zip-code-input" defaultValue="14586" onChange={(event) => { updateZipcode(event.currentTarget.value) }} />
</span>
</section>
</section>
</Layout>
......
......@@ -263,7 +263,21 @@ li {
}
.weather-user-input {
text-align: center;
width: 8em;
box-sizing: border-box;
border: 2px solid #eee;
border-radius: 4px;
font-size: 16px;
background-color: white;
background-image: url('/images/searchicon.png');
background-position: 7px 7px;
background-repeat: no-repeat;
padding: 8px 1px 8px 40px;
color: #777
}
.lighttext {
color: gray;
}
@media only screen and (max-width: 800px) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment