Browse Source

Reworked e-mail submission and footer

dev
Sigrid Jensen 2 years ago
parent
commit
857229a25b
  1. 64
      includes/footer.php
  2. 4
      index.css
  3. 41
      index.php
  4. 2
      services/matrix/index.php
  5. 2
      services/nextcloud/index.php

64
includes/footer.php

@ -1,67 +1,5 @@
<div class="ui inverted vertical fooer segment" style="padding: 5em 0em;">
<div class="ui inverted vertical footer segment" style="padding: 5em 0em 8em;">
<div class="ui center aligned container" style="max-width: 700px !important;">
<div class="ui stackalbe inverted divided grid">
<div class="four wide column">
<h4 class="ui inverted header">Om os</h4>
<div class="ui inverted link list">
<a class="item" href="#">
Om Fricloud
</a>
<a class="item" href="#">
Frivillige
</a>
<a class="item" href="#">
Kontakt
</a>
</div>
</div>
<div class="four wide column">
<h4 class="ui inverted header">Tjenester</h4>
<div class="ui inverted link list">
<a class="item" href="#">
Nextcloud
</a>
<a class="item" href="#">
Github
</a>
<a class="item" href="#">
Matrix
</a>
<a class="item" href="#">
Etherpad
</a>
<a class="item" href="#">
Mastodon
</a>
<a class="item" href="#">
E-mail
</a>
</div>
</div>
<div class="four wide column">
<h4 class="ui inverted header">Guides</h4>
<div class="ui inverted link list">
<!--<a class="item" href="#">
item1
</a>
<a class="item" href="#">
item1
</a>
<a class="item" href="#">
item1
</a>-->
</div>
</div>
<div class="four wide column">
<h4 class="ui inverted header">Forening</h4>
<div class="ui inverted link list">
<a class="item" href="#">
Nyheder
</a>
</div>
</div>
</div>
<div class="ui inverted section divider"></div>
<img class="ui centered small image" src="/images/logo_sky_fricloud.svg" alt="Fricloud logo"/>
<div class="ui horizontal inverted small divided link list">
<a class="item" href="https://www.gnu.org/licenses/agpl-3.0.en.html">

4
index.css

@ -17,12 +17,12 @@
.ui.text.container{
max-width: 450px !important;
padding-bottom: 2em;
}
.image-segment{
height: 41rem;
background-image: url("images/background_design.jpg");
background-position: center;
background-position: top;
background-size: cover;
text-align: center;
}

41
index.php

@ -1,3 +1,4 @@
<?php error_reporting (E_ALL); ?>
<html>
<head>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css"/>
@ -19,18 +20,38 @@
<h2 class="ui inverted header" style="margin-top: 2em !important; font-size: 2em;">
Bliv medlem af foreningen
</h2>
<p class=image-p" style="color: white; font-size: 1.3em;">
<p class=image-p" style="color: white; font-size: 1.3em; padding-bottom: 2em;">
Fricloud forening er for os der mener vores privatliv ikke skal være til salg. Medlemskab, der giver adgang til alle tjenester foreningens servere, vil koste et mindre beløb om måneden.
</p>
<!--<a class="ui huge inverted button" href="#">
Bliv medlem
</a>-->
<?php
$f = fopen("/var/emails", 'a');
$email = '';
if (isset($_POST['email'])) $email = $_POST['email'];
$emailErr = true;
if (filter_var($email, FILTER_VALIDATE_EMAIL)) {
$emailErr = false;
fwrite($f, $email . "\n");
}
fclose($f);
?>
<div class="ui form">
<form onsubmit="submitMail()" action="#">
<form method="post" action="#">
<?php
if ($email != '') {
if ($emailErr) {
echo "<div class=\"ui negative message\"><p>Invalid e-mail adresse</p></div>";
} else {
echo "<div class=\"ui positive message\"><p>Vi har modtaget din e-mail adresse!</p></div>";
}
}
?>
<div class="field">
<input type="text" name="email-input" placeholder="E-mail"/>
<input type="text" name="email" placeholder="E-mail"/>
</div>
<button class="ui button" type="submit">Send mig en mail når Fircloud er klar</button>
<button class="ui button" type="submit">Send mig en mail når Fricloud er klar</button>
</form>
</div>
</div>
@ -131,18 +152,6 @@
</div>
</div>
<?php include($_SERVER['DOCUMENT_ROOT'].'/includes/footer.php'); ?>
<!--<script src="https://cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.js"></script>-->
<script>
function submitMail() {
if (confirm("Giver du samtykke til at Fricloud gemmer din e-mail, til at sende en notifikation når tjenesten åbner?")) {
var xmlHttp = new XMLHttpRequest();
xmlHttp.open( "GET", "https://fricloud.dk/submit?addr=" + document.getElementById('email-input').value, false ); // false for synchronous request
xmlHttp.send( null );
alert("Din e-mail er modtaget");
}
}
</script>
</body>
<!--
<div class="section bg-primary text-light text-center form-group form-horizontal">

2
services/matrix/index.php

@ -8,7 +8,7 @@
</head>
<body>
<?php include($_SERVER['DOCUMENT_ROOT'].'/includes/navbar.php'); ?>
<div class="ui container" style="margin: 5rem 8rem; padding-bottom: 10rem;">
<div class="ui container" style="margin: 5rem 8rem; padding-bottom: 270px;">
<div class="ui text container">
<div class="ui basic segment" id="context">
<div class="ui left close dividing rail" style="width: 200px !important; top: 3rem;">

2
services/nextcloud/index.php

@ -8,7 +8,7 @@
</head>
<body>
<?php include($_SERVER['DOCUMENT_ROOT'].'/includes/navbar.php'); ?>
<div class="ui container" style="margin: 5rem 8rem;">
<div class="ui container" style="margin: 5rem 8rem; padding-bottom: 40px">
<div class="ui text container">
<div class="ui basic segment" id="context">
<div class="ui left close dividing rail" style="width: 200px !important; top: 3rem;">

Loading…
Cancel
Save