diff --git a/.gitea/workflows/website.yml b/.gitea/workflows/website.yml index f633af6..b6b2497 100644 --- a/.gitea/workflows/website.yml +++ b/.gitea/workflows/website.yml @@ -22,6 +22,7 @@ jobs: - name: Check out code uses: actions/checkout@v3 - run: cd "${{ gitea.workspace }}" && make clean + - run: cd "${{ gitea.workspace }}" && make css - run: cd "${{ gitea.workspace }}" && make docker - run: cd "${{ gitea.workspace }}" && make push-docker diff --git a/.idea/php.xml b/.idea/php.xml index 639f74d..aee82fc 100644 --- a/.idea/php.xml +++ b/.idea/php.xml @@ -9,10 +9,25 @@ + + + + + + + + + + + + + + + diff --git a/.idea/watcherTasks.xml b/.idea/watcherTasks.xml index f8a509b..aefa896 100644 --- a/.idea/watcherTasks.xml +++ b/.idea/watcherTasks.xml @@ -22,7 +22,7 @@ - diff --git a/Makefile b/Makefile index 07363be..ee8c134 100644 --- a/Makefile +++ b/Makefile @@ -62,6 +62,18 @@ push-docker: docker image push $(DOCKER_REPO)/$(DOCKER_NAME):$(NAMESPACE)-latest docker image push $(DOCKER_REPO)/$(DOCKER_NAME):latest +css: + docker build -t mscom-css-compile data/css_compress + docker run --rm \ + -v "$(shell pwd):/project" \ + -w /project/data/css_compress \ + mscom-css-compile \ + python3 /project/data/css_compress/compress.py \ + /project/www/data/css/styles.scss \ + /project/www/data/css/styles.css \ + /project/www/data/css/styles.min.css + docker image rm mscom-css-compile + clean: rm -rf ".run-data" git clean -fdx \ No newline at end of file diff --git a/data/css_compress/Dockerfile b/data/css_compress/Dockerfile new file mode 100644 index 0000000..b337535 --- /dev/null +++ b/data/css_compress/Dockerfile @@ -0,0 +1,8 @@ +FROM node:22-slim + +RUN apt-get update && apt-get install -y --no-install-recommends \ + python3 default-jre-headless \ + && npm install -g sass \ + && apt-get clean && rm -rf /var/lib/apt/lists/* + +WORKDIR /project diff --git a/data/css_compress/compress.py b/data/css_compress/compress.py index a81d411..b47d8bf 100644 --- a/data/css_compress/compress.py +++ b/data/css_compress/compress.py @@ -77,8 +77,8 @@ print() print() print('======== CALL SCSS ========') -print('> scss --style=expanded --no-cache --update "' + fsource + ':' + finput + '"') -out = subprocess.run([shutil.which('scss'), '--style=expanded', '--no-cache', '--update', fsource + ':' + finput], stdout=subprocess.PIPE, stderr=subprocess.PIPE) +print('> sass --style=expanded --no-source-map "' + fsource + ':' + finput + '"') +out = subprocess.run([shutil.which('sass'), '--style=expanded', '--no-source-map', fsource + ':' + finput], stdout=subprocess.PIPE, stderr=subprocess.PIPE) print('STDOUT:') print(out.stdout.decode('utf-8')) print('STDERR:') diff --git a/www/data/css/styles.css b/www/data/css/styles.css index 7fc9c39..9c85fcd 100644 --- a/www/data/css/styles.css +++ b/www/data/css/styles.css @@ -20,7 +20,7 @@ body { } /* Level: 0 */ -@media (max-device-width: 767px) { +@media (max-device-width:767px) { .content-responsive { width: 95%; width: calc(100% - 20px); @@ -29,7 +29,7 @@ body { } } /* Level: 1 */ -@media (min-device-width: 768px) and (max-device-width: 850px) { +@media (min-device-width:768px) and (max-device-width:850px) { .content-responsive { width: 95%; width: calc(100% - 20px); @@ -38,7 +38,7 @@ body { } } /* Level: 2 */ -@media (min-device-width: 851px) and (max-device-width: 991px) { +@media (min-device-width:851px) and (max-device-width:991px) { .content-responsive { width: 95%; width: calc(100% - 20px); @@ -47,13 +47,13 @@ body { } } /* Level: 3 */ -@media (min-device-width: 992px) and (max-device-width: 1199px) { +@media (min-device-width:992px) and (max-device-width:1199px) { .content-responsive { width: 724px; } } /* Level: 4 */ -@media (min-device-width: 1200px) { +@media (min-device-width:1200px) { .content-responsive { width: 1170px; } @@ -76,7 +76,7 @@ body { } /* Level: 0 */ -@media (max-device-width: 767px) { +@media (max-device-width:767px) { .contentheader h1 { font-size: 32px; } @@ -87,22 +87,21 @@ body { border: none; color: white; height: 1px; - background-color: #CCCCCCFF; - background: -moz-linear-gradient(left, #CCCCCCFF, #FFFFFF00); - background: -webkit-linear-gradient(left, #CCCCCCFF 0%, #FFFFFF00 100%); + background-color: #cccccc; + background: -moz-linear-gradient(left, #cccccc, rgba(255, 255, 255, 0)); + background: -webkit-linear-gradient(left, #cccccc 0%, rgba(255, 255, 255, 0) 100%); } /* Level: 0 - 2 */ -@media (max-device-width: 991px) { +@media (max-device-width:991px) { .contentheader h1 { text-align: center; margin-left: 10px; margin-right: 10px; } - .contentheader hr { - background: -moz-radial-gradient(circle, #CCCCCCFF, #FFFFFF00); - background: -webkit-radial-gradient(circle, #CCCCCCFF 0%, #FFFFFF00 100%); + background: -moz-radial-gradient(circle, #cccccc, rgba(255, 255, 255, 0)); + background: -webkit-radial-gradient(circle, #cccccc 0%, rgba(255, 255, 255, 0) 100%); } } .blockcontent { @@ -322,91 +321,76 @@ body { } /* Level: 0 */ -@media (max-device-width: 767px) { +@media (max-device-width:767px) { .pagination { flex-direction: column; } - .pag20 { flex-direction: column; } - .pag10 { flex-direction: column; } - .pag05 { flex-direction: row; } } /* Level: 1 */ -@media (min-device-width: 768px) and (max-device-width: 850px) { +@media (min-device-width:768px) and (max-device-width:850px) { .pagination { flex-direction: column; } - .pag20 { flex-direction: column; } - .pag10 { flex-direction: row; } - .pag05 { flex-direction: row; } } /* Level: 2 */ -@media (min-device-width: 851px) and (max-device-width: 991px) { +@media (min-device-width:851px) and (max-device-width:991px) { .pagination { flex-direction: column; } - .pag20 { flex-direction: column; } - .pag10 { flex-direction: row; } - .pag05 { flex-direction: row; } } /* Level: 3 */ -@media (min-device-width: 992px) and (max-device-width: 1199px) { +@media (min-device-width:992px) and (max-device-width:1199px) { .pagination { flex-direction: column; } - .pag20 { flex-direction: column; } - .pag10 { flex-direction: row; } - .pag05 { flex-direction: row; } } /* Level: 4 */ -@media (min-device-width: 1200px) { +@media (min-device-width:1200px) { .pagination { flex-direction: column; } - .pag20 { flex-direction: row; } - .pag10 { flex-direction: row; } - .pag05 { flex-direction: row; } @@ -541,7 +525,7 @@ body { } /* Level: 0 - 1 */ -@media (max-device-width: 850px) { +@media (max-device-width:850px) { #headerdiv { position: static; flex-direction: column; @@ -559,7 +543,6 @@ body { font-weight: bold; margin: 5px 10px; } - #content { padding-top: 0; } @@ -578,16 +561,14 @@ html, body { } #content { - padding-bottom: 60px; - /* Height of the footer */ + padding-bottom: 60px; /* Height of the footer */ } #footerdiv { position: absolute; bottom: 0; width: 100%; - height: 60px; - /* Height of the footer */ + height: 60px; /* Height of the footer */ text-align: center; color: #CCCCCC; left: 0; @@ -596,31 +577,31 @@ html, body { } /* Level: 0 */ -@media (max-device-width: 767px) { +@media (max-device-width:767px) { #footerdiv { width: auto; } } /* Level: 1 */ -@media (min-device-width: 768px) and (max-device-width: 850px) { +@media (min-device-width:768px) and (max-device-width:850px) { #footerdiv { width: auto; } } /* Level: 2 */ -@media (min-device-width: 851px) and (max-device-width: 991px) { +@media (min-device-width:851px) and (max-device-width:991px) { #footerdiv { width: auto; } } /* Level: 3 */ -@media (min-device-width: 992px) and (max-device-width: 1199px) { +@media (min-device-width:992px) and (max-device-width:1199px) { #footerdiv { width: 724px; } } /* Level: 4 */ -@media (min-device-width: 1200px) { +@media (min-device-width:1200px) { #footerdiv { width: 1170px; } @@ -632,11 +613,11 @@ html, body { color: white; height: 1px; background: #CCCCCC; - background: -webkit-gradient(radial, 50% 50%, 0, 50% 50%, 350, from(#CCCCCCFF), to(#FFFFFF00)); + background: -webkit-gradient(radial, 50% 50%, 0, 50% 50%, 350, from(#cccccc), to(rgba(255, 255, 255, 0))); } /* Level: 0 - 1 */ -@media (max-device-width: 850px) { +@media (max-device-width:850px) { #footerdiv .footerspan2 { display: none; visibility: collapse; @@ -667,7 +648,7 @@ html, body { } /* Level: 0 - 1 */ -@media (max-device-width: 850px) { +@media (max-device-width:850px) { .index_pnl_header a { font-size: 16px; } @@ -684,7 +665,7 @@ html, body { } /* Level: 0 - 1 */ -@media (max-device-width: 850px) { +@media (max-device-width:850px) { .index_pnl_base { width: 330px; } @@ -712,12 +693,11 @@ html, body { } /* Level: 0 - 2 */ -@media (max-device-width: 991px) { +@media (max-device-width:991px) { .git_list { width: 100%; height: auto; } - .extGitGraphContainer { width: 95%; width: calc(100% - 16px); @@ -825,6 +805,230 @@ html, body { fill: #003958; } +.about_ehr_container .reading-history { + font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; + padding: 20px; + max-width: min(1170px, 100%); +} +.about_ehr_container .year-container { + margin-bottom: 16px; +} +.about_ehr_container .year-label { + font-size: 24px; + font-weight: bold; + color: #222222; + padding: 5px 10px; +} +.about_ehr_container .month-grid { + padding: 4px; + border: 1px solid #000; + display: grid; + gap: 8px; + /* Level: 4 */ +} +@media (min-device-width:1200px) { + .about_ehr_container .month-grid { + grid-template-columns: repeat(6, 1fr); + } +} +.about_ehr_container .month-grid { + /* Level: 3 */ +} +@media (min-device-width:992px) and (max-device-width:1199px) { + .about_ehr_container .month-grid { + grid-template-columns: repeat(4, 1fr); + } +} +.about_ehr_container .month-grid { + /* Level: 2 */ +} +@media (min-device-width:851px) and (max-device-width:991px) { + .about_ehr_container .month-grid { + grid-template-columns: repeat(4, 1fr); + } +} +.about_ehr_container .month-grid { + /* Level: 1 */ +} +@media (min-device-width:768px) and (max-device-width:850px) { + .about_ehr_container .month-grid { + grid-template-columns: repeat(3, 1fr); + } +} +.about_ehr_container .month-grid { + /* Level: 0 */ +} +@media (max-device-width:767px) { + .about_ehr_container .month-grid { + grid-template-columns: repeat(1, 1fr); + } +} +.about_ehr_container .month-cell { + min-height: 180px; + background: #AAAAAA; + border: 1px solid #000; +} +.about_ehr_container .book-grid { + padding: 4px; +} +.about_ehr_container .month-label { + font-size: 0.8em; + background-color: #888888; + color: #000000; + border-bottom: 1px solid #000000; + text-align: center; + margin-bottom: 8px; + font-weight: bold; +} +.about_ehr_container { + /* Book item styles */ +} +.about_ehr_container .book-item { + border-radius: 0; + position: relative; +} +.about_ehr_container .book-item:not(:hover) { + overflow: hidden; + border: 1px solid #000000; +} +.about_ehr_container .book-container { + position: relative; + transition: transform 0.2s ease-in-out, z-index 0s; + pointer-events: none; +} +.about_ehr_container { + /* Chapter overlay at top */ +} +.about_ehr_container .book-item .chapter-overlay { + position: absolute; + top: 0; + left: 0; + right: 0; + background: linear-gradient(rgba(0, 0, 0, 0.8), transparent); + color: white; + font-size: 2px; + padding: 1px 1px 4px 1px; + text-align: center; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + opacity: 0; +} +.about_ehr_container { + /* Title overlay on hover */ +} +.about_ehr_container .book-item .title-overlay { + position: absolute; + bottom: 0; + left: 0; + right: 0; + background: linear-gradient(transparent, rgba(0, 0, 0, 0.8)); + color: white; + font-size: 2px; + padding: 4px 1px 1px 1px; + transition: opacity 0.2s ease-in-out; + white-space: wrap; + opacity: 0; +} +.about_ehr_container .book-item img { + aspect-ratio: var(--preview-aspect-ratio); +} +.about_ehr_container .book-item.no-cover { + background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); + display: flex; + align-items: center; + justify-content: center; + font-size: 10px; + color: white; + text-align: center; + padding: 4px; +} +.about_ehr_container { + /* Rating stars - top right on hover */ +} +.about_ehr_container .rating-overlay { + position: absolute; + bottom: calc(100% + 0.5px); + right: 0; + width: 100%; + height: 2px; + background-size: contain; + background-repeat: no-repeat; + background-position: right bottom; + opacity: 0; +} +.about_ehr_container { + /* Word count - below title on hover */ +} +.about_ehr_container .wordcount-overlay { + position: absolute; + top: calc(100% + 0.5px); + left: 0; + right: 0; + padding: 1px; + font-size: 2px; + text-align: center; + color: white; + background: rgba(0, 0, 0, 0.7); + opacity: 0; +} +.about_ehr_container { + /* Use data-count attribute to select star image */ +} +.about_ehr_container .rating-overlay[data-count="1.0"] { + background-image: url("/data/images/ehr/stars_1.0.png"); +} +.about_ehr_container .rating-overlay[data-count="1.5"] { + background-image: url("/data/images/ehr/stars_1.5.png"); +} +.about_ehr_container .rating-overlay[data-count="2.0"] { + background-image: url("/data/images/ehr/stars_2.0.png"); +} +.about_ehr_container .rating-overlay[data-count="2.5"] { + background-image: url("/data/images/ehr/stars_2.5.png"); +} +.about_ehr_container .rating-overlay[data-count="3.0"] { + background-image: url("/data/images/ehr/stars_3.0.png"); +} +.about_ehr_container .rating-overlay[data-count="3.5"] { + background-image: url("/data/images/ehr/stars_3.5.png"); +} +.about_ehr_container .rating-overlay[data-count="4.0"] { + background-image: url("/data/images/ehr/stars_4.0.png"); +} +.about_ehr_container .rating-overlay[data-count="4.5"] { + background-image: url("/data/images/ehr/stars_4.5.png"); +} +.about_ehr_container .rating-overlay[data-count="5.0"] { + background-image: url("/data/images/ehr/stars_5.0.png"); +} +.about_ehr_container { + /* ================================================================================================================== */ +} +.about_ehr_container .book-item:hover .book-container { + transform: scale(8); + z-index: 10; + box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3); + background-color: #FFF; + position: absolute; + width: 32px; + height: calc(32px / var(--img-aspect-ratio)); + left: calc(50% - 16px); + top: calc(50% - 16px / var(--img-aspect-ratio)); +} +.about_ehr_container .book-item:hover .title-overlay { + opacity: 1; +} +.about_ehr_container .book-item:hover .chapter-overlay { + opacity: 1; +} +.about_ehr_container .book-item:hover .wordcount-overlay { + opacity: 1; +} +.about_ehr_container .book-item:hover .rating-overlay { + opacity: 1; +} + .admincontent { display: block; width: 100%; @@ -946,7 +1150,7 @@ html, body { width: 95%; height: 1px; border: none; - color: #FFFFFF00; + color: rgba(255, 255, 255, 0); background: -moz-radial-gradient(circle, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0)); background: -webkit-radial-gradient(circle, rgba(0, 0, 0, 0.1) 0%, rgba(0, 0, 0, 0) 100%); } @@ -1113,7 +1317,7 @@ html, body { } /* Level: 0 */ -@media (max-device-width: 767px) { +@media (max-device-width:767px) { .ble_title { font-size: 1.25em; } @@ -1180,19 +1384,19 @@ html, body { } #PEB_tableProblems .PEB_TC_Value:not(:hover) { color: transparent; - -o-transition: .5s; - -ms-transition: .5s; - -moz-transition: .5s; - -webkit-transition: .5s; - transition: .5s; + -o-transition: 0.5s; + -ms-transition: 0.5s; + -moz-transition: 0.5s; + -webkit-transition: 0.5s; + transition: 0.5s; } #PEB_tableProblems .PEB_TC_Value:hover { color: #222222; - -o-transition: .5s; - -ms-transition: .5s; - -moz-transition: .5s; - -webkit-transition: .5s; - transition: .5s; + -o-transition: 0.5s; + -ms-transition: 0.5s; + -moz-transition: 0.5s; + -webkit-transition: 0.5s; + transition: 0.5s; } #PEB_tableProblems .PEB_TC_Time { border-radius: 1px; @@ -1247,21 +1451,19 @@ html, body { } /* Level: 0 - 3 */ -@media (max-device-width: 1199px) { +@media (max-device-width:1199px) { #PEB_tableProblems tr td:nth-child(1), #PEB_tableProblems tr th:nth-child(1) { display: none; } } /* Level: 0 */ -@media (max-device-width: 767px) { +@media (max-device-width:767px) { #PEB_tableProblems tr td:nth-child(1), #PEB_tableProblems tr th:nth-child(1) { display: none; } - #PEB_tableProblems tr td:nth-child(3), #PEB_tableProblems tr th:nth-child(3) { display: none; } - #PEB_tableProblems tr td:nth-child(4), #PEB_tableProblems tr th:nth-child(4) { display: none; } @@ -1333,7 +1535,7 @@ html, body { } /* Level: 0 - 1 */ -@media (max-device-width: 850px) { +@media (max-device-width:850px) { .aoc_calendar { transform: scale(0.75); } @@ -1430,7 +1632,7 @@ html, body { } /* Level: 0 - 1 */ -@media (max-device-width: 850px) { +@media (max-device-width:850px) { .prgl_parent { align-items: center; } @@ -1533,59 +1735,49 @@ html, body { } /* Level: 0 - 3 */ -@media (max-device-width: 1199px) { +@media (max-device-width:1199px) { .prgl_elem_title { font-size: 22pt; } - .prgl_elem_subinfo { flex-direction: column; } - .prgl_elem_subinfo_data { justify-content: center; } - .prgl_elem_subinfo_caption { text-align: center; } - .prgl_elem_sdesc { font-size: 12pt; margin-bottom: 10px; } } /* Level: 0 - 1 */ -@media (max-device-width: 850px) { +@media (max-device-width:850px) { .prgl_elem { flex-direction: column; width: 350px; } - .prgl_elem_left img { width: 100%; height: 100%; } - .prgl_elem_title { font-size: 24pt; word-wrap: break-word; text-align: center; } - .prgl_elem_left { justify-content: center; } - .prgl_elem_info { flex-direction: column; margin: 8px 0 8px 8px; } - .prgl_elem_subinfo { flex-direction: row; } - .prgl_elem_sdesc { display: none; visibility: hidden; @@ -1609,8 +1801,8 @@ html, body { } #prgv_header hr { - background: -moz-radial-gradient(circle, #CCCCCCFF, #FFFFFF00); - background: -webkit-radial-gradient(circle, #CCCCCCFF 0%, #FFFFFF00 100%); + background: -moz-radial-gradient(circle, #cccccc, rgba(255, 255, 255, 0)); + background: -webkit-radial-gradient(circle, #cccccc 0%, rgba(255, 255, 255, 0) 100%); } .prgv_top { @@ -1665,7 +1857,7 @@ html, body { } .prgv_right_comb { - grid-column: 1 / span 2; + grid-column: 1/span 2; } .prgv_right_lang { @@ -1702,37 +1894,33 @@ html, body { border: none; color: white; height: 1px; - background-color: #CCCCCCFF; - background: -moz-radial-gradient(circle, #CCCCCCFF, #FFFFFF00); - background: -webkit-radial-gradient(circle, #CCCCCCFF 0%, #FFFFFF00 100%); + background-color: #cccccc; + background: -moz-radial-gradient(circle, #cccccc, rgba(255, 255, 255, 0)); + background: -webkit-radial-gradient(circle, #cccccc 0%, rgba(255, 255, 255, 0) 100%); } /* Level: 0 - 2 */ -@media (max-device-width: 991px) { +@media (max-device-width:991px) { .prgv_content { border: none; } } /* Level: 0 */ -@media (max-device-width: 767px) { +@media (max-device-width:767px) { .prgv_top { flex-direction: column; margin-top: 0; } - .prgv_left { margin: 0 10px 10px 10px; } - .prgv_right { min-height: 0; min-width: 0; } - .prgv_right_lang { justify-content: space-evenly; } - #prgv_header h1 { font-size: 28pt; } @@ -1782,6 +1970,7 @@ html, body { width: 150px; height: 200px; object-fit: contain; + object-position: left; } .booklst_right { @@ -1815,21 +2004,18 @@ html, body { } /* Level: 0 */ -@media (max-device-width: 767px) { +@media (max-device-width:767px) { .booklst_left { flex-direction: column; align-items: center; } - .booklst_entry { flex-direction: column; } - .booklst_date { display: none; visibility: hidden; } - .booklst_title { font-size: 32pt; } @@ -1852,8 +2038,8 @@ html, body { } #bookv_header hr { - background: -moz-radial-gradient(circle, #CCCCCCFF, #FFFFFF00); - background: -webkit-radial-gradient(circle, #CCCCCCFF 0%, #FFFFFF00 100%); + background: -moz-radial-gradient(circle, #cccccc, rgba(255, 255, 255, 0)); + background: -webkit-radial-gradient(circle, #cccccc 0%, rgba(255, 255, 255, 0) 100%); } .bookv_top { @@ -1907,7 +2093,7 @@ html, body { } .bookv_right_comb { - grid-column: 1 / span 2; + grid-column: 1/span 2; } .bookv_right_lang { @@ -1946,41 +2132,36 @@ html, body { } /* Level: 0 - 2 */ -@media (max-device-width: 991px) { +@media (max-device-width:991px) { .bookv_content { border: none; } - #bookv_header h1 { font-size: 28pt; } } /* Level: 0 - 3 */ -@media (max-device-width: 1199px) { +@media (max-device-width:1199px) { #bookv_header h1 { font-size: 28pt; } } /* Level: 0 */ -@media (max-device-width: 767px) { +@media (max-device-width:767px) { .bookv_top { flex-direction: column; margin-top: 0; } - .bookv_left { margin: 0 10px 10px 10px; } - .bookv_right { min-height: 0; min-width: 0; } - .bookv_right_lang { justify-content: space-evenly; } - #bookv_header h1 { font-size: 18pt; } @@ -2038,7 +2219,7 @@ html, body { } /* Level: 0 */ -@media (max-device-width: 767px) { +@media (max-device-width:767px) { .wle_title { font-size: 1.25em; } @@ -2047,9 +2228,8 @@ html, body { align-self: center; width: 100%; /* Level: 2 - 4 */ - /* Level: 0 */ } -@media (min-device-width: 851px) { +@media (min-device-width:851px) { .ev_master { padding-bottom: 80px; } @@ -2077,7 +2257,10 @@ html, body { white-space: nowrap; width: 100%; } -@media (max-device-width: 767px) { +.ev_master { + /* Level: 0 */ +} +@media (max-device-width:767px) { .ev_master .ev_code { font-size: 75pt; } @@ -2093,7 +2276,7 @@ html, body { } /* Level: 0 - 1 */ -@media (max-device-width: 850px) { +@media (max-device-width:850px) { .euler_pnl_row { flex-direction: column; } @@ -2245,16 +2428,14 @@ html, body { } /* Level: 0 - 1 */ -@media (max-device-width: 850px) { +@media (max-device-width:850px) { .programs_pnl_entry { width: 100%; } - .programs_pnl_bottom_sub_top { margin-left: 4px; margin-right: 6px; } - .programs_pnl_bottom_1, .programs_pnl_bottom_2 { flex-direction: row; } @@ -2306,7 +2487,7 @@ html, body { } /* Level: 0 - 1 */ -@media (max-device-width: 850px) { +@media (max-device-width:850px) { .blogpnl_title { text-align: center; } @@ -2346,7 +2527,7 @@ html, body { } /* Level: 0 - 1 */ -@media (max-device-width: 850px) { +@media (max-device-width:850px) { .books_pnl_extra { display: none; visibility: collapse; @@ -2369,7 +2550,6 @@ html, body { border: 1px solid #888; background: #F8F8F8; padding: 6px; - /* Level: 0 */ } .bfjoust_runner_owner .hsplit { display: flex; @@ -2397,7 +2577,10 @@ html, body { .bfjoust_runner_owner .bottomelem { height: 200px; } -@media (max-device-width: 767px) { +.bfjoust_runner_owner { + /* Level: 0 */ +} +@media (max-device-width:767px) { .bfjoust_runner_owner .hsplit { display: block; } @@ -2555,7 +2738,7 @@ html, body { } /* Level: 0 */ -@media (max-device-width: 767px) { +@media (max-device-width:767px) { .bce_code .bce_code_ctrl { display: flex; flex-direction: column; @@ -2611,7 +2794,7 @@ html, body { } /* Level: 0 */ -@media (max-device-width: 767px) { +@media (max-device-width:767px) { .bce_code_out { flex-direction: column; } @@ -2624,12 +2807,6 @@ html, body { height: 150px; } } -.project-lawful-ebook-blogpost { - /* Level: 0 */ - /* Level: 1 */ - /* Level: 2 */ - /* Level: 3 */ -} .project-lawful-ebook-blogpost code { background-color: rgba(0, 0, 0, 0.1); border-radius: 2px; @@ -2704,7 +2881,10 @@ html, body { width: 100%; border: 1px solid #555; } -@media (max-device-width: 767px) { +.project-lawful-ebook-blogpost { + /* Level: 0 */ +} +@media (max-device-width:767px) { .project-lawful-ebook-blogpost .variant .dlbutton svg { width: 16px; } @@ -2718,7 +2898,10 @@ html, body { flex-direction: column; } } -@media (min-device-width: 768px) and (max-device-width: 850px) { +.project-lawful-ebook-blogpost { + /* Level: 1 */ +} +@media (min-device-width:768px) and (max-device-width:850px) { .project-lawful-ebook-blogpost .variant .dlbutton svg { width: 32px; } @@ -2729,12 +2912,18 @@ html, body { flex-direction: column; } } -@media (min-device-width: 851px) and (max-device-width: 991px) { +.project-lawful-ebook-blogpost { + /* Level: 2 */ +} +@media (min-device-width:851px) and (max-device-width:991px) { .project-lawful-ebook-blogpost .variant .dlbutton svg { width: 48px; } } -@media (min-device-width: 992px) and (max-device-width: 1199px) { +.project-lawful-ebook-blogpost { + /* Level: 3 */ +} +@media (min-device-width:992px) and (max-device-width:1199px) { .project-lawful-ebook-blogpost .variant .dlbutton svg { width: 48px; } @@ -2743,9 +2932,6 @@ html, body { } } -.project-lawful-ebook-blogpost { - /* Level: 0 - 3 */ -} .project-lawful-ebook-blogpost .variant.alt-variants { display: flex; flex-direction: column; @@ -2770,7 +2956,10 @@ html, body { .project-lawful-ebook-blogpost .dlbtn_alt svg { fill: #BBB; } -@media (max-device-width: 1199px) { +.project-lawful-ebook-blogpost { + /* Level: 0 - 3 */ +} +@media (max-device-width:1199px) { .project-lawful-ebook-blogpost .dlbtn_alt svg { width: 16px; } @@ -2779,5 +2968,3 @@ html, body { font-size: 0.75em; grid-column: 4; } - -/*# sourceMappingURL=styles.css.map */ diff --git a/www/data/css/styles.min.css b/www/data/css/styles.min.css index 4f495cc..921b8e4 100644 --- a/www/data/css/styles.min.css +++ b/www/data/css/styles.min.css @@ -10,10 +10,10 @@ .contentheader{width:100%;color:#333;font-size:large} .contentheader h1{font-family:Lato,"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:32px;font-weight:900;margin-bottom:0} @media(max-device-width:767px){.contentheader h1{font-size:32px}} -.contentheader hr{margin:0 0 25px 0;display:block;border:0;color:white;height:1px;background-color:#CCCCCCFF;background:-moz-linear-gradient(left,#CCCCCCFF,#FFFFFF00);background:-webkit-linear-gradient(left,#CCCCCCFF 0,#FFFFFF00 100%)} +.contentheader hr{margin:0 0 25px 0;display:block;border:0;color:white;height:1px;background-color:#ccc;background:-moz-linear-gradient(left,#ccc,rgba(255,255,255,0));background:-webkit-linear-gradient(left,#ccc 0,rgba(255,255,255,0) 100%)} @media(max-device-width:991px){ .contentheader h1{text-align:center;margin-left:10px;margin-right:10px} - .contentheader hr{background:-moz-radial-gradient(circle,#CCCCCCFF,#FFFFFF00);background:-webkit-radial-gradient(circle,#CCCCCCFF 0,#FFFFFF00 100%)} + .contentheader hr{background:-moz-radial-gradient(circle,#ccc,rgba(255,255,255,0));background:-webkit-radial-gradient(circle,#ccc 0,rgba(255,255,255,0) 100%)} } .blockcontent{display:block;width:100%} .generic_hidden{visibility:hidden !important} @@ -124,7 +124,7 @@ html,body{margin:0;padding:0;height:100%} @media(min-device-width:851px) and (max-device-width:991px){#footerdiv{width:auto}} @media(min-device-width:992px) and (max-device-width:1199px){#footerdiv{width:724px}} @media(min-device-width:1200px){#footerdiv{width:1170px}} -#footerdiv hr{margin-bottom:5px;display:block;border:0;color:white;height:1px;background:#ccc;background:-webkit-gradient(radial,50% 50%,0,50% 50%,350,from(#CCCCCCFF),to(#FFFFFF00))} +#footerdiv hr{margin-bottom:5px;display:block;border:0;color:white;height:1px;background:#ccc;background:-webkit-gradient(radial,50% 50%,0,50% 50%,350,from(#ccc),to(rgba(255,255,255,0)))} @media(max-device-width:850px){#footerdiv .footerspan2{display:none;visibility:collapse}} .index_pnl_base{display:inline-flex;flex-direction:column;border:1px solid #444;margin:15px;width:652px} .index_pnl_header{display:flex;align-items:center;justify-content:center;padding:4px;background:#bbb} @@ -145,7 +145,7 @@ html,body{margin:0;padding:0;height:100%} .git_list text.caption_month{font-size:8px;fill:#BBB} .git_list text.caption_day{font-size:8px;fill:#BBB} .svg-tip:after{box-sizing:border-box;position:absolute;left:50%;height:5px;width:5px;bottom:-10px;margin:0 0 0 -5px;content:" ";border:5px solid transparent;border-top-color:rgba(0,0,0,0.8);border-image:none} -.svg-tip{padding:5px;background:none repeat scroll 0 0 rgba(0,0,0,0.8);color:#BBB;font-size:12px;position:absolute;z-index:99999;text-align:center;border-radius:3px;box-sizing:border-box;opacity:0;pointer-events: none;} +.svg-tip{padding:5px;background:none repeat scroll 0 0 rgba(0,0,0,0.8);color:#BBB;font-size:12px;position:absolute;z-index:99999;text-align:center;border-radius:3px;box-sizing:border-box;opacity:0;pointer-events:none} .extGitGraphContainer{background-color:#fcfcfc;margin:10px;display:inline-block;border:1px solid #222;border-radius:0;box-shadow:0 0 1px rgba(0,0,0,0.25) inset} .egg_footer{margin-top:5px;text-align:right;margin-right:5px;margin-bottom:5px;color:#888} .egg_footer>a{text-decoration:none;color:inherit} @@ -158,6 +158,41 @@ html,body{margin:0;padding:0;height:100%} .egg_col_x5_2{fill:#00a1f3} .egg_col_x5_3{fill:#0079b7} .egg_col_x5_4{fill:#003958} +.about_ehr_container .reading-history{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;padding:20px;max-width:min(1170px,100%)} +.about_ehr_container .year-container{margin-bottom:16px} +.about_ehr_container .year-label{font-size:24px;font-weight:bold;color:#222;padding:5px 10px} +.about_ehr_container .month-grid{padding:4px;border:1px solid #000;display:grid;gap:8px} +@media(min-device-width:1200px){.about_ehr_container .month-grid{grid-template-columns:repeat(6,1fr)}} +@media(min-device-width:992px) and (max-device-width:1199px){.about_ehr_container .month-grid{grid-template-columns:repeat(4,1fr)}} +@media(min-device-width:851px) and (max-device-width:991px){.about_ehr_container .month-grid{grid-template-columns:repeat(4,1fr)}} +@media(min-device-width:768px) and (max-device-width:850px){.about_ehr_container .month-grid{grid-template-columns:repeat(3,1fr)}} +@media(max-device-width:767px){.about_ehr_container .month-grid{grid-template-columns:repeat(1,1fr)}} +.about_ehr_container .month-cell{min-height:180px;background:#aaa;border:1px solid #000} +.about_ehr_container .book-grid{padding:4px} +.about_ehr_container .month-label{font-size:.8em;background-color:#888;color:#000;border-bottom:1px solid #000;text-align:center;margin-bottom:8px;font-weight:bold} +.about_ehr_container .book-item{border-radius:0;position:relative} +.about_ehr_container .book-item:not(:hover){overflow:hidden;border:1px solid #000} +.about_ehr_container .book-container{position:relative;transition:transform .2s ease-in-out,z-index 0;pointer-events:none} +.about_ehr_container .book-item .chapter-overlay{position:absolute;top:0;left:0;right:0;background:linear-gradient(rgba(0,0,0,0.8),transparent);color:white;font-size:2px;padding:1px 1px 4px 1px;text-align:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;opacity:0} +.about_ehr_container .book-item .title-overlay{position:absolute;bottom:0;left:0;right:0;background:linear-gradient(transparent,rgba(0,0,0,0.8));color:white;font-size:2px;padding:4px 1px 1px 1px;transition:opacity .2s ease-in-out;white-space:wrap;opacity:0} +.about_ehr_container .book-item img{aspect-ratio:var(--preview-aspect-ratio)} +.about_ehr_container .book-item.no-cover{background:linear-gradient(135deg,#667eea 0,#764ba2 100%);display:flex;align-items:center;justify-content:center;font-size:10px;color:white;text-align:center;padding:4px} +.about_ehr_container .rating-overlay{position:absolute;bottom:calc(100%+0.5px);right:0;width:100%;height:2px;background-size:contain;background-repeat:no-repeat;background-position:right bottom;opacity:0} +.about_ehr_container .wordcount-overlay{position:absolute;top:calc(100%+0.5px);left:0;right:0;padding:1px;font-size:2px;text-align:center;color:white;background:rgba(0,0,0,0.7);opacity:0} +.about_ehr_container .rating-overlay[data-count="1.0"]{background-image:url("/data/images/ehr/stars_1.0.png")} +.about_ehr_container .rating-overlay[data-count="1.5"]{background-image:url("/data/images/ehr/stars_1.5.png")} +.about_ehr_container .rating-overlay[data-count="2.0"]{background-image:url("/data/images/ehr/stars_2.0.png")} +.about_ehr_container .rating-overlay[data-count="2.5"]{background-image:url("/data/images/ehr/stars_2.5.png")} +.about_ehr_container .rating-overlay[data-count="3.0"]{background-image:url("/data/images/ehr/stars_3.0.png")} +.about_ehr_container .rating-overlay[data-count="3.5"]{background-image:url("/data/images/ehr/stars_3.5.png")} +.about_ehr_container .rating-overlay[data-count="4.0"]{background-image:url("/data/images/ehr/stars_4.0.png")} +.about_ehr_container .rating-overlay[data-count="4.5"]{background-image:url("/data/images/ehr/stars_4.5.png")} +.about_ehr_container .rating-overlay[data-count="5.0"]{background-image:url("/data/images/ehr/stars_5.0.png")} +.about_ehr_container .book-item:hover .book-container{transform:scale(8);z-index:10;box-shadow:0 4px 12px rgba(0,0,0,0.3);background-color:#FFF;position:absolute;width:32px;height:calc(32px / var(--img-aspect-ratio));left:calc(50% - 16px);top:calc(50% - 16px / var(--img-aspect-ratio))} +.about_ehr_container .book-item:hover .title-overlay{opacity:1} +.about_ehr_container .book-item:hover .chapter-overlay{opacity:1} +.about_ehr_container .book-item:hover .wordcount-overlay{opacity:1} +.about_ehr_container .book-item:hover .rating-overlay{opacity:1} .admincontent{display:block;width:100%} .admincontent .boxedcontent{margin-bottom:20px} .egg_ajaxOutput{display:flex;box-sizing:border-box;width:100%;align-self:center;margin-left:auto;margin-right:auto;resize:none;height:300px} @@ -182,7 +217,7 @@ html,body{margin:0;padding:0;height:100%} .consistency_result_err{background:red} .consistency_result_intermed{background:#eee} .consistency_result_running{background:#ddd;border:1px solid #000} -.admincontent .boxedcontent hr{width:95%;height:1px;border:0;color:#FFFFFF00;background:-moz-radial-gradient(circle,rgba(0,0,0,0.1),rgba(0,0,0,0));background:-webkit-radial-gradient(circle,rgba(0,0,0,0.1) 0,rgba(0,0,0,0) 100%)} +.admincontent .boxedcontent hr{width:95%;height:1px;border:0;color:rgba(255,255,255,0);background:-moz-radial-gradient(circle,rgba(0,0,0,0.1),rgba(0,0,0,0));background:-webkit-radial-gradient(circle,rgba(0,0,0,0.1) 0,rgba(0,0,0,0) 100%)} .admindberr{color:#b22} .boxedcontent.alertbox{background-color:#f44;color:#222;border:1px solid #a44;font-weight:bold;text-align:center} .boxedcontent.alertbox .bc_data{padding-top:2px;padding-bottom:2px} @@ -303,7 +338,7 @@ html,body{margin:0;padding:0;height:100%} } .prgv_content{display:flex;flex-direction:column;color:#333;border:1px solid #444;background-color:#e0e0e0;width:100%;margin-left:auto;margin-right:auto} #prgv_header h1{font-size:48pt;text-align:center;margin-top:5px} -#prgv_header hr{background:-moz-radial-gradient(circle,#CCCCCCFF,#FFFFFF00);background:-webkit-radial-gradient(circle,#CCCCCCFF 0,#FFFFFF00 100%)} +#prgv_header hr{background:-moz-radial-gradient(circle,#ccc,rgba(255,255,255,0));background:-webkit-radial-gradient(circle,#ccc 0,rgba(255,255,255,0) 100%)} .prgv_top{display:flex;flex-direction:row;margin-top:15px} .prgv_left{display:inline-flex;justify-content:center;border:1px solid #333;flex-grow:1;margin-left:10px;margin-top:auto;margin-bottom:auto} .prgv_left img{height:100%;width:100%;object-fit:contain} @@ -311,13 +346,13 @@ html,body{margin:0;padding:0;height:100%} .prgv_right_key{font-weight:bold} .prgv_right_value a{color:#222;text-decoration:none} .prgv_right_value a:hover{color:#339;text-decoration:none} -.prgv_right_comb{grid-column:1 / span 2} +.prgv_right_comb{grid-column:1/span 2} .prgv_right_lang{display:flex;justify-content:flex-end} .prgv_dl_download{background:#422} .prgv_dl_github{background:#4078c0} .prgv_right_lang img{display:inline;height:16pt;max-width:32px;margin:1px 2px 0 2px} .prgv_center{margin:0 8px 8px 8px;padding:16px;background:#eee;color:#333;border:1px solid rgba(0,0,0,0.15)} -.prgv_sep{margin:40px 0 40px 0;display:block;border:0;color:white;height:1px;background-color:#CCCCCCFF;background:-moz-radial-gradient(circle,#CCCCCCFF,#FFFFFF00);background:-webkit-radial-gradient(circle,#CCCCCCFF 0,#FFFFFF00 100%)} +.prgv_sep{margin:40px 0 40px 0;display:block;border:0;color:white;height:1px;background-color:#ccc;background:-moz-radial-gradient(circle,#ccc,rgba(255,255,255,0));background:-webkit-radial-gradient(circle,#ccc 0,rgba(255,255,255,0) 100%)} @media(max-device-width:991px){.prgv_content{border:0}} @media(max-device-width:767px){ .prgv_top{flex-direction:column;margin-top:0} @@ -334,7 +369,7 @@ html,body{margin:0;padding:0;height:100%} .booklst_entry:hover .booklst_left img{filter:grayscale(100%)} .booklst_entry:hover .booklst_date span{background:#fff;border-left:1px solid #000;border-bottom:1px solid #000} .booklst_left{padding:4px;display:flex} -.booklst_left img{width:150px;height:200px;object-fit:contain} +.booklst_left img{width:150px;height:200px;object-fit:contain;object-position:left} .booklst_right{display:flex;flex-direction:column;flex-grow:1} .booklst_title{color:#333;font-size:40pt;font-weight:bolder;flex-grow:1;display:flex;justify-content:center;align-items:center;text-align:center} .booklst_date{display:flex;flex-direction:row-reverse;color:#333} @@ -347,7 +382,7 @@ html,body{margin:0;padding:0;height:100%} } .bookv_content{display:flex;flex-direction:column;color:#333;border:1px solid #444;background-color:#e0e0e0;width:100%;margin-left:auto;margin-right:auto} #bookv_header h1{font-size:48pt;text-align:center;margin-top:5px} -#bookv_header hr{background:-moz-radial-gradient(circle,#CCCCCCFF,#FFFFFF00);background:-webkit-radial-gradient(circle,#CCCCCCFF 0,#FFFFFF00 100%)} +#bookv_header hr{background:-moz-radial-gradient(circle,#ccc,rgba(255,255,255,0));background:-webkit-radial-gradient(circle,#ccc 0,rgba(255,255,255,0) 100%)} .bookv_top{display:flex;flex-direction:row;margin-top:15px;padding-bottom:10px} .bookv_left{display:inline-flex;justify-content:center;flex-grow:1;margin-left:10px;margin-top:auto;margin-bottom:auto} .bookv_left img{height:100%;width:100%;object-fit:contain} @@ -355,7 +390,7 @@ html,body{margin:0;padding:0;height:100%} .bookv_right_key{font-weight:bold} .bookv_right_value a{color:#222;text-decoration:none} .bookv_right_value a:hover{color:#339;text-decoration:none} -.bookv_right_comb{grid-column:1 / span 2} +.bookv_right_comb{grid-column:1/span 2} .bookv_right_lang{display:flex;justify-content:flex-end} .bookv_dl_download{background:#422} .bookv_dl_github{background:#4078c0} diff --git a/www/data/css/styles_about.scss b/www/data/css/styles_about.scss index 654dec5..f5ecf73 100644 --- a/www/data/css/styles_about.scss +++ b/www/data/css/styles_about.scss @@ -190,4 +190,192 @@ .egg_col_x9_6 { fill: #5E6B79; } .egg_col_x9_7 { fill: #455464; } .egg_col_x9_8 { fill: #2C3E50; } +} + +.about_ehr_container { + + .reading-history { + font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; + padding: 20px; + + max-width: calc( min( 1170px, 100% ) ); + } + + .year-container { + margin-bottom: 16px; + } + + .year-label { + font-size: 24px; + font-weight: bold; + color: #222222; + padding: 5px 10px; + } + + .month-grid { + padding: 4px; + border: 1px solid #000; + + display: grid; + gap: 8px; + + @include rdmedia(4) { grid-template-columns: repeat(6, 1fr); } + @include rdmedia(3) { grid-template-columns: repeat(4, 1fr); } + @include rdmedia(2) { grid-template-columns: repeat(4, 1fr); } + @include rdmedia(1) { grid-template-columns: repeat(3, 1fr); } + @include rdmedia(0) { grid-template-columns: repeat(1, 1fr); } + } + + .month-cell { + min-height: 180px; + + background: #AAAAAA; + border: 1px solid #000; + } + + .book-grid { + padding: 4px; + } + + .month-label { + font-size: 0.8em; + background-color: #888888; + color: #000000; + border-bottom: 1px solid #000000; + + text-align: center; + margin-bottom: 8px; + + font-weight: bold; + } + + /* Book item styles */ + .book-item { + border-radius: 0; + position: relative; + } + + .book-item:not(:hover) { + overflow: hidden; + border: 1px solid #000000; + } + + .book-container { + position: relative; + transition: transform 0.2s ease-in-out, z-index 0s; + pointer-events: none; + } + + /* Chapter overlay at top */ + .book-item .chapter-overlay { + position: absolute; + top: 0; + left: 0; + right: 0; + background: linear-gradient(rgba(0, 0, 0, 0.8), transparent); + color: white; + font-size: 2px; + padding: 1px 1px 4px 1px; + text-align: center; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + + opacity: 0; + } + + /* Title overlay on hover */ + .book-item .title-overlay { + position: absolute; + bottom: 0; + left: 0; + right: 0; + background: linear-gradient(transparent, rgba(0, 0, 0, 0.8)); + color: white; + font-size: 2px; + padding: 4px 1px 1px 1px; + transition: opacity 0.2s ease-in-out; + white-space: wrap; + + opacity: 0; + } + + .book-item img { + aspect-ratio: var(--preview-aspect-ratio); + } + + .book-item.no-cover { + background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); + display: flex; + align-items: center; + justify-content: center; + font-size: 10px; + color: white; + text-align: center; + padding: 4px; + } + + /* Rating stars - top right on hover */ + .rating-overlay { + position: absolute; + bottom: calc(100% + 0.5px); + right: 0; + width: 100%; + height: 2px; + + background-size: contain; + background-repeat: no-repeat; + background-position: right bottom; + opacity: 0; + } + + /* Word count - below title on hover */ + .wordcount-overlay { + position: absolute; + top: calc(100% + 0.5px); + left: 0; + right: 0; + padding: 1px; + font-size: 2px; + text-align: center; + color: white; + background: rgba(0,0,0,0.7); + opacity: 0; + } + + /* Use data-count attribute to select star image */ + .rating-overlay[data-count="1.0"] { background-image: url('/data/images/ehr/stars_1.0.png'); } + .rating-overlay[data-count="1.5"] { background-image: url('/data/images/ehr/stars_1.5.png'); } + .rating-overlay[data-count="2.0"] { background-image: url('/data/images/ehr/stars_2.0.png'); } + .rating-overlay[data-count="2.5"] { background-image: url('/data/images/ehr/stars_2.5.png'); } + .rating-overlay[data-count="3.0"] { background-image: url('/data/images/ehr/stars_3.0.png'); } + .rating-overlay[data-count="3.5"] { background-image: url('/data/images/ehr/stars_3.5.png'); } + .rating-overlay[data-count="4.0"] { background-image: url('/data/images/ehr/stars_4.0.png'); } + .rating-overlay[data-count="4.5"] { background-image: url('/data/images/ehr/stars_4.5.png'); } + .rating-overlay[data-count="5.0"] { background-image: url('/data/images/ehr/stars_5.0.png'); } + + /* ================================================================================================================== */ + + .book-item:hover .book-container { + transform: scale(8); + z-index: 10; + box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3); + background-color: #FFF; + position: absolute; + width: 32px; + height: calc( 32px / var(--img-aspect-ratio) ); + left: calc(50% - 16px); + top: calc(50% - (16px / var(--img-aspect-ratio))); + } + + .book-item:hover .title-overlay { + opacity: 1; + } + .book-item:hover .chapter-overlay { + opacity: 1; + } + + .book-item:hover .wordcount-overlay { opacity: 1; } + .book-item:hover .rating-overlay { opacity: 1; } + } \ No newline at end of file diff --git a/www/data/images/ehr/stars_1.0.png b/www/data/images/ehr/stars_1.0.png new file mode 100644 index 0000000..3eaa5f5 Binary files /dev/null and b/www/data/images/ehr/stars_1.0.png differ diff --git a/www/data/images/ehr/stars_1.5.png b/www/data/images/ehr/stars_1.5.png new file mode 100644 index 0000000..d80e512 Binary files /dev/null and b/www/data/images/ehr/stars_1.5.png differ diff --git a/www/data/images/ehr/stars_2.0.png b/www/data/images/ehr/stars_2.0.png new file mode 100644 index 0000000..de025ca Binary files /dev/null and b/www/data/images/ehr/stars_2.0.png differ diff --git a/www/data/images/ehr/stars_2.5.png b/www/data/images/ehr/stars_2.5.png new file mode 100644 index 0000000..cd105c8 Binary files /dev/null and b/www/data/images/ehr/stars_2.5.png differ diff --git a/www/data/images/ehr/stars_3.0.png b/www/data/images/ehr/stars_3.0.png new file mode 100644 index 0000000..2724d9d Binary files /dev/null and b/www/data/images/ehr/stars_3.0.png differ diff --git a/www/data/images/ehr/stars_3.5.png b/www/data/images/ehr/stars_3.5.png new file mode 100644 index 0000000..ad92e7b Binary files /dev/null and b/www/data/images/ehr/stars_3.5.png differ diff --git a/www/data/images/ehr/stars_4.0.png b/www/data/images/ehr/stars_4.0.png new file mode 100644 index 0000000..694bcac Binary files /dev/null and b/www/data/images/ehr/stars_4.0.png differ diff --git a/www/data/images/ehr/stars_4.5.png b/www/data/images/ehr/stars_4.5.png new file mode 100644 index 0000000..9ec4ae4 Binary files /dev/null and b/www/data/images/ehr/stars_4.5.png differ diff --git a/www/data/images/ehr/stars_5.0.png b/www/data/images/ehr/stars_5.0.png new file mode 100644 index 0000000..65936d2 Binary files /dev/null and b/www/data/images/ehr/stars_5.0.png differ diff --git a/www/internals/modules.php b/www/internals/modules.php index 865bbe9..a4f4e04 100644 --- a/www/internals/modules.php +++ b/www/internals/modules.php @@ -1,7 +1,5 @@ projectlawful === null) { require_once 'modules/projectlawful.php'; $this->projectlawful = new ProjectLawful($this->site); } return $this->projectlawful; } + + public function EbookHistory(): EbookHistory + { + if ($this->ebookhistory === null) { require_once 'modules/ebookhistory.php'; $this->ebookhistory = new EbookHistory($this->site); } + return $this->ebookhistory; + } } \ No newline at end of file diff --git a/www/internals/modules/ebookhistory.php b/www/internals/modules/ebookhistory.php new file mode 100644 index 0000000..7e8ff51 --- /dev/null +++ b/www/internals/modules/ebookhistory.php @@ -0,0 +1,36 @@ +site = $site; + } + + public function dir(): string + { + return __DIR__ . '/../../dynamic/ehr/'; + } + + public function checkConsistency(): array + { + $fn = $this->dir().'/snippet.html'; + + if (!file_exists($fn)) return ['result'=>'err', 'message' => 'File not found: ' . $fn]; + + if (filemtime($fn) < time()-(10*24*60*60)) return ['result'=>'warn', 'message' => 'Rendered data is older than 10 days']; + + return ['result' => 'ok', 'message' => '']; + } + + public function get(): string + { + $fn = $this->dir().'/snippet.html'; + if (!file_exists($fn)) return ''; + + return file_get_contents($fn); + } +} \ No newline at end of file diff --git a/www/internals/modules/projectlawful.php b/www/internals/modules/projectlawful.php index 0d00199..fd972ee 100644 --- a/www/internals/modules/projectlawful.php +++ b/www/internals/modules/projectlawful.php @@ -1,11 +1,5 @@ 'Webapps (data)', 'modules::highscores' => 'Highscores (data)', 'modules::projectlawful' => 'ProjectLawful-ebook (files)', + 'modules::ebookhistory' => 'eBook History (data)', 'egg::db-check' => 'ExtendedGitGraph (db-check)', 'backend::git' => 'Git Repository', ]; @@ -120,6 +121,7 @@ class SelfTest implements IWebsiteModule $this->addCheckConsistency("modules::webapps::webapps-check-consistency", function(){ return Website::inst()->modules->WebApps(); }); $this->addCheckConsistency("modules::highscores::highscores-check-consistency", function(){ return Website::inst()->modules->Highscores(); }); $this->addCheckConsistency("modules::projectlawful::projectlawful-check-consistency", function(){ return Website::inst()->modules->ProjectLawful(); }); + $this->addCheckConsistency("modules::ebookhistory::ebookhistory-check-consistency", function(){ return Website::inst()->modules->EbookHistory(); }); $this->addLambdaStatus("egg::db-check::check-db-consistency", function(){ return Website::inst()->modules->ExtendedGitGraph()->checkDatabaseConsistency(); }); diff --git a/www/internals/utils.php b/www/internals/utils.php index 0eff6b7..5ca11c7 100644 --- a/www/internals/utils.php +++ b/www/internals/utils.php @@ -292,9 +292,11 @@ function curl_http_request($url) return [ 'output'=>$output, 'statuscode'=>$httpcode, 'redirect'=>$redirect, 'errnum'=>$errnum, 'errstr'=>$errmsg ]; } -function array_last(array $arr) -{ - return $arr[count($arr)-1]; +if (!function_exists('array_last')) { + function array_last(array $arr) + { + return $arr[count($arr)-1]; + } } function explode_allow_empty(string $separator, string $str): array { diff --git a/www/pages/about.php b/www/pages/about.php index 61193f3..a55579e 100644 --- a/www/pages/about.php +++ b/www/pages/about.php @@ -107,4 +107,17 @@ $FRAME_OPTIONS->activeHeader = 'about'; + + +
+
Reading history (incomplete :/)
+ +
+ + modules->EbookHistory()->get(); ?> + +
+ +
+