mirror of
https://github.com/TheAnachronism/docspell.git
synced 2025-06-23 02:48:26 +00:00
First version of new ui based on tailwind
This drops fomantic-ui as css toolkit and introduces tailwindcss. With tailwind there are no predefined components, but it's very easy to create those. So customizing the look&feel is much simpler, most of the time no additional css is needed. This requires a complete rewrite of the markup + styles. Luckily all logic can be kept as is. The now old ui is not removed, it is still available by using a request header `Docspell-Ui` with a value of `1` for the old ui and `2` for the new ui. Another addition is "dev mode", where docspell serves assets with a no-cache header, to disable browser caching. This makes developing a lot easier.
This commit is contained in:
@ -1,5 +1,6 @@
|
||||
module Comp.Progress exposing
|
||||
( smallIndicating
|
||||
( progress2
|
||||
, smallIndicating
|
||||
, topAttachedIndicating
|
||||
)
|
||||
|
||||
@ -7,6 +8,21 @@ import Html exposing (Html, div, text)
|
||||
import Html.Attributes exposing (attribute, class, style)
|
||||
|
||||
|
||||
progress2 : Int -> Html msg
|
||||
progress2 percent =
|
||||
div [ class "shadow w-full h-full bg-gray-200 dark:bg-bluegray-600 rounded relative" ]
|
||||
[ div
|
||||
[ class "transition-duration-300 h-full bg-blue-500 dark:bg-light-blue-500 block text-xs text-center"
|
||||
, style "width" (String.fromInt percent ++ "%")
|
||||
]
|
||||
[]
|
||||
, div [ class "absolute left-1/2 -top-1 font-semibold" ]
|
||||
[ text (String.fromInt percent)
|
||||
, text "%"
|
||||
]
|
||||
]
|
||||
|
||||
|
||||
smallIndicating : Int -> Html msg
|
||||
smallIndicating percent =
|
||||
progress "small indicating active" percent Nothing Nothing
|
||||
|
Reference in New Issue
Block a user