Stream: Google Code-in

Topic: Website


view this post on Zulip Lucas Prieels (Jan 06 2018 at 13:46):

For the task "WEB: Make wiki CSS stylesheet theme match main website", can we change the HTML file or only the CSS?

view this post on Zulip Sean (Jan 06 2018 at 15:26):

@Lucas Prieels you can change the HTML, but for that it would be better if you modified the source template files -- which I think is all checked into our github repo.

view this post on Zulip Sean (Jan 06 2018 at 15:27):

https://github.com/BRL-CAD/web

view this post on Zulip Sean (Jan 06 2018 at 15:28):

you may want to compare with what is in https://github.com/BRL-CAD/brl-cad-wiki

view this post on Zulip Lucas Prieels (Jan 07 2018 at 01:07):

@ sean I don't see what the second link is, I didn't find any HTML file in it.
Also, I'd like to change theHTML header because the association with the colors pink and black from http://brlcad.org and the image which is in the wiki header now is really ugly but I don't know how to do it: I can only change the headers of the files one by one? I suppose (and mostly hope :)) that there's a faster way, right?

view this post on Zulip Lucas Prieels (Jan 07 2018 at 01:18):

@Sean

view this post on Zulip Sean (Jan 07 2018 at 07:14):

the second link is an installation of mediawiki with the theme adjusted to more closely match the main website

view this post on Zulip Sean (Jan 07 2018 at 07:14):

however it was done a couple years ago and is out of sync

view this post on Zulip Sean (Jan 07 2018 at 07:14):

and never fully completed iirc

view this post on Zulip Sean (Jan 07 2018 at 07:15):

sorry, not an installation of mediawiki -- it's a proper mediawiki THEME

view this post on Zulip Sean (Jan 07 2018 at 07:16):

it just drops into mediawiki and can be selected -- to test it, you'd need to install mediawiki somewhere

view this post on Zulip Sean (Jan 07 2018 at 07:16):

but it's "the proper way"

view this post on Zulip Lucas Prieels (Jan 07 2018 at 16:37):

@Sean Ok I'll try it. And what about my other question?

view this post on Zulip Jeff Sieu (Jan 07 2018 at 16:39):

Not sure if this can apply to your case, but you can try Control-Shift-F to search for all instances of a certain string in all files of a directory (for Sublime Text at least).

view this post on Zulip Lucas Prieels (Jan 07 2018 at 16:57):

Not sure if this can apply to your case, but you can try Control-Shift-F to search for all instances of a certain string in all files of a directory (for Sublime Text at least).

I didn't know we could search in an entire directory with Subkime. Thanks a lot, that really helps!

view this post on Zulip Mahdi (Jan 07 2018 at 16:57):

Sublime ftw

view this post on Zulip Sean (Jan 07 2018 at 18:30):

grep works too :P

view this post on Zulip Sean (Jan 07 2018 at 18:31):

and will recursively walk an entire tree

view this post on Zulip Sean (Jan 07 2018 at 18:31):

nearly every IDE has such an option too including emacs, vim, sublime, visual code, etc

view this post on Zulip Lucas Prieels (Jan 08 2018 at 19:12):

I don't know if you're aware, but I've seen a few broken links on the wiki:
http://brlcad.org/wiki/Google_Summer_of_Code/Project_Ideas#Mentors
http://brlcad.org/wiki/Help:Contents
http://brlcad.org/wiki/MGED_CMD_preview
(these are pages where we can see red links)

view this post on Zulip Lucas Prieels (Jan 08 2018 at 21:21):

(deleted)

view this post on Zulip Lucas Prieels (Jan 09 2018 at 16:58):

Also, I subscribed for an account in BRL-CAD and the confirmation mail arrived in my spams (gmail). That's a bit disturbing but I don't know if you can do anything for that

view this post on Zulip Jeff Sieu (Jan 09 2018 at 17:15):

Doesn't for me..

view this post on Zulip William Cook (Jan 09 2018 at 18:13):

Hi @LordOfBikes , did u get a chance to look at the site i submitted for the LibreCAD onepager?

view this post on Zulip William Cook (Jan 09 2018 at 18:14):

No rush, i was just wondering u liked it :wink:

view this post on Zulip Lucas Prieels (Jan 09 2018 at 21:14):

I may need a little help :). I'd like to change all the "headers" div in all the file of the website. I used for that search and replace but the problem is that in a lot of the files, there are comments between the lines so I can't run replace with

<div class="header" id="header">
            <table class="menutable">
                <tr>
                    <td valign="top" class="menu">
                        <div ><a href="../../d/download/" class="menu">download</a></div>
                    </td>
                    <td valign="top" class="menu">
                        <div ><a href="https://www.facebook.com/BRL-CAD-387112738872/" class="menu">news</a></div>
                    </td>
                    <td valign="top" class="menu">
                        <div ><a href="../../d/about" class="menu">about</a></div>
                    </td>
                    <td valign="top" class="logomenu">
                        <img href="../../" src="../../img/logo_color.png" class="logo">
                    </td>
                    <td valign="top" class="menu">
                        <div ><a href="../../wiki/" class="menu">docs</a></div>
                    </td>
                    <td valign="top" class="menu">
                        <div onclick="menu_support()onclick="menu_docs()""><a href="https://sourceforge.net/projects/brlcad/support" class="menu">support</a></div>
                    </td>
                    <td valign="top" class="menu">
                        <div ><a href="../../gallery/" class="menu">gallery</a></div>
                    </td>
                </tr>
            </table>
        </div>

