Skip to content
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
1 change: 0 additions & 1 deletion INSTALL
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ installing on OSX:

brew install pkg-config icu4c python-build epubcheck pyyaml


Install mactex: https://www.tug.org/mactex/mactex-download.html

sudo tlmgr update --self
Expand Down
Binary file added _site/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _site/icon32x32.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _site/spiewajco.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion editor/conv/song.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ describe('html2xmlstr tests', () => {
test('simple', () => {
let html = `
<!DOCTYPE html>
<html lang="pl">
<html lang="pl-PL">
<head>
<title>Ballada o smutnym skinie - Big Cyc, Chwyty na gitarę</title>
<link rel="canonical" href="ballada-o-smutnym-skinie.html">
Expand Down
2 changes: 1 addition & 1 deletion editor/index.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/html" lang="pl">
<html xmlns="http://www.w3.org/1999/html" lang="pl-PL">
<head>
<meta charset="UTF-8">
<script type="module" src="./songbook.js"></script>
Expand Down
6 changes: 5 additions & 1 deletion prepare_context.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,14 @@ SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )

if [ ! -d "${SCRIPT_DIR}/.python_venv" ]; then
# Tested on OSX
python3 -m venv .python_venv/
# python 3.12 should be ok as well...
# 3.13 had issues with building lxml
python3.11 -m venv .python_venv/
export PATH="/usr/local/opt/icu4c/bin:$PATH"
export PKG_CONFIG_PATH="/opt/homebrew/opt/icu4c/lib/pkgconfig"
pip3 install -r "${SCRIPT_DIR}/requirements.txt"
fi

source "${SCRIPT_DIR}/.python_venv/bin/activate"

pip install -r requirements.txt
2 changes: 2 additions & 0 deletions render_htmls.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,5 @@ PYTHONPATH="${__dir}" python3 "${__dir}/src/html/htmls_generator.py"
PYTHONPATH="${__dir}" python3 "${__dir}/src/html/index_generator.py"
cd "${__dir}/build/"
zip -r songs_html.zip songs_html

ln -s ../../_site/index.js songs_html/index.js
336 changes: 182 additions & 154 deletions src/epub/templates/template.css
Original file line number Diff line number Diff line change
Expand Up @@ -30,158 +30,186 @@ a:hover {
}

/* --- Top Navigation --- */
div.top-navigation {
background-color: #ffffff;
padding: 1em 2em;
border-radius: 8px;
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
margin-bottom: 2em;
display: flex;
gap: 1.5em;
align-items: center;
}

div.top-navigation a {
font-weight: 500;
}


/* --- Songbooks Section --- */
#songbooks {
list-style: none;
padding: 0;
}

#songbooks li {
font-weight: bold;
margin-top: 1em;
margin-bottom: 0.5em;
}

#songbooks a {
display: inline-block;
background-color: #6c757d;
color: #ffffff;
padding: 0.3em 0.8em;
border-radius: 4px;
font-size: 0.8em;
margin-right: 0.5em;
text-transform: uppercase;
}

#songbooks a:hover {
background-color: #5a6268;
color: #ffffff;
text-decoration: none;
}

#songbooks a.epub {
background-color: #28a745;
}
#songbooks a.epub:hover {
background-color: #218838;
}

#songbooks a.pdf {
background-color: #dc3545;
}
#songbooks a.pdf:hover {
background-color: #c82333;
}


/* --- Main Song List --- */
#songs {
list-style-type: none;
padding: 0;
margin-top: 1em;
background-color: #ffffff;
border-radius: 8px;
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

#songs li {
display: flex;
align-items: center;
border-bottom: 1px solid #e9ecef;
padding: 0.8em 1.5em;
transition: background-color 0.2s ease;
}

#songs li:last-child {
border-bottom: none;
}

#songs li:hover {
background-color: #eef2f5;
}

#songs li a {
flex-grow: 1;
font-size: 1.1em;
color: #333;
font-weight: 400;
}

#songs li a:hover {
text-decoration: none;
color: #0056b3;
}

/* --- Edit Icon Button --- */
.editicon {
background-color: transparent;
border: none;
cursor: pointer;
padding: 0;
margin-right: 1em; /* Spacing between icon and song title */
display: inline-flex;
align-items: center;
justify-content: center;
opacity: 0.6;
transition: opacity 0.2s ease;
}

.editicon:hover {
opacity: 1;
}

.editicon .material-symbols-outlined {
font-size: 20px;
color: #6c757d;
transition: color 0.2s ease;
}

.editicon:hover .material-symbols-outlined {
color: #007bff;
}

/* --- Kindle Link Paragraph --- */
p {
margin-top: 1.5em;
font-style: italic;
color: #6c757d;
}

/* Optional: Simple styling for the search box */
.search-container {
background-color: #ffffff;
padding: 1em 1.5em;
margin-top: 2em;
border-radius: 8px;
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.search-label {
display: block;
margin-bottom: 0.5em;
font-weight: 500;
color: #343a40;
}
#songSearch {
width: 100%;
padding: 0.75em;
font-size: 1em;
border: 1px solid #ced4da;
border-radius: 4px;
box-sizing: border-box; /* Ensures padding doesn't affect width */
@media screen {
div.top-navigation {
background-color: #ffffff;
padding: 1em 2em;
border-radius: 8px;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
margin-bottom: 2em;
display: flex;
gap: 1.5em;
align-items: center;
}
}

@media print {
div.top-navigation {
display: none;
}
}


div.top-navigation a {
font-weight: 500;
}

/* --- Logo ---------------- */

div.top {
display: flex;
}

img.left-top-logo {
width: 10em;
display: inline-block;
/*display: flex;*/
/*flex-direction: row;*/
/*content:url('/spiewajco.png');*/
/*width:100px; !*width of your image*!*/
/*height:100px; !*height of your image*!*/
/*background-image:url('yourimage.file');*/
/*margin:0; !* If you want no margin *!*/
/*padding:0; !*if your want to padding *!*/
}

/* --- Songbooks Section --- */
#songbooks {
list-style: none;
padding: 0;
}

#songbooks li {
font-weight: bold;
margin-top: 1em;
margin-bottom: 0.5em;
}

#songbooks a {
display: inline-block;
background-color: #6c757d;
color: #ffffff;
padding: 0.3em 0.8em;
border-radius: 4px;
font-size: 0.8em;
margin-right: 0.5em;
text-transform: uppercase;
}

#songbooks a:hover {
background-color: #5a6268;
color: #ffffff;
text-decoration: none;
}

#songbooks a.epub {
background-color: #28a745;
}
#songbooks a.epub:hover {
background-color: #218838;
}

#songbooks a.pdf {
background-color: #dc3545;
}
#songbooks a.pdf:hover {
background-color: #c82333;
}


/* --- Main Song List --- */
#songs {
list-style-type: none;
padding: 0;
margin-top: 1em;
background-color: #ffffff;
border-radius: 8px;
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

#songs li {
display: flex;
align-items: center;
border-bottom: 1px solid #e9ecef;
padding: 0.8em 1.5em;
transition: background-color 0.2s ease;
}

#songs li:last-child {
border-bottom: none;
}

#songs li:hover {
background-color: #eef2f5;
}

#songs li a {
flex-grow: 1;
font-size: 1.1em;
color: #333;
font-weight: 400;
}

#songs li a:hover {
text-decoration: none;
color: #0056b3;
}

/* --- Edit Icon Button --- */
.editicon {
background-color: transparent;
border: none;
cursor: pointer;
padding: 0;
margin-right: 1em; /* Spacing between icon and song title */
display: inline-flex;
align-items: center;
justify-content: center;
opacity: 0.6;
transition: opacity 0.2s ease;
}

.editicon:hover {
opacity: 1;
}

.editicon .material-symbols-outlined {
font-size: 20px;
color: #6c757d;
transition: color 0.2s ease;
}

.editicon:hover .material-symbols-outlined {
color: #007bff;
}

/* --- Kindle Link Paragraph --- */
p {
margin-top: 1.5em;
font-style: italic;
color: #6c757d;
}

/* Optional: Simple styling for the search box */
.search-container {
background-color: #ffffff;
padding: 1em 1.5em;
margin-top: 2em;
border-radius: 8px;
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.search-label {
display: block;
margin-bottom: 0.5em;
font-weight: 500;
color: #343a40;
}
#songSearch {
width: 100%;
padding: 0.75em;
font-size: 1em;
border: 1px solid #ced4da;
border-radius: 4px;
box-sizing: border-box; /* Ensures padding doesn't affect width */
}
}
Loading
Loading