Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prettier #1255

Merged
merged 12 commits into from
Jul 10, 2023
Merged
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
23 changes: 23 additions & 0 deletions .github/workflows/npm.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: NPM Actions

on:
pull_request:
# push:

jobs:
prettier:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.ref }}
repository: ${{ github.event.pull_request.head.repo.full_name }}

- name: Prettify code
uses: creyD/[email protected]
with:
dry: True
only_changed: True
prettier_version: 2.8.8
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@ composer.phar
html/ad*
html/analytics*
import/
node_modules/
php/config.php
php/secrets.php
vendor/*
*.pyc
.idea
.DS_Store
.DS_Store
11 changes: 11 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Ignore artifacts:
build
coverage
# Ignore other files we don't want amending
vendor
composer.json
composer.lock
js/utilities.js
*.html
*.min.css
*.min.js
1 change: 1 addition & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
4 changes: 4 additions & 0 deletions INSTALL
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ sudo certbot --nginx -d [YOUR_DOMAIN]
curl -sS https://getcomposer.org/installer | sudo php -- --install-dir=/usr/local/bin --filename=composer
sudo -u openflights php /usr/local/bin/composer install

# Set up npm packages if you're going to be developing OpenFlights
sudo apt-get install npm
sudo -u openflights npm install

# Generates locales for language support
cd openflights
find locale -name *utf8 -printf '%f ' | xargs sudo locale-gen
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ Basically, though, it's your classic [LNMP](https://en.wikipedia.org/wiki/LAMP_%
## Tests

Test coverage is woefully incomplete, but comes in three flavors:

- [`client`](test/client/): Client-side full-stack integration tests, require live DB & server
- [`server`](test/server/): Server-side (PHP) integration tests, require a live database
- [`unit`](test/unit/): Client-side JavaScript unit tests
Expand Down
2 changes: 1 addition & 1 deletion about.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<head>
<title>OpenFlights: About</title>
<meta name="version" content="<?php echo Git::getCurrentCommitID() ?? "unavailable"; ?>">
<link rel="stylesheet" href="/css/style_reset.css" type="text/css">
<link rel="stylesheet" href="/css/style_reset.min.css" type="text/css">
<link rel="stylesheet" href="/openflights.css" type="text/css">
<link rel="icon" type="image/png" href="/img/icon_favicon.png"/>
<!--#include virtual="/html/analytics.html" -->
Expand Down
8 changes: 4 additions & 4 deletions badge/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
The Open Sans font is released under the [Open Font License 1.1](OFL.txt).

* Project: https://fonts.google.com/specimen/Open+Sans
* Source: https://github.com/googlefonts/opensans
The Open Sans font is released under the [Open Font License 1.1](OFL.txt).

- Project: https://fonts.google.com/specimen/Open+Sans
- Source: https://github.com/googlefonts/opensans
2 changes: 1 addition & 1 deletion css/help.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
table.time {
table.time {
border-spacing: 1;
}

Expand Down
File renamed without changes.
159 changes: 79 additions & 80 deletions css/tripit.css
Original file line number Diff line number Diff line change
@@ -1,80 +1,79 @@
/* TripIt Trip List */
div.segment {
width: 850px;
overflow: auto;
}

div.segment-left-cell {
width: 450px;
float: left;
}

div.segment-right-cell {
width: 400px;
float: left;
}

div.segment-none {
font-family: Calibri, Verdana, Arial, sans-serif;
font-size: 12pt;
color: #a1a1a1;
text-align: center;
margin: 15px 0;
}

hr.segment-separator {
height: 1px;
background-color: #a1a1a1;
border: 1px;
clear: both;
}

div.trip_header {
width: 850px;
overflow: auto;
}

div.import_all {
float: right;
margin-top: 3px;
}

/* TripIt Rendezvous */
.loginSelector {
width: 200px;
height: 200px;
vertical-align: middle;
}

.tripit_sprites_soc {
background: url("/img/tripit-sprites-social.png") no-repeat;
padding-left: 20px;
}

.tripit_sprites_soc_fb {
background-position: 0 -2px;
}

.tripit_sprites_soc_google {
background-position: 0 -80px;
}

.tripit_sprites_soc_yahoo {
background-position: 0 -113px;
}

.partnerLoginList {
text-align: left;
display: inline-block;
padding-top: 5px;
padding-bottom: 5px;
}

.ui-button-text {
font-size: 12px;
}

#loginPathPartnerHelp {
display: none;
}

/* TripIt Trip List */
div.segment {
width: 850px;
overflow: auto;
}

div.segment-left-cell {
width: 450px;
float: left;
}

div.segment-right-cell {
width: 400px;
float: left;
}

div.segment-none {
font-family: Calibri, Verdana, Arial, sans-serif;
font-size: 12pt;
color: #a1a1a1;
text-align: center;
margin: 15px 0;
}

hr.segment-separator {
height: 1px;
background-color: #a1a1a1;
border: 1px;
clear: both;
}

div.trip_header {
width: 850px;
overflow: auto;
}

div.import_all {
float: right;
margin-top: 3px;
}

/* TripIt Rendezvous */
.loginSelector {
width: 200px;
height: 200px;
vertical-align: middle;
}

.tripit_sprites_soc {
background: url("/img/tripit-sprites-social.png") no-repeat;
padding-left: 20px;
}

.tripit_sprites_soc_fb {
background-position: 0 -2px;
}

.tripit_sprites_soc_google {
background-position: 0 -80px;
}

.tripit_sprites_soc_yahoo {
background-position: 0 -113px;
}

.partnerLoginList {
text-align: left;
display: inline-block;
padding-top: 5px;
padding-bottom: 5px;
}

.ui-button-text {
font-size: 12px;
}

#loginPathPartnerHelp {
display: none;
}
2 changes: 1 addition & 1 deletion data.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<title>OpenFlights: Airport and airline data</title>
<meta name="description" content="Free airport and airline data with IATA, ICAO, latitude, longitude, elevation, timezone, DST information">
<meta name="keywords" content="airport,airline,data,database,iata,icao,latitude,longitude,elevation,coordinates,timezone,dafif,free">
<link rel="stylesheet" href="/css/style_reset.css" type="text/css">
<link rel="stylesheet" href="/css/style_reset.min.css" type="text/css">
<link rel="stylesheet" href="/css/help.css" type="text/css">
<link rel="stylesheet" href="/openflights.css" type="text/css">
<link rel="icon" type="image/png" href="/img/icon_favicon.png"/>
Expand Down
1 change: 0 additions & 1 deletion demo/README
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
Various screenshots etc for promotional purposes.

2 changes: 1 addition & 1 deletion donate.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<html>
<head>
<title>OpenFlights: Donations and Elite Levels</title>
<link rel="stylesheet" href="/css/style_reset.css" type="text/css">
<link rel="stylesheet" href="/css/style_reset.min.css" type="text/css">
<link rel="stylesheet" href="/openflights.css" type="text/css">
<link rel="icon" type="image/png" href="/img/icon_favicon.png"/>
</head>
Expand Down
2 changes: 1 addition & 1 deletion faq.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html>
<head>
<title>OpenFlights: FAQ</title>
<link rel="stylesheet" href="/css/style_reset.css" type="text/css">
<link rel="stylesheet" href="/css/style_reset.min.css" type="text/css">
<link rel="stylesheet" href="/openflights.css" type="text/css">
<link rel="icon" type="image/png" href="/img/icon_favicon.png"/>
<!--#include virtual="/html/analytics.html" -->
Expand Down
2 changes: 1 addition & 1 deletion help/airline.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html>
<head>
<title>OpenFlights Help: Airport</title>
<link rel="stylesheet" href="/css/style_reset.css" type="text/css">
<link rel="stylesheet" href="/css/style_reset.min.css" type="text/css">
<link rel="stylesheet" href="/openflights.css" type="text/css">
</head>

Expand Down
2 changes: 1 addition & 1 deletion help/airport.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html>
<head>
<title>OpenFlights Help: Airport</title>
<link rel="stylesheet" href="/css/style_reset.css" type="text/css">
<link rel="stylesheet" href="/css/style_reset.min.css" type="text/css">
<link rel="stylesheet" href="/openflights.css" type="text/css">
</head>

Expand Down
2 changes: 1 addition & 1 deletion help/csv.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html>
<head>
<title>OpenFlights Help: CSV</title>
<link rel="stylesheet" href="/css/style_reset.css" type="text/css">
<link rel="stylesheet" href="/css/style_reset.min.css" type="text/css">
<link rel="stylesheet" href="/openflights.css" type="text/css">
</head>

