Format javascript and css files

This commit is contained in:
Adrian Kumpf
2020-12-30 17:49:47 +01:00
parent ff30e5fc6d
commit 5ebe952205
4 changed files with 57 additions and 60 deletions

View File

@@ -4,7 +4,7 @@
@import "~leaflet-control-geocoder/dist/Control.Geocoder.css";
@import "~@geoman-io/leaflet-geoman-free/dist/leaflet-geoman.css";
$mdi-font-path: '~@mdi/font/fonts';
$mdi-font-path: "~@mdi/font/fonts";
@import "~@mdi/font/scss/materialdesignicons.scss";
$notification-padding: 0.75rem 1.25rem 0.75rem 0.75rem;
@@ -43,11 +43,11 @@ $modal-card-foot-border-top: none;
@import "~bulma/sass/layout/section";
@import "~bulma/sass/grid/_all";
@import '~@creativebulma/bulma-tooltip';
@import '~@creativebulma/bulma-divider';
@import '~bulma-switch';
@import "~@creativebulma/bulma-tooltip";
@import "~@creativebulma/bulma-divider";
@import "~bulma-switch";
@import './vendor/modal-fx';
@import "./vendor/modal-fx";
// @import "../../deps/phoenix_live_view/assets/css/live_view.css";
.phx-disconnected {
@@ -117,7 +117,6 @@ nav.navbar {
th:first-of-type {
width: 50%;
}
}
@media screen and (max-width: 900px) {
@@ -127,7 +126,6 @@ nav.navbar {
}
}
@media screen and (min-width: $tablet) {
flex-direction: row;
@@ -151,7 +149,7 @@ nav.navbar {
}
}
button[phx-click=suspend_logging]:disabled {
button[phx-click="suspend_logging"]:disabled {
pointer-events: none;
}
}
@@ -182,7 +180,6 @@ nav.navbar {
.field-label {
min-width: 165px;
.tooltip:before {
text-align: left !important;
}
@@ -197,8 +194,8 @@ nav.navbar {
}
}
$sizes: (0,5,10,15,20,25,30,50);
$positions: ('top','left','bottom','right');
$sizes: (0, 5, 10, 15, 20, 25, 30, 50);
$positions: ("top", "left", "bottom", "right");
@each $size in $sizes {
@each $position in $positions {
@@ -215,20 +212,19 @@ $positions: ('top','left','bottom','right');
font-size: 1.25em;
}
@media screen and (orientation: landscape) and (max-width: $desktop - 1) {
body{
@media screen and (orientation: landscape) and (max-width: $desktop - 1) {
body {
-webkit-text-size-adjust: none;
}
.navbar .navbar-brand,
.navbar .navbar-end,
main.section .container{
main.section .container {
max-width: 95%;
}
.navbar .navbar-brand,
.navbar .navbar-end
{
.navbar .navbar-end {
margin: 0 auto;
}
}
@@ -272,17 +268,17 @@ $positions: ('top','left','bottom','right');
.spinner {
display: inline-flex;
justify-content: center;
height: 1.0rem;
width: 1.0rem;
height: 1rem;
width: 1rem;
.is-loading {
position: relative;
pointer-events: none;
&:after {
@extend %loader;
@include center(1em);
position: absolute !important;
}
position: relative;
pointer-events: none;
&:after {
@extend %loader;
@include center(1em);
position: absolute !important;
}
}
}
@@ -307,7 +303,8 @@ main.full-height {
.about {
margin-top: 50px;
th, td {
th,
td {
border: none;
}
}

View File

@@ -1,42 +1,41 @@
// source: https://github.com/postare/bulma-modal-fx/blob/master/src/_scss/components/_modal-fx.scss
$transition-duration: .3s;
$transition-duration: 0.3s;
.modal {
display: flex;
visibility: hidden;
display: flex;
visibility: hidden;
.modal-content {
max-width: 95%;
}
.modal-content {
max-width: 95%;
}
.modal-background {
transition: all $transition-duration;
opacity: 0;
}
&.is-active {
visibility: visible;
.modal-background {
transition: all $transition-duration;
opacity: 1;
}
}
&.modal-fx {
&-fadeInScale {
.modal-content {
transform: scale(0.7);
opacity: 0;
}
transition: all $transition-duration;
}
&.is-active {
visibility: visible;
.modal-background {
opacity: 1;
}
}
&.modal-fx {
&-fadeInScale {
.modal-content {
transform: scale(0.7);
opacity: 0;
transition: all $transition-duration;
}
&.is-active {
.modal-content {
transform: scale(1);
opacity: 1;
}
}
&.is-active {
.modal-content {
transform: scale(1);
opacity: 1;
}
}
}
}
}

View File

@@ -58,10 +58,10 @@ socket.connect();
let channel = socket.channel("topic:subtopic", {});
channel
.join()
.receive("ok", resp => {
.receive("ok", (resp) => {
console.log("Joined successfully", resp);
})
.receive("error", resp => {
.receive("error", (resp) => {
console.log("Unable to join", resp);
});

View File

@@ -3,14 +3,15 @@ defmodule TeslaMateWeb.DriveController do
require Logger
import Ecto.Query
alias TeslaMate.Log.Drive
alias TeslaMate.Log.{Drive, Position}
alias TeslaMate.Repo
def gpx(conn, %{"id" => id}) do
drive =
Drive
|> Repo.get(id)
|> Repo.preload(positions: from(p in TeslaMate.Log.Position, order_by: p.date))
|> Repo.preload(positions: from(p in Position, order_by: p.date))
case drive do
nil -> conn |> send_resp(404, "Drive not found")