Pārlūkot izejas kodu

escape quotes

v1
bake pirms 1 gada
vecāks
revīzija
077c1156dc
4 mainītis faili ar 70 papildinājumiem un 228 dzēšanām
  1. 0
    172
      assets/css/main.css
  2. 2
    2
      pages/index.html
  3. 59
    47
      template/main.html
  4. 9
    7
      template/navigation.html

+ 0
- 172
assets/css/main.css Parādīt failu

@@ -1,172 +0,0 @@
* {
margin: 0;
padding: 0;
}
a {
border-bottom: 1px solid transparent;
color: #0070e8;
text-decoration: none;
}
a:hover {
border-color: #0070e8;
color: inherit;
}
::selection {
background: #0070e8;
color: #fff;
}
figure {
padding: 0 10px;
width: 200px;
}
figure[align=left] {
float: left;
}
figure[align=right] {
float: right;
}
figure img {
max-width: 100%;
}
figure figcaption {
padding: 5px;
}
abbr {
border-bottom: 1px dotted #2c3e50;
}
html,
body {
min-height: 100%;
}
body {
color: #2c3e50;
font-family: Source Sans Pro, Helvetica Neue, Arial, sans-serif;
}
@media (min-width: 400px) {
body > aside,
body > section {
height: 100%;
}
}
@media (min-width: 400px) {
body {
display: flex;
}
}
body > aside > header,
body > section > header {
padding: 10px;
}
body > aside {
background: #f2f2f2;
border: 1px solid rgba(0,0,0,0.15);
border-left: none;
border-top: none;
flex-shrink: 0;
text-align: right;
}
@media (max-width: 399px) {
body > aside {
border-right: none;
}
}
@media (min-width: 400px) {
body > aside {
border-bottom: none;
width: 150px;
}
body > aside header > h1 > span {
display: none;
}
}
body > section {
flex-grow: 1;
max-width: 850px;
}
@media (mzax-width: 1001px) {
body > section {
width: auto;
}
}
@media (max-width: 399px) {
body > section header:first-of-type > h1 {
display: none;
}
}
body > section header > h1::after {
background: url("../img/beat.png") no-repeat center center;
content: '';
display: inline-block;
height: 16px;
width: 32px;
}
body > section > article {
padding: 10px;
}
body > section > article h2 {
color: #829ebb;
font-size: 1.2rem;
font-weight: lighter;
}
body > section > article > * {
margin-bottom: 10px;
}
nav li {
margin: 0;
}
@media (max-width: 399px) {
nav li {
display: inline-block;
}
nav li.divider {
display: block;
padding: 10px;
}
}
@media (min-width: 400px) {
nav li {
margin: 10px 0;
}
}
nav li.divider {
color: rgba(0,0,0,0.25);
font-size: 0.85rem;
font-weight: bold;
margin: 0;
padding: 0 10px;
text-transform: uppercase;
}
nav li a {
border: 3px solid transparent;
border-left: none;
border-top: none;
color: inherit;
display: block;
padding: 10px;
}
nav li a.new:before {
color: #0070e8;
content: '●';
padding-right: 5px;
}
@media (max-width: 399px) {
nav li a {
border-right: none;
margin-bottom: -2px;
}
}
@media (min-width: 400px) {
nav li a {
border-bottom: none;
margin-right: -2px;
}
}
nav li a:hover,
nav li a.active {
border-color: #0070e8;
}
nav li a:hover span,
nav li a.active span {
border-bottom: 2px solid transparent;
}


+ 2
- 2
pages/index.html Parādīt failu

@@ -5,11 +5,11 @@ title: Ein Hackerspace für blaue, Eisteemate trinkende Frotteehasen

<hr>

