Splittato il tema in due template, base e large.

This commit is contained in:
Emiliano Vavassori 2020-11-26 01:57:56 +01:00
parent cdc6531c16
commit cc6dbfe5a4
4 changed files with 471 additions and 31 deletions

View File

@ -0,0 +1,303 @@
html {
font-family: 'Open Sans', 'helvetica', sans-serif;
background: white;
font-size: 14px;
}
/* Titles */
h1 { text-transform: uppercase }
h1, h2 {
font-weight: normal;
margin-top: 10px;
margin-bottom: 10px;
}
.title
{
font-size: 2.5em;
text-align: center;
margin-bottom: 50px;
text-transform: none;
color: #3a7c78;
line-height: 1;
font-weight: 600;
}
.latest
{-
padding: 10px 10px;
border-bottom: 1px solid #eee;
}
.post_detail
{
font-size: 2em;
line-height: 1em;
}
.entry-content
{
margin-top: 50px;
margin-bottom: 50px;
text-align: justify;
color: #333;
}
article section .about
{
font-size: 18px;
color: #444;
text-align: justify;
}
article section .blog-post
{
font-size: 16px;
}
/* Body */
body {margin: 0}
body > article, footer {
/*line-height: 1.6em;
display: block;
max-width: 700px;
margin: 40px auto auto 355px;
padding: 20px 80px 10px;*/
line-height: 1.6em;
display: block;
margin: auto 5px auto 285px;
padding: 10px 5px 10px;*/
}
article ol.posts
{
padding-left: 0;
}
/* Articles */
p.post_entry {
}
article > header {
list-style-type: none;
padding: 0px 10px;
box-shadow: 0 0 0 2px #3a7c78;
-moz-border-radius: 5px 0;
-webkit-border-radius: 5px 0;
border-radius: 5px 5px;
}
.article_left > h1 {
font-size: 20px;
}
.article_right {
background-color: white;
}
.post_list {
list-style-type: none;
padding: 10px 10px;
-moz-border-radius: 5px 0;
-webkit-border-radius: 5px 0;
border-radius: 5px 5px;
}
/* Links */;
a { color: #3a7c78; text-decoration:none; }
a:visited { color: #3a7c78; text-decoration:none; }
a:link { color:#3a7c78; text-decoration:none; }
a:active { color:#3a7c78; text-decoration:none; }
a:hover { text-decoration: underline; }
/* Code */
.highlight pre {
font-size: 14px;
overflow: auto;
padding: 8px;
}
/* Sidebar */
aside {
font-size: 14px;
width: 220px; height: 100%;
position: fixed;
top: 0; left: 0;
padding: 30px;
/*background-color: #2980b9;*/
background-color: #3a7c78;
color: white;
box-shadow: 0 0 3px black;
text-align: center;
padding-top: 8%;
background-size: cover;
}
aside > ul {
list-style-type: none;
padding: 0px 10px;
margin-top: 0px;
}
aside > h2 {
text-transform: uppercase;
font-size: 14px;
margin-bottom: 5px;
}
#avatar {
width: 100px;
border-radius: 50%;
display: block;
margin: 0 10px 20px 0;
box-shadow: 0px 0px 5px 3px #3a7c78;
-webkit-transition: 200ms;
-moz-transition: 200ms;
-ms-transition: 200ms;
-o-transition: 200ms;
transition: 200ms;
}
#avatar:hover {
box-shadow: 0px 0px 5px 3px white;
}
.social
{
display: inline-block;
margin-top: 40px;
}
.nav
{
display: block;
margin-left: -30px;
margin-right: -30px;
border: 1px solid #73d08a;
margin-top: 40px;
}
.nav > ul > li
{
font-size: 15px;
}
.nav a
{
color: #fff;
text-decoration: none;
transition: all .3s ease-in-out;
}
.nav a:hover
{
background-color: #73d08a;
}
.list-bare
{
list-style: none;
padding: 0;
margin: 0;
}
.nav__link
{
display: block;
padding: 0.77273rem 0;
border-bottom: 1px solid #73d08a;
}
.blog_roll_link
{
display: block;
padding: 0.33147rem 0;
border-bottom: 3px solid #73d08a;
}
/*--------Responsive------------*/
@media (max-width: 800px) {
aside {
left: 0;
max-width: none;
position: relative;
top: 0;
width: 100%;
padding: 0;
padding-top: 1px;
}
.nav
{
margin-left: 0;
margin-right: 0;
}
body > article {
margin: 0 auto;
padding-top: 5px;
padding: 1em;
}
footer
{
padding: 1em;
margin-left: 1em;
margin-top: 0;
}
#avatar {
height: 50px;
width: 50px;
margin: 10px auto;
}
}
img {
max-width: 100%;
}
#license {
font-size: small;
text-align: center;
position: relative;
bottom: -43vh;
}
#license p {
margin-bottom: 5px;
}
#license a {
color: #ffffff;
text-decoration: underline;
}
#license img {
width: 85%;
}
#live {
border: 1px dotted teal;
display: flex;
flex-flow: row nowrap;
justify-content: space-between;
align-items: stretch;
height: 75vh;
}
#embedded-video {
display: flex;
flex: 7;
}
#embedded-chat {
display: flex;
flex: 2;
}
#live iframe {
border: 0px;
flex: 1;
}

View File

@ -59,15 +59,11 @@ article section .blog-post
/* Body */
body {margin: 0}
body > article, footer {
/*line-height: 1.6em;
line-height: 1.6em;
display: block;
max-width: 700px;
margin: 40px auto auto 355px;
padding: 20px 80px 10px;*/
line-height: 1.6em;
display: block;
margin: auto 5px auto 285px;
padding: 10px 5px 10px;*/
padding: 20px 80px 10px;
}
article ol.posts
@ -277,27 +273,3 @@ img {
#license img {
width: 85%;
}
#live {
border: 1px dotted teal;
display: flex;
flex-flow: row nowrap;
justify-content: space-between;
align-items: stretch;
height: 75vh;
}
#embedded-video {
display: flex;
flex: 7;
}
#embedded-chat {
display: flex;
flex: 2;
}
#live iframe {
border: 0px;
flex: 1;
}

View File

@ -1,4 +1,4 @@
{% extends "base.html" %}
{% extends "large_base.html" %}
{% block title %}{{ page.title }}{% endblock %}
{% block content %}
<section id="content" class="body">

View File

@ -0,0 +1,165 @@
<!doctype html>
<html lang="{{ DEFAULT_LANG }}" itemscope itemtype="http://schema.org/Person">
<head>
{% block head %}
<meta charset="utf-8">
<!-- Site Meta Data -->
<title>{% block title %} {{ SITENAME }} | {{ SIDEBAR_DIGEST }} {% endblock %}</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="{{ AUTHOR_DESCRIPTION }}">
<meta name="author" content="{{ AUTHOR }}">
<link rel="shortcut icon" href="{{ FAVICON }}">
<!-- schema.org -->
<meta itemprop="name" content="{{ SITENAME }}">
<meta itemprop="image" content="{{ AVATAR }}">
<meta itemprop="description" content="{{ AUTHOR_DESCRIPTION }}">
<link href='https://fonts.googleapis.com/css?family=Open+Sans:400,600,700' rel='stylesheet' type='text/css'>
<!-- Style Meta Data -->
<link rel="stylesheet" href="{{ SITEURL }}/theme/css/large.css" type="text/css"/>
<link rel="stylesheet" href="{{ SITEURL }}/theme/css/pygments.css" type="text/css"/>
<!-- Feed Meta Data -->
{% if FEED_ALL_ATOM %}
<link href="{{ SITEURL }}/{{ FEED_ALL_ATOM }}" type="application/atom+xml" rel="alternate"
title="{{ SITENAME }} ATOM Feed"/>
{% endif %}
{% if FEED_ALL_RSS %}
<link href="{{ SITEURL }}/{{ FEED_RSS }}" type="application/atom+xml" rel="alternate"
title="{{ SITENAME }} RSS Feed"/>
{% endif %}
<!-- Twitter Feed -->
<meta name="twitter:card" content="summary">
<meta name="twitter:site" content="{{ TWITTER_USERNAME }}">
<meta name="twitter:image" content="">
{% endblock %}
<script src="https://kit.fontawesome.com/0a2f7dbe4a.js" crossorigin="anonymous"></script>
</head>
<body>
<!-- Sidebar -->
<aside>
<!--<center><a href="{{ SITEURL }}"><img id="avatar" src="{{ AVATAR }}"></a></center>-->
<h1>{{ SITENAME }}</h1>
{% if SIDEBAR_DIGEST %}
<p>{{ SIDEBAR_DIGEST }}</p>
{% endif %}
<br>
{% if TWITTER_USERNAME %}
<a class="twitter-follow-button"
href="https://twitter.com/{{ TWITTER_USERNAME }}"
data-show-count="false"
data-lang="en">
Follow @twitterdev
</a>
<script type="text/javascript">
window.twttr = (function (d, s, id) {
var t, js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s);
js.id = id;
js.src = "https://platform.twitter.com/widgets.js";
fjs.parentNode.insertBefore(js, fjs);
return window.twttr || (t = {
_e: [], ready: function (f) {
t._e.push(f)
}
});
}(document, "script", "twitter-wjs"));
</script>
{% endif %}
<nav class="nav">
<ul class="list-bare">
{% for title, link in MENUITEMS %}
<li><a class="nav__link" href="{{ link }}">{{ title }}</a></li>
{% endfor %}
{% if DISPLAY_PAGES_ON_MENU and pages %}{% for p in pages %}
<li><a class="nav__link" href="{{ SITEURL }}/{{ p.url }}">{{ p.title }}</a></li>
{% endfor %}{% endif %}
</ul>
</nav>
<p class="social">
{% if SOCIAL %}
{% for name, link in SOCIAL %}
<a href="{{ link }}" target="_blank"><img
src="{{ SITEURL }}/theme/images/icons/{{ name|lower }}.png"></a>
{% endfor %}
{% endif %}
{% if FEED_ALL_ATOM %}
<a href="{{ SITEURL }}/{{ FEED_ALL_ATOM }}" rel="alternate">
<img src="{{ SITEURL }}/theme/images/icons/rss.png"></a>
{% endif %}
{% if FEED_ALL_RSS %}
<a href="{{ SITEURL }}/{{ FEED_ALL_RSS }}" rel="alternate">
<img src="{{ SITEURL }}/theme/images/icons/rss.png"></a>
{% endif %}
</p>
{% if DISPLAY_CATEGORIES_ON_MENU and categories %}
<h2>Categories</h2>
<ul class="navbar">
{% for cat, null in categories %}
<li{% if cat == category %} class="active"{% endif %}><a
href="{{ SITEURL }}/{{ cat.url }}">{{ cat }}</a></li>
{% endfor %}
</ul>
{% endif %}
{% if LINKS %}
<h2 class="blog_roll_link"><br/>BLOGROLLS</h2>
<ul class="navbar">
{% for name, link in LINKS %}
<li><a href="{{ link }}">{{ name }}</a></li>
{% endfor %}
</ul>
{% endif %}
<div id="license" style="text-align: center;">
<p>I contenuti del sito sono tutti rilasciati con licenza <a href="https://creativecommons.org/licenses/by/3.0/it/" title="Creative Commons - Attiribuzione 3.0">CC BY 3.0</a></p>
<p><a href="https://creativecommons.org/licenses/by/3.0/it/" title="Creative Commons - Attiribuzione 3.0"><img src="https://i0.wp.com/www.libreitalia.org/wp-content/uploads/2017/11/by.png?fit=249%2C87&amp;ssl=1" alt="Creative Commons BY Logo" /></a></p>
</div>
</aside>
<!-- Content -->
<article>
{% block content %}
{% endblock %}
</article>
<!-- Footer -->
{% if DISPLAY_FOOTER or DISPLAY_FOOTER is not defined %}
<footer>
<p>I contenuti del sito sono tutti rilasciati con licenza <a href="https://creativecommons.org/licenses/by/3.0/it/" title="Creative Commons - Attiribuzione 3.0">CC BY 3.0</a><br/>
<a href="https://creativecommons.org/licenses/by/3.0/it/" title="Creative Commons - Attiribuzione 3.0"><img src="https://i0.wp.com/www.libreitalia.org/wp-content/uploads/2017/11/by.png?fit=249%2C87&amp;ssl=1" alt="Creative Commons BY Logo" /></a>
</p>
</footer>
{% endif %}
{% if GOOGLE_ANALYTICS %}
<!-- Analytics -->
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', '{{ GOOGLE_ANALYTICS }}']);
_gaq.push(['_trackPageview']);
(function () {
var ga = document.createElement('script');
ga.type = 'text/javascript';
ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(ga, s);
})();
</script>
{% endif %}
</body>
</html>