export: sorted by player. controls: centered. shell.nix added. makefile: clean, haml cli changes

This commit is contained in:
Denis Knauf 2023-06-08 18:53:06 +02:00
parent 9c15f6c0e9
commit 27b97f7f2c
6 changed files with 29 additions and 7 deletions

2
.gitignore vendored
View file

@ -1,3 +1,5 @@
.*.sw[po]
*.css *.css
*.html *.html
*.js *.js
*.map

View file

@ -1,11 +1,14 @@
all: index.html app.js app.css all: index.html app.js app.css
.PHONY: all .PHONY: all
index.html: index.html.haml index.html: index.html.haml app.js app.css
haml $^ $@ haml render $< >$@
app.js: app.js.coffee app.js: app.js.coffee
coffee -cs >$@ <$^ coffee -cs <$< >$@
app.css: app.css.sass app.css: app.css.sass
sassc $^ $@ sass $< $@
clean:
rm -f index.html app.js app.css

View file

@ -7,6 +7,9 @@ h1
text-align: center text-align: center
.controls .controls
margin: 0 auto
width: 30em
text-align: center
button, a button, a
display: inline-block display: inline-block
border: none border: none
@ -20,6 +23,8 @@ h1
font-size: 2em font-size: 2em
border-radius: 1ex border-radius: 1ex
outline: none outline: none
width: 3em
height: 3em
&:hover, &:active &:hover, &:active
box-shadow: inset 0 0 0.7ex white, 0 0 1ex white box-shadow: inset 0 0 0.7ex white, 0 0 1ex white
background: #ddd background: #ddd
@ -28,7 +33,7 @@ h1
outline: none outline: none
> * > *
display: none display: none
&[data-state=loaded] > .if_loaded, &[data-state=loaded] > .if_loaded,
&[data-state=started] > .if_started, &[data-state=started] > .if_started,
&[data-state=stopped] > .if_stopped &[data-state=stopped] > .if_stopped
display: initial display: initial

View file

@ -94,6 +94,7 @@ window.addEventListener 'load', ->
exporthelper = clock.element.querySelector ':scope .exporthelper' exporthelper = clock.element.querySelector ':scope .exporthelper'
download.addEventListener 'click', (e) -> download.addEventListener 'click', (e) ->
t = '' t = ''
window.list.sort (a,b) -> a[2].value-b[2].value
for en in window.list for en in window.list
t += "#{en[0]}\t#{en[1]}\t#{en[2].value}\n" t += "#{en[0]}\t#{en[1]}\t#{en[2].value}\n"
exporthelper.href = "data:text/csv;name=schplitted.csv,#{encodeURIComponent t}" exporthelper.href = "data:text/csv;name=schplitted.csv,#{encodeURIComponent t}"

View file

@ -5,8 +5,10 @@
%meta(http-equiv="X-UA-Compatible" content="IE=edge") %meta(http-equiv="X-UA-Compatible" content="IE=edge")
%meta(name="viewport" content="width=device-width, initial-scale=1") %meta(name="viewport" content="width=device-width, initial-scale=1")
%title Zeitschplitter %title Zeitschplitter
%link(rel="stylesheet" href="app.css") :css
%script(type="text/javascript" src="app.js") #{File.read 'app.css'}
:javascript
#{File.read 'app.js'}
%body %body
%header %header

9
shell.nix Normal file
View file

@ -0,0 +1,9 @@
with (import <nixpkgs> {});
stdenv.mkDerivation {
name = "zeitschplitter-env";
buildInputs = [
#ruby rubyPackages.openssl env.gems.coffee-script env.gems.haml
gnumake git dart-sass nodePackages.coffee-script rubyPackages.haml
];
LANG = "de_AT.UTF-8";
}