-
-
Notifications
You must be signed in to change notification settings - Fork 100
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
Guide rework #77
Comments
How about using https://github.com/scrivo/highlight.php instead of JS version? |
Because Hightlight.js is widely used? It is almost an industry standard. |
I would also like the class para be removed :)
I find it to be disturbing, and it works anyway. |
I think it would be wise to use the best of breed tools available. |
Just wanted to add another reason to do highlighting on the client: There is no render specific code in the source so it is easy to update/upgrade/change the renderer - a new theme, maybe, another engine.. |
@jacmoe we're going to have news. Probably user submitted news and articles as well. These are to provide RSS where it's good to have highlighted code. Which can't be done in JavaScript. Thus highlight.php. It's a direct port of highlight JS using its definition files. |
How about using the php script then for the RSS feed? And then hightlight.js for the rest? Best of both worlds, I think. Hightlight.js has over 6 thousand stars and over 1 thousand forks. 2015-11-27 21:43 GMT+01:00 Alexander Makarov notifications@github.com:
|
I know, I've participated in the project long time ago. Still it worth trying PHP one. |
I said: why not use both? :) EDIT: |
Could be used but I see no big reason not to use PHP everywhere... |
From what I see it requires that the pre code tags be changed throughout the project, or am I being mistaken? I like the railscasts theme, by the way. :) |
About the TOC and the guide .. How about wrapping the indivudual pages in divs and mark them up with Bootstrap grid classes so that we don't need special handling for the headers? I will make a test with the intro-yii page and link to it from Pastebin when I am done. |
It turned out to be easy enough: Basically, wrap the page in
Inside the row div, of course. And the last scrollnav needs the first header that is not included in the toc div. |
Guide files are pre-rendered and simply delivered on request so using php highlight is the most efficient and most compatible option. |
So, I am now going to As long as it gets to look the best it can be, I am fine with it. :) Then there is still page TOC and the use of blockquotes in the guide.. The page TOC needs to be dealt with, but it is probably trivial - see my posts above. |
So, I am doing this:
|
I am writing on the Getting started page right now and will be putting the library to the test. |
I have idea how if we create gif for installation step.. simple gif I use this tool https://screentogif.codeplex.com/downloads/get/1480830 |
if the animation is too long, gif lacks the possibilty of jumping forward/backward and pause it. I do not think a gif is a good idea in this case. |
@jacmoe current implementation of the guide navigation on the right adds a hash to the current url when I click to open a topic. This makes the page jump around. Imo that should be removed. |
I agree but it is the generated data, so it should be changed there, guide
and API.
|
It is the hash tags in the headers that needs to be removed. I guess
@samdark thought that it was a good idea at the time?
Also, as I wrote elsewhere -I am on my phone right now- the page needs some
additional work to accomodate the scrollspy at the right of the page..
|
fixed: 972cd34 |
@jacmoe about #77 (comment). |
<div class="row">
<div class="col-md-12 col-lg-10">
page content
</div>
<div class="col-lg-2 visible-lg">
<nav id="scrollnav" data-spy="affix">
<ul class="nav hidden-xs hidden-sm">
<li><a href="#what-is-yii">What is Yii?</a></li>
<li><a href="#what-is-yii-best-for">What is Yii Best for?</a></li>
<li><a href="#how-does-yii-compare-with-other-frameworks">How does Yii Compare with Other Frameworks?</a></li>
<li><a href="#yii-versions">Yii Versions</a></li>
<li><a href="#requirements-and-prerequisites">Requirements and Prerequisites</a></li>
</ul>
</nav>
</div>
</div> Then, a small addition to the div.toc at the top of the page needs to be done, adding the class 'hidden-lg': <div class="toc hidden-lg"><ol><li><a href="#what-is-yii-best-for">What is Yii Best for?</a></li>
<li><a href="#how-does-yii-compare-with-other-frameworks">How does Yii Compare with Other Frameworks?</a></li>
<li><a href="#yii-versions">Yii Versions</a></li>
<li><a href="#requirements-and-prerequisites">Requirements and Prerequisites</a></li></ol></div> The pastebin link contains the modified yii start page, but the changes that I outlined here is all that is needed to get this nice scrollspy :) |
Notice that the first header - What is Yii - is not included in the div.toc, but should be included in the (new) scrollnav at the bottom. |
Beautiful work @cebe 👍 |
this just updates the apidoc package and adjust some styling. the actual implementation is in the package. issue #77
we now have highlight.php in apidoc |
please create development server so we can watch day to day changes @jacmoe |
I will set up a box on digitalocean |
http://yiiframework.domain-na.me/ |
Great! 👍 |
It really looks awesome using the new highlighter :) |
seems people have translated these indicators :-/
|
otherwise parsing them is not easy. also translation becomes redundant. We now introduce a json file to have translations for these blocks in a central place. see also yiisoft-contrib/yiiframework.com#77 (comment)
addings css classes to Info, Note, Warning and Tip boxes. yiisoft-contrib/yiiframework.com#77
@jacmoe apidoc now renders CSS classes on the block quotes which can be used to style them. |
There is one thing that bothers me about the blockquotes and that is the words:
They are redundant once the blockquotes have been styled. Also, the icons that @eshill proposed in #94 could be replaced by FontAwesome because they look better (and because that icon font has a much better license. The glyph icons will be removed from Bootstrap 4). And, finally: |
Not really, they make it explicit, what the icon actually means. I think we should keep them. Otherwise we would need a meta document explaining the icons imo. They also make it more accessible in case icons are invisible on screenreader or similar thing.
If we agree on removing them this can easily be done in the renderer.
No, they are different, see https://github.com/yiisoft/yii2/blob/master/docs/documentation_style_guide.md#blocks |
I think we should compare the completely styled versions. removing the "Info:" from the text is easy once we have it. |
could you come up with other arguments that do not include "stupid", "Silly" and are more objective please? Also "someone else is doing this" does not justify something on its own. Bootstrap is very minimal. With color and icon the messages stands out more so they are more visible. I think @eshill's layout is already really nice, unless there are big issues with it, we should just go with it and not waste time in dicussing details. We can always change things later, its important to get it done now. |
Get lost |
all needed changes has been done, issue closed |
Some changes needs to be done in the guide. :)
Page toc
Not sure how that is supposed to work but maybe export a small json file for each page with the headers?
Or simply just a regular php that renders the scrollspy toc?
Because of large screens there will be a scrollspy to our right for easy page level navigation.
Like here: http://testing.jacmoe.dk/guide.html
Source code highlight
Should only be
Optionally, it could be with a class:
But Hightlight.js is intelligent enough to choose the right language.
Other changes
It looks better.
Instead of just using a blockquote and the word Info:
We have to agree on what markup to use, but it will be much better looking.
The text was updated successfully, but these errors were encountered: