Commit a59e3dab authored by Denis Salem's avatar Denis Salem
Browse files

fix academik css, fix code snippet css for every themes

parent 0d6c6171
......@@ -159,7 +159,8 @@
DONE | Fix Shabang issue for compatibility.
DONE | Semantic-web features.
DONE | Theme must have it's own yaml configuration.
WIP | Reorganize themes dependencies in setup (adding default templates, scripts, and pages to include).
DONE | Reorganize themes dependencies in setup.
TODO | Fix Tessellation CSS
WIP | Add relevant templates for themes.
WIP | Client-side search engine.
TODO | Add definition in documentation for optional fields in blog configuration.
......
......@@ -42,13 +42,6 @@ blockquote p
font-size: 0.8em;
padding-left: 1em;}
table {width: 580px; display: block; clear: both;}
table tr {width: 100%; display: block;}
table tbody {width: 100%; display: block;}
table .linenos {width: 4%; display: inline-block;vertical-align: top;}
table .code {width: 95%; display: inline-block;vertical-align: top;}
table td pre {vertical-align: top; overflow: hidden; overflow-x: auto; margin: 0px;}
footer
{display: none;}
......@@ -181,12 +174,24 @@ footer a
.entry span a
{font-style: italic;
color: grey;}
.entry p
{width: 580px;
text-align: justify;
float: left;}
.entry iframe,
.entry img,
.entry math
{max-width: 580px;
margin-top: 1em;
clear: both;}
.entry ul
{clear: both;
max-width: 580px;}
.entry h1,
.entry h2,
.entry h3,
......@@ -205,7 +210,14 @@ footer a
.entry_content
{width: 800px;
clear: both;}
.__VENC_PYGMENTIZE_WRAPPER__ table {width: 580px; display: block; clear: both;}
.__VENC_PYGMENTIZE_WRAPPER__ table tr {width: 100%; display: block;}
.__VENC_PYGMENTIZE_WRAPPER__ table tbody {width: 100%; display: block;}
.__VENC_PYGMENTIZE_WRAPPER__ table .linenos {width: 4%; display: inline-block;vertical-align: top;}
.__VENC_PYGMENTIZE_WRAPPER__ table .code {width: 95%; display: inline-block;vertical-align: top;}
.__VENC_PYGMENTIZE_WRAPPER__ table td pre {vertical-align: top; overflow: hidden; overflow-x: auto; margin: 0px;}
.note, .footnote
{float: left;
margin-top: 1em;
......
......@@ -14,7 +14,7 @@
</head>
<body>
<aside>
<div id="blog-avatar" style="background-image: url('.:GetBlogMetadataIfExists::avatar:: .:GetRelativeOrigin:.{value} :.');">
<div id="blog-avatar" style="background-image: url('.:GetBlogMetadataIfExists::avatar::{value}:.');">
</div>
<p id="blog-description">
.:GetBlogDescription:.
......@@ -46,5 +46,5 @@
</aside>
<div id="blog-content">
<header>
<h1><a href=".:GetBlogURL:."><img src=".:GetBlogMetadataIfExists::banner::{value}:." alt="Le turfu expliqué à mon poney"></a></h1>
<h1><a href=".:GetBlogURL:."><img src=".:GetBlogMetadataIfExists::banner::{value}:." alt=".:GetBlogName:."></a></h1>
</header>
......@@ -112,6 +112,14 @@ header a:hover
.entry pre
{overflow: scroll;}
.__VENC_PYGMENTIZE_WRAPPER__ table {width: 700px; display: block; clear: both;}
.__VENC_PYGMENTIZE_WRAPPER__ table tr {width: 100%; display: block;}
.__VENC_PYGMENTIZE_WRAPPER__ table tbody {width: 100%; display: block;}
.__VENC_PYGMENTIZE_WRAPPER__ table .linenos {width: 4%; display: inline-block;vertical-align: top;}
.__VENC_PYGMENTIZE_WRAPPER__ table .code {width: 95%; display: inline-block;vertical-align: top;}
.__VENC_PYGMENTIZE_WRAPPER__ table td pre {vertical-align: top; overflow: hidden; overflow-x: auto; margin: 0px;}
/***************/
/* F O O T E R */
/***************/
......
......@@ -18,6 +18,13 @@ hr
background-color: grey;
height: 1px;}
.__VENC_PYGMENTIZE_WRAPPER__ table {width: 100%; display: block; clear: both;}
.__VENC_PYGMENTIZE_WRAPPER__ table tr {width: 100%; display: block;}
.__VENC_PYGMENTIZE_WRAPPER__ table tbody {width: 100%; display: block;}
.__VENC_PYGMENTIZE_WRAPPER__ table .linenos {width: 4%; display: inline-block;vertical-align: top;}
.__VENC_PYGMENTIZE_WRAPPER__ table .code {width: 95%; display: inline-block;vertical-align: top;}
.__VENC_PYGMENTIZE_WRAPPER__ table td pre {vertical-align: top; overflow: hidden; overflow-x: auto; margin: 0px;}
/***************/
/* H E A D E R */
/***************/
......
.entry img
{width: auto;}
.permalink
{display: none;}
......
</div>
<footer id="__VENC_NAVIGATION__">
.:GetPreviousPage:: <a id="previous" href="{path} "></a>:.
.:GetPreviousPage:: <a id="previous" href="{path} ">{entry_title} </a>:.
<ul id="pagesList">.:ForPages::5::<li><a href="{path}">{page_number}</a></li>:: . :.</ul>
.:GetNextPage:: <a id="next" href="{path} "></a>:.
.:GetNextPage:: <a id="next" href="{path} " data-venc-api-infinite-scroll-hook="{path}">→ {entry_title}</a>:.
</footer>
</body>
</html>
......@@ -65,8 +65,12 @@ def export_and_remote_copy(argv=list()):
def init_theme(argv):
theme_folder = "theme/"
themes_folder = os.path.expanduser("~")+"/.local/share/VenC/themes/"
if len(argv) == 1 and os.path.isdir(themes_folder+argv[0]):
theme_folder = os.path.expanduser("~")+"/.local/share/VenC/themes/"+argv[0]+"/"
if len(argv) == 1
if os.path.isdir(themes_folder+argv[0]):
theme_folder = os.path.expanduser("~")+"/.local/share/VenC/themes/"+argv[0]+"/"
else:
die(theme_doesnt_exists.format(argv[0]))
if "config.yaml" in os.listdir(theme_folder) and not os.path.isdir(themes_folder+"/config.yaml"):
import yaml
......
......@@ -52,9 +52,9 @@ class CodeHighlight:
lexer = pygments.lexers.get_lexer_by_name(argv[0], stripall=True)
formatter = pygments.formatters.HtmlFormatter(linenos=("table" if argv[1]=="True" else False), cssclass=name)
formatter = pygments.formatters.HtmlFormatter(linenos=(True if argv[1]=="True" else False), cssclass=name)
code = argv[2]
result = pygments.highlight(code.replace("\:",":"), lexer, formatter).replace(".:","&period;:")
result = "<div class=\"__VENC_PYGMENTIZE_WRAPPER__\">"+pygments.highlight(code.replace("\:",":"), lexer, formatter).replace(".:","&period;:")+"</div>"
css = formatter.get_style_defs()
if not name+".css" in self._includes.keys():
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment