mirror of
https://github.com/moparisthebest/android.moparisthebest.org
synced 2024-10-31 15:25:04 -04:00
Added linklog publishing.
This commit is contained in:
parent
ce0d25100b
commit
101a503f5a
@ -17,7 +17,6 @@
|
||||
font-size: 1.5em;
|
||||
a {
|
||||
@include hover-link;
|
||||
color: inherit;
|
||||
&:hover { color: $link-color-hover; }
|
||||
font-weight: normal;
|
||||
display: inline-block;
|
||||
@ -36,7 +35,6 @@
|
||||
.month { text-transform: uppercase; }
|
||||
}
|
||||
p { margin-bottom: 1em; }
|
||||
&, .entry-content { a { @include link-colors(inherit, $link-color-hover); }}
|
||||
a:hover { color: $link-color-hover; }
|
||||
@media only screen and (min-width: 550px) {
|
||||
article { margin-left: 5em; }
|
||||
|
@ -18,9 +18,11 @@ article {
|
||||
margin: 0;
|
||||
&.meta {
|
||||
@extend .sans;
|
||||
text-transform: uppercase;
|
||||
position: absolute; top: 0;
|
||||
}
|
||||
time {
|
||||
text-transform: uppercase;
|
||||
}
|
||||
}
|
||||
@media only screen and (min-width: 768px) {
|
||||
margin-bottom: 1.5em;
|
||||
@ -80,7 +82,14 @@ article {
|
||||
@extend .separator;
|
||||
}
|
||||
}
|
||||
|
||||
a[rel=bookmark]{
|
||||
text-decoration: none;
|
||||
}
|
||||
.linklog-marker {
|
||||
color: $text-color-light;
|
||||
font-size: .8em;
|
||||
line-height: 1em;
|
||||
}
|
||||
}
|
||||
article + article {
|
||||
.blog-index & {
|
||||
@ -95,6 +104,10 @@ article + article {
|
||||
font-size: 2.2em;
|
||||
a { color: inherit; &:hover { color: $link-color-hover; } }
|
||||
}
|
||||
header a[href*='http'] {
|
||||
text-decoration: underline;
|
||||
font-size: .85em;
|
||||
}
|
||||
a[rel=full-article] {
|
||||
background: darken($main-bg, 5);
|
||||
display: inline-block;
|
||||
@ -139,3 +152,4 @@ article + article {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,8 +1,9 @@
|
||||
{% capture category %}{{ post.categories | size }}{% endcapture %}
|
||||
<h1><a href="{{ root_url }}{{ post.url }}">{{post.title}}</a></h1>
|
||||
{% include post/title.html %}
|
||||
<time datetime="{{ post.date | datetime | date_to_xmlschema }}" pubdate>{{ post.date | date: "<span class='month'>%b</span> <span class='day'>%d</span> <span class='year'>%Y</span>"}}</time>
|
||||
{% if category != '0' %}
|
||||
<footer>
|
||||
<span class="categories">posted in {{ post.categories | category_links }}</span>
|
||||
<a rel="bookmark" href="{{ permalink }}">{{ site.permalink_label }}</a>
|
||||
{% if category != '0' %}
|
||||
• <span class="categories">posted in {{ post.categories | category_links }}</span>
|
||||
{% endif %}
|
||||
</footer>
|
||||
{% endif %}
|
||||
|
@ -1,28 +1,23 @@
|
||||
{% unless page.no_header %}
|
||||
<header>
|
||||
{% if index %}
|
||||
<h1 class="entry-title"><a href="{{ root_url }}{{ post.url }}">{% if site.titlecase %}{{ post.title | titlecase }}{% else %}{{ post.title }}{% endif %}</a></h1>
|
||||
{% else %}
|
||||
<h1 class="entry-title">{% if site.titlecase %}{{ page.title | titlecase }}{% else %}{{ page.title }}{% endif %}</h1>
|
||||
{% endif %}
|
||||
{% include post/title.html %}
|
||||
{% unless page.meta == false %}
|
||||
<p class="meta">
|
||||
{% include post/date.html %}{{ time }}
|
||||
{% if site.disqus_short_name and page.comments != false and site.disqus_show_comment_count == true %}
|
||||
| <a href="{% if index %}{{ root_url }}{{ post.url }}{% endif %}#disqus_thread">Comments</a>
|
||||
• <a href="{% if post.url %}{{ permalink }}{% endif %}#disqus_thread">Comments</a>
|
||||
{% endif %}
|
||||
• <a rel="bookmark" href="{{ permalink }}">{{ site.permalink_label }}</a>
|
||||
</p>
|
||||
{% endunless %}
|
||||
</header>
|
||||
{% endunless %}
|
||||
{% if index %}
|
||||
{% capture excerpted %}{{ content | has_excerpt }}{% endcapture %}
|
||||
{% if post.url and excerpted %}
|
||||
<div class="entry-content">{{ content | excerpt }}</div>
|
||||
{% capture excerpted %}{{ content | has_excerpt }}{% endcapture %}
|
||||
{% if excerpted == 'true' %}
|
||||
<footer>
|
||||
<a rel="full-article" href="{{ root_url }}{{ post.url }}">{{ site.excerpt_link }}</a>
|
||||
<a rel="full-article" href="{{ permalink }}">{{ site.excerpt_link }}</a>
|
||||
</footer>
|
||||
{% endif %}
|
||||
{% else %}
|
||||
<div class="entry-content">{{ content }}</div>
|
||||
<div class="entry-content">{{ content }}</div>
|
||||
{% endif %}
|
||||
|
16
.themes/classic/source/_includes/post/title.html
Normal file
16
.themes/classic/source/_includes/post/title.html
Normal file
@ -0,0 +1,16 @@
|
||||
{% if page.external-url %}
|
||||
{% capture linklog %}{{ page.external-url }}{% endcapture %}
|
||||
{% elsif post.external-url %}
|
||||
{% capture linklog %}{{ post.external-url }}{% endcapture %}
|
||||
{% endif %}
|
||||
{% if post.url %}{% assign index = true %}{% endif %}
|
||||
{% capture permalink %}{% if index %}{{ root_url }}{{ post.url }}{% else %}{{ root_url }}{{ page.url }}{% endif %}{% endcapture %}
|
||||
{% capture title_url %}{% if linklog %}{{ linklog }}{% else %}{{ permalink }}{% endif %}{% endcapture %}
|
||||
{% capture article_title %}{% if index %}{{ post.title }}{% else %}{{ page.title }}{% endif %}{% endcapture %}
|
||||
{% capture linklog_marker %}<span class='linklog-marker'>{{ site.linklog_marker }}</span>{% endcapture %}
|
||||
|
||||
<h1 class="entry-titile">
|
||||
{% if linklog and site.linklog_marker and site.linklog_marker_position == 'before' %}{{ linklog_marker }}{% endif %}
|
||||
{% if index or linklog %}<a href="{{ title_url }}">{% endif %}{% if site.titlecase %}{{ article_title | titlecase }}{% else %}{{ article_title }}{% endif %}{% if index or linklog %}</a>{% endif %}
|
||||
{% if linklog and site.linklog_marker and site.linklog_marker_position == 'after' %}{{ linklog_marker }}{% endif %}
|
||||
</h1>
|
@ -3,7 +3,6 @@ layout: nil
|
||||
---
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<feed xmlns="http://www.w3.org/2005/Atom">
|
||||
|
||||
<title><![CDATA[{{ site.title }}]]></title>
|
||||
<link href="{{ site.url }}/atom.xml" rel="self"/>
|
||||
<link href="{{ site.url }}/"/>
|
||||
@ -16,12 +15,16 @@ layout: nil
|
||||
<generator uri="http://octopress.org/">Octopress</generator>
|
||||
|
||||
{% for post in site.posts limit: 20 %}
|
||||
{% if post.external-url %}{% capture linklog %}{{ post.external-url }}{% endcapture %}{% endif %}
|
||||
{% capture title_url %}{% if linklog %}{{ linklog }}{% else %}{{ site.url }}{{ post.url }}{% endif %}{% endcapture %}
|
||||
{% capture title %}{% if linklog and site.linklog_marker_position_feed == 'before' %}{{ site.linklog_marker }} {% endif %}{{ post.title }}{% if linklog and site.linklog_marker_position_feed == 'after' %} {{ site.linklog_marker }}{% endif %}{% endcapture %}
|
||||
<entry>
|
||||
<title type="html"><![CDATA[{{ post.title | cdata_escape }}]]></title>
|
||||
<link href="{{ site.url }}{{ post.url }}"/>
|
||||
<title type="html"><![CDATA[{{ title | cdata_escape }}]]></title>
|
||||
<link href="{{ title_url }}"/>
|
||||
<updated>{{ post.date | date_to_xmlschema }}</updated>
|
||||
<id>{{ site.url }}{{ post.id }}</id>
|
||||
<content type="html"><![CDATA[{{ post.content | expand_urls: site.url | cdata_escape }}]]></content>
|
||||
{% capture content %}{{ post.content | expand_urls: site.url | cdata_escape }}{% if linklog %}<p><a rel="bookmark" href="{{ site.url }}{{ post.url }}">{{ site.feed_permalink_label }}</a></p>{% endif %}{% endcapture %}
|
||||
<content type="html"><![CDATA[{{ content }}]]></content>
|
||||
</entry>
|
||||
{% endfor %}
|
||||
</feed>
|
||||
|
@ -3,7 +3,6 @@ layout: default
|
||||
---
|
||||
|
||||
<div class="blog-index">
|
||||
{% assign index = true %}
|
||||
{% for post in paginator.posts %}
|
||||
{% assign content = post.content %}
|
||||
<article>
|
||||
|
5
Rakefile
5
Rakefile
@ -59,7 +59,7 @@ desc "Watch the site and regenerate when it changes"
|
||||
task :watch do
|
||||
raise "### You haven't set anything up yet. First run `rake install` to set up an Octopress theme." unless File.directory?(source_dir)
|
||||
puts "Starting to watch source with Jekyll and Compass."
|
||||
system "compass compile --css-dir #{source_dir}/stylesheets" unless File.exist?("#{source_dir}/stylesheets/screen.css")
|
||||
system "compass compile --css-dir #{source_dir}/stylesheets"
|
||||
jekyllPid = Process.spawn({"OCTOPRESS_ENV"=>"preview"}, "jekyll --auto")
|
||||
compassPid = Process.spawn("compass watch")
|
||||
|
||||
@ -75,7 +75,7 @@ desc "preview the site in a web browser"
|
||||
task :preview do
|
||||
raise "### You haven't set anything up yet. First run `rake install` to set up an Octopress theme." unless File.directory?(source_dir)
|
||||
puts "Starting to watch source with Jekyll and Compass. Starting Rack on port #{server_port}"
|
||||
system "compass compile --css-dir #{source_dir}/stylesheets" unless File.exist?("#{source_dir}/stylesheets/screen.css")
|
||||
system "compass compile --css-dir #{source_dir}/stylesheets"
|
||||
jekyllPid = Process.spawn({"OCTOPRESS_ENV"=>"preview"}, "jekyll --auto")
|
||||
compassPid = Process.spawn("compass watch")
|
||||
rackupPid = Process.spawn("rackup --port #{server_port}")
|
||||
@ -106,6 +106,7 @@ task :new_post, :title do |t, args|
|
||||
post.puts "title: \"#{title.gsub(/&/,'&')}\""
|
||||
post.puts "date: #{Time.now.strftime('%Y-%m-%d %H:%M')}"
|
||||
post.puts "comments: true"
|
||||
post.puts "external-url: "
|
||||
post.puts "categories: "
|
||||
post.puts "---"
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user