-
-
Notifications
You must be signed in to change notification settings - Fork 14
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
Few fixes #128
Few fixes #128
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should really be commented on our OCD issue.
src/html/downloads.html
Outdated
@@ -39,7 +39,7 @@ | |||
<header> | |||
<div class="container"> | |||
<div class="logo"> | |||
<img src="assets/img/icons/spongie-mark-reverse-dark.svg" /> | |||
<img src="assets/img/icons/spongie-mark-reverse-dark.svg" alt="Spongie reverse"/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This really isn't required, not going to help accessibility at all.
src/html/include/base.html
Outdated
@@ -55,7 +55,7 @@ | |||
<div class="container"> | |||
<div id="sp-logo-container" class="page-scroll"> | |||
<a class="logo" href="#top"> | |||
<img src="assets/img/icons/spongie-mark.svg" style="height: 40px"> | |||
<img src="assets/img/icons/spongie-mark.svg" alt="Spongie" style="height: 40px"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This really isn't required, not going to help accessibility at all.
src/js/downloads/Downloads.vue
Outdated
@@ -30,7 +30,7 @@ | |||
<div class="row"> | |||
<div class="col-lg-5 col-md-6"> | |||
<div class="logo"> | |||
<img src="assets/img/icons/spongie-mark-reverse-dark.svg" /> | |||
<img src="assets/img/icons/spongie-mark-reverse-dark.svg" alt="Spongie reverse" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This really isn't required, not going to help accessibility at all.
src/js/downloads/Main.vue
Outdated
@@ -30,7 +30,7 @@ | |||
<div class="row"> | |||
<div class="col-lg-5 col-md-6"> | |||
<div class="logo"> | |||
<img src="assets/img/icons/spongie-mark-reverse-dark.svg" /> | |||
<img src="assets/img/icons/spongie-mark-reverse-dark.svg" alt="Spongie reverse"/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This really isn't required, not going to help accessibility at all.
The alt attribute is required for img tag. However if you really don't like the content we can use empty alt. Edit: I forgot about the ocd list, thanks for that |
Yes they should have an empty alt |
…and sponsors page
…ed CSP on SpongeWeb
As of HTML5 self-closed tags (such as img) no longer need to use specific syntax ( |
Note: currently I had to add in the CSP connect-src for the download page and frame-src for kiwilrc. Everything works, if we want to make it more restrictive we can move the fonts on the server and use font-src 'self' |
That'd be overkill |
Not to demean your pr, but these changes are the type of things that an OCD issue exists for in every SpongePowered repository (SpongeHome issue) for. Perhaps exception can be made of this pr, in light of the number of issues resolved - however in future that is certainly where these issues should be documented. |
Yeah, you've already said that (and I added the issues to the OCD list), but if you really want to fix them I can delete the pull request and no 'exception' will be made. |
In regards to that pr, I am not sure why that was merged and not directed to the OCD issue. It should have been. |
controllers/header.go
Outdated
"style-src 'self' 'unsafe-inline' https:; "+ | ||
"script-src 'self' 'unsafe-eval' https://cdnjs.cloudflare.com https://www.google-analytics.com; "+ | ||
"frame-ancestors 'none'")*/ | ||
header.Set("Content-Security-Policy", "default-src 'none'; script-src 'self' 'unsafe-inline' 'unsafe-eval' https://cdnjs.cloudflare.com/ ; style-src 'self' 'unsafe-inline' https://cdnjs.cloudflare.com; img-src 'self'; font-src https://cdnjs.cloudflare.com/ https://fonts.googleapis.com/; connect-src 'self' https://dl-api.spongepowered.org/; frame-src https://kiwiirc.com; frame-ancestors 'none'; upgrade-insecure-requests; block-all-mixed-content; ") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we get this split over a few lines, to promote readability?
src/html/downloads.html
Outdated
@@ -39,7 +39,7 @@ | |||
<header> | |||
<div class="container"> | |||
<div class="logo"> | |||
<img src="assets/img/icons/spongie-mark-reverse-dark.svg" /> | |||
<img src="assets/img/icons/spongie-mark-reverse-dark.svg" alt=""/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change />
for >
as per HTML5.
src/html/include/base.html
Outdated
@@ -129,7 +129,7 @@ | |||
<p>Copyright © SpongePowered 2014-2017</p> | |||
<p id="fastly">Accelerated by<br> | |||
<a href="https://www.fastly.com"> | |||
<img src="assets/img/fastly.png" alt="Fastly" /> | |||
<img src="assets/img/fastly.png" alt="Fastly" height="45" width="100" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change />
for >
as per HTML5.
src/js/downloads/Downloads.vue
Outdated
@@ -30,7 +30,7 @@ | |||
<div class="row"> | |||
<div class="col-lg-5 col-md-6"> | |||
<div class="logo"> | |||
<img src="assets/img/icons/spongie-mark-reverse-dark.svg" /> | |||
<img src="assets/img/icons/spongie-mark-reverse-dark.svg" alt="" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change />
for >
as per HTML5.
src/js/downloads/Main.vue
Outdated
@@ -30,7 +30,7 @@ | |||
<div class="row"> | |||
<div class="col-lg-5 col-md-6"> | |||
<div class="logo"> | |||
<img src="assets/img/icons/spongie-mark-reverse-dark.svg" /> | |||
<img src="assets/img/icons/spongie-mark-reverse-dark.svg" alt=""/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change />
for >
as per HTML5.
README.md
Outdated
under the MIT license. See [LICENSE.md](LICENSE.md) for details. | ||
|
||
### Branches | ||
|
||
- `master` is hooked up to [www staging](https://www-staging.spongepowered.org/) | ||
- `production` is hooked up to [www prod](https://www.spongepowered.org/) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The production branch is no longer used - master is now www prod
.
.gitignore
Outdated
@@ -80,13 +80,13 @@ lib-cov | |||
# Coverage directory used by tools like istanbul | |||
coverage | |||
|
|||
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) | |||
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
May as well remove Grunt from the gitignore - we don't use it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is that okay ? You created that gitignore with gitignore.io, it is basically a preset which handle multiple developers using different ide/tools/etc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah - Grunt is a buildtool, we use Gulp so Grunt will never become part of our dev env.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
.gitignore
Outdated
@@ -80,13 +80,10 @@ lib-cov | |||
# Coverage directory used by tools like istanbul | |||
coverage | |||
|
|||
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is no reason to remove this. The gitignore is based on a template and since this isn't breaking anything in our project I see no reason to remove it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I knew it would end up this way
.gitignore
Outdated
# node-waf configuration | ||
.lock-wscript | ||
|
||
# Compiled binary addons (http://nodejs.org/api/addons.html) | ||
# Compiled binary addons (https://nodejs.org/api/addons.html) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Feel free to suggest this change in the upstream repository: https://github.com/github/gitignore/blob/master/Node.gitignore#L32. I don't see a reason to change it here.
controllers/header.go
Outdated
"style-src 'self' 'unsafe-inline' https:; "+ | ||
"script-src 'self' 'unsafe-eval' https://cdnjs.cloudflare.com https://www.google-analytics.com; "+ | ||
"frame-ancestors 'none'")*/ | ||
header.Set("Content-Security-Policy", "default-src 'none'; " + |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please move this to a separate PR, it needs careful testing and can't be accepted together with the other minor changes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh ok, I didn't open a new pull because it was a rather small fix (in terms of lines)
controllers/header.go
Outdated
@@ -49,3 +49,54 @@ func AddHeaders(resp http.ResponseWriter) { | |||
header.Add(fastly.SurrogateControlHeader, cache.SurrogateStaticContentOptions) | |||
} | |||
} | |||
/* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is not what you wanted to do :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I noticed that soon after
You should not be changing any of the sponsor images. 🙅♂️ |
I just compressed the images, can't I do that ? (Not a sensitive change, but now they are compressed) |
@ImMorpheus It's probably better if we keep them as-is, because they were not made by us. Regarding the background, it seems like your optimized image has the same size as the original one? |
Ok, I didn't know that. Consider it fixed |
@ImMorpheus 500 bytes isn't really worth changing the image, that is almost nothing. |
@@ -129,7 +129,7 @@ | |||
<p>Copyright © SpongePowered 2014-2017</p> | |||
<p id="fastly">Accelerated by<br> | |||
<a href="https://www.fastly.com"> | |||
<img src="assets/img/fastly.png" alt="Fastly" /> | |||
<img src="assets/img/fastly.png" alt="Fastly" height="45" width="100"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why did you add an explicit width/height?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If height and width are set, the space required for the image is reserved when the page is loaded. Thus, the page loads faster.
Yeah, I compressed the images all together and there was a compression of more than 20% with some of the others. It just happened to be there and was compressed |
@ImMorpheus That's fine but please revert the change. We shouldn't require all clients to download the whole image again just for 500 bytes. |
Done |
Few fixes (wip)