简体   繁体   English

Web应用程序上的登录页面?

[英]Landing page on web application?

General question about the landing page(static page) for a web-application. 有关Web应用程序登录页面(静态页面)的一般问题。

So I'm working on my own web application which I want to create a static landing page which will give general information about the product and perhaps a quick way to let others sign up. 因此,我正在开发自己的Web应用程序,我想创建一个静态登录页面,该页面将提供有关该产品的一般信息以及也许一种允许他人注册的快速方法。 Would the best way to go about this be to have separate resources (html/css) folders from the application. 最好的方法是从应用程序中获得单独的资源(html / css)文件夹。

For example (using nginx as my server) www.example.com -> will serve those independent (html/css) files which will reside in a different directory and essentially be composed of pure html. 例如(使用nginx作为我的服务器)www.example.com->将为那些独立的(html / css)文件提供服务,这些文件位于不同的目录中,并且基本上由纯HTML组成。

app.example.com -> using a subdomain will serve the rails application. app.example.com->使用子域将提供Rails应用程序。

I just want to get a better understanding how others go about having independent landing pages for their web applications. 我只是想更好地了解其他人如何为他们的Web应用程序拥有独立的登录页面。

If you want to develop a static web page or landing page these are the things I will consider myself. 如果您要开发静态网页或登录页面,这些就是我会考虑的问题。

Technically: 技术上:

I will create folder structure as showed below. 我将创建如下所示的文件夹结构。

-example.html(root level) ---css(inside folder store css files) ---images folder(store all the images) ---modules(store html files inside it) ---scrpits(all java scripts files must be stored here). -example.html(根目录级别)--- css(在文件夹中存储css文件)--- images文件夹(存储所有图像)--- modules(在其中存储html文件)--- scrpits(所有Java脚本文件)必须存储在此处)。

As a product developer: 作为产品开发人员:

I will make sure I will represent information in the landing page as clear as possible. 我将确保我将尽可能清晰地表示登录页面中的信息。

Having two different domains complicates issues unnecessarily (unless you have Twitter or Amazon levels of traffic). 具有两个不同的域会不必要地使问题复杂化(除非您拥有Twitter或Amazon的流量级别)。 Rather: 而是:

Rails will automatically serve anything in public/ folder as static content; Rails会自动将public/文件夹中的任何内容作为静态内容提供; no need to set up a separate nginx conf for that. 无需为此设置单独的nginx conf。 public/index.html will respond to http://example.com/index.html , and public/css/style.css will be rendered at http://example.com/css/style.css . public/index.html将响应http://example.com/index.html ,而public/css/style.css将在http://example.com/css/style.css呈现。

Landing page in Rails is the index action; Rails中的登陆页面是index动作; so static page doesn't work as a landing page by default. 因此默认情况下,静态页面无法用作目标页面。 This question shows an easy way to get around that. 这个问题显示了解决此问题的简便方法。

Of course, you could also make an active page as your landing page, and render it from a view as usual. 当然,您也可以将活动页面作为登录页面,并像往常一样从视图中进行渲染。

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

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