better blog index and fix news link

This commit is contained in:
Torsten Ruger 2018-04-11 17:32:38 +03:00
parent 22a3d42cb6
commit 90fc084fca
4 changed files with 28 additions and 24 deletions

View File

@ -43,3 +43,10 @@ ul.nav
width: 78%
.menu
width: 20%
.blog
h1
font-size: 20px
h2
font-size: 16px
span
font-size: 14px

View File

@ -1,9 +1,12 @@
.blog.blog_index
- @posts.each do |slug , post|
.row
.col-md-2
.col-md-8
%h2= link_to post.title , blog_post_url(post.slug)
%h2
= link_to post.title , blog_post_url(post.slug)
%span
(
=post.date
)
%div
= render( "posts/#{post.template_name}" )[0 ... 350].html_safe
%span.whole= link_to ". . . .Read whole post" , blog_post_url(post.slug)
.col-md-2
%hr

View File

@ -14,18 +14,12 @@
%a{:href => "https://github.com/ruby-x"}
%img{:alt => "Fork me on GitHub", "data-canonical-src" => "https://s3.amazonaws.com/github/ribbons/forkme_left_orange_ff7600.png", :src => "https://camo.githubusercontent.com/8b6b8ccc6da3aa5722903da7b58eb5ab1081adee/68747470733a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f6c6566745f6f72616e67655f6666373630302e706e67", :style => "position: absolute; top: 0; left: 0; border: 0;"}/
%ul.nav
%li
%a{:href => "/"} Home
%li
%a{:href => "/rubyx/layers.html"} Architecture
%li
%a{:href => "/typed/typed.html"} Typed layer
%li
%a{:href => "/arm/overview.html"} Arm Resources
%li
%a{:href => "/project/motivation.html"} About
%li
= link_to "News" , blog_post_url(Post.posts.keys.first)
%li= link_to "Home" , root_path
%li= link_to "Architecture", "/rubyx/layers.html"
%li= link_to "Typed layer" , "/typed/typed.html"
%li= link_to "Arm Resources" , "/arm/overview.html"
%li= link_to "About" , "/project/motivation.html"
%li= link_to "News" , blog_index_path
=link_to "https://github.com/ruby-x" do
=image_tag "x-small.png", style: "position: absolute; top: 15px; right: 15px; border: 0; width: 70px"
%main.container

View File

@ -5,7 +5,7 @@
%p
I am very open for people to join. Say hello at the
= succeed "." do
%a{:href => "https://groups.google.com/forum/#!forum/ruby-x"} list
=ext_link "list" , "https://groups.google.com/forum/#!forum/ruby-x"
%p
I just want to mention that this is my hobby, something i do in my spare time, for fun.
I dont get any money and in fact, running 2 companies, have to carve the time to do this.
@ -17,14 +17,14 @@
%p Then fork and work on a branch before sending pull request.
%p
If you dont have an arm, here are instructions to run an
%a{:href => "/qemu.html"} emulator
=link_to "emulator", "/qemu.html"
(on mac)
%p I wrote some ideas in the about page, but here some more code related guidelines
%ul
%li Walk the straight line
Or “No futureproof” means not to design before you code. Not to anticipate, only to do the job that
Or “No future-proof” means not to design before you code. Not to anticipate, only to do the job that
needs doing. Better design should be extracted from working code.
%li tdd extreme
%li TDD extreme
Having suffered from broken software (small feature add breaks whole software) so many times, the new tdd
wind is not just nice, it is essential. Software size is measured in tests passed, not lines written. Any
new feature is only accepted with enough tests, bugs fixed after a failed test is written.
@ -33,7 +33,7 @@
natural understanding, even of code not read.
Good names are Formatter or compile, but unfortunately not everything we have learnt is named well, like
Array (should be ordered list), Hash (names implementation not function) or string (should be word, or bytebuffer).
%li No sahara
%li No Sahara
There has been much misunderstood talk about drying things up. Dry is good, but was never meant for code, but
for information (configuration). Trying to dry code completely leads to overly interdependent functions,
calling chains that are difficult to understand and serve only a misunderstood slogan.