diff --git a/Makefile b/Makefile
index f575c1e..3b6fd8a 100644
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,36 @@
-all: clean
- mkdir -p public audios
- ln -s ../audios public/audios
+.PHONY=static all clean svg js css
+
+ALL_CSS := $(patsubst res/%.less,public/%.css,$(wildcard res/*.less))
+ALL_JS := $(patsubst res/%.js,public/%.js,$(wildcard res/*.js))
+ALL_SVG := $(patsubst res/%.svg,public/%.svg,$(wildcard res/*.svg))
+
+all: public/index.html
+
+static: css js svg
+
+css: $(ALL_CSS)
+
+js: $(ALL_JS)
+
+svg: $(ALL_SVG)
+
+public:
+ mkdir public
+
+public/index.html: static public public/audios \
+ res/index.html res/page.html \
+ res/song.html res/song_li.html res/song_redir.html
python3 src/latex_scanner.py
+public/audios: audios public
+ rm -f public/audios
+ ln -s ../audios public/audios
+
+public/%.css: res/%.less
+ lessc $< $@
+
+public/%: res/%
+ cp $< $@
+
clean:
rm -rf public
diff --git a/res/colors.less b/res/colors.less
new file mode 100644
index 0000000..4e4d052
--- /dev/null
+++ b/res/colors.less
@@ -0,0 +1,12 @@
+@nochordscolor: #FBB;
+@nochordscolor-hover: #FAA;
+@title: #369;
+@subtitle: #444;
+@text: #333;
+@text-hover: #607D8B;
+@secondary: #EEE;
+@secondary-hover: #CCC;
+@chord-color: darkgreen;
+
+@transition: .5s;
+@border-radius: 4px;
diff --git a/res/index.css b/res/index.css
deleted file mode 100644
index 5c71a9c..0000000
--- a/res/index.css
+++ /dev/null
@@ -1,62 +0,0 @@
-.songs {
- margin: 0 0 2em 0;
- list-style-type: none;
- padding: 0;
-}
-
-.songs li {
- cursor: pointer;
- position: relative;
- left: 0;
- background-color: #EEE;
- margin: .5em;
- padding: .3em 0;
- min-height: 1.6em;
- border-radius: 4px;
-}
-
-.songs li a {
- color: inherit;
- text-decoration: inherit;
-}
-
-.songs li:hover {
- color: #607D8B;
- background-color: #DDD;
- transition-duration: 500ms;
-}
-
-/* .songs li.selected {
- background-color: #CFD8DC;
- transition-duration: 100ms;
-}
-
-.songs li.selected:hover {
- background-color: #BBD8DC;
- color: white;
- transition-duration: 500ms;
-} */
-
-.songs li.hasChords {
- background-color: #FBB;
-}
-
-.songs li.hasChords:hover {
- color: #607D8B;
- background-color: #FAA;
-}
-
-.songs .numberBadge {
- display: inline-block;
- font-size: small;
- color: white;
- padding: 0.8em 0.7em 0 0.7em;
- background-color: #405061;
- line-height: 1em;
- position: relative;
- left: -1px;
- top: -4px;
- min-height: 1.8em;
- margin-right: .8em;
- border-radius: 4px 0 0 4px;
-}
diff --git a/res/index.html b/res/index.html
index 1cd14ce..69b337d 100644
--- a/res/index.html
+++ b/res/index.html
@@ -1,4 +1,5 @@
Índice
-
+
+ Las canciones sin acordes están marcadas en rojo.
+ {list_content}
+
diff --git a/res/index.less b/res/index.less
new file mode 100644
index 0000000..a26c9f3
--- /dev/null
+++ b/res/index.less
@@ -0,0 +1,37 @@
+@import "colors";
+
+.songs {
+ list-style: none;
+ padding: 0;
+ > a {
+ color: inherit;
+ text-decoration: none;
+ > li {
+ background-color: @secondary;
+ margin: .5em;
+ padding: .6em;
+ border-radius: @border-radius;
+ .number {
+ font-weight: bolder;
+ color: black;
+ }
+ &:hover {
+ color: @text-hover;
+ background-color: @secondary-hover;
+ transition-duration: @transition;
+ }
+ &.hasChords {
+ background-color: @nochordscolor;
+ &:hover {
+ color: @text-hover;
+ background-color: @nochordscolor-hover;
+ }
+ }
+ }
+ }
+}
+span.hasChords {
+ background-color: @nochordscolor;
+ padding: 0.3em 0.4em;
+ border-radius: @border-radius;
+}
diff --git a/res/main.css b/res/main.css
deleted file mode 100644
index 0372680..0000000
--- a/res/main.css
+++ /dev/null
@@ -1,44 +0,0 @@
-h1 {
- color: #369;
- font-size: 250%;
-}
-h2, h3 {
- color: #444;
- font-weight: lighter;
-}
-body {
- font-family: Helvetica, Arial, sans-serif;
- margin: 2em;
- color: #333;
-}
-
-.nav * {
- display: inline;
-}
-
-.nav li {
- padding: 0.5em;
- margin: 0.2em;
- background: #eee;
- border-radius: 5px;
-}
-
-.nav li:hover {
- background: #ccc;
- transition-duration: 500ms;
-}
-
-.nav li.selected {
- background: #bbb;
- transition-duration: 100ms;
-}
-
-.nav .selected a {
- color: #111;
- transition-duration: 100ms;
-}
-
-.nav a {
- color: #333;
- text-decoration: none;
-}
diff --git a/res/main.less b/res/main.less
new file mode 100644
index 0000000..c3d064a
--- /dev/null
+++ b/res/main.less
@@ -0,0 +1,56 @@
+@import "colors";
+
+h1 {
+ color: @title;
+ margin-inline: auto;
+ width: max-content;
+ max-width: 100%;
+ text-align: center;
+}
+
+h2, h3 {
+ color: @subtitle;
+ font-weight: lighter;
+}
+
+footer {
+ text-align: center;
+}
+
+body {
+ font-family: Helvetica, Arial, sans-serif;
+ color: @text;
+ max-width: 75em;
+ margin: 1em;
+ @media (min-width: 75em + 1em) {
+ margin: auto;
+ }
+}
+
+nav {
+ margin-inline: auto;
+ width: max-content;
+ max-width: 100%;
+ > ul {
+ padding-inline-start: 0px;
+ > li {
+ display: inline-block;
+ }
+ }
+}
+
+a {
+ text-decoration: none;
+ > span {
+ color: @text;
+ padding: 0.5em;
+ margin: 0.2em;
+ display: inline-block;
+ background: @secondary;
+ border-radius: @border-radius;
+ &:hover {
+ background: @secondary-hover;
+ transition-duration: @transition;
+ }
+ }
+}
diff --git a/res/page.html b/res/page.html
index b341531..c985dbb 100644
--- a/res/page.html
+++ b/res/page.html
@@ -4,24 +4,27 @@
Cancionero - Parroquia San Leandro
- %s
+ {css}
- %s
+ {main}