简体   繁体   English

FIWARE Wirecloud:实际使用哪些模板文件?

[英]FIWARE Wirecloud: which template files are actually used?

We are customizing a Wirecloud installation to provide our own branding, text and header links. 我们正在定制Wirecloud安装,以提供我们自己的品牌,文本和标题链接。 We have created a subtheme to the 'defaulttheme' and are overlaying our own template, images and sccs files to accomplish our customization. 我们已经为'defaulttheme'创建了一个子主题,并覆盖了我们自己的模板,图像和sccs文件来完成我们的自定义。

We have managed to change the header image, landing page and a few other bits, but are hampered by the following: 我们设法更改了标题图片,着陆页和其他一些内容,但受到以下因素的限制:

  1. The generated HTML provides no clues as to which template it originated from (we think?) 生成的HTML没有提供关于它来自哪个模板的线索(我们认为?)
  2. Documentation here: https://wirecloud.readthedocs.io/en/stable/development/platform/themes/ specifies a number of template files, but not all of the template. 这里的文档: https//wirecloud.readthedocs.io/en/stable/development/platform/themes/指定了许多模板文件,但不是所有模板。 For example we cannot find the place where the 'Sign in' button is defined. 例如,我们找不到定义“登录”按钮的位置。
  3. The wirecloud javascripts seem to insert random bits of html for what should be boilerplate stuff. wirecloud javascripts似乎插入了html的随机位,用于什么应该是样板的东西。 For example a 'Powered by wirecloud' icon appears at the bottom of the screen. 例如,屏幕底部会显示“Powered by wirecloud”图标。 The 'get more components' button appears out of nowhere and we cannot disable it. “获取更多组件”按钮无处不在,我们无法禁用它。
  4. Many of the generated elements do not have an id, so it is difficult to disable or identify them in a sccs file. 许多生成的元素没有id,因此很难在sccs文件中禁用或识别它们。 The 'get more components' button for example is not relevant for us, but we cannot remove it (so far). 例如,“获取更多组件”按钮与我们无关,但我们无法将其删除(目前为止)。

Does anyone have a completed custom theme we can look at? 有没有人有我们可以看到的完整自定义主题? Or can someone point out which template files / sccs files are used for branding and overall look-and-feel? 或者有人可以指出哪些模板文件/ sccs文件用于品牌和整体外观?

  1. True, currently WireCloud doesn't print any comment not any other clue for detecting from what template the html was generated. 没错,目前WireCloud不打印任何评论,也没有任何其他线索来检测html生成的模板。
  2. Some parts are not generated using templates, for example, the "Sign in" button. 某些部件不是使用模板生成的,例如“登录”按钮。 I recommend you to create a ticket in the issue tracker for each thing you want to customise and you don't find how to do it, so we will be able to give you a better answer, and to create a template if needed. 我建议您在问题跟踪器中为要自定义的每件事创建一个票证,但是您找不到如何操作,因此我们将能够为您提供更好的答案,并在需要时创建模板。
  3. Remember that you have to include a "Powered by WireCloud" to comply with the WireCloud license. 请记住,您必须包含“Powered by WireCloud”以符合WireCloud许可证。 In the other hand, the "get more components" button can be removed by editing the wirecloud/workspace/wallet/wallet.html template, by removing the following code: 另一方面,通过删除以下代码,可以通过编辑wirecloud/workspace/wallet/wallet.html模板来删除“获取更多组件”按钮:

     <s:southcontainer> <t:addmore/> </s:southcontainer> 
  4. Well, this can also be discussed and documented. 嗯,这也可以讨论和记录。 We usually don't use ids because those elements are better located using some kind of selector. 我们通常不使用id,因为使用某种选择器可以更好地定位这些元素。

Anyway, we are working to improve the documentation about themes ASAP. 无论如何,我们正在努力尽快改进主题文档。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM