-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
initial project creation - getting started form #18
Changes from all commits
d79d26d
88c4339
50ed794
a90a445
e1f0d54
d48b7fb
9394ea8
06967fd
b4f13f0
e96ddea
04f5a35
49e4da3
f1ff2bb
5841b06
a4507d8
3491d35
835ee3d
a87a694
15adb8e
5937e60
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
console.log("Hello only from new_project"); |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,23 @@ | ||
<div class="bg-green-300 border-green-600 border-b p-4 m-4 rounded"> | ||
<h1><%= t('hello') %></h1> | ||
<div class="flex flex-wrap overflow-hidden h-screen"> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This page isn't responsive. That is, it doesn't look good when you make the browser roughly the size of a phone. If we merge without making the page more responsive, I think we should create an issue to come back and make it more responsive later. At some screen size, it should switch from a horizontal to vertical layout. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. for certain, this PR still needs a lot of work, but I figured before I went any further we should check to see if it's going in the right direction for everyone. Further issues can certainly be opened, I'm not a styling expert so any further fixes are quite welcome. |
||
|
||
<div class="my-auto px-3 w-1/3 overflow-hidden"> | ||
<!-- Column 1 Content --> | ||
</div> | ||
|
||
<div class="my-auto px-3 w-1/3 overflow-hidden text-center"> | ||
<!-- Column 2 Content --> | ||
<%= image_tag "cover.svg", :style => "height: 600px; box-shadow: 16px 1px 5px -14px black;", :class => "booklet-svg mx-auto" %> | ||
</div> | ||
|
||
<div class="my-auto px-3 w-1/3 overflow-hidden"> | ||
<!-- Column 3 Content --> | ||
<div class="p-10 m-4 lg:text-5xl md:text-3xl text-center tangerine subpixel-antialiased"><%= t('welcome-greeting-1') %></div> | ||
<div class="p-10 m-4 lg:text-5xl md:text-3xl text-center tangerine subpixel-antialiased"><%= t('welcome-greeting-2') %></div> | ||
<div class="text-center"> | ||
<a href="<%= new_project_pages_path %>"> | ||
<button class="p-5 m-4 text-xl text-pink-500 bg-pink-100 hover:bg-pink-200 hover:text-pink-800 font-bold uppercase rounded-md outline-pink-200"><%= t('get-started-link') %></button> | ||
</a> | ||
</div> | ||
</div> | ||
|
||
</div> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,157 @@ | ||
<h1 class="py-6 my-6 text-center"><%= t('pages.new_project.title') %></h1> <!-- New wedding booklet project --> | ||
|
||
<form action="#" method="POST"> | ||
<div class="md:grid md:grid-cols-3 md:gap-6 bg-gray-200 p-9 mx-4"><!-- Inner wrapper for title + card start --> | ||
<div class="md:col-span-1"><!-- Title before card start --> | ||
<div class="px-4 sm:px-0"> | ||
<h3 class="text-lg font-medium leading-6 text-gray-900"><%= t('pages.new_project.request_info.title') %></h3> <!-- User info --> | ||
<p class="mt-1 text-sm text-gray-600"> | ||
<%= t('pages.new_project.request_info.description') %> <!-- Please fill in some information needed for composing the booklet. --> | ||
</p> | ||
<hr class="m-4 border-gray-400"> | ||
<p class="mt-1 text-sm text-gray-500 italic"> | ||
<%= t('pages.new_project.request_info.optional_login') %> <!-- If you already created an account, you may login instead. In that case any previously entered information will be retrieved. Or you can go ahead and register an account right away if you would like your project to be associated with your account. --> | ||
</p> | ||
<div class="text-center p-4 md:grid md:grid-cols-2 md:gap-3"> | ||
<button class="inline-flex justify-center py-2 px-4 border border-transparent shadow-sm text-sm font-medium rounded-md text-white bg-indigo-600 hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500"><%= t('action-login') %></button> | ||
<button class="inline-flex justify-center py-2 px-4 border border-transparent shadow-sm text-sm font-medium rounded-md text-white bg-indigo-600 hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500"><%= t('action-register') %></button> | ||
</div> | ||
</div> | ||
</div><!-- Title before card end --> | ||
<div class="mt-5 md:mt-0 md:col-span-2"><!-- Card outer wrapper start --> | ||
<div class="shadow sm:rounded-md sm:overflow-hidden"><!-- Card inner wrapper start --> | ||
<div class="px-4 py-5 bg-white space-y-6 sm:p-6"><!-- Card content start --> | ||
<fieldset><!-- Category person block start --> | ||
<legend class="text-base font-medium text-gray-900 required"><%= t('pages.new_project.person_category.label') %> <!-- You are: --></legend> | ||
<div class="mt-4 space-y-4"> | ||
<div class="flex items-center"> | ||
<input id="person_category_bride" name="person_category" type="radio" class="focus:ring-indigo-500 h-4 w-4 text-indigo-600 border-gray-300"> | ||
<label for="person_category_bride" class="ml-3 block text-sm font-medium text-gray-700"> | ||
<%= t('pages.new_project.person_category.bride') %> | ||
</label> | ||
</div> | ||
<div class="flex items-center"> | ||
<input id="person_category_groom" name="person_category" type="radio" class="focus:ring-indigo-500 h-4 w-4 text-indigo-600 border-gray-300"> | ||
<label for="person_category_groom" class="ml-3 block text-sm font-medium text-gray-700"> | ||
<%= t('pages.new_project.person_category.groom') %> | ||
</label> | ||
</div> | ||
<div class="flex items-center"> | ||
<input id="person_category_celebrant" name="person_category" type="radio" class="focus:ring-indigo-500 h-4 w-4 text-indigo-600 border-gray-300"> | ||
<label for="person_category_celebrant" class="ml-3 block text-sm font-medium text-gray-700"> | ||
<%= t('pages.new_project.person_category.celebrant') %> | ||
</label> | ||
</div> | ||
</div> | ||
</fieldset><!-- Person category block end --> | ||
<div class="grid grid-cols-3 gap-6"><!-- Email address block start --> | ||
<div class="col-span-3 sm:col-span-2"> | ||
<label for="email_address" class="block text-sm font-medium text-gray-700 required"> | ||
<%= t('pages.new_project.email_address.label') %><!-- Your email address is --> | ||
</label> | ||
<input type="text" name="email_address" id="email_address" class="focus:ring-indigo-500 focus:border-indigo-500 flex-1 block w-full border-gray-300 rounded py-2 px-3 sm:text-sm leading-tight" placeholder="[email protected]"> | ||
<p class="mt-2 text-sm text-gray-500 italic"> | ||
<%= t('pages.new_project.email_address.description') %> <!-- Your email address will never be shared without your permission. Wedding booklet projects you create will be associated with your email address. --> | ||
</p> | ||
</div> | ||
</div><!-- Email address block end --> | ||
<div class="grid grid-cols-3 gap-6"><!-- Marriage date block start --> | ||
<div class="col-span-3 sm:col-span-2"> | ||
<label for="marriage_date" class="block text-sm font-medium text-gray-700 required"> | ||
<%= t('pages.new_project.marriage_date.label') %><!-- The wedding will take place on: --> | ||
</label> | ||
<input type="datetime-local" name="marriage_date" id="marriage_date" class="focus:ring-indigo-500 focus:border-indigo-500 flex-1 block w-full border-gray-300 rounded py-2 px-3 sm:text-sm leading-tight"> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could there be a placeholder here? It's unclear what kind of time/date format would be best. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think pretty much all browsers now have a calendar picker? That should pretty much take care of getting the format right, because it will change between locales anyways and browsers handle that with the calendar picker. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
</div> | ||
</div><!--Marriage date block end --> | ||
<div class="grid grid-cols-3 gap-6"><!-- Marriage location church block start --> | ||
<div class="col-span-3 sm:col-span-2"> | ||
<label for="marriage_location.church" class="block text-sm font-medium text-gray-700 required"> | ||
<%= t('pages.new_project.marriage_location.church_label') %><!-- The wedding ceremony will take place at: --> | ||
</label> | ||
<input type="text" name="marriage_location.church" id="marriage_location.church" class="focus:ring-indigo-500 focus:border-indigo-500 flex-1 block w-full border-gray-300 rounded py-2 px-3 sm:text-sm leading-tight" placeholder="Saint Patrick Cathedral"> | ||
</div> | ||
</div><!--Marriage location block end --> | ||
<div class="grid grid-cols-3 gap-6"><!-- Marriage location city / nation block start --> | ||
<div class="col-span-3 sm:col-span-2"> | ||
<label for="marriage_location.city" class="block text-sm font-medium text-gray-700"> | ||
<%= t('pages.new_project.marriage_location.city_label') %> <!-- The wedding ceremony will take place in: --> | ||
</label> | ||
<input type="text" name="marriage_location.city" id="marriage_location.city" class="focus:ring-indigo-500 focus:border-indigo-500 flex-1 block w-full border-gray-300 rounded py-2 px-3 sm:text-sm leading-tight" placeholder="New York City, New York"> | ||
</div> | ||
</div><!--Marriage location block end --> | ||
|
||
</div><!-- Card content end --> | ||
</div><!-- Card inner wrapper end --> | ||
</div><!-- Card outer wrapper end --> | ||
</div><!-- Inner wrapper for title + card end --> | ||
|
||
<div class="hidden sm:block" aria-hidden="true"> | ||
<div class="py-5"> | ||
<div class="border-t border-gray-200"></div> | ||
</div> | ||
</div> | ||
|
||
<div class="mt-10 sm:mt-0 md:grid md:grid-cols-3 md:gap-6 bg-gray-200 p-9 mx-4"> | ||
<div class="md:col-span-1"> | ||
<div class="px-4 sm:px-0"> | ||
<h3 class="text-lg font-medium leading-6 text-gray-900"><%= t('pages.new_project.wedding_party.title') %></h3><!-- Wedding party --> | ||
<p class="mt-1 text-sm text-gray-600"> | ||
<%= t('pages.new_project.wedding_party.description') %><!-- C --> | ||
</p> | ||
</div> | ||
</div> | ||
<div class="mt-5 md:mt-0 md:col-span-2"> | ||
<div class="shadow overflow-hidden sm:rounded-md"> | ||
<div class="px-4 py-5 bg-white sm:p-6"> | ||
<div class="grid grid-cols-6 gap-6"> | ||
<div class="col-span-6 sm:col-span-3"> | ||
<label for="bride_firstname" class="block text-sm font-medium text-gray-700 required"><%= t('pages.new_project.wedding_party.bride.firstname_label') %></label> | ||
<input type="text" name="bride_firstname" id="bride_firstname" autocomplete="off" class="mt-1 focus:ring-indigo-500 focus:border-indigo-500 block w-full shadow-sm sm:text-sm border-gray-300 rounded-md"> | ||
</div> | ||
|
||
<div class="col-span-6 sm:col-span-3"> | ||
<label for="bride_lastname" class="block text-sm font-medium text-gray-700 required"><%= t('pages.new_project.wedding_party.bride.lastname_label') %></label> | ||
<input type="text" name="bride_lastname" id="bride_lastname" autocomplete="off" class="mt-1 focus:ring-indigo-500 focus:border-indigo-500 block w-full shadow-sm sm:text-sm border-gray-300 rounded-md"> | ||
</div> | ||
|
||
<div class="col-span-6 sm:col-span-3"> | ||
<label for="groom_firstname" class="block text-sm font-medium text-gray-700 required"><%= t('pages.new_project.wedding_party.groom.firstname_label') %></label> | ||
<input type="text" name="groom_firstname" id="groom_firstname" autocomplete="off" class="mt-1 focus:ring-indigo-500 focus:border-indigo-500 block w-full shadow-sm sm:text-sm border-gray-300 rounded-md"> | ||
</div> | ||
|
||
<div class="col-span-6 sm:col-span-3"> | ||
<label for="groom_lastname" class="block text-sm font-medium text-gray-700 required"><%= t('pages.new_project.wedding_party.groom.lastname_label') %></label> | ||
<input type="text" name="groom_lastname" id="groom_lastname" autocomplete="off" class="mt-1 focus:ring-indigo-500 focus:border-indigo-500 block w-full shadow-sm sm:text-sm border-gray-300 rounded-md"> | ||
</div> | ||
|
||
<div class="col-span-6 sm:col-span-3"> | ||
<label for="maidofhonor_firstname" class="block text-sm font-medium text-gray-700 required"><%= t('pages.new_project.wedding_party.maidofhonor.firstname_label') %></label> | ||
<input type="text" name="maidofhonor_firstname" id="maidofhonor_firstname" autocomplete="off" class="mt-1 focus:ring-indigo-500 focus:border-indigo-500 block w-full shadow-sm sm:text-sm border-gray-300 rounded-md"> | ||
</div> | ||
|
||
<div class="col-span-6 sm:col-span-3"> | ||
<label for="maidofhonor_lastname" class="block text-sm font-medium text-gray-700 required"><%= t('pages.new_project.wedding_party.maidofhonor.lastname_label') %></label> | ||
<input type="text" name="maidofhonor_lastname" id="maidofhonor_lastname" autocomplete="off" class="mt-1 focus:ring-indigo-500 focus:border-indigo-500 block w-full shadow-sm sm:text-sm border-gray-300 rounded-md"> | ||
</div> | ||
|
||
<div class="col-span-6 sm:col-span-3"> | ||
<label for="bestman_firstname" class="block text-sm font-medium text-gray-700 required"><%= t('pages.new_project.wedding_party.bestman.firstname_label') %></label> | ||
<input type="text" name="bestman_firstname" id="bestman_firstname" autocomplete="off" class="mt-1 focus:ring-indigo-500 focus:border-indigo-500 block w-full shadow-sm sm:text-sm border-gray-300 rounded-md"> | ||
</div> | ||
|
||
<div class="col-span-6 sm:col-span-3"> | ||
<label for="bestman_lastname" class="block text-sm font-medium text-gray-700 required"><%= t('pages.new_project.wedding_party.bestman.lastname_label') %></label> | ||
<input type="text" name="bestman_lastname" id="bestman_lastname" autocomplete="off" class="mt-1 focus:ring-indigo-500 focus:border-indigo-500 block w-full shadow-sm sm:text-sm border-gray-300 rounded-md"> | ||
</div> | ||
</div> | ||
</div> | ||
<div class="px-4 py-3 bg-gray-50 text-right sm:px-6"> | ||
<button type="submit" class="inline-flex justify-center py-2 px-4 border border-transparent shadow-sm text-sm font-medium rounded-md text-white bg-indigo-600 hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500"> | ||
<%= t('pages.new_project.create_project_button') %><!-- Create project --> | ||
</button> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</form> | ||
<%= javascript_pack_tag 'new_project' %> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should consider if we want to do this "the tailwind way" by modifying our
tailwind.config.js
. Perhaps this could be ourdisplay
font, or perhaps we could introduce it as its own font family class. Here's the tailwind docs about fonts.This doesn't need to prevent this PR from merging, just a thought/suggestion, and we could always do it later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have tried defining a tailwind font class in
tailwind.config.js
like this:But it doesn't seem to be working. I apply a
font-tangerine
class to thediv
that I want styled with the Tangerine Google WebFont, but the font is not applied, and inspecting the browser console, I don't see any rules for a.font-tangerine
class.Does something need to be run after the
tailwind.config.js
file is changed, in order for the changes to be picked up? I triedbin/rails assets:precompile
but it didn't help, I triednpm run postcss:build
but I'm getting an errormissing script: postcss:build
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wouldn't be using this font too much in the UI in any case, it's more for show on the home page for a nice first impact.