Improve responsive features

This commit is contained in:
José Valim 2021-04-21 13:50:55 +02:00
parent c7e2c45a57
commit 02f46fd912
4 changed files with 15 additions and 8 deletions

View file

@ -1515,6 +1515,7 @@
"jest-resolve": "^26.6.2", "jest-resolve": "^26.6.2",
"jest-util": "^26.6.2", "jest-util": "^26.6.2",
"jest-worker": "^26.6.2", "jest-worker": "^26.6.2",
"node-notifier": "^8.0.0",
"slash": "^3.0.0", "slash": "^3.0.0",
"source-map": "^0.6.0", "source-map": "^0.6.0",
"string-length": "^4.0.1", "string-length": "^4.0.1",
@ -3369,6 +3370,7 @@
"dependencies": { "dependencies": {
"anymatch": "~3.1.1", "anymatch": "~3.1.1",
"braces": "~3.0.2", "braces": "~3.0.2",
"fsevents": "~2.3.1",
"glob-parent": "~5.1.0", "glob-parent": "~5.1.0",
"is-binary-path": "~2.1.0", "is-binary-path": "~2.1.0",
"is-glob": "~4.0.1", "is-glob": "~4.0.1",
@ -4828,7 +4830,8 @@
"esprima": "^4.0.1", "esprima": "^4.0.1",
"estraverse": "^4.2.0", "estraverse": "^4.2.0",
"esutils": "^2.0.2", "esutils": "^2.0.2",
"optionator": "^0.8.1" "optionator": "^0.8.1",
"source-map": "~0.6.1"
}, },
"bin": { "bin": {
"escodegen": "bin/escodegen.js", "escodegen": "bin/escodegen.js",
@ -7390,6 +7393,7 @@
"@types/node": "*", "@types/node": "*",
"anymatch": "^3.0.3", "anymatch": "^3.0.3",
"fb-watchman": "^2.0.0", "fb-watchman": "^2.0.0",
"fsevents": "^2.1.2",
"graceful-fs": "^4.2.4", "graceful-fs": "^4.2.4",
"jest-regex-util": "^26.0.0", "jest-regex-util": "^26.0.0",
"jest-serializer": "^26.6.2", "jest-serializer": "^26.6.2",
@ -9237,6 +9241,7 @@
"resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz",
"integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==",
"dependencies": { "dependencies": {
"graceful-fs": "^4.1.6",
"universalify": "^2.0.0" "universalify": "^2.0.0"
}, },
"optionalDependencies": { "optionalDependencies": {
@ -14986,8 +14991,10 @@
"integrity": "sha512-9P3MWk6SrKjHsGkLT2KHXdQ/9SNkyoJbabxnKOoJepsvJjJG8uYTR3yTPxPQvNDI3w4Nz1xnE0TLHK4RIVe/MQ==", "integrity": "sha512-9P3MWk6SrKjHsGkLT2KHXdQ/9SNkyoJbabxnKOoJepsvJjJG8uYTR3yTPxPQvNDI3w4Nz1xnE0TLHK4RIVe/MQ==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"chokidar": "^3.4.1",
"graceful-fs": "^4.1.2", "graceful-fs": "^4.1.2",
"neo-async": "^2.5.0" "neo-async": "^2.5.0",
"watchpack-chokidar2": "^2.0.1"
}, },
"optionalDependencies": { "optionalDependencies": {
"chokidar": "^3.4.1", "chokidar": "^3.4.1",

View file

@ -20,7 +20,7 @@ defmodule LivebookWeb.HomeLive do
<div class="flex flex-grow h-full"> <div class="flex flex-grow h-full">
<div class="flex-grow px-6 py-8 overflow-y-auto"> <div class="flex-grow px-6 py-8 overflow-y-auto">
<div class="max-w-screen-lg w-full mx-auto p-4 pt-0 pb-8 flex flex-col items-center space-y-4"> <div class="max-w-screen-lg w-full mx-auto p-4 pt-0 pb-8 flex flex-col items-center space-y-4">
<div class="w-full flex flex-col space-y-2 items-center sm:flex-row sm:space-y-0 sm:justify-between pb-4 border-b border-gray-200"> <div class="w-full flex flex-col space-y-2 items-center sm:flex-row sm:space-y-0 sm:justify-between sm:pb-4 pb-8 border-b border-gray-200">
<div class="text-2xl text-gray-800 font-semibold"> <div class="text-2xl text-gray-800 font-semibold">
<img src="/logo-with-text.png" class="h-[50px]" alt="Livebook" /> <img src="/logo-with-text.png" class="h-[50px]" alt="Livebook" />
</div> </div>

View file

@ -67,14 +67,14 @@ defmodule LivebookWeb.PathSelectComponent do
</div> </div>
<div class="flex-grow -m-1 p-1 overflow-y-auto tiny-scrollbar" tabindex="-1"> <div class="flex-grow -m-1 p-1 overflow-y-auto tiny-scrollbar" tabindex="-1">
<%= if highlighting?(@files) do %> <%= if highlighting?(@files) do %>
<div class="grid grid-cols-4 gap-2 border-b border-dashed border-grey-200 mb-2 pb-2"> <div class="grid sm:grid-cols-4 grid-cols-2 gap-2 border-b border-dashed border-grey-200 mb-2 pb-2">
<%= for file <- @files, file.highlighted != "" do %> <%= for file <- @files, file.highlighted != "" do %>
<%= render_file(file, @phx_target) %> <%= render_file(file, @phx_target) %>
<% end %> <% end %>
</div> </div>
<% end %> <% end %>
<div class="grid grid-cols-4 gap-2"> <div class="grid sm:grid-cols-3 lg:grid-cols-4 grid-cols-2 gap-2">
<%= for file <- @files, file.highlighted == "" do %> <%= for file <- @files, file.highlighted == "" do %>
<%= render_file(file, @phx_target) %> <%= render_file(file, @phx_target) %>
<% end %> <% end %>

View file

@ -65,11 +65,11 @@ defmodule LivebookWeb.SessionLive.ShortcutsComponent do
<h3 class="text-lg font-medium text-gray-900 pt-4"> <h3 class="text-lg font-medium text-gray-900 pt-4">
<%= @title %> <%= @title %>
</h3> </h3>
<div class="mt-2 flex"> <div class="mt-2 flex sm:flex-row flex-col">
<div class="w-1/2"> <div class="flex-grow">
<%= render_shortcuts_section_table(@left, @platform) %> <%= render_shortcuts_section_table(@left, @platform) %>
</div> </div>
<div class="w-1/2"> <div class="flex-grow">
<%= render_shortcuts_section_table(@right, @platform) %> <%= render_shortcuts_section_table(@right, @platform) %>
</div> </div>
</div> </div>