Skip to content

Commit

Permalink
Add some more homepage stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
hschne committed Dec 21, 2023
1 parent 0a91fba commit 187019e
Show file tree
Hide file tree
Showing 7 changed files with 131 additions and 131 deletions.
2 changes: 2 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -92,3 +92,5 @@ group :development do
# Speed up commands on slow machines / big apps [https://github.com/rails/spring]
# gem "spring"
end

gem "nice_partials", "~> 0.10.0"
3 changes: 3 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,8 @@ GEM
net-smtp (0.4.0)
net-protocol
net-ssh (7.2.0)
nice_partials (0.10.0)
actionview (>= 4.2.6)
nio4r (2.7.0)
nokogiri (1.15.5-aarch64-linux)
racc (~> 1.4)
Expand Down Expand Up @@ -386,6 +388,7 @@ DEPENDENCIES
kamal (~> 1.3)
litestack (~> 0.4.2)
lograge (~> 0.14.0)
nice_partials (~> 0.10.0)
puma (>= 5.0)
rails (~> 7.1.2)
rspec-rails (~> 6.1)
Expand Down
3 changes: 3 additions & 0 deletions app/helpers/application_helper.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# frozen_string_literal: true

module ApplicationHelper
def link_class
'no-underline hover:underline'
end
end
176 changes: 48 additions & 128 deletions app/views/application/home.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,20 @@
"
>
<div class="mx-auto text-center">
<h1 class="font-semibold text-3xl sm:text-5xl/leading-tight">
Data Sharing.
<h1 class="font-semibold text-4xl sm:text-6xl sm:leading-tight">
Simple Data Sharing.
<br>
Secure, Simple, Self-Destructing.
Secure, Self-Destructing.
</h1>

<p class="mx-auto max-w-lg mt-4 sm:text-xl/relaxed ">
Lorem ipsum dolor sit amet consectetur, adipisicing elit. Nesciunt illo
tenetur fuga ducimus numquam ea!
<p class="mx-auto max-w-2xl mt-4 sm:text-xl/relaxed">
Data Dead Drop provides effortless, secure file sharing. Data
self-destroys after access. No Browser required - just use your
favorite command line client!
</p>

<div class="mt-8 flex flex-wrap justify-center gap-4">
<%= render layout: "components/button_link_inverted", locals: { path: "What" } do %>
<%= render layout: "components/button_link_inverted", locals: { path: new_path } do %>
Get Started
<% end %>

Expand All @@ -28,144 +29,63 @@
</div>
</div>
</section>
<section id="how-it-works" class="container mx-auto max-w-screen-xl p-4">
<section id="how-it-works" class="">

<p class="text-lg font-extrabold sm:text-2xl mb-2 upcase">How It Works</p>
<h2 class="text-3xl font-extrabold sm:text-5xl mb-8">Share data in 3 simple steps</h2>
<div class="container mx-auto max-w-screen-xl p-4 py-24 ">
<p class="text-lg text-gray-600 font-bold sm:text-2xl mb-4 uppercase">How It Works</p>
<h2 class="text-3xl font-semibold sm:text-5xl">Share data in 3 steps</h2>

<div class="grid grid-cols-1 gap-8 items-center justify-between md:grid-cols-3">

<p class="text-8xl font-extrabold mb-4 p-6">01</p>
<div class="bg-white col-span-2 p-6 rounded shadow">
<h3 class="text-3xl font-semibold mb-2">Drop your data</h3>
<p class="mb-4">Drop some data in our
<%= link_to("Web UI", new_path, class: "no-underline hover:underline") %>
or upload data with your favorite command line client. In exchange,
you'll receive a secure link. Here's how you do it with Curl.</p>
<code
class="
text-sm sm:text-base inline-flex text-left items-center space-x-4 text-white
rounded-lg p-4 pl-6
"
>
<span class="flex gap-4">
<span class="shrink-0">
</span>

<span class="flex-1">
curl -X POST -F "upload[data][email protected]"
https://datadeaddrop.com/u.json
</span>
</span>

<button>
<svg
class="shrink-0 h-5 w-5 transition group-hover:text-white"
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 20 20"
fill="currentColor"
aria-hidden="true"
>
<path d="M8 2a1 1 0 000 2h2a1 1 0 100-2H8z"></path>
<path
d="M3 5a2 2 0 012-2 3 3 0 003 3h2a3 3 0 003-3 2 2 0 012 2v6h-4.586l1.293-1.293a1 1 0 00-1.414-1.414l-3 3a1 1 0 000 1.414l3 3a1 1 0 001.414-1.414L10.414 13H15v3a2 2 0 01-2 2H5a2 2 0 01-2-2V5zM15 11h2a1 1 0 110 2h-2v-2z"
>
</path>
</svg>
</button>
</code>
</div>

<p class="text-8xl font-extrabold p-6">02</p>
<div
class="
bg-white md:col-start-1 md:row-start-2 col-span-2 rounded shadow p-6
py-16 grid grid-cols-1 gap-8 items-center justify-between md:grid-cols-4
"
>
<h3 class="text-3xl font-semibold mb-2">Grab your data</h3>
<p class="mb-4">Use your link to download your data, either via your browser or your
favorite command line client.</p>

<code
class="
text-sm sm:text-base inline-flex text-left items-center space-x-4 text-white
rounded-lg p-4 pl-6
"
>
<span class="flex gap-4">
<span class="shrink-0">
$
</span>
<%= render "components/how_it_works_step" do |partial| %>
<% partial.step "01" %>
<% partial.title "Upload" %>

<% partial.content do %>
Upload some data via our
<%= link_to("Web UI", new_path, class: link_class) %>
or use your favorite command line client. Specify how long data
should be kept and how often it can be accessed. You'll receive
unique and secure link to access your data.
<% end %>
<% end %>

<span class="flex-1">
curl -L http://datadeaddrop.com/d/your-secret-url.json >
your-file.txt
</span>
</span>
<%= render "components/how_it_works_step" do |partial| %>
<% partial.step "02" %>
<% partial.title "Download" %>

<button>
<svg
class="shrink-0 h-5 w-5 transition group-hover:text-white"
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 20 20"
fill="currentColor"
aria-hidden="true"
>
<path d="M8 2a1 1 0 000 2h2a1 1 0 100-2H8z"></path>
<path
d="M3 5a2 2 0 012-2 3 3 0 003 3h2a3 3 0 003-3 2 2 0 012 2v6h-4.586l1.293-1.293a1 1 0 00-1.414-1.414l-3 3a1 1 0 000 1.414l3 3a1 1 0 001.414-1.414L10.414 13H15v3a2 2 0 01-2 2H5a2 2 0 01-2-2V5zM15 11h2a1 1 0 110 2h-2v-2z"
>
</path>
</svg>
</button>
</code>
</div>
<% partial.content do %>
Share your link, or use it yourself to download your data. You can
use your browser or hop on the command line.
<% end %>
<% end %>

<p class="text-8xl font-extrabold p-6">03</p>
<div class="bg-white col-span-2 rounded shadow p-6">
<h3 class="text-3xl font-semibold mb-2">Incinerate!</h3>
<p class="mb-4">After access, we destroy your data and keep no trace of it. If you
don't grab your data after a set amount of time it will also be
destroyed 🔥</p>
<%= render "components/how_it_works_step" do |partial| %>
<% partial.step "03" %>
<% partial.title "Incinerate" %>

<% partial.content do %>
Your data is automatically destroyed after being accessed a
predefined number of times. Even if nobody access it, your data is
deleted after a short expiration time 🔥
<% end %>
<% end %>
</div>
</div>
</section>

<section id="faq" class="container mx-auto max-w-screen-xl py-32 px-4">
<h2 class="text-3xl font-extrabold mb-8 sm:text-5xl">FAQ</h2>

<details class="group [&_summary::-webkit-details-marker]:hidden" open>
<summary
class="
flex cursor-pointer items-center justify-between gap-1.5 rounded-lg p-4
"
>
<h2 class="font-medium">Lorem ipsum dolor sit amet consectetur adipisicing?</h2>

<svg
class="h-5 w-5 shrink-0 transition duration-300 group-open:-rotate-180"
xmlns="http://www.w3.org/2000/svg"
fill="none"
viewBox="0 0 24 24"
stroke="currentColor"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M19 9l-7 7-7-7"
/>
</svg>
</summary>

<p class="mt-4 px-4 leading-relaxed">
Lorem ipsum dolor sit amet consectetur, adipisicing elit. Ab hic
veritatis molestias culpa in, recusandae laboriosam neque aliquid libero
nesciunt voluptate dicta quo officiis explicabo consequuntur distinctio
corporis earum similique!
</p>
</details>
<%= render partial: "components/faq_item",
locals: {
headline: "Lorem ipsum dolor sit amet",
content:
"Lorem ipsum dolor sit amet, consectetur adipisicing elit. Dolores, sapiente animi! Accusantium inventore sunt ipsam? Molestiae voluptatum deleniti quia rerum reiciendis omnis. Sequi, repudiandae. Debitis earum eligendi neque architecto vel?",
} %>

<%= render partial: "components/faq_item",
locals: {
Expand Down
6 changes: 3 additions & 3 deletions app/views/components/_faq_item.html.erb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<details class="group [&_summary::-webkit-details-marker]:hidden">
<summary
class="
flex cursor-pointer items-center justify-between gap-1.5 rounded-lg p-4
flex cursor-pointer items-center justify-between gap-1.5 rounded-lg py-4
"
>
<h2 class="font-medium"><%= headline %></h2>
Expand All @@ -22,7 +22,7 @@
</svg>
</summary>

<p class="mt-4 px-4 leading-relaxed">
<% content %>
<p class="mt-4 sm:px-4 leading-relaxed">
<%= content %>
</p>
</details>
7 changes: 7 additions & 0 deletions app/views/components/_how_it_works_step.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<p class="text-8xl font-extrabold mb-4"><%= partial.step %></p>
<div class="bg-white col-span-3">
<h3 class="text-3xl font-semibold mb-2"><%= partial.title %></h3>
<p class="mb-4">
<%= partial.content %>
</p>
</div>
65 changes: 65 additions & 0 deletions app/views/uploads/new.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,70 @@
<h1 class="font-bold text-4xl">New upload</h1>

<%= render "form", upload: @upload %>
<div class="flex my-2 text-sm font-semibold items-center text-gray-800">
<div class="flex-grow border-t h-px mr-3"></div>
OR
<div class="flex-grow border-t h-px ml-3"></div>
</div>
<div>
<div class="sm:hidden">
<label for="Tab" class="sr-only">Tab</label>

<select id="Tab" class="w-full rounded-md border-gray-200">
<option>Settings</option>
<option>Messages</option>
<option>Archive</option>
<option select>Notifications</option>
</select>
</div>

<div class="hidden sm:block">
<div class="border-b border-gray-200">
<nav class="-mb-px flex gap-6">
<a
href="#"
class="
shrink-0 border border-transparent p-3 text-sm font-medium text-gray-500
hover:text-gray-700
"
>
Settings
</a>

<a
href="#"
class="
shrink-0 border border-transparent p-3 text-sm font-medium text-gray-500
hover:text-gray-700
"
>
Messages
</a>

<a
href="#"
class="
shrink-0 border border-transparent p-3 text-sm font-medium text-gray-500
hover:text-gray-700
"
>
Archive
</a>

<a
href="#"
class="
shrink-0 rounded-t-lg border border-gray-300 border-b-white p-3 text-sm
font-medium text-sky-600
"
>Notifications
</a>
</nav>

</div>
</div>
</div>

</div>

</section>

0 comments on commit 187019e

Please sign in to comment.