diff --git a/Gemfile b/Gemfile index d01c681..12f8803 100644 --- a/Gemfile +++ b/Gemfile @@ -1,6 +1,7 @@ source 'https://rubygems.org' gem 'sinatra' +gem 'sinatra-partial' gem 'data_mapper' gem 'rake' diff --git a/Gemfile.lock b/Gemfile.lock index dfb770c..1cf4bd9 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -97,6 +97,8 @@ GEM rack (~> 1.4) rack-protection (~> 1.4) tilt (~> 1.3, >= 1.3.4) + sinatra-partial (0.4.0) + sinatra sqlite3 (1.3.9) stringex (1.5.1) tilt (1.4.1) @@ -119,4 +121,5 @@ DEPENDENCIES rake rerun sinatra + sinatra-partial sqlite3 diff --git a/linkedout.rb b/linkedout.rb index a791d0c..21fed6b 100644 --- a/linkedout.rb +++ b/linkedout.rb @@ -1,9 +1,12 @@ require 'sinatra' +require 'sinatra/partial' require 'better_errors' require_relative 'config/dotenv' require_relative 'models' +set :partial_template_engine, :erb + configure :development do use BetterErrors::Middleware BetterErrors.application_root = File.expand_path('..', __FILE__) diff --git a/public/main.css b/public/main.css index 7ba924b..f57fce3 100644 --- a/public/main.css +++ b/public/main.css @@ -1,9 +1,125 @@ +/* + * HEADER + */ header { min-width: 100%; text-align: center; + background-color: #555; + color: #fff; + padding: 0.5em; } -.resume { +header h1 { + margin: 0; + font-size: 1.5em; +} + + +/* + * PAGE + */ +.page { margin: 0 auto; width: 720px; } + +/* Separate page nav area from the main content with a border */ +.page nav { + padding-bottom: 0.25em; + border-bottom: 1px solid; + margin-bottom: 0.5em; +} + +.page nav a { + float: right; +} + +/* Highlight section for featured content */ +.highlight { + width: 100%; + margin-bottom: 3em; +} + +.highlight p { font-size: 1.5em; } + + +/* + * GRID + */ +.row { + display: block; + clear: both; +} + +.row:after { + display: block; + content: ""; + line-height: 0; + clear: both; +} + +/* 1/3 column (720 * 1/3) */ +.one_third { + float: left; + width: 240px; +} + +/* 2/3 column (720 * 2/3 - margin) */ +.two_thirds { + float: left; + width: 460px; + margin-right: 20px; +} + + +/* + * FORMS + */ +textarea { + width: 360px; + height: 3em; +} + +form.vertical label { + display: inline-block; + min-width: 120px; + vertical-align: top; +} + +form.vertical input { margin-bottom: 0.25em; } + +form.vertical input[type="submit"] { + margin-left: 124px; + padding: 0.25em; +} + +form.mini input[type="text"] { max-width: 160px; } +form.mini input[type="submit"] { float: right; } + + +/* + * UTILITY CLASSES + */ +.no_bullets { + list-style-type: none; +} + +.no_padding { + padding: 0; +} + + +/* + * SECTION STYLING + */ + +/* Jobs section */ +.jobs li { margin-bottom: 2.5em; } +.jobs li h4 { margin-bottom: 0; } + +/* Skills section */ +.skills li { + padding: 0.25em; + margin-bottom: 1em; + background-color: #ccc; +} diff --git a/views/partials/job.erb b/views/partials/job.erb new file mode 100644 index 0000000..0db8394 --- /dev/null +++ b/views/partials/job.erb @@ -0,0 +1,4 @@ +
<%= job.job_description %>
+<%= user.bio %>
+<%= default_user.bio %>
-<%= job.job_description %>
-