Skip to content

Commit

Permalink
Gh 1683 (#1716)
Browse files Browse the repository at this point in the history
* Create axios instances

* Working on header

* Fix issues according to lint

* Add github svg for navbar

* Add github projet link to navbar

* Modify navbar styles

* Modify resources dropdown styles

* Add img arrow_down

* Modify navbar resources dropdown icon

* Fix navbar brand alignment

* Modify jumbotron header and text styles

* Add to assets img arrow_down_blue.svg

* Modify navbar resources dropdown btn

* Add aseets img jumbotron_boxes.svg

* Modify jumbotron boxes img

* Remove boxes.png from assets img

* Modify jumbotron twitter button

* Fix linter issues

* Fix jumbotron twitter button behavior

* Remove comented code from jumbotron

* Modify footer

* Modify footer styles

* Imrove footer styles

* Fix linter issues with footer

* Modify jumbotron styles

* Format index.pug code a bit

* Modify aside styles

* Modify main and aside styls for less than sm

* Replace footer jsdelivr logo svg

* Use new svg for footer logo

* Modify jumbotron styles for less than sm

* Fix jumbotron styles for xs and sm

* Modify jumbotron aligns for md

* Modify aside styles for md

* Fix index.pug whitespace

* Modify aside productionDiv styles

* Modify jumbotron styles for md

* Add buttons.github.io/buttons.js to csp

* Use github buttons star button

* Add buttons.github.io script to layout

* Modify main styles

* Modify layout and jumbotron for md

* Remove align center for md

* Modify jumbotron padding for lg

* Modify jumbotron padding for lg and xl

* /modify jumbotron and main for xl

* Remove comented from nav

* Fix linter issues for jumbotron

* Fix navbar to show hamburger

* Fix banner image

* Modify jumbotron styles for collapsed navbar

* Modify collapsed navbar styles

* Fix jubmotron alignment

* Modify main aside for xl

* Remove bootstrap alpha alert

* Fix aside top margin

* Modify main header and subheader styles

* Modify main cards headings

* Add arrow_down_white svg

* Modify content cards styles

* Modify csscode.pug styles

* Fix linter issues

* Modify jscode.pug styles

* Modify about page styles

* Modify about page links

* Remove newline

* Modify bootswatch styles

* Fix dropdown csscode menus

* Fix main and aside for xl

* Fix footer styles

* Fix elements composition

* Remove bootswatch col padding

* Fix boxes-image style rule

* Temp fix for nav route

* Modify jumbotron styles

* Modify navbar styles

* Modify boxes-images.svg position

* Fix jumbotron styles

* Fix linter issue

* Fix main-aside styles for md

* Modify style rules

* Add font Inter

* Fix linter issue

* Fix headers, about page padding

* Modify fontawesome styles

* Remove commented code

* Modify bootlint styles

* Add link href for Lear more aside

* Remove xml from svg

* Remove invalid html arguments

* Fix is html valid test 404

* Fix is html valid test about

* Fix is html valid test bootswatch4

* Fix about styles, remove obsolete attributes

* Remove id from bootswatch input

* Use jsdelivr cdn for github buttons

* Modify twitter button to follow jsDelivr

* Fix jumbotron recomended CDN link href

* Fix footer jsDelivr link href

* Fix quotes

* Scaffold new page bootsstrap icons

* Add bootrstrapIcons path generating

* Fix typo

* Add padding to bootswatch images

* Add bootstrap icons sri generating

* Fix linter issue

* Fix helmet csp self case

* Show copied styles on copy from input

* Fix input dropdown btn styles

* Fix input outline on focus

* Modify About page links for themes and books

* Remove themes templates and routes

* Remove themes test

* Remove themesAd from _extras

* Remove themes images

* Remove books templates, test, styles

* Remove books images

* Remove showcase completely

* Remove intagrations completely

* Fix valid html test

* Fix helmet-csp

* Modify helmet-csp and fix github stars button

* Restore themes route with redirect to the main

* Restore books, integrations, showcase routes

* Fix linter issues
  • Loading branch information
xbpcb authored Jun 25, 2021
1 parent e5cd97f commit 7c135ba
Show file tree
Hide file tree
Showing 97 changed files with 1,226 additions and 976 deletions.
10 changes: 3 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@


[BootstrapCDN](https://www.bootstrapcdn.com/) is the easiest and fastest way to get started with Bootstrap, Font Awesome, Bootswatch and Bootstrap Icons.
Simply visit the main site and copy the URLs you need. New versions of all projects are pulled directly from NPM.
Simply visit the main site and copy the URLs you need. New versions of all projects are pulled directly from NPM.

Or follow the instructions bellow for more advanced use cases.

Expand All @@ -25,7 +25,7 @@ These will pull the `4.6.0` version. It is safe to use SRI with static versions

### Version aliasing

To auto-update to latest minor version you can specify for example `4` as the version in the URL.
To auto-update to latest minor version you can specify for example `4` as the version in the URL.
You will then get the latest v4 version available with a delay of up to 7 days.
```
<!-- CSS only -->
Expand All @@ -40,7 +40,7 @@ A more detailed documentation is available on [jsDelivr's Github page](https://g

### Using the API to pull versions

For certain use-cases it is possible to automate updates [using our API](https://data.jsdelivr.com/v1/package/npm/jquery).
For certain use-cases it is possible to automate updates [using our API](https://data.jsdelivr.com/v1/package/npm/jquery).
You can use it to get the list of versions available on the CDN including the latest one.
```
https://data.jsdelivr.com/v1/package/npm/bootstrap
Expand Down Expand Up @@ -114,10 +114,6 @@ The Express.js app configuration.
* javascript: Array of javascript file(s) we use.
* redirects: Array of Objects for the page redirects.

#### `config/_extras.yml`

Contains the `/showcase/` and `/integrations/` config we use in the Express.js app.

#### `config/_files.yml`

Contains the CDN files we host.The SRI values are updated by running `npm run integrity`.
Expand Down
23 changes: 14 additions & 9 deletions app.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,16 +125,17 @@ app.locals.semver = semver;
app.use('/', routes.indexRoute);
app.use('/about/', routes.aboutRoute);
app.use('/alpha/?|/beta/?|/jobs/?|/privacy-policy/?', routes.redirectToRoot);
app.use('/books/', routes.booksRoute);
app.use('/bootlint/', routes.bootlintRoute);
app.use('/bootswatch/', routes.bootswatchRoute);
app.use('/bootswatch4/', routes.bootswatch4Route);
app.use('/data/bootstrapcdn.json', routes.dataRoute);
app.use('/fontawesome/', routes.fontawesomeRoute);
app.use('/integrations/', routes.integrationsRoute);
app.use('/legacy', routes.legacyRoutes);
app.use('/showcase/', routes.showcaseRoute);
app.use('/bootstrapicons/', routes.bootstrapIconsRoute);
app.use('/themes/', routes.themesRoute);
app.use('/books/', routes.booksRoute);
app.use('/integrations/', routes.integrationsRoute);
app.use('/showcase/', routes.showcaseRoute);

const map = sitemap({
url: 'www.bootstrapcdn.com',
Expand All @@ -151,9 +152,6 @@ const map = sitemap({
'/404/': {
hide: true
},
'/books/': {
hide: true
},
'/bootswatch4/': {
hide: true
},
Expand All @@ -168,6 +166,15 @@ const map = sitemap({
},
'/themes/': {
hide: true
},
'/books/': {
hide: true
},
'/integrations/': {
hide: true
},
'/showcase/': {
hide: true
}
}
});
Expand All @@ -181,9 +188,7 @@ if (ENV.ENABLE_CRAWLING) {
'/bootlint',
'/bootswatch',
'/fontawesome',
'/integrations',
'/legacy',
'/showcase'
'/legacy'
]);
return map.XMLtoWeb(res);
});
Expand Down
23 changes: 10 additions & 13 deletions config/_app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,19 +28,16 @@ javascript:
- name: main
uri: /assets/js/main.js
friends:
- name: SecurityTrails
url: 'https://securitytrails.com/'
nofollow: false
- name: Bootstrap
url: 'https://getbootstrap.com/'
- name: nixCraft
url: 'https://www.cyberciti.biz/'
- name: Edubirdie
url: 'https://edubirdie.com/'
nofollow: false
- name: FossHub
url: 'https://www.fosshub.com/'
nofollow: false
- name: Cloudflare
url: 'https://www.cloudflare.com/'
- name: appfleet
url: 'https://appfleet.com/'
- name: Fastly
url: 'https://www.fastly.com/'
- name: NS1
url: 'https://ns1.com/'
- name: bunny.net
url: 'https://bunny.net/'
redirects:
- name: legacy
from: /legacy/
Expand Down
157 changes: 0 additions & 157 deletions config/_extras.yml

This file was deleted.

18 changes: 9 additions & 9 deletions config/helmet-csp.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
'use strict';

const CSP = {
defaultSrc: ['"none"'],
baseUri: ['"self"'],
defaultSrc: ['\'none\''],
baseUri: ['\'self\''],
formAction: ['platform.twitter.com', 'syndication.twitter.com'],
frameAncestors: ['"none"'],
frameAncestors: ['\'none\''],
scriptSrc: [
'"self"',
'\'self\'',
'\'unsafe-inline\'',
'stackpath.bootstrapcdn.com',
'www.google-analytics.com',
Expand Down Expand Up @@ -40,28 +40,28 @@ const CSP = {
'https://cdn.jsdelivr.net'
],
fontSrc: [
'"self"',
'\'self\'',
'stackpath.bootstrapcdn.com',
'fonts.gstatic.com',
'https://cdn.jsdelivr.net'
],
frameSrc: [
'"self"',
'\'self\'',
'img.shields.io',
'platform.twitter.com',
'syndication.twitter.com',
'https://cdn.jsdelivr.net'
],
childSrc: [
'"self"',
'\'self\'',
'img.shields.io',
'platform.twitter.com',
'syndication.twitter.com',
'https://cdn.jsdelivr.net'
],
connectSrc: ['syndication.twitter.com'],
connectSrc: ['syndication.twitter.com', 'https://api.github.com/repos/jsdelivr/bootstrapcdn'],
objectSrc: ['img.shields.io'],
manifestSrc: ['"self"']
manifestSrc: ['\'self\'']
};

module.exports = CSP;
2 changes: 1 addition & 1 deletion config/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ function loadConfig(file) {
return yaml.load(fs.readFileSync(path.join(__dirname, file)), 'utf8');
}

['_app.yml', '_extras.yml', '_files.yml'].forEach((file) => {
['_app.yml', '_files.yml'].forEach((file) => {
const name = file.replace(/^_/, '').replace(/.yml$/, '');

module.exports[name] = loadConfig(file);
Expand Down
Loading

0 comments on commit 7c135ba

Please sign in to comment.