initial commit

This commit is contained in:
M. Gardner 2020-01-29 13:43:00 +02:00
commit a9bf5d12cc
3 changed files with 116 additions and 0 deletions

18
gen.php Normal file
View File

@ -0,0 +1,18 @@
<?php
$wordlist=parse_ini_file("wordlist.ini");
$title="Generic random generator";
if(isset($wordlist["title"])){
$title=$wordlist["title"];
}
$format=$wordlist["format"] or die("unspecified format");
$idea="";
foreach($format as $part){
$idea.=$wordlist[$part][array_rand($wordlist[$part])].' ';
}
?>

54
ideas.php Normal file
View File

@ -0,0 +1,54 @@
<?php
/*
* ideas.php
*
* Copyright 2020 Mark Gardner <mark@gaffer>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301, USA.
*
*
*/
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<?php
require "gen.php";
?>
<title><?php echo $title;?></title>
<meta http-equiv="content-type" content="text/html;charset=utf-8" />
<meta name="generator" content="Geany 1.33" />
<link rel=stylesheet type="text/css" href=style.css />
</head>
<body>
<div class=container>
<div id=r1><h1><?php echo $title;?></h1></div>
<div class=idea>
<div>
<?php
echo $idea;
?>
</div>
</div>
<div id=r2></div>
</div>
</body>
</html>

44
style.scss Normal file
View File

@ -0,0 +1,44 @@
html{
// background-color:#610045;
background-color:#1b0061;
min-height:100%;
}
body{
min-height:100%;
}
.container{
padding:5em;
display:grid;
grid-template-columns:45% auto 45%;
grid-template-rows:45% auto 45%;
min-height:100%;
height:100%;
}
#r1{
grid-row-start:1;
grid-row-end:1;
grid-column-start:2;
grid-column-end:2;
min-height:100%;
}
#r2{
grid-row-start:3;
grid-row-end:3;
min-height:100%;
}
.idea{
div{
padding:2em;
background-color:#00611b;
color:#eeffa8;
}
grid-column-start:2;
grid-column-end:2;
grid-row-start:2;
grid-row-end:2;
}