Expand Down
2 changes: 1 addition & 1 deletion help/database.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html>
<head>
<title>OpenFlights Help: Databases</title>
<link rel="stylesheet" href="/css/style_reset.css" type="text/css">
<link rel="stylesheet" href="/css/style_reset.min.css" type="text/css">
<link rel="stylesheet" href="/openflights.css" type="text/css">
</head>

Expand Down
2 changes: 1 addition & 1 deletion help/privacy.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html>
<head>
<title>OpenFlights: Privacy policy</title>
<link rel="stylesheet" href="/css/style_reset.css" type="text/css">
<link rel="stylesheet" href="/css/style_reset.min.css" type="text/css">
<link rel="stylesheet" href="/openflights.css" type="text/css">
</head>

Expand Down
2 changes: 1 addition & 1 deletion help/resetpw.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<html>
<head>
<title>OpenFlights: Reset password</title>
<link rel="stylesheet" href="/css/style_reset.css" type="text/css">
<link rel="stylesheet" href="/css/style_reset.min.css" type="text/css">
<link rel="stylesheet" href="/openflights.css" type="text/css">
</head>

Expand Down
2 changes: 1 addition & 1 deletion help/time.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html>
<head>
<title>OpenFlights Help: Time</title>
<link rel="stylesheet" href="/css/style_reset.css" type="text/css">
<link rel="stylesheet" href="/css/style_reset.min.css" type="text/css">
<link rel="stylesheet" href="/openflights.css" type="text/css">
<link rel="stylesheet" href="/css/help.css" type="text/css">
</head>
Expand Down
2 changes: 1 addition & 1 deletion help/trip.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html>
<head>
<title>OpenFlights Help: Trips</title>
<link rel="stylesheet" href="/css/style_reset.css" type="text/css">
<link rel="stylesheet" href="/css/style_reset.min.css" type="text/css">
<link rel="stylesheet" href="/openflights.css" type="text/css">
</head>

Expand Down
4 changes: 2 additions & 2 deletions html/alsearch.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>OpenFlights: <?php echo _("Airline search") ?></title>
<link rel="stylesheet" href="/css/style_reset.css" type="text/css">
<title>OpenFlights: <?php echo _("Airline search") ?></title>
<link rel="stylesheet" href="/css/style_reset.min.css" type="text/css">
<link rel="stylesheet" href="/openflights.css" type="text/css">
<link rel="gettext" type="application/x-po" href="/locale/<?php echo $locale;?>/LC_MESSAGES/messages.po" />
<link rel="icon" type="image/png" href="/img/icon_favicon.png"/>
Expand Down
2 changes: 1 addition & 1 deletion html/apsearch.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<html>
<head>
<title>OpenFlights: <?php echo _("Airport search") ?></title>
<link rel="stylesheet" href="/css/style_reset.css" type="text/css">
<link rel="stylesheet" href="/css/style_reset.min.css" type="text/css">
<link rel="stylesheet" href="/openflights.css" type="text/css">
<link rel="gettext" type="application/x-po" href="/locale/<?php echo $locale;?>/LC_MESSAGES/messages.po" />
<link rel="icon" type="image/png" href="/img/icon_favicon.png"/>
Expand Down
2 changes: 1 addition & 1 deletion html/import.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<html>
<head>
<title>OpenFlights: <?php echo _("Import data") ?></title>
<link rel="stylesheet" href="/css/style_reset.css" type="text/css">
<link rel="stylesheet" href="/css/style_reset.min.css" type="text/css">
<link rel="stylesheet" href="/openflights.css" type="text/css">
</head>

Expand Down
2 changes: 1 addition & 1 deletion html/route-maps.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html>
<head>
<title>OpenFlights: Route maps</title>
<link rel="stylesheet" href="/css/style_reset.css" type="text/css">
<link rel="stylesheet" href="/css/style_reset.min.css" type="text/css">
<link rel="stylesheet" href="/openflights.css" type="text/css">
<link rel="icon" type="image/png" href="/img/icon_favicon.png"/>
<?php include"./html/analytics.html"; ?>
Expand Down
Loading