Skip to content
This repository has been archived by the owner on Feb 6, 2024. It is now read-only.

Commit

Permalink
mostly design bits
Browse files Browse the repository at this point in the history
  • Loading branch information
Shpigford committed Jan 9, 2024
1 parent 2d8b412 commit 975b10c
Show file tree
Hide file tree
Showing 11 changed files with 169 additions and 12 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,5 @@
/app/assets/builds/*
!/app/assets/builds/.keep
*NOTES*
lib/data/.DS_Store
.DS_Store
/lib/data/*
18 changes: 18 additions & 0 deletions app/assets/images/logo-color-mark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
32 changes: 32 additions & 0 deletions app/assets/images/logo-color.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
25 changes: 25 additions & 0 deletions app/assets/images/logo-light.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions app/assets/stylesheets/application.tailwind.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@

@layer components {
.btn-primary {
@apply bg-blue-400 hover:bg-blue-500 border border-blue-500 text-white text-sm px-3 py-1.5 rounded-[10px] text-center;
@apply bg-vermilion-500 hover:bg-vermilion-600 border border-vermilion-600 text-white text-sm px-3 py-1.5 rounded-[10px] text-center;
}

.btn-secondary {
@apply bg-white hover: bg-gray-50 border border-gray-200 text-black text-sm px-3 py-1.5 rounded-[10px] text-center;
}
}
}
6 changes: 3 additions & 3 deletions app/helpers/application_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ def subheading(subheading)
end

def navigation_link(path, text, icon)
css_class = current_page?(path) ? 'flex gap-x-2 items-center px-3 py-3 text-base font-medium text-gray-900 rounded-md hover:bg-gray-200 bg-gray-100 group'
: 'flex gap-x-2 items-center px-3 py-3 text-base font-medium text-gray-400 rounded-md hover:bg-gray-200 group'
icon_color = current_page?(path) ? 'text-caribbean-green-500' : 'text-gray-400'
css_class = current_page?(path) ? 'flex gap-x-2 items-center px-3 py-3 text-base font-medium text-woodsmoke-900 rounded-md hover:bg-woodsmoke-200 bg-woodsmoke-100 group'
: 'flex gap-x-2 items-center px-3 py-3 text-base font-medium text-woodsmoke-400 rounded-md hover:bg-woodsmoke-200 group'
icon_color = current_page?(path) ? 'text-caribbean-green-500' : 'text-woodsmoke-400'

link_to path, class: css_class do
concat(content_tag(:i, nil, class: "text-lg #{icon_color} fa-kit #{icon}"))
Expand Down
3 changes: 3 additions & 0 deletions app/models/exchange.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,7 @@ class Exchange < ApplicationRecord
has_many :operating_hours
has_many :holidays
has_many :transactions, as: :transactable, dependent: :destroy
belongs_to :parent, class_name: 'Exchange', foreign_key: 'operating_mic_code', primary_key: 'mic_code', optional: true
has_many :children, class_name: 'Exchange', foreign_key: 'operating_mic_code', primary_key: 'mic_code'

end
37 changes: 36 additions & 1 deletion app/views/api/exchanges/_exchange.json.jbuilder
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,41 @@ json.acronym exchange.acronym
json.mic_code exchange.mic_code
json.city exchange.city
json.country_code exchange.country_code
json.kind exchange.kind
json.timezone exchange.timezone
json.currency exchange.currency
json.links exchange.links
json.links exchange.links

if params[:related]
if exchange.kind == 'segment'
json.operating_exchange do
json.id exchange.parent.id
json.name exchange.parent.name
json.acronym exchange.parent.acronym
json.mic_code exchange.parent.mic_code
json.city exchange.parent.city
json.country_code exchange.parent.country_code
json.kind exchange.parent.kind
json.timezone exchange.parent.timezone
json.currency exchange.parent.currency
json.links exchange.parent.links
end
end

if exchange.kind == 'operating'
json.segment_exchanges do
json.array! exchange.children do |segment|
json.id segment.id
json.name segment.name
json.acronym segment.acronym
json.mic_code segment.mic_code
json.city segment.city
json.country_code segment.country_code
json.kind segment.kind
json.timezone segment.timezone
json.currency segment.currency
json.links segment.links
end
end
end
end
6 changes: 3 additions & 3 deletions app/views/layouts/application.html.erb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!DOCTYPE html>
<html class="h-full bg-gray-50">
<html class="h-full bg-vista-50">
<head>
<title><%= content_for?(:title) ? ("#{yield(:title)} - Synth").html_safe : "Synth" %></title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
Expand Down Expand Up @@ -32,10 +32,10 @@
<body>
<div class="h-full">
<div class="hidden md:fixed md:inset-y-0 md:flex md:w-[275px] md:flex-col">
<div class="flex flex-col justify-between flex-grow pt-5 overflow-y-auto bg-gray-50">
<div class="flex flex-col justify-between flex-grow pt-5 overflow-y-auto bg-vista-50">
<div>
<div class="px-6 mb-4">
<%= link_to image_tag("logomark.svg", class: 'block w-auto h-6'), root_path, data: { turbo: false} %>
<%= link_to image_tag("logo-color.svg", class: 'block w-auto h-8'), root_path, data: { turbo: false} %>
</div>

<div class="flex flex-col flex-1 p-4">
Expand Down
4 changes: 2 additions & 2 deletions app/views/layouts/devise.html.erb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!DOCTYPE html>
<html class="h-full bg-gray-50">
<html class="h-full bg-vista-50">
<head>
<title><%= content_for?(:title) ? ("#{yield(:title)} - Synth").html_safe : "Synth" %></title>
<meta name="viewport" content="width=device-width,initial-scale=1">
Expand Down Expand Up @@ -30,7 +30,7 @@
<div class="flex flex-col justify-between min-h-full py-12 sm:px-6 lg:px-8">
<div class="flex flex-col justify-center flex-grow">
<div class="sm:mx-auto sm:w-full sm:max-w-md">
<%= image_tag "logomark.svg", class: "w-auto h-10 mx-auto" %>
<%= image_tag "logo-color.svg", class: "w-auto h-12 mx-auto" %>
</div>

<div class="mt-8 sm:mx-auto sm:w-full sm:max-w-md">
Expand Down
43 changes: 43 additions & 0 deletions config/tailwind.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,49 @@ module.exports = {
fontFamily: {
sans: ['Inter var', ...defaultTheme.fontFamily.sans],
},
colors: {
black: '#1a1a1a',
'vista': {
'25': '#f9f9f9',
'50': '#f7f4f2',
'100': '#efe9e5',
'200': '#ded2ca',
'300': '#c9b4a8',
'400': '#b29285',
'500': '#a37a6c',
'600': '#956b61',
'700': '#7d5751',
'800': '#664946',
'900': '#543d3a',
'950': '#2c1f1e',
},
'vermilion': {
'50': '#fff6ec',
'100': '#ffead3',
'200': '#ffd2a6',
'300': '#ffb26e',
'400': '#ff8533',
'500': '#ff630c',
'600': '#f44702',
'700': '#ca3304',
'800': '#a0290c',
'900': '#81240d',
'950': '#460e04',
},
'woodsmoke': {
'50': '#f6f6f6',
'100': '#e7e7e7',
'200': '#d1d1d1',
'300': '#b0b0b0',
'400': '#888888',
'500': '#6d6d6d',
'600': '#5d5d5d',
'700': '#4f4f4f',
'800': '#454545',
'900': '#3d3d3d',
'950': '#1a1a1a',
},
}
},
},
plugins: [
Expand Down

0 comments on commit 975b10c

Please sign in to comment.