diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..9822342 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +# Ignore files that may contain irrelevant content or secrets +config.php +creds.php diff --git a/README b/README new file mode 100644 index 0000000..f822da5 --- /dev/null +++ b/README @@ -0,0 +1,5 @@ +~ m o o d b l o g ~ + +to set up: +1: copy templates/config.def.php to templates/config.php and change the placeholders +2: copy creds.def.php to creds.php and change the placeholders diff --git a/creds.def.php b/creds.def.php new file mode 100644 index 0000000..e39990d --- /dev/null +++ b/creds.def.php @@ -0,0 +1,8 @@ + diff --git a/css/glazed-gray.css b/css/glazed-gray.css new file mode 100644 index 0000000..7290580 --- /dev/null +++ b/css/glazed-gray.css @@ -0,0 +1,97 @@ +html, body { + margin: 0px 5px 5px 5px; + background-color: #c0c0c0; +} +body { + margin: auto; + width: 728px; + font-family: sans-serif; +} +@media screen and (max-width: 728px) { + body { + width: 100%; + } +} +div.window-bar { + background: linear-gradient(180deg, rgba(128,128,128,1) 0%, rgba(54,54,54,1) 13%, rgba(51,51,51,1) 49%, rgba(29,29,29,1) 51%, rgba(4,4,4,1) 81%, rgba(0,0,0,1) 100%); + color: #ffffff; + /*padding: 2px 8px 2px 8px;*/ + padding: 4px 8px 4px 8px; +} +div.window { + background-color: #eeeeee; + margin-top: 10px; + margin-bottom: 10px; +} +div.window-content { + padding: 15px; + border: 2px solid #000000; + border-top: 0px; +} +.post-date { + float: right; +} +img.pfp { + float: left; + padding: 2px; + border: 2px solid #000000; + margin-right: 15px; + display: block; +} +div.bio { + grid-area: bio; +} +.clearfix::after { + content: ""; + clear: both; + display: table; +} +hr { + border: 1px solid #000000; +} +footer { + text-align: center; +} +a.options { + text-decoration: none; +} +a.options:visited { + color: #0000ee; +} +.monospace { + font-family: monospace; +} +img.mood { + vertical-align: middle; +} +div.hidden-info { + display: none; + font-family: monospace; +} +label.show-info { + color: #0000ee; + cursor: pointer; +} +label.show-info:active { + color: #ff0000; +} +input.show-info:checked ~ div.hidden-info { + display: flex; +} +pre.hidden-info { + margin: 5px 0px 0px 0px; +} +div.grid-container { + display: grid; + grid-template-columns: auto auto auto; +} +div.bio-grid-container { + display: grid; + /*grid-template-columns: 98px auto auto;*/ + grid-template-areas: + 'pfp bio'; +} +pre { + white-space: pre-wrap; + word-break: break-word; +} diff --git a/img/moods/alarmed.png b/img/moods/alarmed.png new file mode 100644 index 0000000..ff08cab Binary files /dev/null and b/img/moods/alarmed.png differ diff --git a/img/moods/angry.png b/img/moods/angry.png new file mode 100644 index 0000000..4193786 Binary files /dev/null and b/img/moods/angry.png differ diff --git a/img/moods/cheeky.png b/img/moods/cheeky.png new file mode 100644 index 0000000..89419d9 Binary files /dev/null and b/img/moods/cheeky.png differ diff --git a/img/moods/dumb.png b/img/moods/dumb.png new file mode 100644 index 0000000..8f5f33e Binary files /dev/null and b/img/moods/dumb.png differ diff --git a/img/moods/embarassed.png b/img/moods/embarassed.png new file mode 100644 index 0000000..94b763e Binary files /dev/null and b/img/moods/embarassed.png differ diff --git a/img/moods/evil.png b/img/moods/evil.png new file mode 100644 index 0000000..6fcbfb0 Binary files /dev/null and b/img/moods/evil.png differ diff --git a/img/moods/fat.png b/img/moods/fat.png new file mode 100644 index 0000000..565bdd9 Binary files /dev/null and b/img/moods/fat.png differ diff --git a/img/moods/frustrated.png b/img/moods/frustrated.png new file mode 100644 index 0000000..11ff92f Binary files /dev/null and b/img/moods/frustrated.png differ diff --git a/img/moods/happy.png b/img/moods/happy.png new file mode 100644 index 0000000..9ea8398 Binary files /dev/null and b/img/moods/happy.png differ diff --git a/img/moods/mad.png b/img/moods/mad.png new file mode 100644 index 0000000..bc39883 Binary files /dev/null and b/img/moods/mad.png differ diff --git a/img/moods/neutral.png b/img/moods/neutral.png new file mode 100644 index 0000000..6a68761 Binary files /dev/null and b/img/moods/neutral.png differ diff --git a/img/moods/ninja.png b/img/moods/ninja.png new file mode 100644 index 0000000..2a10a71 Binary files /dev/null and b/img/moods/ninja.png differ diff --git a/img/moods/no-mouth.png b/img/moods/no-mouth.png new file mode 100644 index 0000000..a21203a Binary files /dev/null and b/img/moods/no-mouth.png differ diff --git a/img/moods/old.png b/img/moods/old.png new file mode 100644 index 0000000..deea425 Binary files /dev/null and b/img/moods/old.png differ diff --git a/img/moods/questioning.png b/img/moods/questioning.png new file mode 100644 index 0000000..68f822e Binary files /dev/null and b/img/moods/questioning.png differ diff --git a/img/moods/sad.png b/img/moods/sad.png new file mode 100644 index 0000000..6d5b402 Binary files /dev/null and b/img/moods/sad.png differ diff --git a/img/moods/silly.png b/img/moods/silly.png new file mode 100644 index 0000000..ed0860d Binary files /dev/null and b/img/moods/silly.png differ diff --git a/img/moods/surprised.png b/img/moods/surprised.png new file mode 100644 index 0000000..ae3fbbb Binary files /dev/null and b/img/moods/surprised.png differ diff --git a/img/moods/tired.png b/img/moods/tired.png new file mode 100644 index 0000000..faab627 Binary files /dev/null and b/img/moods/tired.png differ diff --git a/img/moods/torn.png b/img/moods/torn.png new file mode 100644 index 0000000..0e099a4 Binary files /dev/null and b/img/moods/torn.png differ diff --git a/img/moods/what-a-night.png b/img/moods/what-a-night.png new file mode 100644 index 0000000..8e8b70a Binary files /dev/null and b/img/moods/what-a-night.png differ diff --git a/img/moods/whistle.png b/img/moods/whistle.png new file mode 100644 index 0000000..e25e02f Binary files /dev/null and b/img/moods/whistle.png differ diff --git a/img/pfp.png b/img/pfp.png new file mode 100644 index 0000000..1b56007 Binary files /dev/null and b/img/pfp.png differ diff --git a/index.php b/index.php new file mode 100644 index 0000000..4177d7d --- /dev/null +++ b/index.php @@ -0,0 +1,32 @@ +"; + echo "
"; + echo " ".$res['Title'].""; + echo " ".$res["DATE_FORMAT(Time, '%d-%m-%Y %H:%i')"].""; + echo "
"; + echo "
"; + echo " "; + echo " current mood: ".$res['Mood']; + echo " "; + echo "
"; + echo " "; + echo " current tunes: ".$res['Song']; + echo " "; + echo "
"; + echo $res['Message']; + echo "
"; + echo " share: "; + echo "
"; + echo ""; +} + +include('templates/footer.php'); +?> diff --git a/schema.sql b/schema.sql new file mode 100644 index 0000000..4d4d729 --- /dev/null +++ b/schema.sql @@ -0,0 +1,9 @@ +CREATE TABLE IF NOT EXISTS articles ( + ID INT NOT NULL AUTO_INCREMENT primary key, + Time TIMESTAMP, + Title VARCHAR(512) NOT NULL, + Mood VARCHAR(256), + MoodImage VARCHAR(256), + Song VARCHAR(256), + Message MEDIUMTEXT NOT NULL +); diff --git a/templates/bio.php b/templates/bio.php new file mode 100644 index 0000000..5769677 --- /dev/null +++ b/templates/bio.php @@ -0,0 +1,22 @@ +
+
+ +
+
+ profile picture +
+ +
+ +
+ + +
+
+
+
+
+
+
+
+
diff --git a/templates/config.def.php b/templates/config.def.php new file mode 100644 index 0000000..947d7a2 --- /dev/null +++ b/templates/config.def.php @@ -0,0 +1,19 @@ + +$username="User"; +$tagline='"Sample tagline, not necessarily surrounded with quotes"'; +$more_info="IRC Nickname: Example +E-Mail: example@example.com + +Interests: Being an example, writing Lorem Ipsum-type texts, ReplacingSpacesWithNothingToDemonstrateLineWrapping"; +?> diff --git a/templates/footer.php b/templates/footer.php new file mode 100644 index 0000000..491a7ce --- /dev/null +++ b/templates/footer.php @@ -0,0 +1,7 @@ + + + diff --git a/templates/header.php b/templates/header.php new file mode 100644 index 0000000..8f55851 --- /dev/null +++ b/templates/header.php @@ -0,0 +1,12 @@ + + + + + <?php echo $short_blog_title; ?> + + + "> + + + diff --git a/templates/unused_config.php b/templates/unused_config.php new file mode 100644 index 0000000..e9d5843 --- /dev/null +++ b/templates/unused_config.php @@ -0,0 +1,16 @@ + +$username="User"; +$tagline='"Sample tagline, not necessarily surrounded with quotes"'; +$more_info="IRC Nickname: Example +E-Mail: example@example.com + +Interests: Being an example, writing Lorem Ipsum-type texts"; +?> diff --git a/write/index.php b/write/index.php new file mode 100644 index 0000000..99a2ad5 --- /dev/null +++ b/write/index.php @@ -0,0 +1,53 @@ + +
+
+ write +
+
+
+ choose an icon that represents your mood the most: +
+
+ alarmed.png alarmed.png
+ angry.png angry.png
+ cheeky.png cheeky.png
+ dumb.png dumb.png
+ embarassed.png embarassed.png
+ evil.png evil.png
+ fat.png fat.png
+ frustrated.png frustrated.png
+ happy.png happy.png
+ mad.png mad.png
+ neutral.png neutral.png
+
+
+ ninja.png ninja.png
+ no-mouth.png no-mouth.png
+ old.png old.png
+ questioning.png questioning.png
+ sad.png sad.png
+ silly.png silly.png
+ surprised.png surprised.png
+ tired.png tired.png
+ torn.png torn.png
+ what-a-night.png what-a-night.png
+ whistle.png whistle.png
+
+
+ post title: +
+ current mood: +
+ current tunes: +
+ article: (HTML markup is allowed) +
+ +
+ enter your password: +
+ +
+
+
+ diff --git a/write/post.php b/write/post.php new file mode 100644 index 0000000..0133304 --- /dev/null +++ b/write/post.php @@ -0,0 +1,37 @@ +go back!"; +?> +
+
+ post results +
+
+query("INSERT INTO articles (Title, Mood, MoodImage, Song, Message) VALUES('".$title."', '".$mood."', '".$moodimage."', '".$song."', '".$articlebody."')"); + #$mysqli->query('INSERT INTO articles (Title, Mood, MoodImage, Song, Message) VALUES("title test", "mood", "what-a-night.png", "music", "styles!")'); + #$mysqli->query('INSERT INTO articles (Title, Mood, MoodImage, Song, Message) VALUES("'.$title.'", "'.$mood.'", "what-a-night.png", "music", "styles!")'); + + echo "success".$go_back; + header("Location: ".$root); + exit(); + } + echo "

".$_POST['password']."

"; + die("wrong password".$go_back); +} +die("no POST".$go_back); +?> +
+
+