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

broken image minor changes #43

Merged
merged 7 commits into from
Oct 9, 2017
Merged

Conversation

MatthiasLiszt
Copy link

added some useful functions for dealing with broken images , getting screen resolution and
changed my personal name to Matthias Liszt ...
took me longer than expected

index.html Outdated
@@ -268,9 +287,9 @@ <h6 class="black-text">Currently organized by: </h6>
<li>
<div class="row valign-wrapper">
<div class="col s2">
<a href="http://rob.ee/">
<a href="http://rob.ee/">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trailing whitespace.

index.html Outdated
<img src="https://avatars3.githubusercontent.com/u/13132899?v=3&s=460" alt="Avatar of Robert Axelsen" class="circle responsive-img">
</a>
</a>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indentation missing.

index.html Outdated
var image=document.getElementById(id+'new');
var old=document.getElementById(id);
sub="<img src='"+link+"' alt='background picture showing a view of Vienna' />";
console.log(sub);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At least the "sub" variable with its code is necessary for showing the alternative picture, which is the very purpose of this brokenImage function.
Only "console.log(sub)" isn't necessary for the code to work.

getresolution.js Outdated
@@ -0,0 +1,8 @@

function getResolution(){
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great initiative, Matthias! Like your increasing number of contributions ;)

What is the issue you're trying to fix here? Is this related to a issue? If not, please create an issue describing the details resulting in you creating this PR.

Two things regarding this function:

  1. Should this maybe be added to index.js instead of kept in a separate file?
  2. There is a typo in the return statement, meaning the variable gets never returned

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In case "https://images.unsplash.com/" is down , the brokenImage function gets executed and shows the picture from the repo.

I think it could be necessary to get the screen resolution. However I did not use this getResolution function at all. Probably might be useful if someone is viewing the page from a real small screen and the code makes use of it.

index.html Outdated
<script>
function brokenImage(link,id){
//alert("broken image!");
console.log(id+" image broken");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove, or is there a need to keep this in production for logging purposes?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I used to keep this usually because it helps me in debugging the code later.
I'd like to know how you deal with those sort of things.

@Createdd Createdd self-requested a review October 8, 2017 20:09
@MatthiasLiszt
Copy link
Author

Thanks for looking at the pull request.
It seems you are using some "linting" tool. Could you tell me which one , please?

@robaxelsen robaxelsen merged commit d8e4e60 into FCCVienna:master Oct 9, 2017
@robaxelsen
Copy link
Member

robaxelsen commented Oct 9, 2017

@DDCreationStudios Followed instructions (after obviously misunderstanding them) here on GitHub and merged without meaning to. Just wanted to merge my changes to Matthias' branch. +1 from my side though, but wanted you to review first. Please revert if you disagree with anything in my merge.

@MatthiasLiszt No linting tool. I just spotted it because GitHub review tool highlighted the indentation mistakes. I used Atom plugin to beautify the files one more time, so we have a consistent indentation style. Also moved your broken image function to index.js. All in all, a good PR though! Thanks a lot for the work you put into this 😄 👍

@Createdd
Copy link
Member

@robeerob ok don't worry. I will open a new PR since at least the Readme.md is looking weird :D
Next time you can revert it instantely after unintended merge if you are not sure about the merge. There is no limit for PRs and it's always training practice for us :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants