Skip to content
This repository has been archived by the owner on Jan 15, 2024. It is now read-only.

Getting started download buttons #82

Merged
merged 5 commits into from
Oct 10, 2019
Merged

Getting started download buttons #82

merged 5 commits into from
Oct 10, 2019

Conversation

Soitora
Copy link
Member

@Soitora Soitora commented Oct 6, 2019

Changed the getting started buttons to look much more "professional".
I wanted to change more on the page but that will be a seperate PR.

This is aimed toward issue #62 by @j2ghz.

@Soitora Soitora requested a review from arkon October 6, 2019 18:09
@netlify
Copy link

netlify bot commented Oct 6, 2019

Deploy preview for tachiyomi ready!

Built with commit 827a064

https://deploy-preview-82--tachiyomi.netlify.com

@Soitora
Copy link
Member Author

Soitora commented Oct 7, 2019

It's ready to be checked now @arkon

@j2ghz
Copy link

j2ghz commented Oct 7, 2019

Not sure what changed, but last time I looked it was good, now it looks like this:
image
Request to https://fonts.googleapis.com/css?family=OpenSans fails with 404
Response reads:

Error (400): Missing font family

The requested font families are not available.

Requested: OpenSans (style: normal, weight: 400)

For reference, see the Google Fonts API documentation.

@Soitora
Copy link
Member Author

Soitora commented Oct 7, 2019

I'll look into the font issue first thing tomorrow

EDIT: I presume it tried to look for OpenSans and not Open Sans because the font import wasn't quoted, I have fixed that and added fallbacks, it should not look weird now.

src/.vuepress/components/DownloadButtons.vue Show resolved Hide resolved
src/.vuepress/enhanceApp.js Outdated Show resolved Hide resolved
src/.vuepress/styles/index.scss Outdated Show resolved Hide resolved
@@ -7,7 +7,7 @@ lang: en-US

## Installation

[![github](https://img.shields.io/github/release/inorichi/tachiyomi.svg?style=for-the-badge&maxAge=600)](https://github.com/inorichi/tachiyomi/releases/latest) [![github downloads](https://img.shields.io/github/downloads/inorichi/tachiyomi/total.svg?style=for-the-badge&maxAge=600)](http://www.somsubhra.com/github-release-stats/?username=inorichi&repository=tachiyomi)
<DownloadButtons/>
Copy link
Contributor

Choose a reason for hiding this comment

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

Looking at this, it seems like we have an opportunity to actually make it more reusable for the home page as well. Thoughts?

Copy link
Member Author

Choose a reason for hiding this comment

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

The entire home page is written as a single <template> section, not sure how exactly to go about it adding a Vue element in that, not sure how to go about that.

Apparently you can add Vue component straight into a <template> section. Inserting it quickly without any edits yielded this:
image

</ul>
</template>

<style scoped lang="stylus">
Copy link
Contributor

Choose a reason for hiding this comment

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

Why Stylus? That being said, I originally suggested using Sass when the Vuepress stuff was implemented, but maybe we can just use Stylus if there's no real benefit to that...

Copy link
Member Author

Choose a reason for hiding this comment

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

Both has great benefits, their use cases are very similiar. I can stick to SASS (SCSS) if that's the standard we want, they're almost interchangeable at certain levels anyways, the one I used here could be switched to <style scoped lang="scss"> and it was still fully functional.

src/.vuepress/components/DownloadButtons.vue Outdated Show resolved Hide resolved
Comment on lines +113 to +118
const { data } = await axios.get(RELEASE_URL);
// Maybe eventually some release has more than the apk in assets.
const apkAsset = data.assets.find(a => a.name.includes('.apk'));
// Set the values.
this.$data.tagName = data.tag_name;
this.$data.browserDownloadUrl = apkAsset.browser_download_url;
Copy link
Contributor

Choose a reason for hiding this comment

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

This seems... familiar?

Copy link
Member Author

Choose a reason for hiding this comment

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

Taken straight from Home.vue to generate the correct download link.

Copy link
Contributor

Choose a reason for hiding this comment

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

That's usually a cue that the code should refactored to be reusable. :)

That's okay though, it can be refactored later.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, based on your comments on earlier PRs I shouldn't do that in the same PR but split them up instead.

Comment on lines +113 to +118
const { data } = await axios.get(RELEASE_URL);
// Maybe eventually some release has more than the apk in assets.
const apkAsset = data.assets.find(a => a.name.includes('.apk'));
// Set the values.
this.$data.tagName = data.tag_name;
this.$data.browserDownloadUrl = apkAsset.browser_download_url;
Copy link
Contributor

Choose a reason for hiding this comment

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

That's usually a cue that the code should refactored to be reusable. :)

That's okay though, it can be refactored later.

@Soitora Soitora merged commit 33d1c57 into tachiyomiorg:master Oct 10, 2019
@Soitora Soitora deleted the getting-started-download-buttons branch October 10, 2019 11:41
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants