1
0
mirror of https://github.com/beestat/app.git synced 2025-05-24 02:14:03 -04:00

Added app welcome page

This commit is contained in:
Jon Ziebell 2023-10-20 06:42:54 -04:00
parent f643e8cb1a
commit a4392c37f7
2 changed files with 172 additions and 3 deletions

View File

@ -20,9 +20,6 @@
$_COOKIE['session_key'] = 'd31d3ef451fe65885928e5e1bdf4af321f702009';
}
require_once 'api/cora/setting.php';
$setting = cora\setting::get_instance();
// If you're not logged in, just take you directly to the ecobee login page.
if(isset($_COOKIE['session_key']) === false) {
header('Location: https://' . $_SERVER['HTTP_HOST'] . '/api/?resource=ecobee&method=authorize&arguments={}&api_key=' . $setting->get('beestat_api_key_local'));

172
welcome/index.php Normal file
View File

@ -0,0 +1,172 @@
<?php
require 'api/cora/setting.php';
$setting = cora\setting::get_instance();
// If you're not logged in, just take you directly to the ecobee login page.
if(isset($_COOKIE['session_key']) === false) {
header('Location: https://' . $_SERVER['HTTP_HOST'] . '/api/?resource=ecobee&method=authorize&arguments={}&api_key=' . $setting->get('beestat_api_key_local'));
die();
}
?>
<!doctype html>
<html>
<head>
<title>beestat</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport" content="initial-scale=1,maximum-scale=1,user-scalable=no">
<meta name="theme-color" content="#263238">
<style type="text/css">
@font-face{
font-family:"Montserrat";
font-weight:200;
font-style:normal;
src:url("../font/montserrat/montserrat_200.eot?") format("embedded-opentype"),url("../font/montserrat/montserrat_200.woff") format("woff"),url("../font/montserrat/montserrat_200.ttf") format("truetype"),url("../font/montserrat/montserrat_200.svg#Montserrat") format("svg")
}
@font-face{
font-family:"Montserrat";
font-weight:300;
font-style:normal;
src:url("../font/montserrat/montserrat_300.eot?") format("embedded-opentype"),url("../font/montserrat/montserrat_300.woff") format("woff"),url("../font/montserrat/montserrat_300.ttf") format("truetype"),url("../font/montserrat/montserrat_300.svg#Montserrat") format("svg")
}
@font-face{
font-family:"Montserrat";
font-weight:500;
font-style:normal;
src:url("../font/montserrat/montserrat_500.eot?") format("embedded-opentype"),url("../font/montserrat/montserrat_500.woff") format("woff"),url("../font/montserrat/montserrat_500.ttf") format("truetype"),url("../font/montserrat/montserrat_500.svg#Montserrat") format("svg")
}
html {
box-sizing: border-box;
}
*, *:before, *:after {
box-sizing: inherit;
}
body {
padding: 0;
margin: 0;
background: #2f3d44;
font-family: Montserrat;
overflow-x: hidden;
}
a {
color: #0fb9b1;
text-decoration: none;
transition: color 200ms ease;
}
.logo {
display: inline-block;
vertical-align: middle;
margin-right: 8px;
}
hr {
height: 2px;
border: none;
background: #38474f;
}
/* Specific to this page. */
header {
padding: 20px;
}
main {
background: #3bdf83;
padding: 80px 0 80px 0;
transform: skewY(-2deg);
transform-origin: top left;
margin-bottom: 48px;
}
.inner {
max-width: 980px;
padding: 0 32px 0 32px;
margin: auto;
}
.main_row {
transform: skewY(2deg);
transform-origin: top left;
align-items: center;
text-align: center;
}
.main_text {
color: #2f3d44;
font-size: 19px;
margin-bottom: 24px;
font-weight: 500;
}
.about {
line-height: 36px;
color: #fff;
font-size: 14px;
font-weight: 300;
text-align: center;
margin-bottom: 48px;
}
button {
border: none;
font-size: 17px;
border-radius: 3px;
padding: 10px;
font-family: Montserrat;
font-weight: 300;
display: inline-block;
cursor: pointer;
transition: background 200ms ease, border-color 200ms ease, color 200ms ease;
}
button.yellow {
background: #fed330;
border: 1px solid #fed330;
color: #2f3d44;
}
button:hover {
background: #20b364;
border-color: #20b364;
color: #fff;
}
@media only screen and (max-width: 470px) {
button {
display: block;
width: 100%;
margin-bottom: 24px;
}
}
</style>
</head>
<body>
<header>
<img class="logo" src="../logo.png" height="48" alt="beestat logo"/>
</header>
<main>
<div class="inner">
<div class="main_row">
<div class="main_text">
Data analytics and home comparisons for your smart thermostat
</div>
<div>
<a href="https://app.beestat.io/"><button class="yellow">Connect my ecobee</button></a>
</div>
</div>
</div>
</main>
<section class="inner about">
<hr/>
Beestat connects with your thermostat and provides you with useful charts and analytics so that you can make informed decisions and see how changes you make lower your energy footprint.
<hr/>
</section>
</body>
</html>