I searched on the internet but didn't find anything. Anyone know how to exclude comments from the search? Thanks

view this post on Zulip William Cook (Jan 09 2018 at 21:16):

sry gimme a sec to read

view this post on Zulip Lucas Prieels (Jan 09 2018 at 21:17):

The code isn't important, just the last question :) but thanks

view this post on Zulip William Cook (Jan 09 2018 at 21:18):

Wdym comments between ?

view this post on Zulip Lucas Prieels (Jan 09 2018 at 21:21):

Like if I searched for the code above, it would not find that for example:

<div class="header" id="header">
            <table class="menutable">
                <tr>
                    <td valign="top" class="menu">
                        <div ><a href="../../d/download/" class="menu">download</a></div>
                    </td>
                    <td valign="top" class="menu">
                        <div ><a href="https://www.facebook.com/BRL-CAD-387112738872/" class="menu">news</a></div>
                    </td>
                    <td valign="top" class="menu">
                        <div ><a href="../../d/about" class="menu">about</a></div>
                    </td>
                    <td valign="top" class="logomenu">
                        <img href="../../" src="../../img/logo_color.png" class="logo">
                    </td>
                    <td valign="top" class="menu">
                        <div ><a href="../../wiki/" class="menu">docs</a></div>
                    </td>
                    <td valign="top" class="menu">
<!-- Comment here-->
                        <div onclick="menu_support()onclick="menu_docs()""><a href="https://sourceforge.net/projects/brlcad/support" class="menu">support</a></div>
                    </td>
                    <td valign="top" class="menu">
                        <div ><a href="../../gallery/" class="menu">gallery</a></div>
                    </td>
                </tr>
            </table>
        </div>

view this post on Zulip William Cook (Jan 09 2018 at 21:23):

oh ok, dont search for the entire block of code, only search for the class, then skim through the results to find the corresponding code

view this post on Zulip Lucas Prieels (Jan 09 2018 at 21:25):

The problem is that there are more than 5,000 files :)

view this post on Zulip William Cook (Jan 09 2018 at 21:31):

Wtf, is it a website?

view this post on Zulip Mahdi (Jan 09 2018 at 21:31):

You could write a program that does that, right? It shouldn't take more than a couple of minutes with fast i/o

view this post on Zulip Mahdi (Jan 09 2018 at 21:32):

Python would probably be a quick way because it provides libraries for that

view this post on Zulip Mahdi (Jan 09 2018 at 21:34):

Are you trying to replace the headers for the website with the one from the github repo?

view this post on Zulip William Cook (Jan 09 2018 at 21:36):

How is there 5000 files?

view this post on Zulip Mahdi (Jan 09 2018 at 21:36):

That does seem odd

view this post on Zulip Lucas Prieels (Jan 09 2018 at 21:37):

Wtf, is it a website?

Yes, the BRL-CAD's one

Are you trying to replace the headers for the website with the one from the github repo?

Yeah, and I don't know a lot about sublime's plugins but I'll try thanks

view this post on Zulip William Cook (Jan 09 2018 at 21:37):

No way, did u write the code from scratch or used a generator?

view this post on Zulip William Cook (Jan 09 2018 at 21:37):

Im not being mean : )

view this post on Zulip Lucas Prieels (Jan 09 2018 at 21:38):

That's the one which is currently the wiki. I've just downloaded it

view this post on Zulip Lucas Prieels (Jan 09 2018 at 21:38):

no worry :)

view this post on Zulip William Cook (Jan 09 2018 at 21:38):

Impossible, do u mean 5000 files or 5000 lines of code?

view this post on Zulip Mahdi (Jan 09 2018 at 21:40):

oh well if you're using sublime you can use this instead

view this post on Zulip Mahdi (Jan 09 2018 at 21:40):

http://docs.sublimetext.info/en/latest/search_and_replace/search_and_replace_files.html

view this post on Zulip Lucas Prieels (Jan 09 2018 at 21:40):

files
there are 5000 files but not all of them are html, there are pictures,... But I think there are still more than 1000 coding files

view this post on Zulip William Cook (Jan 09 2018 at 21:41):

I would download the files manually, manually meaning copy and paste the code

view this post on Zulip Mahdi (Jan 09 2018 at 21:42):

Make sure you only open just the .html files

view this post on Zulip Lucas Prieels (Jan 09 2018 at 21:42):

I've seen that but excluding comments isn't explained

view this post on Zulip William Cook (Jan 09 2018 at 21:42):

