<%= notice %>
<% end %> + <% if alert %><%= alert %>
<% end %> + <%= yield %> +diff --git a/Gemfile b/Gemfile index 5efe339e6..35de3cbf2 100644 --- a/Gemfile +++ b/Gemfile @@ -76,10 +76,13 @@ end # Developer Added Gems gem 'dotenv-rails' +gem 'mapbox-gl-rails' # Suggested Potentially Useful Gems -# gem 'devise' +gem 'devise' # gem 'httparty' # gem 'paperclip # gem 'uniquify' # gem 'will_paginate' + +gem "geocoder", "~> 1.8" diff --git a/Gemfile.lock b/Gemfile.lock index c3e104938..ad6dec17d 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -66,13 +66,14 @@ GEM i18n (>= 1.6, < 2) minitest (>= 5.1) tzinfo (~> 2.0) - addressable (2.8.1) + addressable (2.8.5) public_suffix (>= 2.0.2, < 6.0) + bcrypt (3.1.19) bindex (0.8.1) - bootsnap (1.13.0) + bootsnap (1.17.0) msgpack (~> 1.2) builder (3.2.4) - capybara (3.37.1) + capybara (3.39.2) addressable matrix mini_mime (>= 0.1.3) @@ -81,68 +82,79 @@ GEM rack-test (>= 0.6.3) regexp_parser (>= 1.5, < 3.0) xpath (~> 3.2) - childprocess (4.1.0) - concurrent-ruby (1.1.10) + concurrent-ruby (1.2.2) crass (1.0.6) - debug (1.6.2) - irb (>= 1.3.6) + date (3.3.4) + debug (1.8.0) + irb (>= 1.5.0) reline (>= 0.3.1) - digest (3.1.0) + devise (4.9.3) + bcrypt (~> 3.0) + orm_adapter (~> 0.1) + railties (>= 4.1.0) + responders + warden (~> 1.2.3) dotenv (2.8.1) dotenv-rails (2.8.1) dotenv (= 2.8.1) railties (>= 3.2) erubi (1.11.0) + geocoder (1.8.2) globalid (1.0.0) activesupport (>= 5.0) i18n (1.12.0) concurrent-ruby (~> 1.0) - importmap-rails (1.1.5) + importmap-rails (1.2.3) actionpack (>= 6.0.0) + activesupport (>= 6.0.0) railties (>= 6.0.0) - io-console (0.5.11) - irb (1.4.1) - reline (>= 0.3.0) + io-console (0.6.0) + irb (1.8.3) + rdoc + reline (>= 0.3.8) jbuilder (2.11.5) actionview (>= 5.0.0) activesupport (>= 5.0.0) - loofah (2.18.0) + loofah (2.21.4) crass (~> 1.0.2) - nokogiri (>= 1.5.9) - mail (2.7.1) + nokogiri (>= 1.12.0) + mail (2.8.1) mini_mime (>= 0.1.1) + net-imap + net-pop + net-smtp + mapbox-gl-rails (2.9.0) + railties (>= 3.2) marcel (1.0.2) matrix (0.4.2) method_source (1.0.0) - mini_mime (1.1.2) - minitest (5.16.3) - msgpack (1.5.6) - mysql2 (0.5.4) - net-imap (0.2.3) - digest + mini_mime (1.1.5) + minitest (5.20.0) + msgpack (1.7.2) + mysql2 (0.5.5) + net-imap (0.4.4) + date net-protocol - strscan - net-pop (0.1.1) - digest + net-pop (0.1.2) net-protocol + net-protocol (0.2.1) timeout - net-protocol (0.1.3) - timeout - net-smtp (0.3.1) - digest + net-smtp (0.4.0) net-protocol - timeout - nio4r (2.5.8) - nokogiri (1.13.8-arm64-darwin) + nio4r (2.5.9) + nokogiri (1.15.4-x86_64-darwin) racc (~> 1.4) - nokogiri (1.13.8-x86_64-linux) + nokogiri (1.15.4-x86_64-linux) racc (~> 1.4) - public_suffix (5.0.0) - puma (5.6.5) + orm_adapter (0.5.0) + psych (5.1.1.1) + stringio + public_suffix (5.0.3) + puma (5.6.7) nio4r (~> 2.0) - racc (1.6.0) - rack (2.2.4) - rack-test (2.0.2) + racc (1.7.3) + rack (2.2.8) + rack-test (2.1.0) rack (>= 1.3) rails (7.0.3.1) actioncable (= 7.0.3.1) @@ -158,11 +170,13 @@ GEM activesupport (= 7.0.3.1) bundler (>= 1.15.0) railties (= 7.0.3.1) - rails-dom-testing (2.0.3) - activesupport (>= 4.2.0) + rails-dom-testing (2.2.0) + activesupport (>= 5.0.0) + minitest nokogiri (>= 1.6) - rails-html-sanitizer (1.4.3) - loofah (~> 2.3) + rails-html-sanitizer (1.6.0) + loofah (~> 2.21) + nokogiri (~> 1.14) railties (7.0.3.1) actionpack (= 7.0.3.1) activesupport (= 7.0.3.1) @@ -170,41 +184,47 @@ GEM rake (>= 12.2) thor (~> 1.0) zeitwerk (~> 2.5) - rake (13.0.6) - redis (4.8.0) - regexp_parser (2.5.0) - reline (0.3.1) + rake (13.1.0) + rdoc (6.6.0) + psych (>= 4.0.0) + redis (4.8.1) + regexp_parser (2.8.2) + reline (0.3.9) io-console (~> 0.5) - rexml (3.2.5) + responders (3.1.1) + actionpack (>= 5.2) + railties (>= 5.2) + rexml (3.2.6) rubyzip (2.3.2) - selenium-webdriver (4.4.0) - childprocess (>= 0.5, < 5.0) + selenium-webdriver (4.10.0) rexml (~> 3.2, >= 3.2.5) rubyzip (>= 1.2.2, < 3.0) websocket (~> 1.0) - sprockets (4.1.1) + sprockets (4.2.1) concurrent-ruby (~> 1.0) - rack (> 1, < 3) + rack (>= 2.2.4, < 4) sprockets-rails (3.4.2) actionpack (>= 5.2) activesupport (>= 5.2) sprockets (>= 3.0.0) - stimulus-rails (1.1.0) + stimulus-rails (1.3.0) railties (>= 6.0.0) - strscan (3.0.4) - tailwindcss-rails (2.0.12-arm64-darwin) + stringio (3.0.8) + tailwindcss-rails (2.0.32-x86_64-darwin) railties (>= 6.0.0) - tailwindcss-rails (2.0.12-x86_64-linux) + tailwindcss-rails (2.0.32-x86_64-linux) railties (>= 6.0.0) - thor (1.2.1) - timeout (0.3.0) - turbo-rails (1.1.1) + thor (1.3.0) + timeout (0.4.1) + turbo-rails (1.5.0) actionpack (>= 6.0.0) activejob (>= 6.0.0) railties (>= 6.0.0) - tzinfo (2.0.5) + tzinfo (2.0.6) concurrent-ruby (~> 1.0) - web-console (4.2.0) + warden (1.2.9) + rack (>= 2.0.9) + web-console (4.2.1) actionview (>= 6.0.0) activemodel (>= 6.0.0) bindex (>= 0.4.0) @@ -213,25 +233,29 @@ GEM nokogiri (~> 1.6) rubyzip (>= 1.3.0) selenium-webdriver (~> 4.0) - websocket (1.2.9) + websocket (1.2.10) websocket-driver (0.7.5) websocket-extensions (>= 0.1.0) websocket-extensions (0.1.5) xpath (3.2.0) nokogiri (~> 1.8) - zeitwerk (2.6.0) + zeitwerk (2.6.12) PLATFORMS - arm64-darwin-20 + x86_64-darwin-19 + x86_64-darwin-22 x86_64-linux DEPENDENCIES bootsnap capybara debug + devise dotenv-rails + geocoder (~> 1.8) importmap-rails jbuilder + mapbox-gl-rails mysql2 (~> 0.5) puma (~> 5.0) rails (~> 7.0.3, >= 7.0.3.1) @@ -249,4 +273,4 @@ RUBY VERSION ruby 3.1.2p20 BUNDLED WITH - 2.3.18 + 2.4.19 diff --git a/README.md b/README.md index 85f6c86ae..755ee7388 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,14 @@ Smith College CSC223: Software Engineering\ Starter App for ValetBike project + +**Team member names:** +Elena Wang, +Ying Loo, +Maya Gilliom, +Lesly Gonzalez, +Chris Dong + ## Environment Configuration As you configure your environment you should **keep a log** where you **write down all the steps you take** including **each command you type**. You will inevitably run into errors setting up your development environment and maintaining a meticulous log will allow others to help you troubleshoot. Ignore this recommendation at your own peril, but don't say you haven't been warned :] diff --git a/app/assets/config/manifest.js b/app/assets/config/manifest.js index b06fc42ac..4a1d0a009 100644 --- a/app/assets/config/manifest.js +++ b/app/assets/config/manifest.js @@ -3,3 +3,4 @@ //= link_tree ../../javascript .js //= link_tree ../../../vendor/javascript .js //= link_tree ../builds + diff --git a/app/assets/images/Carol.png b/app/assets/images/Carol.png new file mode 100644 index 000000000..d5732a2f7 Binary files /dev/null and b/app/assets/images/Carol.png differ diff --git a/app/assets/images/Carol.png:Zone.Identifier b/app/assets/images/Carol.png:Zone.Identifier new file mode 100644 index 000000000..0fb5dfe81 --- /dev/null +++ b/app/assets/images/Carol.png:Zone.Identifier @@ -0,0 +1,3 @@ +[ZoneTransfer] +ZoneId=3 +HostUrl=https://gencraft.com/ diff --git a/app/assets/images/Clemenbykes stock photo.png b/app/assets/images/Clemenbykes stock photo.png new file mode 100644 index 000000000..ecb839f4f Binary files /dev/null and b/app/assets/images/Clemenbykes stock photo.png differ diff --git a/app/assets/images/backg_2.png b/app/assets/images/backg_2.png new file mode 100644 index 000000000..1fe322f72 Binary files /dev/null and b/app/assets/images/backg_2.png differ diff --git a/app/assets/images/backg_2.png:Zone.Identifier b/app/assets/images/backg_2.png:Zone.Identifier new file mode 100644 index 000000000..c82c53922 --- /dev/null +++ b/app/assets/images/backg_2.png:Zone.Identifier @@ -0,0 +1,4 @@ +[ZoneTransfer] +ZoneId=3 +ReferrerUrl=https://mail.google.com/ +HostUrl=https://mail-attachment.googleusercontent.com/attachment/u/0/?ui=2&ik=d39b9f91f6&attid=0.1&permmsgid=msg-a:r5439327989664005209&th=18c55bb2a9e644d5&view=att&disp=safe&realattid=18c55baf97ab65b46191&saddbat=ANGjdJ-cgRMWY4B8abKo7NHnC1L7VFiTqD0BeAdp9jObaT_SYcukMCO8uZpF6QKkofKQpQ1B_SdZQLgZgl6F3WMNOU2wgMps3TSGWt3o1PVVLmXinkt5FXBaQHvlVxqjCv60g_gNNUyyZBVgR10HK_prxbxnVy-NZJ-sCLm7Jfdt1e7mJIGK7MIXZpOFGnqwbmPdz501e9_fjC-lyMYWraQsBzD0EyXVzwQ4dg_qRL7lo5pBuE7g5dpfIR6v0_L85o9KIQGm8H5xQ3oZ6yx4KwMQkbVonmT5dW4oGOUXCe5I7yWCDSTu63B0udOE0kGJaVyyv3S7LmT5bDvf6dF4u7UhNB_vJ-k8GTsae4G97lkQNdzDPHHr3m4YZxpfq_bMlqS6KO2GakgFNURYqpQs7EVtXoNlxuZQaeUHyKymAzDD7olgFSn4v7EG7rp0XIvIBRE3wN1ciQueXbUr7yQdaVvwftkXI6ESlkkhsD6-3mEVqMoWRQeiH3QAtCxeZ98-zW3nJC015wrWrsckGJ6dHndNY9lFcTpnupHwtNhqYdIR37SbfsZbSRngRgAtPuvPXZxvS7Ln2skwJ5sZ_D_0_yMp6aNCmfR-7GaaLQ74tKh7S0QHE8XMoeUw7omqr2NecJ0Awe1lLLb6N64HNMmv1kEOHUsDswatTxSCVkiOTGHd-9ACCQe1b4kLGxAEftUZhiAxqcq1OSTsq3vBtsFkTMnj40mtbWUB0qkBeK1GcPZlZisTlMVBcSwaYLD_njzgGQULZLtmU7Qdg76FH8R3GMSbh1KhvK9R6RejMBcdDMEFW-D--4qy4nlplBmzBTWx-WJ7G75F-2kiQiOUrn5lgb1Q5XX9R_Q6BRR7ClE2RQ_Afwo2DfoiPyiFR-x9foXkliy7Ll6rXH5LLhe19T2sKR6__EbAaJbzmZtQ62cs5fB0xsrBfLnp9QITnorzsy48srJyJNoVUvj3JWCQXKPmv3PG18PGnlgtGsV7ojtqtVZraeHq02zYS90OoBDxka8 diff --git a/app/assets/images/background.jpeg:Zone.Identifier b/app/assets/images/background.jpeg:Zone.Identifier new file mode 100644 index 000000000..b3099f837 --- /dev/null +++ b/app/assets/images/background.jpeg:Zone.Identifier @@ -0,0 +1,3 @@ +[ZoneTransfer] +ZoneId=3 +HostUrl=https://web.whatsapp.com/ diff --git a/app/assets/images/background.png b/app/assets/images/background.png new file mode 100644 index 000000000..dc2a6b163 Binary files /dev/null and b/app/assets/images/background.png differ diff --git a/app/assets/images/background.png:Zone.Identifier b/app/assets/images/background.png:Zone.Identifier new file mode 100644 index 000000000..16c0f684e --- /dev/null +++ b/app/assets/images/background.png:Zone.Identifier @@ -0,0 +1,4 @@ +[ZoneTransfer] +ZoneId=3 +ReferrerUrl=https://mail.google.com/ +HostUrl=https://mail-attachment.googleusercontent.com/attachment/u/0/?ui=2&ik=d39b9f91f6&attid=0.1&permmsgid=msg-a:r5826301768616074415&th=18c55b6cb3590bd6&view=att&disp=safe&realattid=18c55b698eeb65b46191&saddbat=ANGjdJ8V0IHfCSbrF_XHXfNUntI7IFhYJVZulrMHZVauPf9G8TuVJt5V-DSBBNcbL8PkT7i1IOdVYzW5HtREj8jwIoTpRQGlhT4wpmtGhHI5C9MqBCSCfOHrm22yAg4D-1iWrMpyDb4-SPk9khlG9vXls43zFOY8-hsjUhBiKXkqirbOogrO8m24EXLiN2q5PAGU5SW3K2AIYKbqB2_KXG9975-PdTfrsCLXDv2mjheSSNFpuuNfIzT7-SwWZ6k7D5ZtdHG_d3UaVfegfJ6sJfXVK0m-Ch0mcufDqKqp6S6sHZLu_Bmcj9tW8EZ934fBhxDZnSLVfcMvjvOjr7Z2GqO4_GpBpzx5AwTUZOqc5z0TSrBj1y9nTcJpRGLA7y2SgZFIXcM9hvP0-frHjwxOjFybc8AOrJ7GBq_7DJk7cAZJ1dYJnfIqIcp0P3fPQFs0boLwfpzuRbtUGpcZK89I31B4iia5-Gybu-VBA77UoMZToN4fdg8obfPZ__r1oBYp5hKpapHToD_PUum8jx2IaNGFxdwUZvk1_HcPUj6ccHrH5cyUeHDXakWYiMFqOJasRPfRrIE3w75YRkPPqtmUUPl_emeQJHpLgKuZlq38rIeEhLb2ERUlo_o_ziiXacIVwJGtIxk9VZVqn9AswUEicDw9IPMSTGexGVIpeVd-XU4bKahcVvM0X6X1tEEfH3XR-ps_jQfoaaNQ3NJ4QxiJ7EXhqQHyQc0sXJhdzo_ZPoSMO7WnYW7uVhNsq5alnmf0hEc2lt_aS0XSXNrsrNVcEZ8ULaU_MJXdBS38Vdxdc-qePpqmOv1HlKNw-12BIH247jp91AJdc0SUS8kiBeiWzyCUCGa2IzJlXszbGdfpRl5LVqn5s8fGioeS7xZ_6Z97FP65vgl68L42VJJPzPHjAyOdwzIgUogxnt229ZTJr3lcIWAnBrIQOcHNIbPgatDlRbQo9KoZcpwXMI-8mlOuMoCoLAK41j2RVjS-EN7AV4WOt2LKhcc67F5Ti1xVVd8 diff --git a/app/assets/images/banner.jpg b/app/assets/images/banner.jpg new file mode 100644 index 000000000..94fc9850a Binary files /dev/null and b/app/assets/images/banner.jpg differ diff --git a/app/assets/images/banner.jpg:Zone.Identifier b/app/assets/images/banner.jpg:Zone.Identifier new file mode 100644 index 000000000..68e244b96 --- /dev/null +++ b/app/assets/images/banner.jpg:Zone.Identifier @@ -0,0 +1,4 @@ +[ZoneTransfer] +ZoneId=3 +ReferrerUrl=https://www.google.com/ +HostUrl=https://st4.depositphotos.com/1145675/27091/i/450/depositphotos_270917458-stock-photo-background-banner-flowers-natural-green.jpg diff --git a/app/assets/images/bicicleta.gif b/app/assets/images/bicicleta.gif new file mode 100644 index 000000000..d66d47c93 Binary files /dev/null and b/app/assets/images/bicicleta.gif differ diff --git a/app/assets/images/bicicleta.gif:Zone.Identifier b/app/assets/images/bicicleta.gif:Zone.Identifier new file mode 100644 index 000000000..c05bf530e --- /dev/null +++ b/app/assets/images/bicicleta.gif:Zone.Identifier @@ -0,0 +1,4 @@ +[ZoneTransfer] +ZoneId=3 +ReferrerUrl=https://mail.google.com/ +HostUrl=https://mail-attachment.googleusercontent.com/attachment/u/0/?ui=2&ik=d39b9f91f6&attid=0.1&permmsgid=msg-a:r8931870788843572318&th=18c5b49082627208&view=att&disp=safe&realattid=18c5b48f69245622f0a1&saddbat=ANGjdJ_vDA34piJ6UZcBouSVqIypSmYVht4mmjUU3hJJdVupAohoXPWePH1L37yHhzwV7OAYb0Cl7b8abu2_Uss0nQBiASIdTI_l_Me83qIRL5bBYPS2lKLFbLpl3ec2bjdGO7vjCqSlLLxPa3vxPLT6Gqk8fu6LX2ubouc5C2DVos9dYmASQz3WqDDbCY7bMzT_2YTKJuotPm6P6U8Mompq7MYMg6tgwQEZs4ZZOZ0wvzNWk-K02SqQIlWJpMzD5_cr_AQiUSXq3bjmFeOdw3XaD3u3MncQQEBx3hFI-S_pn0C3ngYKUPlu6xiey5CLuZio_nbsfDDyMF1lGeQChj8YA7epdwGrIl_UYRbBZgFsZToKgxNog1bJRy5hJJOPeOg6WmZc9QZrZ8tUVTMeemUXCgLW_uffntx76YUNMBOlvR9IACG3IuNNSc_jzc4ugq-k6chOGP_ZaSQFgmFvMFXvjEIudTsIn84tf1wtvmTtFywEGaoN8Qj42x5VWnEv3dDl2LKB7eFF86Vvs7QQPpxRKjFje2suRVfSRP5w7Z60AIFbC9GTEuj6eBorqKEiTOs5WG1g0OTCc11WA6U7FW3b2ObqPdlO0UBmxrfUMCG7RmC_zhVcyZ5bODRoZ9fNEr9cSyt_jDw99nAbbBmQpiHTsraEXKDhS_d9KlvCer1DtiBTVDmwKRtVlCMRceEWQxivBM2xKGXoJxhot-MkGZKOrclMDLvXBd_h_Av5w__wjtt2FU1lwSnZg2gBvVwY_IAXTaIw-fb-XT2KUmhakJusuR_n0PKU7fLAW7mL9VSaZA2t4XNYluMRrTaFo8Wm3Pm2XixJH57KcKyU3LCx_XaSwcGugPAxd_ok3XgxHr8RKtEjFIJ9fBOpZo5Er2jg2BQ0ic4V2mXeiFEWMXn8DiZkrmyp05OZtuKkqFwfCZCmGKRfH2YglPcbUPsBEHzBtbnwWD7qdAZJR-M7nZW-sSNskjSiZfodjE04r2Z9DkCBVuoSU_YITAeD97-5KLE diff --git a/app/assets/images/bicicleta_2.gif b/app/assets/images/bicicleta_2.gif new file mode 100644 index 000000000..b0727c061 Binary files /dev/null and b/app/assets/images/bicicleta_2.gif differ diff --git a/app/assets/images/bicicleta_2.gif:Zone.Identifier b/app/assets/images/bicicleta_2.gif:Zone.Identifier new file mode 100644 index 000000000..869f159eb --- /dev/null +++ b/app/assets/images/bicicleta_2.gif:Zone.Identifier @@ -0,0 +1,4 @@ +[ZoneTransfer] +ZoneId=3 +ReferrerUrl=https://mail.google.com/ +HostUrl=https://mail-attachment.googleusercontent.com/attachment/u/0/?ui=2&ik=d39b9f91f6&attid=0.1&permmsgid=msg-a:r4202205693239303764&th=18c5b4c260894382&view=att&disp=safe&realattid=18c5b4c191245622f0a1&saddbat=ANGjdJ897QA7IYls4z7KVJRl6J7ysOk5lRWGsGA8BMsSd5JDTMN3Cz1YMRMRVCdnq-YFjtp9WXbGUiXXh0PIwqt-jTBil6WZRIBe9tydnDK6d0oOXrhpNY4QEDIxL6wQwAyBNHeoYGxkmk3Aq4k9KHs_k2l-DdSVPXV4aVPFAdmdu4B3lfrGK0SYUZHHXt8RvsFbm2NHSC480I_XzbWHQfrc53mu1onUwuv8LOG_r5TgG_rjB7fqf82HrjClbEmtbCSosThSpkRHYvfMQ7px3kWjsWLLnGAO45zUuUn50EUoJJd3MQ8M3B1N-To5LEzcfpIFPlasClyL_MtdTZltzZBK6akP5OdbvfScpr7yAezjnbPAyRK6J_vdBk0CiLpq4JTrnADTsJ81osolibIqkDeOmGF3AOMGBE9nqgFDSHB7BnFlRPmK-Hm1FjdQae7RabqtmfEJwUWAC2Ql_-FEOL3RwinRv4ZhoxN-gscfEFMXN-uHWO6aiywFcHtJbK_ByKv7FdHjoTfPyaubU_PbCb5qvd-mNme89OE83r9f1mpbBEIbt2-C0URSp_PAgKf3J8Sjwn9sZXfBP5NxlBCj38kMzENGNkfmoyfEe8ROqb1RMQKufxoWYdL4nC-Q4fYgjNfsJNqn5oh-3HhGtEXvFs4x_ry-Pzbgu34AB4SZYEhY_UZpq5YuxE6jPgsF6uW5GloOkqRiiaqnboxzfn8BA9Jv1V9XZKIXmLvvOiXQC6K8885MwIYfGMrC-Xo5tCf2JL-xXAIqoiNs8jf6gnc1hRLEUp_15k_uy1PZiAKBgEEt9AQE53UV1pFw_GA1LmCO5R4FlUrUutfhCLoaxw1aesSNDlZTxBi8Y2ZiySnRtB-VljLYOCyfa2FRAhXmgvBb6UkPez7iJRsS7ME7NLbZr6lsXO5NBwBVP8-IPRQ1nZw7UIBpggBpsaBLOzMgZxPOw3JQ8e3huxIL2Cx41aB0pEEJ3yyh5mqBA6rF1I4geIWlw7k_NuHbQXaKeFdj-Kc diff --git a/app/assets/images/clemenbykes_bike_light.png b/app/assets/images/clemenbykes_bike_light.png new file mode 100644 index 000000000..acfda4ca1 Binary files /dev/null and b/app/assets/images/clemenbykes_bike_light.png differ diff --git a/app/assets/images/clemenbykes_logo.png b/app/assets/images/clemenbykes_logo.png new file mode 100644 index 000000000..f4ce783cf Binary files /dev/null and b/app/assets/images/clemenbykes_logo.png differ diff --git a/app/assets/images/clemenbykes_logo_light.png b/app/assets/images/clemenbykes_logo_light.png new file mode 100644 index 000000000..d497e3719 Binary files /dev/null and b/app/assets/images/clemenbykes_logo_light.png differ diff --git a/app/assets/images/clementeam.png b/app/assets/images/clementeam.png new file mode 100644 index 000000000..5359c9979 Binary files /dev/null and b/app/assets/images/clementeam.png differ diff --git a/app/assets/images/clementeam.png:Zone.Identifier b/app/assets/images/clementeam.png:Zone.Identifier new file mode 100644 index 000000000..60f0f9780 --- /dev/null +++ b/app/assets/images/clementeam.png:Zone.Identifier @@ -0,0 +1,3 @@ +[ZoneTransfer] +LastWriterPackageFamilyName=Microsoft.Windows.Photos_8wekyb3d8bbwe +ZoneId=3 diff --git a/app/assets/images/get code.png b/app/assets/images/get code.png new file mode 100644 index 000000000..fcb2b555f Binary files /dev/null and b/app/assets/images/get code.png differ diff --git a/app/assets/images/kiosk unlock.png b/app/assets/images/kiosk unlock.png new file mode 100644 index 000000000..721c20c8e Binary files /dev/null and b/app/assets/images/kiosk unlock.png differ diff --git a/app/assets/images/naranja.gif b/app/assets/images/naranja.gif new file mode 100644 index 000000000..96270617d Binary files /dev/null and b/app/assets/images/naranja.gif differ diff --git a/app/assets/images/naranjita (2) - Shortcut.lnk b/app/assets/images/naranjita (2) - Shortcut.lnk new file mode 100644 index 000000000..407d097b4 Binary files /dev/null and b/app/assets/images/naranjita (2) - Shortcut.lnk differ diff --git a/app/assets/images/naranjita (2).gif:Zone.Identifier b/app/assets/images/naranjita (2).gif:Zone.Identifier new file mode 100644 index 000000000..82264d337 --- /dev/null +++ b/app/assets/images/naranjita (2).gif:Zone.Identifier @@ -0,0 +1,4 @@ +[ZoneTransfer] +ZoneId=3 +ReferrerUrl=https://convertio.co/ +HostUrl=https://s140.convertio.me/p/oTRHi2FHBxP5YlP9vf2H4A/ad3d5f88526c42f7e26f46b4c14cd9ba/WhatsApp-Video-2023-12-04-at-4.17.49-PM.gif diff --git a/app/assets/images/orange eigth.png b/app/assets/images/orange eigth.png new file mode 100644 index 000000000..f6cbee659 Binary files /dev/null and b/app/assets/images/orange eigth.png differ diff --git a/app/assets/images/orange full.png b/app/assets/images/orange full.png new file mode 100644 index 000000000..eba87f32e Binary files /dev/null and b/app/assets/images/orange full.png differ diff --git a/app/assets/images/orange half.png b/app/assets/images/orange half.png new file mode 100644 index 000000000..631bcc281 Binary files /dev/null and b/app/assets/images/orange half.png differ diff --git a/app/assets/images/orange_back.png b/app/assets/images/orange_back.png new file mode 100644 index 000000000..5bc63d14c Binary files /dev/null and b/app/assets/images/orange_back.png differ diff --git a/app/assets/images/orange_back.png:Zone.Identifier b/app/assets/images/orange_back.png:Zone.Identifier new file mode 100644 index 000000000..0fb5dfe81 --- /dev/null +++ b/app/assets/images/orange_back.png:Zone.Identifier @@ -0,0 +1,3 @@ +[ZoneTransfer] +ZoneId=3 +HostUrl=https://gencraft.com/ diff --git a/app/assets/images/portada.png b/app/assets/images/portada.png new file mode 100644 index 000000000..c262e8f09 Binary files /dev/null and b/app/assets/images/portada.png differ diff --git a/app/assets/images/portada.png:Zone.Identifier b/app/assets/images/portada.png:Zone.Identifier new file mode 100644 index 000000000..0fb5dfe81 --- /dev/null +++ b/app/assets/images/portada.png:Zone.Identifier @@ -0,0 +1,3 @@ +[ZoneTransfer] +ZoneId=3 +HostUrl=https://gencraft.com/ diff --git a/app/assets/images/return bike.png b/app/assets/images/return bike.png new file mode 100644 index 000000000..79bdd4dd6 Binary files /dev/null and b/app/assets/images/return bike.png differ diff --git a/app/assets/images/ride bike.png b/app/assets/images/ride bike.png new file mode 100644 index 000000000..36c013159 Binary files /dev/null and b/app/assets/images/ride bike.png differ diff --git a/app/assets/images/team.png b/app/assets/images/team.png new file mode 100644 index 000000000..ea84c8a81 Binary files /dev/null and b/app/assets/images/team.png differ diff --git a/app/assets/images/team.png:Zone.Identifier b/app/assets/images/team.png:Zone.Identifier new file mode 100644 index 000000000..581251317 --- /dev/null +++ b/app/assets/images/team.png:Zone.Identifier @@ -0,0 +1,4 @@ +[ZoneTransfer] +ZoneId=3 +ReferrerUrl=https://mail.google.com/ +HostUrl=https://mail-attachment.googleusercontent.com/attachment/u/0/?ui=2&ik=d39b9f91f6&attid=0.1&permmsgid=msg-a:r1247229375699654371&th=18c55eda8d5331c3&view=att&disp=safe&realattid=18c55ed9a67b65b46191&saddbat=ANGjdJ_osgNH6Uo_8IrZ--AmNbXzl2mMNAjN3ZfwQLThore23M84ovOlzGhPV30uJaw6PUd0UrLgcYjc4pzJBECesScaFUx_Lfzct06XIhYWpfNWU2VYhuzEgIMakicd2vK_4fp8deAq110Ht75ouWX0CSPp6jISGlNuW7w-jCPa5hH_emN3lKrNXuDFzIuuW4QyLsrybXJWiXQgxPfPnjHn10SS6bsLT5tNLkTByDuYXR9WeLEzg45H2_n0K_3JZ7Whf3PEXpYuCOR7OTuzU-0tps6mtFNhiVx_USdK5x-t-byx2SuJw3mK3vfy4q9O0D2TI0R8w0Hh9Y0cwRNPopkgTD59Qfca9zTwbL8WcI2CjVSaSkz7LWNAmCKhElWT9fOsLnuj-Oq1b5u6l0MYwpk8azSoLfXtARM3sYDYlG_4SV-iDU2nMpvtI01gX5csAHnCk0aRlj_9g0V6pi-S35tP2wmCAJK1hcGg6kbLSBSlxOAK6gYxUYUx_HRBg9gsACISkEklVmd2qhPv4m7hUazaeIU7M1DMMjgXrfdxVXXku_xgAOpSRzfnwjuBg0_OITX5jk61iY1EC7IO8qIripyvXUNCsPNySpPPXg5ba_y8xxfoGdwaL6WrLVNH2077qUbk-cNTAM6gLqQs-8Gltq3hta6xrE-gtH8XqtijHkga-UbY48T_3yvlWp_-Z8C_MgXopG6_QmLidMwUV4Ra2ls_BkD5tI6kM06mFe7JkZJpMvEYrvECY6RtcGUhnkmnPyOankgMySRac7Rc-BzmD6bJ801Wgk41VI_IiFRu8yMiLhMyijbaJQyDWkU356Ioi7OCbLBjv2jv4kuqB47x-ShSwvZwA_06lf-_lr8OHswAmKABKufAQ62l1xY63sIqDO3BPFg0W7RGpuOJoZSVIctyUAxp-Ch18DeHV0U3VMaurasEOuEptlFaKjyP9KtUE7h9181tYzH29mpHnqFYl-PQijYlYJAnufG3Peb3e4Xw-kBuRqtqxXmHByla358 diff --git a/app/assets/images/team_1.png b/app/assets/images/team_1.png new file mode 100644 index 000000000..f3f974a1e Binary files /dev/null and b/app/assets/images/team_1.png differ diff --git a/app/assets/images/team_1.png:Zone.Identifier b/app/assets/images/team_1.png:Zone.Identifier new file mode 100644 index 000000000..6ec4d6c0b --- /dev/null +++ b/app/assets/images/team_1.png:Zone.Identifier @@ -0,0 +1,5 @@ +[ZoneTransfer] +ZoneId=3 +ReferrerUrl=https://mail.google.com/ +HostUrl=https://mail-attachment.googleusercontent.com/attachment/u/0/?ui=2&ik=d39b9f91f6&attid=0.1&permmsgid=msg-a:r-4944343429027153900&th=18c56baed664a1f6&view=att&disp=safe&realattid=18c56bad8b0b65b46191&saddbat=ANGjdJ9D7hACPRRukQrxtpHZ7JLbXnb6mOgZD89Z2mXCm4McJin3fa-pU-qilZF2hpblAFp_Ry3lpNI37jnluNKxA_3FM6MeevKNsP581wc6Bq4YXPzH-vFaWOpOyuGcHAnI8n3AgGzwNPqNtSjnWJ1pwiw4gojSYysPR4_3AASVn2XQJMBUJNNmWsgyMVwNyrYwey96q6Iv1I7eWxczVrA_OQGsskmWLBKBVXn3v02wdKuQGhvggBQDfiHCOesku1zWgawrwxrfatBDQI5i85CpAnSgLkfvunK0m43JaAH75IxCBqS65IBjf36qyxKwizelAhxhRJ6_9vgJkFsmIi4KBth4OXPCy8-WSkoR4i-US_NoN4wAqrBSlrEHV6FU2cc4aFLoSj2eehzfpavDeSlXJujpG2inj51aNzY9pP-WY_r1xN-IBXKZEgsMeMUEkREgsrBWykFR2FF_k1GjvIMGO0oCUxVSXwtNsJkKW0pfBSMlPqGq1_p_pVBdCwKLLMoB1cA2TI5OSegv9-RBnhuFVRetEf_FIZsSjwWlmv-J19S1hUkRCnzzLnatRqGffz_3qiU8W1TeoJ7oKVrgeWiih1pHWcNgd6IukYC7sTvSnpOkECGYakQG_DPxm_c7HqQhuyY5FHAqSjc1FcRQX7X6vAC9f7QTD2eThoDoYOnBzveS5A4nY-PYoEtzkX2YbL-fZ_3P3UtMqtDFMuc9uoa-Nxr1CmQZaFWABDnJSdL1G-SMpoO3Lzx4chov66m77CHzdgnSNd5bpFugqOL3P_m2mWgvC8QPG8gcldO7-XBBXXsORAEkh7OlRTVCZA6LQ4oMb-CUSnLZrCYSMRzTv1lLzVLCIaDBYEPcCW84lPQGm3Fm481MNhZfaL0G250UnSks7cRyMBZ9I-hM5nX8Za6Bts-Faw-dx3IHFUMksn4xLGEhX06ay4cnH10mdUHh8BrkKXH_j374zaK5Ac4f5sWP9hHvYkMA7xCL-OCKBlDhTw_u6DcFT06op0gOnaA +LastWriterPackageFamilyName=Microsoft.Windows.Photos_8wekyb3d8bbwe diff --git a/app/assets/images/unlock bike 2.png b/app/assets/images/unlock bike 2.png new file mode 100644 index 000000000..ab2bf29fd Binary files /dev/null and b/app/assets/images/unlock bike 2.png differ diff --git a/app/assets/images/user_profile.png b/app/assets/images/user_profile.png new file mode 100644 index 000000000..25a47ec9e Binary files /dev/null and b/app/assets/images/user_profile.png differ diff --git a/app/assets/images/user_profile.png:Zone.Identifier b/app/assets/images/user_profile.png:Zone.Identifier new file mode 100644 index 000000000..09cf58781 --- /dev/null +++ b/app/assets/images/user_profile.png:Zone.Identifier @@ -0,0 +1,4 @@ +[ZoneTransfer] +ZoneId=3 +ReferrerUrl=https://www.google.com/ +HostUrl=https://cdn3.iconfinder.com/data/icons/vector-icons-6/96/256-512.png diff --git a/app/assets/stylesheets/dropdown.css b/app/assets/stylesheets/dropdown.css new file mode 100644 index 000000000..dc2e0f61c --- /dev/null +++ b/app/assets/stylesheets/dropdown.css @@ -0,0 +1,64 @@ +.sidebar{ + height: 100%; + width: 300px; + position: absolute; + z-index: 1; + top: 0; + left: 0; + background-color: #60843f; + overflow-x: hidden; + padding-top: 20px; +} + +.sidebar a { + border-radius: 120px; + text-decoration: none; + font-size: 1em; + color: #ffffff; + display: block; + transition: 0.3s; + } + +.sidebar a:hover{ + border-radius: 120px; + border-style: solid; + border-width: thin medium thin; + border-color: white; + background-color: #e09213; +} + +.sidebar .closebtn { + position: absolute; + top: 0; + right: 25px; + font-size: 36px; + margin-left: 50px; + } + + .openbtn { + position: absolute; + border-radius: 5px; + font-size: 20px; + cursor: pointer; + background-color: #60843f; + padding: 10px 15px; + color: white; + border: none; + margin-left: -640px; + } + + .openbtn:hover { + background-color: #59882d; + } + + /* Style page content - use this if you want to push the page content to the right when you open the side navigation */ + #stationview { + transition: margin-left .5s; /* If you want a transition effect */ + padding: 20px; + } + + /* On smaller screens, where height is less than 450px, change the style of the sidenav (less padding and a smaller font size) */ + @media screen and (max-height: 450px) { + .sidebar {padding-top: 15px;} + .sidebar a {font-size: 18px;} + } \ No newline at end of file diff --git a/app/assets/stylesheets/global.css b/app/assets/stylesheets/global.css index ff48f1abe..5d726ed8d 100644 --- a/app/assets/stylesheets/global.css +++ b/app/assets/stylesheets/global.css @@ -31,5 +31,5 @@ body { font-family: var(--body-font); font-weight: 400; color: var(--black-color); - background: var(--white-color); + background: color(#fafdeb) } diff --git a/app/assets/stylesheets/map.css b/app/assets/stylesheets/map.css new file mode 100644 index 000000000..7f6036a12 --- /dev/null +++ b/app/assets/stylesheets/map.css @@ -0,0 +1,15 @@ + #map{ + background-color: #ffffff; + grid-area: map; + } + + .mapboxgl-popup { + max-width: 200px; + } + + .mapboxgl-popup-content { + text-align: center; + font-family: 'Open Sans', + sans-serif; + } + \ No newline at end of file diff --git a/app/assets/stylesheets/navigation.css b/app/assets/stylesheets/navigation.css new file mode 100644 index 000000000..d0366437f --- /dev/null +++ b/app/assets/stylesheets/navigation.css @@ -0,0 +1,173 @@ +.button{ + border-radius: 25px; + display: block; + color: white; + background-color: #557735; + text-align: center; + padding: 8px; +} + +.button:hover { + background-color: #2a3f17; + transition: background-color 0.3s; +} + +.rent-button{ + display: block; + color: white; + border-radius: 10%; + background-color: #78a350; + text-align: center; + padding: 8px; + margin-top: 10px; + margin-left: 15px; + margin-bottom: 10px; + width: 70%; +} + +.rent-button:hover { + background-color: #d39510; + border-radius: 10%; + transition: background-color 0.3s; +} + +.profile-button{ + display: block; + color: white; + border-radius: 10%; + background-color: #78a350; + text-align: center; + padding: 8px; + margin-top: 10px; + width: 100%; +} + +.profile-button:hover { + background-color: #426521; + border-radius: 10%; + transition: background-color 0.3s; +} + +.back-button{ + display: block; + color: white; + border-radius: 5%; + background-color: #476d24; + text-align: center; + padding: 8px; + margin-top: 10px; + width: 100%; +} + +.back-button:hover { + border-radius: 20%; + transition: background-color 0.3s; +} + +.pricing-button{ + display: block; + color: white; + border-radius: 10%; + background-color: #baad3c; + text-align: center; + padding: 8px; + margin-top: 10px; + width: 100%; +} + +.pricing-button:hover { + background-color: #655a21; + border-radius: 10%; + transition: background-color 0.3s; +} + + + +nav{ + float:right +} + +nav ul { + list-style-type: none; + margin: 0; + padding: 0; + overflow: hidden; + background-color: #ff873c; +} + +nav ul li { + float: left; + margin: 0; +} + +nav ul li a { + display: block; + color: white; + float: right; + text-align: center; + padding: 40px 45px; + text-decoration: none; +} + + +nav ul li a:push{ + margin-left: auto; +} + +nav ul li a:hover { + background-color: #f67f25; +} + +nav ul li form { + display: block; + color: white; + float: right; + text-align: center; + padding: 40px 45px; + text-decoration: none; +} + +nav ul form:hover { + background-color: #f67f25; +} + + +input[type=text], select { + width: 100%; + padding: 12px 20px; + margin: 0; + display: inline-block; + border: 1px solid #ccc; + border-radius: 4px; + box-sizing: border-box; + } + + +input[type=text], select { + width: 100%; + padding: 12px 20px; + margin: 0; + display: inline-block; + border: 1px solid #ccc; + border-radius: 4px; + box-sizing: border-box; + } + + input[type=submit] { + width: 100%; + background-color: #557735; + color: white; + padding: 14px 20px; + margin: 8px 0; + border: none; + border-radius: 4px; + cursor: pointer; + } + + input[type=submit]:hover { + background-color: #557735; + } + + .form-label { + font-size: 13px; + } \ No newline at end of file diff --git a/app/assets/stylesheets/pages.css b/app/assets/stylesheets/pages.css index 16bd64b55..9a77ebfd5 100644 --- a/app/assets/stylesheets/pages.css +++ b/app/assets/stylesheets/pages.css @@ -2,10 +2,211 @@ /* Universal Page Style */ /************************************/ +header { + background: #ff873c; + grid-row: 1; +} + +header::after { + content: ''; + display: table; + clear: both; +} + +.home-container{ + display: grid; + min-height: 100vh; + grid-template-columns: 1fr 1fr 1fr 1fr; + grid-template-rows: .2fr .5fr .2fr 1fr; + grid-template-areas: + "welcome welcome bikeimg bikeimg" + "howto howto howto howto" + "desc desc desc desc" + "map map map map" + +} + +.map-container{ + display: grid; + height: 100vh; + grid-template-columns: 1fr 1fr 1fr 1fr; + grid-template-rows: .5fr .5fr; + grid-template-areas: + "mapSidebar desc desc desc" + "mapSidebar map map map" + +} + +.reglog-container{ + display: grid; + height: 100vh; + grid-template-columns: 1fr 1fr 1fr 1fr; + grid-template-areas: + "reglog reglog reglog reglog" +} + +.gen-container{ + display: grid; + height: 100vh; + grid-template-columns: 1fr 1fr 1fr 1fr; + grid-template-areas: + "gen gen gen gen" +} + +.about-container { + display: grid; + min-height: 100vh; + grid-template-columns: 1fr 1fr 1fr 1fr; + grid-template-rows: .3fr .5fr .2fr 1fr; + grid-template-areas: + "text text img img" + "faq faq faq faq" +} + +.pay-container{ + display: grid; + height: 100vh; + grid-template-columns: 1fr 1fr 1fr 1fr 1fr 1fr; + grid-template-rows: 1fr 1fr 1fr 1fr 1fr 1fr; + grid-template-areas: + "first first first last last last" + "mon mon year year cvv cvv" + "num num num num num num" +} + +.check-container{ + display: grid; + min-height: 100vh; + grid-template-columns: 1fr 1fr 1fr 1fr; + grid-template-areas: + "bikeimg bikeimg desc desc" + "rdesc rdesc rdesc rdesc" +} +.profile-container { + display: grid; + min-height: 90vh; + grid-template-columns: 1fr 1fr 1fr 1fr; + grid-template-rows: .3fr .5fr .2fr 1fr; + grid-template-areas: + "photo photo" + "name name" + "background-photo background-photo background-photo background-photo" +} + +footer { + grid-row: 3; + bottom: 0; + width: 100%; + padding: 3em; + background: #ff873c; +} + +footer ul{ + float: right; + color: white; +} + +.container{ + margin: 0 auto; + justify-content: space-between; +} + +.row { + display: flex; + text-align: center; +} + +.column{ + border-radius: 25px; + background-color: #ffffff; + color: #2a5c25; + flex: 1; +} + + +.profile-column{ + z-index: 2; + border-radius: 25px; + border-color: #cfad47; + border-width: thick; + background-color: #ffffff; + color: #69b962; + padding: 3em 1em 3em 1em; + width: 25%; + margin-left: 870px; +} + +.profile-row { + display: block; + position: static; + margin-bottom: 170px; +} + +.register-container { + display: grid; + min-height: 160vh; + grid-template-columns: 1fr 1fr 1fr 1fr; + grid-template-rows: .3fr .5fr .2fr 1fr; + grid-template-areas: + "reg reg reg reg" +} + + +.register-column{ + border-radius: 25px; + background-color: #ffffff; + color: #2a5c25; + flex: 1; +} + +.register-row { + display: flex; + text-align: center; +} + +.payment-container { + display: grid; + min-height: 120vh; + max-height: 130vh; + min-width: 120vh; + grid-template-columns: 2fr 2fr 2fr 2fr; + grid-template-rows: .3fr .5fr .2fr 1fr; + grid-template-areas: + "pay pay pay pay" +} + +.payment-column{ + border-radius: 25px; + background-color: #ffffff; + margin-left: 7px; + color: #2a5c25; + flex: 1; +} + +.code-container { + display: grid; + min-height: 90vh; + max-width: 120vh; + background-color: white; + grid-template-columns: 1fr 1fr 1fr 1fr; + grid-template-rows: .3fr .5fr .2fr 1fr; + grid-template-areas: + "code code code code" +} + +.column h1{ + text-align: center; + font-size: 2em; +} + +.logo{ + float: left; + padding: 1em; +} + .page-section { - max-width: 80em; + max-width: 100em; width: 100%; - margin-top: 4em; } .page-section .section-inner { @@ -18,6 +219,7 @@ font-weight: 500; font-size: 2.5em; margin-bottom: 1em; + justify-content: center; } .record-row { @@ -35,6 +237,7 @@ } + /***********************************/ /* Responsiveness */ /***********************************/ @@ -49,4 +252,4 @@ margin-bottom: .6em; } -} +} \ No newline at end of file diff --git a/app/assets/stylesheets/sections.css b/app/assets/stylesheets/sections.css new file mode 100644 index 000000000..53374b303 --- /dev/null +++ b/app/assets/stylesheets/sections.css @@ -0,0 +1,157 @@ +#welcome { + background-color: #ffffff; + color: #2a5c25; + left: 0; + grid-area: welcome; + } + +#bikeimg { + right: 0; + background-color: #ffffff; + grid-area: bikeimg; +} + +#howto { + background-color: #ffcd91; + color: #2a5c25; + grid-area: howto; +} + +#desc{ + color: #2a5c25; + grid-area: desc; +} + +#rdesc{ + color: #2a5c25; + grid-area: rdesc; +} + + +#text { + background-color: #5c803c; + color: #ffffff; + top: 15%; + grid-area: text; +} + +#img { + background-color: #5c803c; + top: 50%; + grid-area: img; +} + +#faq { + grid-area: faq; + position:absolute ; + top: 38%; + left: 6%; +} + +#stationview{ + grid-area: stationview; +} + +#newrental{ + color: #2a5c25; +} + +#reglog{ + background-color: #b1e695; + color: #2a5c25; + grid-area: reglog; +} + +#general{ + color: #2a5c25; + grid-area: gen; +} + +#photo { + position: relative; + z-index: 2; +} + +#background-photo { + position: absolute; + z-index: 1; +} + +#name { + display: flex; + align-items: left; + justify-content: left; + text-align: left; + font-size: 24px; /* Adjust the font size as needed */ + font-family: sans-serif; /* Replace 'YourFont' with the desired font-family */ + color: #075c11; /* Set your desired text color */ + left: 50px; + padding-top: 0px; +} + +.profile-picture img { + display: flex; + align-items: right; + justify-content: right; + border-radius: 50%; + width: 90px; + height: 90px; + border: 4px solid #fff; + z-index: 2; + left: 50px; +} + +.back-picture img { + align-items: center; + justify-content: center; + width: 230vh; + height: 100vh; + z-index: 1; +} + +.profile-info h2 { + margin: 0; +} + +.centered { + position: absolute; + top: 50%; + left: 50%; + transform: translate(-50%, -50%); + text-align: center; +} + +.profile-centered { + position: absolute; + top: 65%; + left: 15%; + transform: translate(-50%, -50%); + text-align: center; +} + +.centered img{ + max-width: 750px; + max-height: 500px; + position: static; + margin: auto; +} + +.bold-brown{ + font-weight: bold; + color: #134213; +} + +#reg{ + color: #2a5c25; + grid-area: reg; +} + +#pay{ + color: #2a5c25; + grid-area: pay; +} + +#code{ + color: #2a5c25; + grid-area: gen; +} \ No newline at end of file diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 09705d12a..084d01ecd 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -1,2 +1,12 @@ class ApplicationController < ActionController::Base + before_action :configure_permitted_parameters, if: :devise_controller? + + protected + + def configure_permitted_parameters + devise_parameter_sanitizer.permit(:sign_up, keys: [:first_name, :last_name, :birthday, :phone_number]) + devise_parameter_sanitizer.permit(:account_update, keys: [:first_name, :last_name, :phone_number]) + end + + end diff --git a/app/controllers/bikes_controller.rb b/app/controllers/bikes_controller.rb new file mode 100644 index 000000000..b304b5861 --- /dev/null +++ b/app/controllers/bikes_controller.rb @@ -0,0 +1,10 @@ +class BikesController < ApplicationController + + def index + # if params[:reverse].blank? || params[:reverse] == "0" + # @bikes = Bike.all.order(identifier: :asc) + # else + # @bikes = Bike.all.order(identifier: :desc) + end + +end diff --git a/app/controllers/home_controller.rb b/app/controllers/home_controller.rb new file mode 100644 index 000000000..63da74ee1 --- /dev/null +++ b/app/controllers/home_controller.rb @@ -0,0 +1,44 @@ +class HomeController < ApplicationController + before_action :authenticate_user!, only: [:profile] + + before_action :set_active_rental, only: [:map, :profile] # defines a user's currently active rental if they have one + + def index + if params[:station].present? + @stations = Station.near(params[:station]) + else + @stations = Station.all.order(identifier: :asc) + end + end + + def map + if params[:station].present? + @stations = Station.near(params[:station]) + else + @stations = Station.all.order(identifier: :asc) + end + end + + def pricing + end + + def help + end + + def explore + end + + def profile + end + + private + + # defines a user's currently active rental if they have one + def set_active_rental + if user_signed_in? && !current_user.rentals.where(return: nil).empty? + @active_rental = current_user.rentals.where(return: nil).first + end + end + + +end diff --git a/app/controllers/payments_controller.rb b/app/controllers/payments_controller.rb new file mode 100644 index 000000000..0227e562d --- /dev/null +++ b/app/controllers/payments_controller.rb @@ -0,0 +1,86 @@ +class PaymentsController < ApplicationController + before_action :authenticate_user! + before_action :check_user, only: [:new, :create, :edit, :update] + before_action :check_existing_payment, only: [:new, :create] + before_action :check_payment_id, only: [:edit, :update] + + def index + @user = current_user + @payment = Payment.new + render :new + #temporary workaround to keep users on the new form in case they reload the page + end + + def show + @user = current_user + @payment = Payment.find_by(user_id: current_user.id) + render :edit + #temporary workaround to keep users on the edit form in case they reload the page + end + + def new + @user = current_user + @payment = Payment.new + end + + def create + @user = current_user + @payment = Payment.new(payment_params) + @payment.user = @user + if @payment.save + flash.notice = "Payment information saved" + redirect_to profile_home_index_path + else + render(action: :new) + end + end + + def edit + @user = current_user + @payment = Payment.find_by(user_id: current_user.id) + end + + def update + @user = current_user + @payment = Payment.find_by(user_id: current_user.id) + if @payment.update(payment_params) && @payment.valid? + flash.notice = "Payment information updated" + redirect_to profile_home_index_path + else + render :edit + end + end + + def check_user + if current_user.id != params[:user_id].to_i + flash.alert = "Unable to access requested resource. Check for proper URL." + redirect_to profile_home_index_path + end + end + + + def check_payment_id + @user = current_user + if @user.payment.id != params[:id].to_i + flash.alert = "Unable to access requested resource. Check for proper URL." + redirect_to profile_home_index_path + end + end + + + + def check_existing_payment + @user = current_user + @payment = Payment.find_by(user_id: @user) + if @payment.present? + redirect_to edit_user_payment_path(user_id: @user, id: @payment) and return true + end + end + + private + + def payment_params + params.require(:payment).permit(:first_name, :last_name, :card_number, :cvv, :exp_month, :exp_year) + end + +end diff --git a/app/controllers/rentals_controller.rb b/app/controllers/rentals_controller.rb new file mode 100644 index 000000000..a2d01fe9a --- /dev/null +++ b/app/controllers/rentals_controller.rb @@ -0,0 +1,122 @@ +class RentalsController < ApplicationController + before_action :authenticate_user! # forces user to log in before renting a bike + before_action :set_rental, only: [:show, :edit, :update] + before_action :set_station, only: [:new, :create, :edit] + before_action :ask_for_payment, :prevent_multi_rentals, :station_has_bikes, only: [:new, :create] + before_action :user_access, only: [:edit, :update, :show, :prevent_return_old_rental] + before_action :prevent_return_old_rental, only: [:edit, :update] # prevent user from returning a rental that was already returned + before_action :current_time, only: [:create, :update] + + + def index + @rentals = current_user.rentals + + end + + def new + @rental = Rental.new() + @station + end + + def create + @rental = Rental.new( + number: "%07d" % rand(10000000), + borrower: current_user, + checkout_station: @station, + bike: Bike.where(current_station_id: @station.id).first, + checkout: @current_time) + + if @rental.save + redirect_to rental_path(@rental) + @bike = @rental.bike + @bike.update(current_station_id: nil) + else + render('new') + end + end + + def show + end + + def edit + @rental.update(return_station_id: @station.id) + end + + def update + if @rental.update(rental_params) + @rental.update(return: @current_time) + @rental.update(cost: @rental.duration*0.05) #one day rate should not be hard coded :) + bike = @rental.bike + bike.update(current_station_id: @rental.return_station_id) + redirect_to rental_path(@rental) + else + render('edit') + end + end + + private + + def rental_params + params.require(:rental).permit(:checkout, :station_id, :return_station_id, :return, :checkout_station, :return_station) + end + + def set_station + @station = Station.find(params[:station_id]) + end + + def set_rental + @rental = Rental.find(params[:id]) + end + + # checks if current user has no rentals that have not been returned yet + def prevent_multi_rentals + unless current_user.rentals.where(return: nil).empty? + # redirects if user has an active rental that has not been returned yet + flash[:notice] = 'Please return your current bike before renting another one.' + @active_rental = current_user.rentals.where(return: nil).first + redirect_to rental_path(@active_rental.id) # redirects to currently active rental + end + end + + # checks if the rental has already been returned + def prevent_return_old_rental + unless @rental.return.nil? + # redirects if the rental has already been returned + flash[:notice] = 'You have already returned this bike.' + redirect_to rentals_path + end + end + + # checks if the station has bikes + def station_has_bikes + unless @station.docked_bikes.count > 0 + # redirects if the station has no bikes + flash[:notice] = 'This station has no bikes. Please choose another station.' + redirect_to map_home_index_path # flash message is hard to read bc map loads on top of it; TODO: may need to change this + end + end + + # checks if the user has provided their payment info + def ask_for_payment + @payment = Payment.find_by(user_id: current_user.id) + if @payment.nil? + # redirects if current user has no payment info + flash[:notice] = 'Please input your payment information.' + redirect_to new_user_payment_path(current_user.id) + end + end + + def current_time + @current_time = Time.now + end + + def user_access + @rental = Rental.find(params[:id]) + if @rental.borrower != current_user + flash[:notice] = "Cannot access rentals made by other users" + redirect_to rentals_path + end + end + + +end \ No newline at end of file diff --git a/app/controllers/stations_controller.rb b/app/controllers/stations_controller.rb index 88090af16..581a92844 100644 --- a/app/controllers/stations_controller.rb +++ b/app/controllers/stations_controller.rb @@ -5,3 +5,4 @@ def index end end + diff --git a/app/helpers/bikes_helper.rb b/app/helpers/bikes_helper.rb new file mode 100644 index 000000000..a2645e4e1 --- /dev/null +++ b/app/helpers/bikes_helper.rb @@ -0,0 +1,2 @@ +module BikesHelper +end diff --git a/app/helpers/home_helper.rb b/app/helpers/home_helper.rb new file mode 100644 index 000000000..23de56ac6 --- /dev/null +++ b/app/helpers/home_helper.rb @@ -0,0 +1,2 @@ +module HomeHelper +end diff --git a/app/helpers/map_helper.rb b/app/helpers/map_helper.rb new file mode 100644 index 000000000..65a956169 --- /dev/null +++ b/app/helpers/map_helper.rb @@ -0,0 +1,2 @@ +module MapHelper +end diff --git a/app/helpers/payments_helper.rb b/app/helpers/payments_helper.rb new file mode 100644 index 000000000..18d3f4ae6 --- /dev/null +++ b/app/helpers/payments_helper.rb @@ -0,0 +1,12 @@ +module PaymentsHelper + def display_alerts + html = <<-HTML +
Welcome <%= @email %>!
+ +You can confirm your account email through the link below:
+ +<%= link_to 'Confirm my account', confirmation_url(@resource, confirmation_token: @token) %>
diff --git a/app/views/devise/mailer/email_changed.html.erb b/app/views/devise/mailer/email_changed.html.erb new file mode 100644 index 000000000..32f4ba803 --- /dev/null +++ b/app/views/devise/mailer/email_changed.html.erb @@ -0,0 +1,7 @@ +Hello <%= @email %>!
+ +<% if @resource.try(:unconfirmed_email?) %> +We're contacting you to notify you that your email is being changed to <%= @resource.unconfirmed_email %>.
+<% else %> +We're contacting you to notify you that your email has been changed to <%= @resource.email %>.
+<% end %> diff --git a/app/views/devise/mailer/password_change.html.erb b/app/views/devise/mailer/password_change.html.erb new file mode 100644 index 000000000..b41daf476 --- /dev/null +++ b/app/views/devise/mailer/password_change.html.erb @@ -0,0 +1,3 @@ +Hello <%= @resource.email %>!
+ +We're contacting you to notify you that your password has been changed.
diff --git a/app/views/devise/mailer/reset_password_instructions.html.erb b/app/views/devise/mailer/reset_password_instructions.html.erb new file mode 100644 index 000000000..f667dc12f --- /dev/null +++ b/app/views/devise/mailer/reset_password_instructions.html.erb @@ -0,0 +1,8 @@ +Hello <%= @resource.email %>!
+ +Someone has requested a link to change your password. You can do this through the link below.
+ +<%= link_to 'Change my password', edit_password_url(@resource, reset_password_token: @token) %>
+ +If you didn't request this, please ignore this email.
+Your password won't change until you access the link above and create a new one.
diff --git a/app/views/devise/mailer/unlock_instructions.html.erb b/app/views/devise/mailer/unlock_instructions.html.erb new file mode 100644 index 000000000..41e148bf2 --- /dev/null +++ b/app/views/devise/mailer/unlock_instructions.html.erb @@ -0,0 +1,7 @@ +Hello <%= @resource.email %>!
+ +Your account has been locked due to an excessive number of unsuccessful sign in attempts.
+ +Click the link below to unlock your account:
+ +<%= link_to 'Unlock my account', unlock_url(@resource, unlock_token: @token) %>
diff --git a/app/views/devise/passwords/edit.html.erb b/app/views/devise/passwords/edit.html.erb new file mode 100644 index 000000000..5fbb9ff0a --- /dev/null +++ b/app/views/devise/passwords/edit.html.erb @@ -0,0 +1,25 @@ +Five dedicated computer science students, class of 2025, passionate about contributing to the progress and well-being of our city's population. Through hard work and innovation, we have created a bike renting website that provides an affordable and convenient solution for people in the valley to get around. Our commitment to sustainable transportation aims to make a positive impact on both the community and the environment.
+With stations across Amherst, Northampton, Hampshire, and Springfield, perform errands with ease or have fun exploring scenic bike routes!
+ <%= link_to('Start Now', map_home_index_path, class: 'button') %> +After choosing a station and time, simply click "Rent Now" and a unique code will be generated for you!
+Enter your code at our kiosks located at each station and a bike will unlock!
+Have a sweet time riding!
+At the closest station near you, return the bike and you are all set!
+Done riding? Select a station from the sidebar to return your bike!
+ <% else %> +Ready to ride? View the station locations in the map below, and select a station from the sidebar to rent a bike!
+ <% end %> + <% if user_signed_in? %> + <%= link_to "Past Rentals", rentals_path, class: 'button' %> + <% end %> +Unlike other expensive bike services we want our rides to be affordable. So, ride as long as you like, cause it will only cost you
+ +Are you ready to ride? Click the button below to start!
+ <%= link_to('Start Now', map_home_index_path, class: 'button') %> +<%= notice %>
<% end %> + <% if alert %><%= alert %>
<% end %> + <%= yield %> +