The core is now rewritten and working

This commit is contained in:
mmk2410 2015-06-10 12:45:02 +02:00
parent 9054fc3598
commit 7ba332052e
17 changed files with 312 additions and 230 deletions

View file

@ -54,7 +54,7 @@ img{
right: 0;
float: center;
z-index: 40;
background: #de3e0b;
background: #ff4415;
width: 100%;
box-shadow: 0px 0px 4px 4px rgba(189, 189, 189, 0.5);
-moz-box-shadow: 0px 0px 4px 4px rgba(189, 189, 189, 0.5);
@ -78,7 +78,7 @@ img{
font-size: 14px;
line-height: 20px;
letter-spacing: 0.01px;
color: #de3e0b;
color: #ff4415;
text-decoration: none;
}
section{
@ -128,10 +128,10 @@ Usage: <a class=".text_button_flat_colored">YOUR TEXT</a>
height: 40px;
padding: 8px;
color: #FFFFFF;
background-color: #de3e0b;
background-color: #ff4415;
border-width: 1px;
border-style: solid;
border-color: #de3e0b;
border-color: #ff4415;
border-radius: 3px;
margin: 4px;
margin-bottom: 5px;
@ -184,7 +184,7 @@ code{
}
.texttitle:hover{
color: #de3e0b;
color: #ff4415;
}
.texttitlemono{

195
res/css/design.scss Normal file
View file

@ -0,0 +1,195 @@
/*
The MIT License
Copyright 2015 mmk.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
/*
Created on : Jun 10, 2015, 9:57:04 AM
Author : mmk2410
*/
$primary-color: #ff4415;
$font-family: 'Roboto', sans-serif;
body{
margin-right: 15%;
margin-left: 15%;
margin-bottom: 0px;
margin-top: 100px;
font-family: $font-family;
font-size: 14px;
line-height: 20px;
letter-spacing: 0.01px;
background-color: #ffffff;
color: rgba(0, 0, 0, 0.87);
}
img{
max-width: 100%;
max-height: 400px;
display: block;
margin-left: auto;
margin-right: auto;
}
.header{
position: absolute;
top: 0;
left: 0;
right: 0;
float: center;
z-index: 40;
background: $primary-color;
width: 100%;
box-shadow: 0px 0px 4px 4px rgba(189, 189, 189, 0.5);
-moz-box-shadow: 0px 0px 4px 4px rgba(189, 189, 189, 0.5);
-webkit-box-shadow: 0px 0px 4px 4px rgba(189, 189, 189, 0.5);
height: 60px;
padding-right: 0px;
padding-top: 0px;
white-space: nowrap;
}
.text{
font-family: $font-family;
font-size: 14px;
line-height: 20px;
letter-spacing: 0.01px;
background-color: #ffffff;
z-index: 10;
color: rgba(0, 0, 0, 0.87);
}
.text a{
font-family: $font-family;
font-size: 14px;
line-height: 20px;
letter-spacing: 0.01px;
color: $primary-color;
text-decoration: none;
}
section{
margin-bottom: 50px;
}
.title{
padding-left:15%;
height: 60px;
line-height: 60px;
display:inline-block;
text-decoration: none;
color: #FFFFFF;
vertical-align: middle;
font-size: 24px;
overflow-x: hidden;
max-width: 35%;
}
.home{
float: right;
padding-right: 15%;
height: 60px;
line-height: 60px;
vertical-align: middle;
color: #fff;
overflow-x: hidden;
font-size: 20px;
display: inline-block;
text-decoration: none;
max-width: 35%;
}
code{
background-color: #e8e6e6;
padding: 5px;
}
.texttitle{
font-family: $font-family;
font-weight: 500;
font-size: 20px;
color: rgb(33, 33, 33);
line-height: 24px;
letter-spacing: 0.05px;
text-decoration: none;
}
.texttitle:hover{
color: $primary-color;
}
.texttitlemono{
font-family: $font-family;
font-weight: 500;
font-size: 20px;
color: rgb(33, 33, 33);
line-height: 24px;
letter-spacing: 0.05px;
text-decoration: none;
}
.cc{
font-family: $font-family;
font-size: 12px;
line-height: 14px;
letter-spacing: 0.01px;
text-align: center;
}
.cc a{
font-family: 'Roboto', sans-serif;
font-size: 12px;
line-height: 14px;
letter-spacing: 0.01px;
color: rgba(0, 0, 0, 0.87);
text-decoration: none;
}
.cc a:hover{
text-decoration: underline;
}
.socialbar{
display: inline-block;
height: 68px;
margin-top: 10px;
}
.socialimg{
height: 40px;
display: inline-block;
padding-right: 5px;
}
@media screen and (max-width: 700px){
body {
margin-right: 40px;
margin-left: 20px;
}
.title{
padding-left: 10px;
max-width: 45%;
}
.home{
padding-right: 10px;
max-width: 45%;
}
}

View file

Before

(image error) Size: 1.5 KiB

After

(image error) Size: 1.5 KiB

Before After
Before After

View file

Before

(image error) Size: 5.8 KiB

After

(image error) Size: 5.8 KiB

Before After
Before After

View file

Before

(image error) Size: 31 KiB

After

(image error) Size: 31 KiB

Before After
Before After

View file

@ -1,48 +1,25 @@
<?php
/*
/*
* The MIT License
*
* Copyright 2015 mmk2410.
*
*
* Copyright 2015 mmk.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FINESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*
*/
/**
* This is a small tool for converting german umlauts into HTML codes.
* This fixes the error that one some servers weird sings are displayed.
*
* @author Marcel Kapfer <marcelmichaelkapfer@yahoo.co.nz>
*/
class UmlautConverter
{
function convert($text)
{
$output = str_replace("ä","&auml;",$text);
$output = str_replace("Ä","&Auml;",$output);
$output = str_replace("ö","&ouml;",$output);
$output = str_replace("Ö","&Ouml;",$output);
$output = str_replace("ü","&uuml;",$output);
$output = str_replace("Ü","&Uuml;",$output);
$output = str_replace("ß","&szlig;",$output);
return $output;
}
}

View file

@ -0,0 +1,64 @@
<?php
/*
* The MIT License
*
* Copyright 2015 mmk2410.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
/**
* Description of ArticleGenerator
*
* @author mmk2410 <marcelmichaelkapfer@yahoo.co.nz>
*/
class ArticleGenerator {
function newArticle($directory, $articlefile)
{
$article = file_get_contents($directory . $articlefile);
echo "<section>";
if(substr($article, 0, 6) == "%TITLE"){
$title = substr($article, 8, strpos($article, "\n") - 8);
$link = "./?article=" . substr($articlefile, 0, -3);
echo "<h2><a href='$link'>$title</a></h2>";
$article = substr($article, strpos($article, "\n") + 1);
}
if(substr($article, 0, 5) == "%DATE"){
$date = substr($article, 7, strpos($article, "\n") - 7);
echo "<small>$date</small>";
$article = substr($article, strpos($article, "\n") + 1);
}
//TODO Code detection
echo Parsedown::instance()
->setBreaksEnabled(true)
->text($article);
echo "</section>" . "\n";
}
}

View file

@ -6,9 +6,9 @@
<div class="socialbar">
<!--Twitter-->
<a href="https://twitter.com/intent/tweet?text=Check out: <?php echo $post->title; ?> &url=<?php echo $url; ?>&original_referer=" target="blank"><img src="res/twttr.svg" class="socialimg"/></a>
<a href="https://twitter.com/intent/tweet?text=Check out: <?php echo $post->title; ?> &url=<?php echo $url; ?>&original_referer=" target="blank"><img src="res/img/twttr.svg" class="socialimg"/></a>
<!--Google+-->
<a href="https://plus.google.com/share?url=<?php echo $url; ?>&hl=en-US" target="blank"><img src="res/gplus.svg" class="socialimg" /></a>
<a href="https://plus.google.com/share?url=<?php echo $url; ?>&hl=en-US" target="blank"><img src="res/img/gplus.svg" class="socialimg" /></a>
<!--Facebook-->
<a href="https://www.facebook.com/sharer/sharer.php?u=<?php echo $url; ?>&t=<?php echo $post->title; ?>" target="blank"><img src="res/fb.png" class="socialimg" /></a>
<a href="https://www.facebook.com/sharer/sharer.php?u=<?php echo $url; ?>&t=<?php echo $post->title; ?>" target="blank"><img src="res/img/fb.png" class="socialimg" /></a>
</div>

View file

@ -29,7 +29,7 @@
* This is a small tool for converting the title of a post into someting usable
* as an url. This is used for the article urls.
*
* @author Marcel Kapfer <marcelmichaelkapfer@yahoo.co.nz>
* @author mmk2410 <marcelmichaelkapfer@yahoo.co.nz>
*/
class HrefGenerator {