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

Resolved Issue #33 #34

Merged
merged 7 commits into from
Mar 31, 2019
Merged

Resolved Issue #33 #34

merged 7 commits into from
Mar 31, 2019

Conversation

soulspark666
Copy link
Contributor

Added smooth scrolling view according to issue #33

Copy link
Member

@sivaraam sivaraam left a comment

Choose a reason for hiding this comment

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

Your PR seems to include changes unrelated to #33. It would be nice if you could separate them into difference commits.

index.html Outdated
@@ -34,10 +34,10 @@
<div class="container">
<h1 class="display-4">Commons Mobile App</h1>
<a class="app-badge f-droid-badge" href="https://f-droid.org/repository/browse/?fdid=fr.free.nrw.commons">
<img src="images/f-droid-badge.png" alt="F-Droid Logo" />
<img src="https://raw.githubusercontent.com/commons-app/commons-app.github.io/master/images/f-droid-badge.png" alt="F-Droid Logo" />
Copy link
Member

Choose a reason for hiding this comment

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

What's the advantage of using an absolute link to GitHub instead of a relative link which works just fine?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Both are just fine for me. I used codepen.io to add the smooth scrolling effect, so I placed an absolute link there. If you want I can change it back to relative.

Copy link
Member

Choose a reason for hiding this comment

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

Please revert them to relative paths itself.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done!

index.html Outdated
</div>
</footer>

<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
<script src='https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.1/jquery.min.js'></script>
Copy link
Member

Choose a reason for hiding this comment

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

I'm asking this as I'm not aware. Is there an advantage of using the Cloudflare CDN rather than JQuery URL?

Further, you seem to have switched to a older version of jQuery when changing the URL.

Copy link
Contributor Author

@soulspark666 soulspark666 Feb 25, 2019

Choose a reason for hiding this comment

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

Cloudflare servers are a bit faster. You can check it out here.

I can update jquery to 3.3.1, I just didn't saw that while adding it in codepen.io.

});

// Active link switching
$(window).scroll(function() {
Copy link
Member

Choose a reason for hiding this comment

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

I generally think it would be nice to achieve something simple as this without custom JS (possibly using CSS; there's already a PR (#32) which does just this).

Not using JS has the advantage that it doesn't require maintainence :-)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I also thought of using CSS initially but for time delay and stuff, js is required.
If I found something that can be done via css then I'll add a PR.

</head>

<body>
<nav class="navbar navbar-expand-lg navbar-dark bg-primary">
<nav class="navbar fixed-top navbar-expand-lg navbar-dark bg-primary">
Copy link
Member

Choose a reason for hiding this comment

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

I could see the reason why you're using fixed-top for the navbar but it seems to be making the text ("Commons Mobile App") within the <h1> contained within <div class="jumbotron jumbotron-fluid"> to be very close to the navbar in the desktop view and it even goes under the navbar in mobile view. Can you fix this?

Copy link
Member

Choose a reason for hiding this comment

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

BTW, sorry for the late request of change. Couldn't get my hands on this for a while :-(

Copy link
Member

Choose a reason for hiding this comment

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

I managed to fix this issue in 4ff0f4c

We just have one file. A folder isn't worth it.
As the navbar has been made fixed we have to compensate it with a little
top padding for the body as the size of the navbar isn't taken into
account when it is turned into fixed.

Ref: https://stackoverflow.com/a/11124805/5614968
@sivaraam sivaraam merged commit ee30698 into commons-app:master Mar 31, 2019
@sivaraam
Copy link
Member

Thanks a lot for your contribution @soulspark666! Hope to see you again :-)

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

2 participants