remove all references to the old news page
This commit is contained in:
parent
d88baa8233
commit
0e9700b912
6 changed files with 0 additions and 92 deletions
|
|
@ -6,7 +6,6 @@ install:
|
|||
script:
|
||||
-
|
||||
# - rake generate_downloads
|
||||
# - rake copy_newsletter_posts
|
||||
# - rake travis
|
||||
#deploy: # https://docs.travis-ci.com/user/deployment/pages/
|
||||
# provider: pages
|
||||
|
|
|
|||
|
|
@ -9,7 +9,6 @@ TODO
|
|||
- [ ] responsive sizes
|
||||
- [x] download details pages
|
||||
- [x] landing page
|
||||
- [ ] news page, import newsletter repo as a submodule
|
||||
- [x] help page
|
||||
- [x] setup travis for generate_downloads.rb
|
||||
- [x] update header to latest version (different logo)
|
||||
|
|
|
|||
|
|
@ -14,4 +14,3 @@
|
|||
@import 'pages/home';
|
||||
@import 'pages/downloads';
|
||||
@import 'pages/download';
|
||||
@import 'pages/news';
|
||||
|
|
|
|||
|
|
@ -1,15 +0,0 @@
|
|||
.post-list {
|
||||
margin-left: 0;
|
||||
list-style: none;
|
||||
|
||||
> li {
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
|
||||
h2 {
|
||||
line-height: 24px;
|
||||
a {
|
||||
color: #000;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,31 +0,0 @@
|
|||
#!/usr/bin/env ruby
|
||||
|
||||
require 'rubygems'
|
||||
require 'open-uri'
|
||||
require 'json'
|
||||
require 'base64'
|
||||
|
||||
desc 'Copy files from the newsletter repository'
|
||||
task :copy_newsletter_posts do
|
||||
file = open('https://api.github.com/repos/adafruit/circuitpython-weekly-newsletter/contents/_posts').read
|
||||
|
||||
posts = JSON.parse(file)
|
||||
|
||||
posts.each do |post|
|
||||
response = JSON.parse(open(post["url"]).read)
|
||||
content = Base64.decode64(response["content"])
|
||||
File.write File.join(File.dirname(__FILE__), '../../_posts/', post["name"]), content
|
||||
sleep 2
|
||||
end
|
||||
|
||||
file = open('https://api.github.com/repos/adafruit/circuitpython-weekly-newsletter/contents/assets').read
|
||||
|
||||
assets = JSON.parse(file)
|
||||
|
||||
assets.each do |asset|
|
||||
response = JSON.parse(open(asset["url"]).read)
|
||||
content = Base64.decode64(response["content"])
|
||||
File.write File.join(File.dirname(__FILE__), '../../assets/', asset["name"]), content
|
||||
sleep 2
|
||||
end
|
||||
end
|
||||
43
news.html
43
news.html
|
|
@ -1,43 +0,0 @@
|
|||
---
|
||||
layout: default
|
||||
---
|
||||
|
||||
<div class="home">
|
||||
|
||||
<ul class="post-list">
|
||||
{% for post in site.posts %}
|
||||
<li>
|
||||
<span class="post-meta">{{ post.date | date: "%b %-d, %Y" }}</span>
|
||||
|
||||
<h2>
|
||||
<a class="post-link" href="{{ post.url | prepend: site.baseurl }}">{{ post.title }}</a>
|
||||
</h2>
|
||||
|
||||
<article class="post-content">
|
||||
{{ post.excerpt }}
|
||||
</article>
|
||||
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
||||
<script type='text/javascript'>
|
||||
window.onload = function () {
|
||||
try {
|
||||
var headers = document.querySelectorAll('article h2');
|
||||
headers.forEach(function (hdr) {
|
||||
var title = hdr.closest('li').querySelector('.post-link');
|
||||
console.log(title.innerText);
|
||||
console.log(hdr.innerText);
|
||||
if (hdr.innerText === title.innerText) {
|
||||
console.log('here');
|
||||
hdr.remove();
|
||||
}
|
||||
});
|
||||
} catch (ex) {
|
||||
// ignore
|
||||
}
|
||||
}
|
||||
</script>
|
||||
Loading…
Reference in a new issue