browser post initial

This commit is contained in:
Lorin Werthen 2016-10-29 22:04:20 +02:00
parent 62e812b9bb
commit 47bcb817e7
No known key found for this signature in database
GPG key ID: F11FFC921E0E08E0
4 changed files with 64 additions and 20 deletions

1
.author-information Normal file
View file

@ -0,0 +1 @@
Lorin Werthen

View file

@ -11,39 +11,36 @@ def bold_say(str)
end end
def bold_ask(str, *args) def bold_ask(str, *args)
ask "<%= color %(#{str}), :bold %>", *args res = ask "<%= color %(#{str}), :bold %>", *args
puts
res
end end
run do |_opts, _args, _cmd| run do |_opts, _args, _cmd|
result_hash = {} result_hash = {}
post_directory = 'content/posts'
author_file = '.author-information'
bold_say "Let's make a new post, shall we?" bold_say "Let's make a new post, shall we?"
bold_say('-' * 20) bold_say('-' * 20)
puts last_entry = "#{post_directory}/#{Dir.entries('content/posts').last}"
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
result_hash['title'] = bold_ask 'What will the title be?' 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 result_hash['author'] = if File.exist? author_file
File.read(author_file).chomp
puts else
bold_ask 'What is your name?'
result_hash['banner'] = bold_ask 'Supply a link to the banner of the event, please' if type == :event end
puts result_hash.to_yaml 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 end

View file

@ -145,3 +145,7 @@ footer.footer {
padding-right: 5px; padding-right: 5px;
} }
} }
.fa {
vertical-align: baseline;
}

View 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