oupala/apaxy

style subdirectories

Closed this issue · 25 comments

noerw commented

The style is applied in the main directory, but not in subdirectories, as the paths are relative:

If I'm listing /share/**, and the apaxy theme folder is in /share/theme, and there's a subdir /share/asdf, styles are looked up under /share/asdf/theme/**..

Is there a way to fix this? or do I have to write a RewriteRule for */theme/*?

i was able to fix this by editing the /share/.htaccess file to replace all instances of theme/ with /share/theme/.

I had the same issue where only my top folder (where I installed this tool) had the theme showing and fixed it by replacing all instances of theme/ with /theme/ in the .htaccess file. For example:

AddIcon /theme/icons/archive.png .7z .bz2 .cab .gz .tar

Instead of the original

AddIcon theme/icons/archive.png .7z .bz2 .cab .gz .tar

That way the webserver always looked for a theme folder in the top level directory, rather than looking for a theme folder relative to the current directory.

This regression is due to #55 (and particularly commit bb21c1a). I hope this change will be reverted as apaxy does no longer work the whole tree anymore.

The (hopefully temporary) workaround is to replace:

AddIcon theme/icons/archive.png .7z .bz2 .cab .gz .tar

by

AddIcon /{FOLDERNAME}/theme/icons/archive.png .7z .bz2 .cab .gz .tar

As mentionned by @programster, /{FOLDERNAME} can be null if apaxy is installed at root. In this case, follow @programster advice:

AddIcon /theme/icons/archive.png .7z .bz2 .cab .gz .tar

In the other case, when apaxy is not installed at root, but into the myfolder directory, use the following syntax

AddIcon /myfolder/theme/icons/archive.png .7z .bz2 .cab .gz .tar

And @AdamWhitcroft, can you please revert to bad commit?

Maybe we should just use someones active fork, as he doesn't answer on anything

I would give it up to a week. It looks like this is an old thread that has been "revived" by me less than 24 hours ago by adding a comment. It was stale since 11th May.

@AdamWhitcroft is alive, he's twitting. Maybe someone can twit him.

The best solution would for @AdamWhitcroft to update apaxy, or the hear from him that he's not willing to maintain apaxy any more. It would hence be the time to a friendly fork. I'm not fond a aggressive fork if I can avoid it.

As there is no release of apaxy and no alternate branch to refer to, I decided to stick with the last commit (66e30f0) before the bug was introduced.

I need to identify a specific version of apaxy as I'm working on an automated install of apaxy (using ansible).

It would be great to have releases, or at least another branch (which could be named develop) in order to keep the master branch bugfree.

I've forked this repo and fixed the issues in my version:
https://github.com/programster/Apaxy

I also changed the style so that max-width is set to 100% which I believe is much better, especially when you have long filenames.

Great @programster ! Could you comment on all fixed issues with a link to your fork please? Thanks!

@hazcod by all means. I have initialized the issue area on my fork, and will try to address any small issues in the coming days/weeks but it is likely where I will get to a point where I am happy, create a final release, and then mark the repo as no longer maintained in the README.

@oupala, @hazcod, @programster It's not that I'm not willing gentlemen, it's simply a free-time issue. I'm working through as many of the issues today as I can. Sorry about that.

I've created a develop branch where I'll be reverting files that have weird commits in them. If one of you could just check them out to make sure you're happy, and then do a merge request I'll merge into master and then we can work on a release.

Thanks @AdamWhitcroft for your answer, and for taking this time for apaxy.

I don't think that your develop branch is ok for me. Let me explain you why.

  1. First, with the current version of the htaccess.txt file, the path is hard-linked to root path (/theme/...). It is hard to know what to change in order to change the root path where apaxy is installed. For the previous version of the htaccess.txt file, it was clear (and documented in the readme) to know what to change to follow the installed path of apaxy (/{FOLDERNAME}/theme/...).
  2. Second, the wrapper css class have been changed from 500px to 100%. 500px was too small, but 100% is too large, especially on large screens where it become very hard to follow lines and to know when a file has been modified or how big it is.

before

.wrapper {
    max-width: 500px;
}

after

.wrapper {
    max-width: 100%;
}

in my opinion, the best compromise would be 900px:

.wrapper {
    max-width: 900px;
}

Is it all clear for you? I can make a pull request if you want to.

@oupala Thanks for that. If you make a PR on develop I'll go ahead and merge those in. I wasn't really happy removing the pathing stuff but it was requested a few times. I'd rather the instructions be clearer than faster.

I just created two pull requests:

  • #76 that can merge to master
  • #78 that can merge to develop

Take the one you want and discard the other one.

The first one only revert commit bb21c1a, while the second pull request revert commit bb24c1a and commit 8d8c15b. All this is explained in my previous comment in this thread.

The pull request has been merged the the develop branch has been tested by myself: it works like a charm!

It could be cool now to merge develop to master and possibly to add a tag on a commit to a specific version tag, and why not releasing a version...

By the way, why did you decide to rename Apaxy to package-Apaxy ? It appears to be a strange decision to my mind...

@oupala Good stuff! I'll go ahead and merge develop into master in the next couple of days (just super busy at the moment.)

The reason I renamed it is because I moved my project pages into their own GitHub repo's so my main website repo was less cluttered. Unfortunately, I couldn't keep this repo named Apaxy and use GitHub project pages with the same name as it was causing weird redirects. Appending with packgage- was the best system I could come up with for renaming repos that have downloadable content.

Is there a better way I could do this?

Great news @AdamWhitcroft I'll stick with the develop branch until you merge.

I see what you wanted to do: separate your github pages from you real repo. But the right way to do that is to have a separate gh-pages as you have in the original Apaxy repository.

But why do you want to do that? You're not using the gh-pages for Apaxy? And you now have to maintain twice more repository than before...

@oupala I wasn't aware I could do that :/ So you're saying I could have 1 repo called apaxy (it needs to be lowercase for the url), and have the main Apaxy package download in the master branch, and use the gh-pages branch for the static website files for http://adamwhitcroft.com/apaxy?

If so, mind blown.

Edit: I've read up on how to do it! Thanks so much for the suggestion, that definitely makes things so much easier!

Explanations are here : https://pages.github.com/

Tell us if you change apaxy name back to apaxy! :-)

Hi, i find this again:

put .htaccess under /share (content is from https://github.com/programster/Apaxy/blob/master/apaxy/htaccess.txt)
put theme under /

But the style can not be applied

Hi @daixiang0 !

Please open a new issue to discuss about your problem.

Can this be closed? It looks like the original problem was resolved.

The problem is resolved by commits merged into develop. So master branch is not (yet) fixed.

Once @AdamWhitcroft merge develop into master, then - yes - I do agree with you that this issue should be closed.

And I'm hardly waiting for this. We need master branch to be bug-free as much as possible. This is what a master branch is for.

All tasks mentioned in this thread have been completed. It's time to close this issue.