caffeine-overload / bandinchina

Naming and shaming companies who kowtow to Chinese censorship requests
1.04k stars 52 forks source link

Whitelist and Blacklist buttons don't work #109

Closed MoistCode closed 4 years ago

MoistCode commented 4 years ago

The whitetlist and blacklist buttons at the top of the site do not seem to change the main content at the bottom. I'll look into this.

MoistCode commented 4 years ago

@caffeine-overload Is it possible to reopen this issue? I just tested it on your page but it still does not seem to work.

The way it is suppose to work can be seen on my page:

https://moistcode.github.io/

Clicking the blacklist or whitelist button at the top should change the content. Could it be an issue with assets pipeline?

Edit: Typo

caffeine-overload commented 4 years ago

What about just having the lists in separate HTML pages? Is that possible on github pages?

MoistCode commented 4 years ago

@caffeine-overload That will repeat a lot of information. I went this route so changing the content that is always there much, such as the navigation, easier so we don't end up having multiple files with the same changes. I think it may be due to how your gh pages was set up as opposed to mine. How did you get yours to work with /bandinchina

caffeine-overload commented 4 years ago

I followed instructions given by @Medallyon in #22

caffeine-overload commented 4 years ago

By "repeat information", I guess you are referring to the navigation list? I don't think the pages for the lists will necessarily need navigation bars, a viewer can just use the browser back button in that case. I just think it may be useful to be able to link directly to the white/black lists from external sites, unless there is a way with this setup

MoistCode commented 4 years ago

@caffeine-overload I'll take a look at it tonight and make another PR. Until then, can you re-open this PR so I can make sure I get to it and don't forget.

I'm sure this can be done. It is probably just simple fix. I'm just not familiar with how GH pages work with slugs referencing specific repos. Don't worry about it. I'll update you again once I get an inkling of a solution.

@Medallyon If you have any insight please let me know.

MoistCode commented 4 years ago

@caffeine-overload I may have a temporarily fix for the white and blacklist button issue in this pull request.

Instead of getting the data from a local pipeline, it will just make a request straight to your raw repo data.

LoadingPleaseWait commented 4 years ago

The "Home" button is also broken. It ends up giving a 404.

MoistCode commented 4 years ago

@LoadingPleaseWait Fixed with the latest PR

caffeine-overload commented 4 years ago

Just merged and can confirm it works on my machine

LoadingPleaseWait commented 4 years ago

Works for me too :tada:

MoistCode commented 4 years ago

Perfect. The only downside right now is in the development environment, devs won't be able to test their changes in blacklist.md or whitelist.md since it is obtaining the information straight from @caffeine-overload 's repo and not from a local pipeline. This will have to do while I resolve the issue with the pipeline.

@caffeine-overload I'm going to close this issue. I'll open up a new one for the pipeline.

medallyon commented 4 years ago

No idea why the website isn't just at https://caffeine-overload.github.io/. I don't remember how you would change that either.

MoistCode commented 4 years ago

@Medallyon Thanks for following up. Using a specific slug to reference the repo is great since it allows for the base URL to link to something like a portfolio page. I can help @caffeine-overload if they decide to remove the slug as it is easier for me to work with GH pages that way as I have done it before.

Edit: Typo

LoadingPleaseWait commented 4 years ago

I believe that would require another repo. I think it's fine in its current location though.

MoistCode commented 4 years ago

@LoadingPleaseWait I agree. I guess we'll put this up to a nice to have since it's not really necessary at the moment.