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

Improve page layout and CSS stylesheets #1

Open
lahwaacz opened this Issue Aug 29, 2017 · 11 comments

Comments

Projects
None yet
2 participants
@lahwaacz
Copy link
Owner

lahwaacz commented Aug 29, 2017

The website needs to improve the layout of its pages and provide some CSS stylesheets. I can't do it myself, so here is a quickstart guide for the contributors. One day it will appear in the README, when it exists...

  1. Install the dependencies: python-django, python-requests, pyalpm, mandoc (if you want to install it side-by-side with the man-db and groff packages, I use this modified PKGBUILD).
  2. Fork this repository, clone the fork and change into its directory.
  3. Copy mysite/local_settings.py.example to mysite/local_settings.py and edit DEBUG = True and the SECRET_KEY variable.
  4. Configure a connection to a PostgreSQL server in the Django database settings in the mysite/local_settings.py file.
  5. Initialize the Django database by running ./manage.py makemigrations and ./manage.py migrate.
  6. Start the development web server with ./manage.py runserver. The site should be available at http://localhost:8000, saying that there are 0 man pages and 0 packages (because they were not imported yet). The server will automatically reload when you make changes to the webapp code or templates.
  7. Run the update.py script to import some man pages. However, note that the full import requires to download about 7.5 GB of packages from a mirror of the Arch repos and then the extraction takes about 20-30 minutes. (The volume of all man pages is less than 300 MB though.) If you won't need all man pages for the development, you can run e.g. update.py --only-repos core to import only man pages from the core repository (the smallest one, download size is about 160 MB) or even update.py --only-packages coreutils man-pages.

That's it! Your testing website should now be (almost) fully functional, depending on how many packages you imported. Navigate to the URL of some man page and verify that it's HTML version is actually served.

Before you start working on the design, note that:

  • the CSS stylesheets are archweb_manpages/static/archweb_manpages/*.css
  • the templates for the HTML pages are stored in archweb_manpages/templates/. See The Django template language for details.

Of course if something doesn't work or you need more help, just let me know!

@parasharrajat

This comment has been minimized.

Copy link

parasharrajat commented Oct 2, 2017

hey ...there is some problem with migrations ...actually there are none migrations...
./manage.py makemigations gives no changes detected. It means that migrations are
generated but when i run $ ./manage.py migrate. this output shows up
Operations to perform: Apply all migrations: (none) Running migrations: No migrations to apply.

Now i dont know what is happening and on webpage this is the output.
Request Method: | GET -- | -- http://127.0.0.1:8000/ 1.11.2 ProgrammingError relation "archweb_manpages_manpage" does not exist LINE 1: SELECT COUNT(*) AS "__count" FROM "archweb_manpages_manpage" ^ /usr/lib/python3.6/site-packages/django/db/backends/utils.py in execute, line 65 /usr/bin/python 3.6.2 ['/home/anonymous/dev/projects/archweb_manpages', '/usr/lib/python36.zip', '/usr/lib/python3.6', '/usr/lib/python3.6/lib-dynload', '/usr/lib/python3.6/site-packages'] Mon, 2 Oct 2017 22:08:54 +0000
As seen there are no tables in database ..
Sorry Forgot to tell you before I don't have any experience with python..want to contribute to design.

@lahwaacz

This comment has been minimized.

Copy link
Owner

lahwaacz commented Oct 3, 2017

Hi, are you setting up the project right now or are you trying to update a database created by some older commits in the repo? Is your database PostgreSQL?

In the first case, ./manage.py makemigrations should still create the initial migration (0001_initial.py in the archweb_manpages/migrations/ directory) which creates all the tables. Does it help if you create the archweb_manpages/migrations/ directory manually?

@parasharrajat

This comment has been minimized.

Copy link

parasharrajat commented Oct 3, 2017

i m setting the project for the first time and yeah my db is PS.
that's the problem . there is no migrations and no archweb_manpages/migrations/ directory.

Oh great <
i manually created the directory as you said and it worked..why it is not creating the directory automatically and still says OK? any opinion! just asking for curiosity...
thanks.

@lahwaacz

This comment has been minimized.

Copy link
Owner

lahwaacz commented Oct 3, 2017

If only I knew why it is a problem... I'll include it in the repository so that others don't have this problem again.

Anyway, I'm glad you got it working! Of course feel free to ask again if you have more problems.

@parasharrajat

This comment has been minimized.

Copy link

parasharrajat commented Oct 3, 2017

i have some topic to discuss. Is it ok to ask here ... because over time this page can become lengthy .

@lahwaacz

This comment has been minimized.

Copy link
Owner

lahwaacz commented Oct 3, 2017

Long pages are probably inevitable anyway, so ask wherever you feel is the best place. I don't mind if this page becomes very long...

@parasharrajat

This comment has been minimized.

Copy link

parasharrajat commented Oct 3, 2017

Ok ..

  1. Can i use JS or have to stick with CSS only approach?
  2. do you want social sharing to be added?
  3. can I change layout of the page ?
  4. can i use any UI framework?
  5. Do have any choice and something that should be presented your way?

Sorry for bad communication and these stupid question ...damn beginner...

@lahwaacz

This comment has been minimized.

Copy link
Owner

lahwaacz commented Oct 3, 2017

I would like to keep the design as simple as possible, i.e. without javascript and UI frameworks. I don't think that the website will ever get so big that doing most things from scratch is too difficult or laborious. Though if you have an idea where javascript is very useful, I might reconsider.

What do you mean by "social sharing"? I'm probably against, similarly to the previous point.

Feel free to change the layout, it's not fixed. Only the layout of the man page content is tied with the mandoc converter – they have a CSS stylesheet which I eventually almost entirely copy-pasted into our man_page.css.

You should also know, that when we are ready, we would like to propose the website to become an official Arch project, so you might want to count with that for the design.

Finally, I think it would be best to start with small pieces and show the intermediate results often, so that we can discuss the changes as they reveal. I would hate to force you to redo something or even say "no" to something which took you a lot of time to complete. Good luck and thanks for your interest to work on this!

@parasharrajat

This comment has been minimized.

Copy link

parasharrajat commented Oct 3, 2017

you are right . I guessed your intentions but didn't clear about that so i asked.
I was suggesting react.js for components but forget that you have taken the project so far so it will be hard to mess up now, there are a lot on the todo list.
Last question before i will start working. Does website theme should be similar to official arch website ?
I also have one point to add to Todo list . after finishing the project we can consider to add thread links from arch wiki to package manuals and similarly manual links on wiki pages.

@lahwaacz

This comment has been minimized.

Copy link
Owner

lahwaacz commented Oct 3, 2017

Regarding the theme, it would be probably good if the colors match etc, but it does not have to be a precise copy. Creativity is always welcome and even the official website could be improved a lot 😉

I'm not sure if I understand the Todo list item properly. The Arch wiki has a Template:man which already points to this site.

@parasharrajat

This comment has been minimized.

Copy link

parasharrajat commented Oct 3, 2017

Oh ... I don't know about Template:man not a wiki editor so far. Thanks for help .now i contact you when something has been done.

@lahwaacz lahwaacz referenced this issue Oct 3, 2017

Open

Missing README #3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment