简体   繁体   English

逆向工程/自定义流星LocalMarket示例应用程序

[英]Reverse Engineering / Customizing Meteor LocalMarket example app

I want to reverse engineer the Meteor example app "LocalMarket" and make something with a similar design for a different niche. 我想对Meteor示例应用程序“ LocalMarket”进行逆向工程,并针对不同的细分市场采用类似的设计。 The problem I'm having is I almost don't even know where to begin, for changing the navigation. 我遇到的问题是,我几乎不知道从哪里开始更改导航。

According to the official Meteor tutorial, when we create our meteor app it creates a folder with a .js file, an .html file, a .css file, and a .meteor folder. 根据官方的流星教程,当我们创建流星应用程序时,它将创建一个包含.js文件,.html文件,.css文件和.meteor文件夹的文件夹。

But the LocalMarket app has the .meteor folder and then several other folders: 但是LocalMarket应用程序具有.meteor文件夹,然后还有其他几个文件夹:

client, cordova-build-override, lib, public, resources, server. 客户端,cordova-build-override,lib,public,资源,服务器。

There's also a mobile-config javascript file and a readme doc. 还有一个移动配置的javascript文件和自述文件。

I (sort of) don't understand why there are separate folders for client and server and so many different style sheets. 我(有点)不明白为什么会有用于客户端和服务器的单独文件夹以及这么多不同的样式表。 But that's kind of beside the point. 但这有点不重要。

Long story short (and you have to run the app with Meteor to see what I mean for this question): I want to change the navigation text, icons, and links: Home, What's Cooking, Recipes, Bookmarks, About, while keeping that awesome menu style and probably just modifying the existing pages to avoid having to rename everything. 长话短说(您必须与Meteor一起运行应用程序才能明白我对这个问题的意思):我想更改导航文本,图标和链接:首页,烹饪方法,食谱,书签,关于,同时保留该内容很棒的菜单样式,可能只是修改现有页面,以避免必须重命名所有内容。 Though if you have suggestions for easily renaming the pages I'm all for it. 尽管如果您有关于轻松重命名页面的建议,我全力以赴。

In templates\\app-body.html it looks like the menu structure is defined. 在templates \\ app-body.html中,似乎已定义了菜单结构。 For example 例如

<a href="{{pathFor 'about'}}" class="{{activePage 'about'}}">
        <span class="wrapper-menu-item">
          <span class="icon-question"></span>
          <span class="title-menu">About</span>
        </span>
      </a>

links to the Bookmarks page. 链接到“书签”页面。

But I am not finding the styling for any of the classes listed, except in a "merged-stylesheets.css" document in .meteor\\local\\build\\programs. 但是,除了在.meteor \\ local \\ build \\ programs中的“ merged-stylesheets.css”文档中,我找不到列出的任何类的样式。

Is it okay to modify merged-stylesheets.css though? 可以修改merged-stylesheets.css吗? I thought the .meteor folder was not for app developers to modify. 我以为.meteor文件夹不适合应用程序开发人员修改。 Am I wrong about that? 我对此有误吗?

I do see the classes in there, ie: 我确实看到那里的课程,即:

icon-question:before {
  content: "\e613";   

but I am not finding that "e613" reference anywhere. 但我找不到任何地方的“ e613”参考。

Any insight on changing out the navigation icons, text, and links for the different pages in the LocalMarket example app based on the specific issues I've mentioned, would be appreciated. 对于基于我提到的特定问题而在LocalMarket示例应用程序中更改导航图标,文本和不同页面的链接的任何见解,将不胜感激。

Any ways to change the page titles, and change everything app-wide to reflect that, without fatally destroying the new app, would be super appreciated. 在不致命破坏新应用程序的情况下,任何更改页面标题以及在应用程序范围内进行所有更改以反映这一点的方法,将受到高度赞赏。

I see how to modify the content on the pages. 我看到了如何修改页面上的内容。 That looks pretty straightforward. 这看起来非常简单。

A way to change the displayed titles of the pages without changing their classes/ functional references to them in other app files, would help too. 更改页面显示标题而不更改其他应用程序文件中它们的类/对它们的功能引用的方法也将有所帮助。

Thanks very much! 非常感谢!

There are many questions in there, hopefully we can answer most of them. 那里有很多问题,希望我们能回答大多数问题。

  1. Stuff in /server is only visible server-side. /server内容仅在/server可见。
  2. Stuff in /client is only visible on the client. /client内容仅在/client上可见。
  3. Stuff in other top level directories (and their subdirectories) is visible to both server and client 服务器和客户端都可以看到其他顶级目录(及其子目录)中的内容
  4. Stuff under .meteor should not be changed. .meteor下的.meteor不应更改。 That's where all your packages end up 那就是你所有包裹的结局
  5. It sounds like the style sheet for the example is part of a package. 听起来该示例的样式表是程序包的一部分。 That means you shouldn't edit it directly but should instead override the styles you need to change in your own .css file that you create under /client . 这意味着您不应该直接对其进行编辑,而应该覆盖/client下创建的自己的.css文件中需要更改的样式。 Your style sheet(s) will load after any package style sheets which means your styles will win. 您的样式表将在所有包装样式表之后加载,这意味着您的样式将获胜。
  6. It also sounds like one of the packages installs its own icons, hence the "\\e613" You can install your own icons too using (for example) fontello 听起来其中一个软件包也安装了自己的图标,因此"\\e613"也可以使用(例如) fontello安装自己的图标。
  7. I don't know where the page titles are set in that example. 我不知道在该示例中页面标题设置在哪里。 There's probably a head.html file with a <title> tag or it could be set in the router. 可能存在带有<title>标记的head.html文件,或者可以在路由器中设置它。

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

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