Skip to content

Commit

Permalink
Merge pull request #486 from Pelican-Elegant/fixes
Browse files Browse the repository at this point in the history
Fixe w3c and table
  • Loading branch information
talha131 committed Aug 10, 2019
2 parents 54aa309 + a795520 commit 20ba517
Show file tree
Hide file tree
Showing 15 changed files with 107 additions and 42 deletions.
6 changes: 3 additions & 3 deletions documentation/content/101 Quick Start/testimonials.md
Expand Up @@ -26,13 +26,13 @@ authors: Talha Mansoor
[悟道洞穴人](https://github.com/Pelican-Elegant/elegant/pull/2#issue-19502670)

<blockquote class="twitter-tweet" lang="en"><p><a href="https://twitter.com/talham_">@talham_</a> yours is the most innovative Pelican theme I&#39;ve seen yet: <a href="http://t.co/worboJFRuX">http://t.co/worboJFRuX</a>. I love the search feature.</p>&mdash; Tshepang Lekhonkhobe (@tshepang_dev) <a href="https://twitter.com/tshepang_dev/statuses/384347807387095040">September 29, 2013</a></blockquote>
<script async src="//platform.twitter.com/widgets.js" charset="utf-8"></script>
<script async src="//platform.twitter.com/widgets.js"></script>

<blockquote class="twitter-tweet" lang="en"><p><a href="https://twitter.com/talham_">@talham_</a> Thanks for the Elegant theme. It is really elegant :).</p>&mdash; Simon Cahuk (@cahuk) <a href="https://twitter.com/cahuk/statuses/391533360830775296">October 19, 2013</a></blockquote>
<script async src="//platform.twitter.com/widgets.js" charset="utf-8"></script>
<script async src="//platform.twitter.com/widgets.js"></script>

<blockquote class="twitter-tweet" lang="en"><p><a href="https://twitter.com/talham_">@talham_</a> Hi, Elegant is a cool theme. Checking it out.</p>&mdash; Fayad Fami (@fayadfami) <a href="https://twitter.com/fayadfami/statuses/451420620241137664">April 2, 2014</a></blockquote>
<script async src="//platform.twitter.com/widgets.js" charset="utf-8"></script>
<script async src="//platform.twitter.com/widgets.js"></script>

> I'm hugely impressed with your work on the theme; thank you for opening the
> code for it.
Expand Down
2 changes: 1 addition & 1 deletion documentation/content/Analytics SEO SMO/stat-counter.md
Expand Up @@ -25,7 +25,7 @@ that a website must have in order to use StatCounter.

:::javascript
<!-- Start of StatCounter Code for Default Guide -->
<script type="text/javascript">
<script>
var sc_project=5555555;
var sc_invisible=1;
var sc_security="XXXXXXXX";
Expand Down
18 changes: 18 additions & 0 deletions documentation/content/Components/table.md
@@ -0,0 +1,18 @@
---
authors: Talha Mansoor
Title: Tables
Tags: remarkable
Date: 2019-08-11 01:16
Slug: tables
Category: Components
---

Tables in Elegant theme have rounded borders and striped alternating rows.

