Skip to content

Commit

Permalink
Add str_starts_with() polyfill
Browse files Browse the repository at this point in the history
  • Loading branch information
dpilafian committed Jan 27, 2024
1 parent 599cb14 commit e02b51d
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 19 deletions.
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,8 @@ _A simple and aesthetic image gallery to showcase your art portfolio_
 
[![Build](https://github.com/center-key/paradise/workflows/build/badge.svg)](https://github.com/center-key/paradise/actions/workflows/run-spec-on-push.yaml)

Paradise is an open source software package for displaying a collection of photos on a website in
a clean, professional style. Use Paradise to create an online exhibit for an artist or
organization.
Paradise is an open source software package for publishing a curated portfolio of photos on a website in a clean, professional style.
Use Paradise to create an online exhibit for an artist or organization.

**[Download install files](https://github.com/center-key/paradise/tree/main/releases)**

Expand Down
14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"description": "Paradise Photo Gallery",
"license": "GPL-3.0",
"type": "module",
"main": "website/index.html",
"browser": "website/index.html",
"repository": {
"type": "git",
"url": "git+https://github.com/center-key/paradise.git"
Expand Down Expand Up @@ -55,7 +55,7 @@
"csso build/1-dev/gallery/console/paradise-console.css --output build/2-min/gallery/console/paradise-console.min.css",
"uglifyjs src/gallery/js/*.js --output build/2-min/gallery/paradise.min.js",
"uglifyjs src/gallery/console/js/*.js --output build/2-min/gallery/console/paradise-console.min.js",
"replacer src/gallery --ext=.php build/3-tst/gallery --pkg",
"replacer src/gallery --ext=.php build/3-tst/gallery",
"add-dist-header build/2-min/gallery build/3-tst/gallery",
"add-dist-header build/2-min/gallery/console build/3-tst/gallery/console",
"copy-file src/gallery/image/.htaccess --folder build/3-tst/gallery/image",
Expand All @@ -73,15 +73,15 @@
"test": "html-validator website"
},
"devDependencies": {
"@fortawesome/fontawesome-free": "~6.4",
"@fortawesome/fontawesome-free": "~6.5",
"add-dist-header": "~1.3",
"bestzip": "~2.2",
"copy-file-util": "~1.1",
"copy-folder-util": "~1.1",
"csso-cli": "~4.0",
"dna-engine": "~3.0",
"dna-engine": "~3.1",
"dropzone": "6.0.0-beta.2",
"fetch-json": "~3.2",
"fetch-json": "~3.3",
"jshint": "~2.13",
"less": "~4.2",
"magnific-popup": "~1.1",
Expand All @@ -91,7 +91,7 @@
"rimraf": "~5.0",
"run-scripts-util": "~1.2",
"uglify-js": "~3.17",
"w3c-html-validator": "~1.5",
"web-ignition": "~2.0"
"w3c-html-validator": "~1.6",
"web-ignition": "~2.1"
}
}
7 changes: 7 additions & 0 deletions src/gallery/console/admin-server/polyfills.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,13 @@ function str_contains($haystack, $needle) {
}
}

// PHP 8.0.0: str_starts_with()
if (!function_exists('str_starts_with')) {
function str_starts_with($haystack, $needle) {
return strlen($needle) === 0 || strpos($haystack, $needle) === 0;
}
}

// PHP 8.0.0: str_ends_with()
if (!function_exists("str_ends_with")) {
function str_ends_with($haystack, $needle) {
Expand Down
2 changes: 1 addition & 1 deletion tools/build.sh.command
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ releaseInstructions() {
echo "When ready to do the next release:"
echo
echo " === Increment version ==="
echo " Edit pacakge.json to bump $version to next version number"
echo " Edit package.json to bump $version to next version number"
echo " $projectHome/package.json"
}
nextActionPush() {
Expand Down
16 changes: 8 additions & 8 deletions website/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@
<link rel=apple-touch-icon href=graphics/mobile-home-screen.png>
<link rel=preconnect href=https://fonts.googleapis.com>
<link rel=preconnect href=https://fonts.gstatic.com crossorigin>
<link rel=stylesheet href=https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@6.4/css/all.min.css>
<link rel=stylesheet href=https://cdn.jsdelivr.net/npm/dna-engine@3.0/dist/dna-engine.css>
<link rel=stylesheet href=https://cdn.jsdelivr.net/npm/web-ignition@2.0/dist/reset.min.css>
<link rel=stylesheet href=https://cdn.jsdelivr.net/npm/web-ignition@2.0/dist/layouts/color-blocks.css>
<link rel=stylesheet href=https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@6.5/css/all.min.css>
<link rel=stylesheet href=https://cdn.jsdelivr.net/npm/dna-engine@3.1/dist/dna-engine.css>
<link rel=stylesheet href=https://cdn.jsdelivr.net/npm/web-ignition@2.1/dist/reset.min.css>
<link rel=stylesheet href=https://cdn.jsdelivr.net/npm/web-ignition@2.1/dist/layouts/color-blocks.css>
<link rel=stylesheet href=style.css>
<script defer src=https://cdn.jsdelivr.net/npm/fetch-json@3.2/dist/fetch-json.min.js></script>
<script defer src=https://cdn.jsdelivr.net/npm/dna-engine@3.0/dist/dna-engine.min.js></script>
<script defer src=https://cdn.jsdelivr.net/npm/web-ignition@2.0/dist/lib-x.min.js></script>
<script defer src=https://cdn.jsdelivr.net/npm/fetch-json@3.3/dist/fetch-json.min.js></script>
<script defer src=https://cdn.jsdelivr.net/npm/dna-engine@3.1/dist/dna-engine.min.js></script>
<script defer src=https://cdn.jsdelivr.net/npm/web-ignition@2.1/dist/lib-x.min.js></script>
</head>
<body>

Expand All @@ -54,7 +54,7 @@ <h2>Build an art exhibit</h2>
<img class=paradise-logo src=graphics/paradise-logo.svg alt=paradise>
</a>
<p>
Paradise is an open source software package for publishing a portfolio of photos on
Paradise is an open source software package for publishing a curated portfolio of photos on
a website in a clean, professional style.
</p>
<p>
Expand Down

0 comments on commit e02b51d

Please sign in to comment.