Wait did u download the entire wiki or just one html page?

view this post on Zulip Lucas Prieels (Jan 09 2018 at 21:43):

Yeah, but there are still hundreds of files including one by user, the wiki talks,...
the entire wiki

view this post on Zulip William Cook (Jan 09 2018 at 21:43):

Oh ok, that makes since, i thought u meants one of the wiki pages lol

view this post on Zulip Mahdi (Jan 09 2018 at 21:45):

You could get everything that starts with the first line until the last

view this post on Zulip Mahdi (Jan 09 2018 at 21:45):

this will delete the comments though

view this post on Zulip Mahdi (Jan 09 2018 at 21:47):

Otherwise write a program to parse the files and skip at each comment line

view this post on Zulip Lucas Prieels (Jan 09 2018 at 21:52):

Yeah, I don't know if the comments are important. I don't know how to do that but I'll search thanks

view this post on Zulip Mahdi (Jan 09 2018 at 21:52):

Also, you might want to read about regex for sublime

view this post on Zulip Mahdi (Jan 09 2018 at 21:53):

That could be somewhere to start

view this post on Zulip Mahdi (Jan 09 2018 at 22:03):

I wonder how web developers handle it? I personally don't do web stuff so you would think they would come up with a better way

view this post on Zulip William Cook (Jan 09 2018 at 22:05):

Im sure there is, its just hard to figure it out without doing it first hand lol

view this post on Zulip Mahdi (Jan 09 2018 at 22:06):

I still think making a parser is the easiest way to do it

view this post on Zulip Mahdi (Jan 09 2018 at 22:06):

Most modern languages come with libraries that would make this really easy

view this post on Zulip William Cook (Jan 09 2018 at 22:08):

(deleted)

view this post on Zulip Sean (Jan 12 2018 at 19:25):

How is there 5000 files?

if I had to guess, there's an export of BRL-CAD source code API documentation in there, which is quite extensive

view this post on Zulip Sean (Jan 12 2018 at 19:25):

the wiki is "only" a few hundred pages

view this post on Zulip Sean (Jan 12 2018 at 19:26):

at least, I think .. I suppose there could be thousands of files by now if you count image uploads too

view this post on Zulip Sean (Jan 13 2018 at 05:51):

@Lucas Prieels I think this is the best wiki style fixup I've seen so far

view this post on Zulip Lucas Prieels (Jan 13 2018 at 05:54):

The one I submitted?

view this post on Zulip Sean (Jan 13 2018 at 05:55):

no, the one you didn't submit .... ;)

view this post on Zulip Mahdi (Jan 14 2018 at 16:22):

https://screenshots.firefox.com/g6ppMqju7xpTswqB/brlcad.org

view this post on Zulip Naseef (Jan 14 2018 at 16:23):

That's your new stylesheet?

view this post on Zulip Mahdi (Jan 14 2018 at 16:23):

What do you guys think about that style?

view this post on Zulip Naseef (Jan 14 2018 at 16:24):

Awesome! Colors like in the main page.

view this post on Zulip Mitesh (Jan 14 2018 at 16:24):

It looks amazing

view this post on Zulip Jeff Sieu (Jan 14 2018 at 16:26):

I wonder what does the whole page look like?

view this post on Zulip Mahdi (Jan 14 2018 at 16:28):

I haven't really finished the whole website yet haha

view this post on Zulip Mahdi (Jan 14 2018 at 16:29):

I was thinking of adding a dynamic header and an animated table of contents

view this post on Zulip Lucas Prieels (Jan 15 2018 at 16:32):

@Mahdi Did you finish your website in time?

view this post on Zulip Jeff Sieu (Jan 15 2018 at 16:32):

There's still another 3 days, right? Provided the current task is the website one.

view this post on Zulip Rahil Malik (Jan 15 2018 at 16:34):

yup , just the last day will be 17th jan and no extensions probably

view this post on Zulip Jeff Sieu (Jan 15 2018 at 16:35):

Yes, it's a definite no extensions. Set by Google itself/themselves.

view this post on Zulip Lucas Prieels (Jan 15 2018 at 16:59):

Yes but you have to claim a follow-on task to finish it properly, so you have to do it now :)

view this post on Zulip Lucas Prieels (Jan 15 2018 at 17:36):

Everyone, who did the CSS task eventually? @William Cook @Mitesh @Naseef @Mahdi

view this post on Zulip Naseef (Jan 15 2018 at 17:37):

I didn't do any CSS tasks for BRL-CAD.

view this post on Zulip Mitesh (Jan 15 2018 at 17:39):

i did only one css task

view this post on Zulip Lucas Prieels (Jan 16 2018 at 18:25):

@Sean for the second CSS task, all I have to do is change the css file or do I have to do some changes using WikiMedia?

view this post on Zulip Sean (Jan 17 2018 at 15:18):

there's not enough time now, but the idea was to get it working with mediawiki, nothing really to do with the css file


Last updated: Oct 09 2024 at 00:44 UTC