Skip to content

Commit

Permalink
Revert "Decouple themes and move to standalone repos"
Browse files Browse the repository at this point in the history
This reverts commit 2e134cf.

Use submodule is easy to maintance the themes, but is not easy to
maintance the whole simiki project, so I revert this commit.
  • Loading branch information
tankywoo committed May 15, 2017
1 parent c12bd0a commit c1615c4
Show file tree
Hide file tree
Showing 15 changed files with 1,069 additions and 15 deletions.
6 changes: 0 additions & 6 deletions .gitmodules

This file was deleted.

7 changes: 0 additions & 7 deletions README.md
Expand Up @@ -76,13 +76,6 @@ Sending pull requests on [Pull Requests Page](https://github.com/tankywoo/simiki
* Bug fixes can be based on **`master`** branch and I will also merge into `dev` branch.
* Feature can be based on **`dev`** branch.

The basic steps are:

git clone <your-forked-git-repo-url>
# clone themes from another repos, otherwise some unittest rely on theme will cause error
git submodule init
git submodule update

Following links are the contribution guidelines you may need:

* [Fork A Repo](https://help.github.com/articles/fork-a-repo/)
Expand Down
1 change: 0 additions & 1 deletion simiki/themes/simple
Submodule simple deleted from f49bc3
28 changes: 28 additions & 0 deletions simiki/themes/simple/base.html
@@ -0,0 +1,28 @@
<!DOCTYPE HTML>
<html>
<head>
<link rel="Stylesheet" type="text/css" href="{{ site.root }}/static/css/style.css">
<link rel="Stylesheet" type="text/css" href="{{ site.root }}/static/css/tango.css">
<link rel="shortcut icon" href="{{ site.root }}/favicon.ico" type="image/x-icon">
<link rel="icon" href="{{ site.root }}/favicon.ico" type="image/x-icon">
<title>{% block title %}{{ site.title }}{% endblock %}</title>
<meta name="keywords" content="{{ site.keywords }}"/>
<meta name="description" content="{{ site.description }}"/>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>

<body>
<div id="container">
{% block container %}
{{ page.content }}
{% endblock %}
</div>
<div id="footer">
<span>
Copyright © {{ site.time.strftime("%Y") }} {{ site.author }}.
Powered by <a href="http://simiki.org/" target="_blank">Simiki</a>.
</span>
</div>
{% include "stat.html" %}
</body>
</html>
36 changes: 36 additions & 0 deletions simiki/themes/simple/index.html
@@ -0,0 +1,36 @@
{% extends "base.html" %}

{% macro list_page(pages, parent_url, parent_id) -%}
<ul>
{%- for page_k, page_v in pages.items() %}
{% if site.default_ext in page_k %}
<li class="pagelist">
<a href="{{ parent_url }}/{{ page_v.name }}.html">{{ page_v.title }}</a>
</li>
{% else %}
{% set id = parent_id ~ "-" ~ page_k %}
<li class="pagelist" id="{{ id }}">{{ page_k }}</li>
{% set url = parent_url ~ "/" ~ page_k %}
{{ list_page(page_v, url, id) }}
{% endif %}
{%- endfor %}
</ul>
{%- endmacro %}

{% block title %}{{ site.title }}{% endblock %}

{% block container %}
<div id="wiki_title">{{ site.title }}</div>

<div id="index">
{% for category_name, pages in site.structure.items() %}
{# Top-level wiki pages not display in index #}
{% if site.default_ext not in category_name %}
<h2 id="{{ category_name }}">{{ category_name }}</h2>
{% set url = "./" ~ category_name %}
{{ list_page(pages, url, category_name) }}
<div class="clearfix"></div>
{% endif %}
{% endfor %}
</div>
{% endblock %}
29 changes: 29 additions & 0 deletions simiki/themes/simple/page.html
@@ -0,0 +1,29 @@
{% extends "base.html" %}

{% block title %}{{ page.title }} - {{ site.title }}{% endblock %}

{% block container %}
<div id="header">
<div id="post-nav">
{%- if not default_home_page -%}
<a href="{{ site.root }}/">Home</a>
{%- if page.category -%}
{%- for c in page.category.split("/") -%}
{%- if loop.index == 1 -%}
{%- set id = c -%}
{%- else -%}
{% set id = id ~ "-" ~ c -%}
{%- endif -%}
&nbsp;»&nbsp;<a href="{{ site.root }}/#{{ id }}">{{ c }}</a>
{%- endfor -%}
{%- endif -%}
&nbsp;»&nbsp;{{ page.title }}
{%- endif -%}
</div>
</div>
<div class="clearfix"></div>
<div id="title">{{ page.title }}</div>
<div id="content">
{{ page.content }}
</div>
{% endblock %}
Empty file added simiki/themes/simple/stat.html
Empty file.
259 changes: 259 additions & 0 deletions simiki/themes/simple/static/css/style.css
@@ -0,0 +1,259 @@
/*
Theme Name: Simple
Author: Tanky Woo<me@tankywoo.com>
Author URI: http://www.wutianqi.com/
Description: Default theme for simiki.
Version: 0.1
License: The MIT License (MIT)
Tags: simple, single-columns, code, codehighlight, white, markdown
*/

/* Global Configuration */
/* IE6 ignores this and uses default size of 16pt */
html>body { font-size: 14px; }

html {
font-size: 100%;
overflow-y: scroll;
-webkit-text-size-adjust: 100%;
-ms-text-size-adjust: 100%;
}

body {
font-family: "Helvetica Neue", "Segoe UI", Arial, Sans-Serif;
line-height: 1.5em;
background-color: whitesmoke;
}

a { color: #0645ad; text-decoration: none; }
a:visited { color: #0b0080; }
a:hover { color: #06e; text-decoration: underline; }
a:active { color: #faa700; }

p { margin: 0 0 1.5em 0; text-align: justify; }

h1, h2, h3, h4, h5, h6 {
font-weight: normal;
color: #111;
line-height: 1em;
}

h1 { font-size: 2.0em; }
h2 { font-size: 1.6em; border-bottom: 1px solid #ddd; padding-bottom: 5px; overflow:hidden }
h3 { font-size: 1.4em; }
h4 { font-size: 1.2em; }
h5 { font-size: 1.0em; }
h6 { font-size: 0.8em; }

blockquote {
color: #666;
margin: 0;
padding-left: 3em;
border-left: 0.4em #eee solid;
}

hr {
border: 1px solid silver;
margin: 1em 0;
padding: 0;
}

b, strong { font-weight: bold; }

ul, ol {
margin: 1.5em 0;
padding-left: 1.5em;
line-height: 1.5em;
}

ul li { list-style-type: square; }

ul li p { margin: 0; }

img {
border: 0;
vertical-align: middle;
margin: 0 auto;
max-width: 100%;
}

table {
border-collapse: collapse;
border-spacing: 0;
margin-bottom: 1em;
border: 1px solid #ccc;
}

td {
vertical-align: top;
padding: 3px 6px;
}

/* Optimization for pre and code tag */
pre, code {
font-family: Consolas, "DejaVu Sans Mono", "Lucida Console", Monaco, Andale Mono, "MS Gothic", monospace;
font-size: 13px;
border-radius: 3px;
-moz-border-radius: 3px;
-webkit-border-radius: 3px;
overflow: auto;
}

code {
color: #666;
background-color: #eee;
margin: 0 2px;
padding: 1px 3px;
}

pre {
border: 1px solid #eee;
padding: 8px 12px;
white-space: pre;
white-space: -moz-pre-wrap; /* Firefox */
white-space: -pre-wrap; /* ancient Opera */
white-space: -o-pre-wrap; /* newer Opera */
white-space: pre-wrap; /* Chrome; W3C standard */
word-wrap: break-word; /* IE */
}

pre code {
border: 0px !important;
padding: 0;
color: #000;
background-color: #f8f8f8;
}

/* Custom Configuration */
#container {
background: white;
width: 50em;
line-height: 1.5em;
margin: 1.5em auto 3em auto;
padding: 1.5em 2em;
border: 1px solid #ccc;
box-shadow: 2px 2px 8px #aaa;
-webkit-box-shadow: 2px 2px 8px #aaa;
-moz-box-shadow: 2px 2px 8px #aaa;
}

#wiki_title, #title {
text-align: center;
font-size: 2em;
line-height: 1.5em;
padding-bottom: 10px;
margin: 20px 0;
}

#title {
border-bottom: 1px dashed #eee;
}

#header {
}

#footer {
margin: 10px auto;
color: grey;
font-size: 80%;
text-align: center;
}

li.pagelist {
width: 100%;
margin-right: 1.5em;
list-style-type: none;
white-space: nowrap;
overflow: hidden;
}

li.pagelist:before {
content: "\0BB \020";
}

#index ul { margin: 0; }

/* Table of Contents */
.toc {
margin: 0 0.5em;
padding: 0.5em 1em;
border: 1px solid silver;
background-color: #ecf5ff;
float: right;
display: block;
font-size: 90%;
}

.toc > .toctitle {
display: block;
text-align: center;
font-weight: bold;
margin-bottom: 1em;
}

.toc ul {
margin: 0;
}

/* Hackers */
/* Hacker for codehilite */
table.codehilitetable {
border-collapse: separate;
border: 1px solid #eee;
margin: 14px 0;
border-radius: 3px;
-moz-border-radius: 3px;
-webkit-border-radius: 3px;
}

.codehilitetable pre {
margin: 0;
border: 0 none;
box-shadow: none;
-webkit-box-shadow: none;
-moz-box-shadow: none;
}

.codehilitetable td {
border: 0 none;
padding: 0;
margin: 0;
}

/* Clear the float problem */
.clearfix:after {
visibility: hidden;
clear: both;
font-size: 0;
content: ".";
display: block;
height: 0;
}


table.hlcodetable {
border: 1px solid #eee;
border-collapse: separate !important;
border-radius: 3px;
-moz-border-radius: 3px;
-webkit-border-radius: 3px;
}

.hlcodetable td {
padding: 0;
border: none;
}

.hlcodetable .linenodiv {
border-right: 1px solid #ccc;
}

.hlcodetable .linenodiv pre {
margin: 0;
border: none;
}

.hlcodetable .hlcode pre {
margin: 0;
border: none;
}

0 comments on commit c1615c4

Please sign in to comment.