Skip to content

Commit

Permalink
#59 /recent
Browse files Browse the repository at this point in the history
  • Loading branch information
yegor256 committed Jan 29, 2020
1 parent 83f4263 commit 7b9b5db
Show file tree
Hide file tree
Showing 4 changed files with 50 additions and 3 deletions.
6 changes: 6 additions & 0 deletions codexia.rb
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,12 @@
)
end

get '/recent' do
haml :recent, layout: :layout, locals: merged(
title: '/recent'
)
end

def current_user
redirect '/' unless @locals[:user]
@locals[:user][:login].downcase
Expand Down
3 changes: 2 additions & 1 deletion test/test_codexia.rb
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ def test_renders_pages
'/version',
'/robots.txt',
'/',
'/js/smth.js'
'/js/smth.js',
'/recent'
]
pages.each do |p|
get(p)
Expand Down
42 changes: 40 additions & 2 deletions views/index.haml
Original file line number Diff line number Diff line change
@@ -1,2 +1,40 @@
%p
Hello!
!!! 5
%html
%head
%title= title
%meta{charset:'UTF-8'}
%meta{name: 'viewport', content: 'width=device-width, initial-scale=1.0'}
%meta{name: 'keywords', content: 'investment, open source, incubator'}
%meta{name: 'description', content: 'Open Source Incubator: to help young emerging projects to grow and reach their users faster'}
%link{href: 'https://cdn.jsdelivr.net/gh/yegor256/tacit@gh-pages/tacit-css.min.css', rel: 'stylesheet'}
%link{href: 'https://cdn.jsdelivr.net/gh/yegor256/drops@gh-pages/drops.min.css', rel: 'stylesheet'}
%link{rel: 'shortcut icon', href: iri.cut('/favicon.ico')}
:css
.item { margin-right: 1em; }
.logo { width: 64px; height: 64px; }
.body { font-size: 24px; }
.center {
width: 20em;
max-width: 100%;
padding: 1em;
height: 20em;
position: absolute;
top:0;
bottom: 0;
left: 0;
right: 0;
margin: auto;
}
p { margin: 1em 0; }
%body
%div.center.monospace
%p
%img{src: 'logo.svg', style: 'width:250px;', alt: 'logo'}
%p
%strong.firebrick Codexia
is an open source incubator.
%p{style: 'font-size: 0.6em; line-height: 1.4em;'}
More news are coming, stay tuned<br/>
and join us in <
%a{href: 'https://t.me/cdxia'} Telegram

2 changes: 2 additions & 0 deletions views/recent.haml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
%p
Recent...

0 comments on commit 7b9b5db

Please sign in to comment.