diff --git a/.env.example b/.env.example index d058e64..1bd5d3a 100644 --- a/.env.example +++ b/.env.example @@ -13,4 +13,5 @@ SMTP_USER = "Your SMTP Sender Username Here" SMTP_PASS = "Your SMTP Sender Password Here" SMTP_SENDTO = "Your Email Inbox Address to Receive Emails" SMTP_PORT = 465 -ANALYTICS_ID = "Your Google Analytics Tracking ID Here" \ No newline at end of file +ANALYTICS_ID = "Your Google Analytics Tracking ID Here" +GITHUB_ACCESS_TOKEN = "Your GitHub Access Token Here" \ No newline at end of file diff --git a/htdocs/assets/_integrate.php b/htdocs/assets/_integrate.php index 9b17918..800c819 100644 --- a/htdocs/assets/_integrate.php +++ b/htdocs/assets/_integrate.php @@ -4,6 +4,7 @@ + diff --git a/htdocs/assets/images/projects/default.jpg b/htdocs/assets/images/projects/default.jpg new file mode 100644 index 0000000..8c5dce9 Binary files /dev/null and b/htdocs/assets/images/projects/default.jpg differ diff --git a/htdocs/assets/images/fantasywalls.jpg b/htdocs/assets/images/projects/fantasywalls.jpg similarity index 100% rename from htdocs/assets/images/fantasywalls.jpg rename to htdocs/assets/images/projects/fantasywalls.jpg diff --git a/htdocs/assets/images/prourl.jpg b/htdocs/assets/images/projects/prourl.jpg similarity index 100% rename from htdocs/assets/images/prourl.jpg rename to htdocs/assets/images/projects/prourl.jpg diff --git a/htdocs/assets/js/tippy-config.js b/htdocs/assets/js/tippy-config.js index 6610113..9f457a2 100644 --- a/htdocs/assets/js/tippy-config.js +++ b/htdocs/assets/js/tippy-config.js @@ -34,3 +34,16 @@ tippy('#shareclosebutton', { touch: false }); +tippy('.projectitem', { + content(reference) { + const projectId = reference.getAttribute('data-template'); + const projectTippyTemplate = document.getElementById(projectId); + return projectTippyTemplate.innerHTML; + }, + allowHTML: true, + placement: 'right', + theme: 'neosubhamoy', + animation: 'scale-subtle', + touch: false +}); + diff --git a/htdocs/assets/style.css b/htdocs/assets/style.css index 9a0fcb1..9a89f54 100644 --- a/htdocs/assets/style.css +++ b/htdocs/assets/style.css @@ -610,6 +610,10 @@ video { bottom: 0px; } +.bottom-2 { + bottom: 0.5rem; +} + .bottom-\[-10rem\] { bottom: -10rem; } @@ -674,6 +678,10 @@ video { top: 0px; } +.top-2 { + top: 0.5rem; +} + .top-3 { top: 0.75rem; } @@ -1034,6 +1042,10 @@ video { height: 2.5rem; } +.h-2 { + height: 0.5rem; +} + .h-20 { height: 5rem; } @@ -1099,6 +1111,14 @@ video { height: 100vh; } +.h-3 { + height: 0.75rem; +} + +.h-4 { + height: 1rem; +} + .max-h-\[45vh\] { max-height: 45vh; } @@ -1204,6 +1224,14 @@ video { width: 100vw; } +.w-3 { + width: 0.75rem; +} + +.w-4 { + width: 1rem; +} + .max-w-\[45vw\] { max-width: 45vw; } @@ -1538,6 +1566,10 @@ video { background-color: rgba(249, 115, 22, 0.2); } +.bg-\[rgba\(255\2c 255\2c 255\2c 0\.15\)\] { + background-color: rgba(255,255,255,0.15); +} + .bg-\[rgba\(255\2c _255\2c _255\2c _0\.25\)\] { background-color: rgba(255, 255, 255, 0.25); } @@ -1574,6 +1606,35 @@ video { background-color: rgb(30 41 59 / var(--tw-bg-opacity)); } +.bg-bg_third { + --tw-bg-opacity: 1; + background-color: rgb(38 51 74 / var(--tw-bg-opacity)); +} + +.bg-\[rgba\(0\2c 0\2c 0\2c 0\.15\)\] { + background-color: rgba(0,0,0,0.15); +} + +.bg-\[rgba\(0\2c 0\2c 0\2c 0\.20\)\] { + background-color: rgba(0,0,0,0.20); +} + +.bg-\[rgba\(255\2c 255\2c 255\2c 0\.2\)\] { + background-color: rgba(255,255,255,0.2); +} + +.bg-\[rgba\(0\2c 0\2c 0\2c 0\.2\)\] { + background-color: rgba(0,0,0,0.2); +} + +.bg-\[rgba\(56\2c 189\2c 248\2c 0\.5\)\] { + background-color: rgba(56,189,248,0.5); +} + +.bg-\[rgba\(56\2c 189\2c 248\2c 0\.7\)\] { + background-color: rgba(56,189,248,0.7); +} + .bg-gradient-to-r { background-image: linear-gradient(to right, var(--tw-gradient-stops)); } @@ -1832,14 +1893,6 @@ video { text-transform: lowercase; } -.leading-relaxed { - line-height: 1.625; -} - -.leading-loose { - line-height: 2; -} - .text-\[rgb\(22\2c _163\2c _74\)\] { --tw-text-opacity: 1; color: rgb(22 163 74 / var(--tw-text-opacity)); @@ -1905,6 +1958,10 @@ video { opacity: 0.5; } +.opacity-\[0\.70\] { + opacity: 0.70; +} + .opacity-\[0\.75\] { opacity: 0.75; } diff --git a/htdocs/core/github_api_functions.php b/htdocs/core/github_api_functions.php new file mode 100644 index 0000000..0452ea3 --- /dev/null +++ b/htdocs/core/github_api_functions.php @@ -0,0 +1,32 @@ + \ No newline at end of file diff --git a/htdocs/core/utility_functions.php b/htdocs/core/utility_functions.php new file mode 100644 index 0000000..486c9a0 --- /dev/null +++ b/htdocs/core/utility_functions.php @@ -0,0 +1,14 @@ += 1000000000) { + return number_format($num / 1000000000, 1) . 'B'; + } elseif ($num >= 1000000) { + return number_format($num / 1000000, 1) . 'M'; + } elseif ($num >= 1000) { + return number_format($num / 1000, 1) . 'K'; + } else { + return $num; + } +} +?> \ No newline at end of file diff --git a/htdocs/projects.php b/htdocs/projects.php index 91684ac..34ad269 100644 --- a/htdocs/projects.php +++ b/htdocs/projects.php @@ -2,6 +2,8 @@ require 'core/connection.php'; require 'core/host_config.php'; require 'core/query_functions.php'; +require 'core/github_api_functions.php'; +require 'core/utility_functions.php'; require 'core/write_dataset.php'; write_dataset($conn); @@ -95,10 +97,88 @@ $years = create_project_years_array($conn); //fetch all projects by year and show it while ($project = $projects -> fetch_assoc()) { echo " - ".$project['name'].($project['shortdes'] != "" ? ' - '. $project['shortdes'] : '')." + ".$project['name'].($project['shortdes'] != "" ? ' - '. $project['shortdes'] : '')." + "; } - + echo <<