diff --git a/README.md b/README.md index 2728ce8..17cb8a2 100644 --- a/README.md +++ b/README.md @@ -2,13 +2,10 @@ [![Travis](https://travis-ci.org/hakanensari/frankfurter.svg)](https://travis-ci.org/hakanensari/frankfurter) -Foreign exchange (forex) rates and currency conversion API +Frankfurter is a free and open source API for current and historical foreign exchange rates. It tracks data published by the European Central Bank. Rates are updated around 4PM CET every working day. -## Getting Started +A public instance of the API is hosted on `https://frankfurter.app`. Alternatively, you can self-host a private instance using the provided Docker image. -Frankfurter is a free and open source API for current and historical foreign exchange rates. It tracks data published by the European Central Bank. - -Rates are updated around 4PM CET every working day. ## Examples @@ -91,7 +88,6 @@ To update to a newer image, run ```bash docker-compose -f docker-compose.yml -f docker-compose.prod.yml pull -docker-compose -f docker-compose.yml -f docker-compose.prod.yml up -d ``` -Within a few minutes, you will access the API at `https://yourdomain.com`. +Within a few minutes, you will access the API at `https://yourdomain.com/`. diff --git a/lib/web/public/images/frankfurter-solid.png b/lib/web/public/images/frankfurter-solid.png deleted file mode 100644 index a100560..0000000 Binary files a/lib/web/public/images/frankfurter-solid.png and /dev/null differ diff --git a/lib/web/public/stylesheets/sass/application.scss b/lib/web/public/stylesheets/sass/application.scss index d793264..4b02b2f 100644 --- a/lib/web/public/stylesheets/sass/application.scss +++ b/lib/web/public/stylesheets/sass/application.scss @@ -21,9 +21,12 @@ body { } } -.content { - margin-bottom: 2em; +.container { max-width: 720px; +} + +.header { + margin-bottom: 2em; .logo { img { @@ -34,33 +37,31 @@ body { .logo, h1, - h1+p+p { + h2 { + color: #FFF; text-align: center; } h1 { font-size: 56px; + } + h2 { + font-size: 20px; + margin-bottom: 2em; + } +} + +.content { + h1 { + &, &+p { display: none; } - - &+p+p { - margin-bottom: 2em; - } - - &, - &+p+p { - color: #FFF; - } } - h1+p+p, h2 { font-size: 20px; - } - - h2 { font-weight: bold; } } @@ -89,6 +90,6 @@ code:not(.hljs) { .footer { color: #FFF; - margin: 2em 0; + margin: 2em auto; text-align: center; } diff --git a/lib/web/server.rb b/lib/web/server.rb index 7c8376f..60aa83a 100644 --- a/lib/web/server.rb +++ b/lib/web/server.rb @@ -33,6 +33,8 @@ configure :test do set :raise_errors, false end +set :static_cache_control, [:public, max_age: 300] + helpers do def end_of_day_quote @end_of_day_quote ||= begin diff --git a/lib/web/views/index.erb b/lib/web/views/index.erb index 0d1aea2..7f20091 100644 --- a/lib/web/views/index.erb +++ b/lib/web/views/index.erb @@ -1,20 +1,79 @@ - + Foreign exchange rates and currency conversion API | Frankfurter + - - <% if ENV['GA_TRACKING_ID'] %> + + + <% end %> + + + + + +
+ +

Frankfurter

+

Foreign exchange (forex) rates and currency conversion API

+
+ +
+ <%= content %> +
+ + + + + + <% if ENV['GA_TRACKING_ID'] %> - - - <% end %> - - - - - - -
- - <%= content %> -
- - - - -