<div class="grid">
<div class=\"grid\">
$(for page in mate/*.html; do echo "
<div class=\"col-one-fourth\">
<figure>
<img src=\"/assets/img/$(basename "${page}" ".html")_1.jpg\">
<img src=\"/assets/img/$(basename "${page}" ".html")_1.jpg\" alt=\"$(meta "${page}" "title")\">
<figcaption>
<a href=\"/mate/$(basename "${page}")\">
$(meta "${page}" "title")

+ 59
- 47
template/main.html Parādīt failu

@@ -1,48 +1,60 @@
<!doctype html>
<meta charset=\"utf-8\">
<meta name=\"viewport\" content=\"width=device-width\">

<title>$(meta "$page" "title") - fussel.space</title>

<link rel=\"stylesheet\" href=\"/assets/css/main.css\">
<link rel=\"stylesheet\" href=\"//fonts.googleapis.com/css?family=Source+Sans+Pro:400,700,400italic,700italic\">

<link rel=\"icon\" href=\"/assets/img/beat.png\">

<aside>
<header>
<h1>fussel<span>.space</span></h1>
</header>

<nav>
$(eval "echo \"$(cat "../template/navigation.html")\"")
</nav>
</aside>

<section>
<header>
<h1>space</h1>
</header>

<article>
<h2>$(meta "$page" "title")</h2>

$(content "$page")

$(if [ `dirname "$page"` == "./mate" ]; then
caffeine=`meta "$page" "caffeine"`
if [ "$caffeine" != "" ]; then
echo "<p><strong>Koffein:</strong> ${caffeine}mg/100ml</p>"
fi

monkey=`meta "$page" "monkey"`
if [ "$monkey" != "" ]; then
echo "<p><a href=\"https://matemonkey.com/map/dealer/?products=${monkey}\">$(meta "${page}" "title") auf <strong>MateMonkey</strong></a></p>"
fi
fi)

<footer>
<p>$(git log -1 --format="Zuletzt bearbeitet am <a href="https://git.192k.pw/bake/fussel.space/commit/%H">%ad</a> von <a href="https://git.192k.pw/%an">%an</a>." --date=format:"%d.%m.%Y" $page)</p>
</footer>
</article>
</section>
<html lang=\"de\">
<head>
<meta charset=\"utf-8\">
<meta name=\"viewport\" content=\"width=device-width\">

<title>$(meta "$page" "title") - fussel.space</title>

<link rel=\"stylesheet\" href=\"/assets/css/main.css\">
<link rel=\"stylesheet\" href=\"//fonts.googleapis.com/css?family=Source+Sans+Pro:400,700,400italic,700italic\">

<link rel=\"icon\" href=\"/assets/img/beat.png\">
</head>

<body>
<aside>
<header>
<h1>fussel<span>.space</span></h1>
</header>

<nav>
$(eval "echo \"$(cat "../template/navigation.html")\"")
</nav>
</aside>

<section>
<header>
<h1>space</h1>
</header>

<article>
<h2>$(meta "$page" "title")</h2>

$(content "$page")

$(if [ `dirname "$page"` == "./mate" ]; then
caffeine=`meta "$page" "caffeine"`
if [ "$caffeine" != "" ]; then echo "
<p>
<strong>Koffein:</strong> ${caffeine}mg/100ml
</p>
"; fi

monkey=`meta "$page" "monkey"`
if [ "$monkey" != "" ]; then echo "
<p>
<a href=\"https://matemonkey.com/map/dealer/?products=${monkey}\">
$(meta "${page}" "title") auf <strong>MateMonkey</strong>
</a>
</p>
"; fi
fi)

<footer>
<p>$(git log -1 --format="Zuletzt bearbeitet am <a href=\"https://git.192k.pw/bake/fussel.space/commit/%H\">%ad</a> von <a href=\"https://git.192k.pw/%an\">%an</a>." --date=format:"%d.%m.%Y" $page)</p>
</footer>
</article>
</section>
</body>
</html>

+ 9
- 7
template/navigation.html Parādīt failu

@@ -3,13 +3,15 @@
<li><a href=\"https://git.192k.pw/bake/fussel.space\">Git</a></li>
<li class=\"divider\"><span>Mate</span></li>
$(for page in $pages; do
if [ `dirname "${page}"` != "./mate" ]; then
continue
fi
class=""
if [ `basename "${page}"` == "$file" ]; then
class=" class=\"active\""
fi
echo "<li><a href=\"/mate/$(basename "${page}")\"${class}><span>$(meta "${page}" "title")</span></a></li>";
if [ `dirname "${page}"` != "./mate" ]; then continue; fi
if [ `basename "${page}"` == "$file" ]; then class=" class=\"active\""; fi
echo "
<li>
<a href=\"/mate/$(basename "${page}")\"${class}>
<span>$(meta "${page}" "title")</span>
</a>
</li>
";
done)
</ul>

Notiek ielāde…
Atcelt
Saglabāt