browser post initial
This commit is contained in:
parent
62e812b9bb
commit
47bcb817e7
4 changed files with 64 additions and 20 deletions
1
.author-information
Normal file
1
.author-information
Normal file
|
@ -0,0 +1 @@
|
|||
Lorin Werthen
|
|
@ -11,39 +11,36 @@ def bold_say(str)
|
|||
end
|
||||
|
||||
def bold_ask(str, *args)
|
||||
ask "<%= color %(#{str}), :bold %>", *args
|
||||
res = ask "<%= color %(#{str}), :bold %>", *args
|
||||
puts
|
||||
res
|
||||
end
|
||||
|
||||
run do |_opts, _args, _cmd|
|
||||
result_hash = {}
|
||||
post_directory = 'content/posts'
|
||||
author_file = '.author-information'
|
||||
|
||||
bold_say "Let's make a new post, shall we?"
|
||||
bold_say('-' * 20)
|
||||
|
||||
puts
|
||||
|
||||
bold_say 'What kind of post will it be?'
|
||||
|
||||
type = choose do |menu|
|
||||
default = :event
|
||||
|
||||
menu.prompt = "(default #{default})"
|
||||
menu.choice :blog
|
||||
menu.choice :event
|
||||
menu.default = default
|
||||
end
|
||||
|
||||
puts
|
||||
last_entry = "#{post_directory}/#{Dir.entries('content/posts').last}"
|
||||
|
||||
result_hash['title'] = bold_ask 'What will the title be?'
|
||||
|
||||
puts
|
||||
result_hash['description'] = bold_ask 'Give a description of the event'
|
||||
|
||||
result_hash['time'] = bold_ask 'When will the event take place?', Date
|
||||
|
||||
puts
|
||||
|
||||
result_hash['banner'] = bold_ask 'Supply a link to the banner of the event, please' if type == :event
|
||||
|
||||
puts result_hash.to_yaml
|
||||
result_hash['author'] = if File.exist? author_file
|
||||
File.read(author_file).chomp
|
||||
else
|
||||
bold_ask 'What is your name?'
|
||||
end
|
||||
|
||||
result_hash['created_at'] = Date.today
|
||||
|
||||
filename = result_hash['title'].downcase.tr(' ', '-').gsub(/[^0-9A-Za-z-]/, '')
|
||||
|
||||
File.open("#{last_entry}/#{filename}.md", 'w') do |file|
|
||||
file.write(result_hash.to_yaml + '---')
|
||||
end
|
||||
end
|
||||
|
|
|
@ -145,3 +145,7 @@ footer.footer {
|
|||
padding-right: 5px;
|
||||
}
|
||||
}
|
||||
|
||||
.fa {
|
||||
vertical-align: baseline;
|
||||
}
|
||||
|
|
42
content/posts/16-17/how-do-i-browser.md
Normal file
42
content/posts/16-17/how-do-i-browser.md
Normal file
|
@ -0,0 +1,42 @@
|
|||
---
|
||||
title: How do I browser?
|
||||
description: Being a massive hipster, I tried out every obscure browser I could find. These are my opinions, for what it's worth.
|
||||
author: Lorin Werthen
|
||||
created_at: 25-10-2016
|
||||
---
|
||||
|
||||
# Dingen
|
||||
|
||||
It's 2016. We have hoverboards, selfie sticks, way too many JavaScript package managers and an obsession for ironic humor. In these dark days, we should search for those things that truly make us happy, like finding that near perfect web browser.
|
||||
|
||||
In this post we compare the usual contenders, together with some cool, groovy, new browsers.
|
||||
|
||||
* Google Chrome/Chromium
|
||||
* Firefox
|
||||
* Vivaldi
|
||||
* Opera
|
||||
* Internet Explorer
|
||||
* Brave
|
||||
* qutebrowser
|
||||
|
||||
## Google Chrome/Chromium
|
||||
Ah good old Chrom{e,ium}. Whether you go for the open source or the corporate version, you're getting a damn good browser. Most websites seem to be designed with Chrome (or just WebKit browsers in general) in mind. The **Chrome Web Store** is without a doubt the most mature web store with thousands upon thousands of extensions.
|
||||
|
||||
Rating: <i class="fa fa-star"></i> <i class="fa fa-star"></i> <i class="fa fa-star"></i> <i class="fa fa-star"></i>
|
||||
|
||||
## Firefox
|
||||
|
||||
|
||||
## Vivaldi
|
||||
|
||||
|
||||
## Opera
|
||||
|
||||
|
||||
## Internet Explorer
|
||||
|
||||
|
||||
## Brave
|
||||
|
||||
|
||||
## qutebrowser
|
Loading…
Reference in a new issue