| Season | Episodes | First aired |
| ------ | -------- | ------------------ |
| 1 | 13 | June 2, 2002 |
| 2 | 12 | June 1, 2003 |
| 3 | 12 | September 19, 2004 |
| 4 | 13 | September 10, 2006 |
| 5 | 10 | January 6, 2008 |
71 changes: 62 additions & 9 deletions static/css/elegant.css
Expand Up @@ -457,21 +457,21 @@ div.blog-archives h2 {
position: relative;
margin: 0;
}
div.blog-archives article,
div.recent-posts article {
div.blog-archives div,
div.recent-posts-article {
border-bottom: 1px dotted #aaa;
}
div.blog-archives article,
div.recent-posts article {
div.blog-archives div,
div.recent-posts-article {
font-size: 1.1em;
padding: 0.3em 0.2em;
position: relative;
overflow: auto;
}
div.blog-archives article {
div.blog-archives div {
margin-left: 6em;
}
div.blog-archives article.last-entry-of-year {
div.blog-archives div.last-entry-of-year {
margin-bottom: 1em;
}
div.blog-archives time,
Expand All @@ -481,15 +481,15 @@ div.recent-posts time {
}
div.blog-archives time,
div.recent-posts time,
div.recent-posts section {
div.recent-posts-posted {
color: #8f8f8f;
font: 0.9em "PT Sans", "Helvetica Neue", Arial, Sans-Serif;
}
div.recent-posts section a {
div.recent-posts-posted a {
color: inherit;
padding-left: 0.3em;
}
div.recent-posts section a:hover {
div.recent-posts-posted a:hover {
border-bottom: 1px dashed;
text-decoration: none;
}
Expand Down Expand Up @@ -663,3 +663,56 @@ div.figure.align-left,
.gist table {
table-layout: initial;
}
/* Table */
table {
max-width: 100%;
background-color: transparent;
border-collapse: collapse;
border-spacing: 0;
border: 1px solid #bfbfbf;
border-collapse: separate;
*border-collapse: collapse;
border-left: 0;
-webkit-border-radius: 6px;
-moz-border-radius: 6px;
border-radius: 6px;
}

table th,
table td {
border-left: 1px solid #bfbfbf;
padding-left: 2px;
padding-right: 2px;
}

table thead:first-child tr:first-child th {
border-top: 0;
}

table thead:first-child tr:first-child > th:first-child {
-webkit-border-top-left-radius: 6px;
border-top-left-radius: 6px;
-moz-border-radius-topleft: 6px;
}

table thead:first-child tr:first-child > th:last-child {
-webkit-border-top-right-radius: 6px;
border-top-right-radius: 6px;
-moz-border-radius-topright: 6px;
}

table tbody:last-child tr:last-child > td:first-child {
-webkit-border-bottom-left-radius: 6px;
border-bottom-left-radius: 6px;
-moz-border-radius-bottomleft: 6px;
}

table tbody:last-child tr:last-child > td:last-child {
-webkit-border-bottom-right-radius: 6px;
border-bottom-right-radius: 6px;
-moz-border-radius-bottomright: 6px;
}

table tbody > tr:nth-child(odd) > td {
background-color: #ebebeb;
}
4 changes: 2 additions & 2 deletions templates/_includes/analytics.html
Expand Up @@ -10,7 +10,7 @@
{% endif %}

{% if HEAP_ANALYTICS %}
<script type="text/javascript">
<script>
window.heap=window.heap||[],heap.load=function(e,t){window.heap.appid=e,window.heap.config=t=t||{};var r=t.forceSSL||"https:"===document.location.protocol,a=document.createElement("script");a.type="text/javascript",a.async=!0,a.src=(r?"https:":"http:")+"//cdn.heapanalytics.com/js/heap-"+e+".js";var n=document.getElementsByTagName("script")[0];n.parentNode.insertBefore(a,n);for(var o=function(e){return function(){heap.push([e].concat(Array.prototype.slice.call(arguments,0)))}},p=["addEventProperties","addUserProperties","clearEventProperties","identify","resetIdentity","removeEventProperty","setEventProperties","track","unsetEventProperty"],c=0;c<p.length;c++)heap[p[c]]=o(p[c])};
heap.load("{{HEAP_ANALYTICS}}");
</script>
Expand All @@ -20,7 +20,7 @@
{% if PIWIK_SSL_URL is not defined %}
{% set PIWIK_SSL_URL = PIWIK_URL %}
{% endif %}
<script type="text/javascript">
<script>
var _paq = _paq || [];
_paq.push(["trackPageView"]);
_paq.push(["enableLinkTracking"]);
Expand Down
2 changes: 0 additions & 2 deletions templates/_includes/article_author.html
Expand Up @@ -3,7 +3,6 @@
{% for author in article.authors %}
{% if author|string in AUTHORS %}
{% if tag.open %}
<section>
<hr />
{% set tag.open = false %}
{% set tag.close = true %}
Expand All @@ -21,6 +20,5 @@
{% endif %}
{% endfor %}
{% if tag.close %}
</section>
{% endif %}
{% endmacro %}
4 changes: 2 additions & 2 deletions templates/_includes/comments.html
Expand Up @@ -57,14 +57,14 @@


{% macro comments_common_scripts() %}
<script language="javascript" type="text/javascript">
<script>
function uncollapse() {
if (window.location.hash.match(/^#comment-\d+$/)) {
$('#disqus_thread').collapse('show');
}
}
</script>
<script type="text/javascript" language="JavaScript">
<script>
uncollapse();
window.onhashchange=function(){
if (window.location.hash.match(/^#comment-\d+$/))
Expand Down
4 changes: 2 additions & 2 deletions templates/_includes/disqus_scripts.html
@@ -1,5 +1,5 @@
{% macro disqus_misc_scripts() %}
<script type="text/javascript">
<script>
var disqus_shortname = '{{ DISQUS_SITENAME }}';
(function () {
var s = document.createElement('script'); s.async = true;
Expand All @@ -12,7 +12,7 @@

{% macro disqus_comments_script(article) %}
<div id="disqus_thread"></div>
<script type="text/javascript">
<script>
var disqus_shortname = '{{ DISQUS_SITENAME }}';
{% if article.comment_id %}
var disqus_identifier = '{{ article.comment_id }}';
Expand Down
2 changes: 1 addition & 1 deletion templates/_includes/minify_tipuesearch.html
@@ -1,3 +1,3 @@
{% assets filters="rjsmin", output="tipuesearch/tipuesearch.packed.min.js", "tipuesearch/tipuesearch_set.js", "tipuesearch/tipuesearch.js" %}
<script type="text/javascript" src="{{ SITEURL }}/{{ ASSET_URL }}"></script>
<script src="{{ SITEURL }}/{{ ASSET_URL }}"></script>
{% endassets %}
2 changes: 0 additions & 2 deletions templates/_includes/share_links.html
@@ -1,6 +1,5 @@
{% macro share_links(article) %}
{% if article.share_post and article.status != 'draft' %}
<section>
<p id="post-share-links">
{% if article.share_post_intro %}
{{ article.share_post_intro }}
Expand All @@ -14,6 +13,5 @@
<a href="{{article.share_post['email']}}" target="_blank" title="Share via Email">Email</a>
</p>
</section>
{% endif %}
{% endmacro %}
2 changes: 1 addition & 1 deletion templates/_includes/stat_counter.html
@@ -1,6 +1,6 @@
{% if STAT_COUNTER_PROJECT and STAT_COUNTER_SECURITY %}
<!-- Start of StatCounter Code for Default Guide -->
<script type="text/javascript">
<script>
var sc_project={{ STAT_COUNTER_PROJECT }};
var sc_invisible=1;
var sc_security="{{ STAT_COUNTER_SECURITY }}";
Expand Down
8 changes: 4 additions & 4 deletions templates/archives.html
Expand Up @@ -46,14 +46,14 @@ <h2 id="{{year }}"><a href="#{{year}}">{{ year }}</a></h2>
{% endif %}

{% if loop.last %}
<article itemscope class="last-entry-of-year">
<div itemscope class="last-entry-of-year">
{% else %}
{% set next_year = loop.nextitem.date.strftime('%Y') %}

{% if next_year != year %}
<article itemscope class="last-entry-of-year">
<div itemscope class="last-entry-of-year">
{% else %}
<article itemscope>
<div itemscope>
{% endif %}
{% endif %}

Expand All @@ -68,7 +68,7 @@ <h2 id="{{year }}"><a href="#{{year}}">{{ year }}</a></h2>
<time itemprop="dateCreated" datetime="{{ article.date.isoformat() }}">
{{ article.locale_date }}
</time>
</article>
</div>
{% endfor %}
</div>
</div>
Expand Down
4 changes: 2 additions & 2 deletions templates/categories.html
Expand Up @@ -78,15 +78,15 @@ <h1><a href="{{ SITEURL }}/{{ CATEGORIES_URL }}">All Categories</a></h1>
{% endblock content %}
{% block script %}
{{ super() }}
<script language="javascript" type="text/javascript">
<script>
function uncollapse() {
$(window.location.hash).collapse({
toggle: true
})
}
</script>

<script type="text/javascript" language="JavaScript">
<script>
uncollapse();
</script>
{% endblock script %}
14 changes: 7 additions & 7 deletions templates/index.html
Expand Up @@ -100,7 +100,7 @@ <h1 id="recent-posts">Recent Posts <a id="allposts" href="{{ SITEURL }}/{{ ARCHI
<div class="recent-posts">
{% for article in articles %}
{% if loop.index0 < RECENT_ARTICLES_COUNT %}
<article itemscope>
<div itemscope class="recent-posts-article">
<a href="{{ SITEURL }}/{{ article.url }}">
{{ article.title }}
{%if article.subtitle %}
Expand All @@ -109,17 +109,17 @@ <h1 id="recent-posts">Recent Posts <a id="allposts" href="{{ SITEURL }}/{{ ARCHI
</small>
{% endif %}
</a>
<section>
<div class="recent-posts-posted">
posted in
<a href="{{ SITEURL }}/{{ CATEGORIES_URL }}#{{ article.category.slug }}-ref">{{ article.category }}</a>
<div class="recent-posts-time">
<time itemprop="dateCreated" datetime="{{ article.date.isoformat() }}">{{ article.locale_date }}</time>
<a href="{{ SITEURL }}/{{ CATEGORIES_URL }}#{{ article.category.slug }}-ref">{{ article.category }}</a>
<div class="recent-posts-time">
<time itemprop="dateCreated" datetime="{{ article.date.isoformat() }}">{{ article.locale_date }}</time>
</div>
</div>
</section>
{% if RECENT_ARTICLE_SUMMARY %}
<p>{{article.summary}}</p>
{% endif %}
</article>
</div>
{% endif %}
{% endfor %}
</div>
Expand Down
6 changes: 2 additions & 4 deletions templates/search.html
Expand Up @@ -29,8 +29,8 @@
{% if 'assets' in PLUGINS %}
{% include '_includes/minify_tipuesearch.html' with context %}
{% else %}
<script type="text/javascript" src="{{ SITEURL }}/theme/tipuesearch/tipuesearch_set.js"></script>
<script type="text/javascript" src="{{ SITEURL }}/theme/tipuesearch/tipuesearch.min.js"></script>
<script src="{{ SITEURL }}/theme/tipuesearch/tipuesearch_set.js"></script>
<script src="{{ SITEURL }}/theme/tipuesearch/tipuesearch.min.js"></script>
{% endif %}

{% if 'tipue_search' in PLUGINS %}
Expand All @@ -57,9 +57,7 @@
{% endblock script %}

{% block content %}
<article>
<div class="span8 offset2">
<div id="tipue_search_content"><div id="tipue_search_loading"></div></div>
</div>
</article>
{% endblock content %}

0 comments on commit 20ba517

Please sign in to comment.