Godoc样式表和JavaScript

huangapple go评论75阅读模式
英文:

Godoc stylesheet and javascript

问题

我知道Godoc -html只生成没有样式表和JavaScript的HTML,但一旦生成了,我从哪里获取这些内容呢?

我从godoc.org获取了CSS和JS,但似乎JS与godoc生成的HTML标记不兼容。

我只是想尝试一下而不使用godoc server

示例标记:

<div id="pkg-overview" class="toggleVisible">
    <div class="collapsed">
		<h2 class="toggleButton" title="点击显示概述部分">概述 ▹</h2>
	</div>
	<div class="expanded">
		<h2 class="toggleButton" title="点击隐藏概述部分">概述 ▾</h2>
		<p>Hello World</p>
	</div>
</div>
英文:

I know Godoc -html generates HTML only without stylesheets and javascript, but once generated where can I get those from?

I got css and js from godoc.org but it seems the js doesn't work with the html markup that is generated by godoc

I just want to try this out without using godoc server

Example markup:

&lt;div id=&quot;pkg-overview&quot; class=&quot;toggleVisible&quot;&gt;
    &lt;div class=&quot;collapsed&quot;&gt;
		&lt;h2 class=&quot;toggleButton&quot; title=&quot;Click to show Overview section&quot;&gt;Overview ▹&lt;/h2&gt;
	&lt;/div&gt;
	&lt;div class=&quot;expanded&quot;&gt;
		&lt;h2 class=&quot;toggleButton&quot; title=&quot;Click to hide Overview section&quot;&gt;Overview ▾&lt;/h2&gt;
		&lt;p&gt;Hello World
        &lt;/p&gt;
	&lt;/div&gt;
&lt;/div&gt;

答案1

得分: 3

你可以尝试查看tools#hg/godoc/static

你会找到一个godoc/static/godocs.js,可能会有所帮助。

它被godoc/static/godoc.html使用。

godoc.html还使用了:

英文:

You can try and have a look in tools#hg/godoc/static

You will find a godoc/static/godocs.js which might help.

It is used by godoc/static/godoc.html anyway.
godoc.html also uses:

huangapple
  • 本文由 发表于 2014年10月7日 20:56:05
  • 转载请务必保留本文链接:https://go.coder-hub.com/26236557.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定