Skip to content
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

Opacity on hover #39

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 20 additions & 1 deletion assets/css/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,23 @@
@keyframes spin {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}
}

.dim {
opacity: 1;
transition: opacity .15s ease-in;
}

.dim:hover, .dim:focus {
opacity: .5;
transition: opacity .15s ease-in;
}

.dim:active {
opacity: .8;
transition: opacity .15s ease-out;
}

.underline:hover {
text-decoration: underline;
}
26 changes: 19 additions & 7 deletions elm.js
Original file line number Diff line number Diff line change
Expand Up @@ -15146,6 +15146,7 @@ var $mdgriffith$elm_ui$Element$Background$color = function (clr) {
'background-color',
clr));
};
var $mdgriffith$elm_ui$Element$htmlAttribute = $mdgriffith$elm_ui$Internal$Model$Attr;
var $mdgriffith$elm_ui$Element$rgb255 = F3(
function (red, green, blue) {
return A4($mdgriffith$elm_ui$Internal$Model$Rgba, red / 255, green / 255, blue / 255, 1);
Expand All @@ -15169,7 +15170,9 @@ var $author$project$UI$mintButtonAttrs = _List_fromArray(
$mdgriffith$elm_ui$Element$Border$rounded(3),
$mdgriffith$elm_ui$Element$padding(15),
$mdgriffith$elm_ui$Element$Background$color($author$project$UI$mint),
$mdgriffith$elm_ui$Element$Font$color($author$project$UI$white)
$mdgriffith$elm_ui$Element$Font$color($author$project$UI$white),
$mdgriffith$elm_ui$Element$htmlAttribute(
$elm$html$Html$Attributes$class('dim'))
]);
var $mdgriffith$elm_ui$Element$Input$Placeholder = F2(
function (a, b) {
Expand Down Expand Up @@ -15363,7 +15366,9 @@ var $author$project$UI$completedButtonAttrs = _List_fromArray(
$mdgriffith$elm_ui$Element$Border$rounded(3),
$mdgriffith$elm_ui$Element$padding(15),
$mdgriffith$elm_ui$Element$Background$color($author$project$UI$grey),
$mdgriffith$elm_ui$Element$Font$color($author$project$UI$white)
$mdgriffith$elm_ui$Element$Font$color($author$project$UI$white),
$mdgriffith$elm_ui$Element$htmlAttribute(
$elm$html$Html$Attributes$class('dim'))
]);
var $author$project$UI$darkGrey = A3($mdgriffith$elm_ui$Element$rgb255, 69, 83, 91);
var $mdgriffith$elm_ui$Internal$Flag$fontAlignment = $mdgriffith$elm_ui$Internal$Flag$flag(12);
Expand Down Expand Up @@ -15739,7 +15744,9 @@ var $author$project$Pages$Capture$showTime = F2(
$mdgriffith$elm_ui$Element$Font$bold,
$mdgriffith$elm_ui$Element$width($mdgriffith$elm_ui$Element$fill),
$mdgriffith$elm_ui$Element$padding(30),
$mdgriffith$elm_ui$Element$Font$color($author$project$UI$teal)
$mdgriffith$elm_ui$Element$Font$color($author$project$UI$teal),
$mdgriffith$elm_ui$Element$htmlAttribute(
$elm$html$Html$Attributes$class('underline'))
]),
{
W: $mdgriffith$elm_ui$Element$text(hour + (':' + (minute + (':' + second)))),
Expand Down Expand Up @@ -15767,7 +15774,9 @@ var $author$project$Pages$Capture$showTime = F2(
$mdgriffith$elm_ui$Element$Font$bold,
$mdgriffith$elm_ui$Element$width($mdgriffith$elm_ui$Element$fill),
$mdgriffith$elm_ui$Element$padding(30),
$mdgriffith$elm_ui$Element$Font$color($author$project$UI$teal)
$mdgriffith$elm_ui$Element$Font$color($author$project$UI$teal),
$mdgriffith$elm_ui$Element$htmlAttribute(
$elm$html$Html$Attributes$class('underline'))
]),
{
W: $mdgriffith$elm_ui$Element$text(hour + (':' + (minute + (':' + second)))),
Expand Down Expand Up @@ -15808,7 +15817,9 @@ var $author$project$UI$startButtonAttrs = _List_fromArray(
$mdgriffith$elm_ui$Element$Border$rounded(3),
$mdgriffith$elm_ui$Element$padding(15),
$mdgriffith$elm_ui$Element$Background$color($author$project$UI$teal),
$mdgriffith$elm_ui$Element$Font$color($author$project$UI$white)
$mdgriffith$elm_ui$Element$Font$color($author$project$UI$white),
$mdgriffith$elm_ui$Element$htmlAttribute(
$elm$html$Html$Attributes$class('dim'))
]);
var $author$project$UI$orange = A3($mdgriffith$elm_ui$Element$rgb255, 252, 134, 91);
var $author$project$UI$stopButtonAttrs = _List_fromArray(
Expand All @@ -15817,7 +15828,9 @@ var $author$project$UI$stopButtonAttrs = _List_fromArray(
$mdgriffith$elm_ui$Element$Border$rounded(3),
$mdgriffith$elm_ui$Element$padding(15),
$mdgriffith$elm_ui$Element$Background$color($author$project$UI$orange),
$mdgriffith$elm_ui$Element$Font$color($author$project$UI$white)
$mdgriffith$elm_ui$Element$Font$color($author$project$UI$white),
$mdgriffith$elm_ui$Element$htmlAttribute(
$elm$html$Html$Attributes$class('dim'))
]);
var $mdgriffith$elm_ui$Element$Font$strike = $mdgriffith$elm_ui$Internal$Model$htmlClass($mdgriffith$elm_ui$Internal$Style$classes.eq);
var $author$project$Pages$Capture$showCapture = F2(
Expand Down Expand Up @@ -16126,7 +16139,6 @@ var $mdgriffith$elm_ui$Element$paddingEach = function (_v0) {
bottom,
left));
};
var $mdgriffith$elm_ui$Element$htmlAttribute = $mdgriffith$elm_ui$Internal$Model$Attr;
var $mdgriffith$elm_ui$Element$Input$isFill = function (len) {
isFill:
while (true) {
Expand Down
20 changes: 17 additions & 3 deletions src/Pages/Capture.elm
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
module Pages.Capture exposing (Model, Msg(..), init, subscriptions, toSession, update, view)

import Asset
import Capture exposing (..)
import Element exposing (..)
import Element.Background as EltBackground
import Element.Font exposing (..)
import Element.Input as EltInput
import Endpoint
import Html.Attributes as HtmlAttr
import Http
import Page
import Route
Expand Down Expand Up @@ -390,7 +390,14 @@ showTime capture clock =
Just t ->
millisToHMS t
in
link [ center, bold, width fill, padding 30, color UI.teal ]
link
[ center
, bold
, width fill
, padding 30
, color UI.teal
, htmlAttribute <| HtmlAttr.class "underline"
]
{ url = Route.routeToString (Route.CaptureTimers capture.idCapture)
, label = text (hour ++ ":" ++ minute ++ ":" ++ second)
}
Expand All @@ -405,7 +412,14 @@ showTime capture clock =
Just t ->
millisToHMS t
in
link [ center, bold, width fill, padding 30, color UI.teal ]
link
[ center
, bold
, width fill
, padding 30
, color UI.teal
, htmlAttribute <| HtmlAttr.class "underline"
]
{ url = Route.routeToString (Route.CaptureTimers capture.idCapture)
, label = text (hour ++ ":" ++ minute ++ ":" ++ second)
}
Expand Down
5 changes: 5 additions & 0 deletions src/UI.elm
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ buttonAttrs =
, EltBrd.width 1
, EltBrd.rounded 3
, Elt.padding 5
, Elt.htmlAttribute <| HtmlAttr.class "dim"
]


Expand All @@ -59,6 +60,7 @@ mintButtonAttrs =
, Elt.padding 15
, EltBackground.color mint
, EltFont.color white
, Elt.htmlAttribute <| HtmlAttr.class "dim"
]


Expand All @@ -69,6 +71,7 @@ startButtonAttrs =
, Elt.padding 15
, EltBackground.color teal
, EltFont.color white
, Elt.htmlAttribute <| HtmlAttr.class "dim"
]


Expand All @@ -79,6 +82,7 @@ stopButtonAttrs =
, Elt.padding 15
, EltBackground.color orange
, EltFont.color white
, Elt.htmlAttribute <| HtmlAttr.class "dim"
]


Expand All @@ -89,6 +93,7 @@ completedButtonAttrs =
, Elt.padding 15
, EltBackground.color grey
, EltFont.color white
, Elt.htmlAttribute <| HtmlAttr.class "dim"
]


Expand Down