Google com configure html

Replicate the google.com page design using HTML and CSS

In this tutorial, we will design Google’s homepage using HTML/CSS.

This is just a tutorial for learning purposes, this is not meant to use the design in any other use.
Larry Page and Sergey Brin in 1998 created Google. Today we can’t even imagine our lives without Google.
One of the main reasons for its success is its simple and effective GUI.
When Larry Page and Sergey Brin created Google they didn’t know much HTML and CSS, that’s why they kept the GUI of google.com so simple.

Steps for creating Google Homepage design

1. HTML

Work, learn and run your bussiness from home
Google offered in:
  • हिन्दी
  • বাংলা
  • తెలుగు
  • मराठी
  • தமிழ்
  • ગુજરાતી
  • ಕನ್ನಡ
  • മലയാളം
  • ਪੰਜਾਬੀ

2. CSS

/* Styling of navigation bar */ #navdiv < display:flex; width:17%; margin-left: 82%; justify-content: space-around; margin-top: 1%; height:35px; >nav img < margin-top: 5px; >#googleimg < margin-top: 100px; >/* Removing underline from links*/ a < margin-top: 8px; text-decoration: none; >button < border-radius: 3px; height:100%; padding:5px 12px; background-color: #4C87E1 ; color:white; border:none; >/* setting up size and border stle of search bar*/ #maindiv < width:35%; border-radius: 50px; display: flex; height:40px; border:1px solid lightgrey; >#inputspan < width:80%; >span < vertical-align: top; >span:first-child < width:10%; border-radius: 50px; margin-top: 7px; >span:last-child < width:10%; border-radius: 50px; margin-top: 7px; >input < height:100%; width:100%; border: none; padding:0px; >section < display: flex; margin-top: 2%; width:23%; justify-content: space-around; margin-bottom: 2%; >section button < padding:10px 12px; background-color: lightgrey; color:black; >ul < display: flex; width: 30%; padding-left: 0px; list-style: none; justify-content: space-around; margin: 6px; >#Bottomdiv < display:flex; font-size: 12px; margin-top: 3%; >#Bottomdiv span < width:7%; margin-left: 31%; >/*When hovered*/ a:hover < text-decoration: underline; >button:hover

Our Output

Replicate the google.com page design using HTML and CSS

HOPE YOU LIKED THIS TUTORIAL!

Источник

Служба HTML: создание и обслуживание HTML

Оптимизируйте свои подборки Сохраняйте и классифицируйте контент в соответствии со своими настройками.

Служба HTML позволяет обслуживать веб-страницы, которые могут взаимодействовать с серверными функциями сценариев приложений. Это особенно полезно для создания веб-приложений или добавления пользовательских интерфейсов в Google Docs, Sheets и Forms. Вы даже можете использовать его для создания тела электронного письма.

Создание HTML-файлов

Чтобы добавить HTML-файл в проект Apps Script, выполните следующие действия:

В файле HTML вы можете написать большинство стандартных HTML, CSS и клиентского JavaScript. Страница будет отображаться в формате HTML5, хотя некоторые расширенные функции HTML5 будут недоступны, как описано в разделе Ограничения .

Ваш файл также может включать скриптлеты шаблонов, которые обрабатываются на сервере перед отправкой страницы пользователю — аналогично PHP — как описано в разделе о шаблонах HTML .

Подавать HTML как веб-приложение

Чтобы создать веб-приложение со службой HTML, ваш код должен включать функцию doGet() , которая сообщает сценарию, как обслуживать страницу. Функция должна возвращать объект HtmlOutput , как показано в этом примере.

Код.gs

Индекс.html

Когда эта базовая структура создана, все, что вам нужно сделать, — это сохранить версию сценария , а затем развернуть его как веб-приложение .

После развертывания сценария в качестве веб-приложения его также можно встроить на сайт Google .

Подавать HTML в качестве пользовательского интерфейса Google Docs, Sheets, Slides или Forms

Служба HTML может отображать диалоговое окно или боковую панель в Google Docs, Sheets, Slides или Forms, если ваш сценарий привязан к контейнеру файла. (В Google Forms настраиваемые пользовательские интерфейсы видны только редактору, который открывает форму для ее изменения, а не пользователю, который открывает форму для ответа.)

В отличие от веб-приложения, скрипт, создающий пользовательский интерфейс для документа, электронной таблицы или формы, не нуждается в специальной функции doGet() , и вам не нужно сохранять версию скрипта или развертывать ее. Вместо этого функция, открывающая пользовательский интерфейс, должна передать ваш HTML-файл в виде объекта HtmlOutput методам showModalDialog()) или showSidebar() объекта Ui для активного документа, формы или электронной таблицы.

Эти примеры включают несколько дополнительных функций для удобства: функция onOpen() создает пользовательское меню , упрощающее открытие интерфейса, а кнопка в HTML-файле вызывает специальный метод close() API google.script.host . чтобы закрыть интерфейс.

Код.gs

// Use this code for Google Docs, Slides, Forms, or Sheets. function onOpen() < SpreadsheetApp.getUi() // Or DocumentApp or SlidesApp or FormApp. .createMenu('Dialog') .addItem('Open', 'openDialog') .addToUi(); >function openDialog() < var html = HtmlService.createHtmlOutputFromFile('Index'); SpreadsheetApp.getUi() // Or DocumentApp or SlidesApp or FormApp. .showModalDialog(html, 'Dialog title'); >

Индекс.html

Обратите внимание, что в первый раз, когда вы хотите отобразить этот пользовательский интерфейс, вы должны либо запустить функцию onOpen() вручную в редакторе сценариев , либо перезагрузить окно редактора документов, таблиц или форм (что закроет редактор сценариев). После этого пользовательское меню должно появляться в течение нескольких секунд каждый раз, когда вы открываете файл. Выберите «Диалог» > «Открыть» , чтобы увидеть интерфейс.

Если не указано иное, контент на этой странице предоставляется по лицензии Creative Commons «С указанием авторства 4.0», а примеры кода – по лицензии Apache 2.0. Подробнее об этом написано в правилах сайта. Java – это зарегистрированный товарный знак корпорации Oracle и ее аффилированных лиц.

Последнее обновление: 2023-06-22 UTC.

Источник

Configuring a Bucket as a Website

This topic describes how you can configure a Google Cloud Storage bucket as a static website. Static web pages can contain client-side technologies such as HTML, CSS, and JavaScript.

If you looking to host static assets for a dynamic website hosted, for example, in Google App Engine or in Google Compute Engine , you can also follow the steps here. For more information, see Hosting static assets for a dynamic website .

In this tutorial, we’ll use the domain example.com . You can follow the steps using an existing domain that you own or manage, or you can register a new domain.

Contents

Step 1: Verify you own or manage the domain

The Bucket Name Verification section discusses different ways to verify that you are the owner or a manager of the domain. If you own the domain you are associating to a bucket, then you may have already performed this step. If you just created a new domain, then you will have to verify it.

If you try to create the bucket before you verify the domain, you’ll receive a warning that you’ll need to verify the domain.

Step 2: Create a CNAME record

In this step, you will configure your DNS records to provide a CNAME alias to c.storage.googleapis.com . A CNAME alias is a DNS record that lets you use a URL from your own domain to access resources (bucket and objects) in Google Cloud Storage using your custom domain URL. For example, for example.com , the CNAME record contains the following information:

NAME TYPE DATA www CNAME c.storage.googleapis.com

Your domain registration service should have a way that you can administer your domain, including adding a CNAME record.

Step 3: Create a bucket and add content

Create a bucket with a name that matches the CNAME you created for your domain. For example, if you registered example.com , verified the domain, and then added a CNAME record pointing www.example.com to c.storage.googleapis.com , then create the bucket with the name «www.example.com».

Add objects to the bucket that will be the content served as website content. The following example shows a bucket with two objects «index.html» and «404.html»:

Bucket website example.

For any objects in the bucket that you want to serve, share those objects publicly. For an example of how to do this in Google Developers Console, see Sharing Data Publicly .

Step 4: Configure an index page and a custom error page

The index page (also called the webserver directory index ), for a static website served from a Google Cloud Storage bucket, is the object returned when a site visitor requests the top level directory, (e.g., http://www.example.com ) instead of an actual object in the bucket. You can configure an index page and a custom error page by configuring the for the bucket. By setting the Website Configuration of a bucket, you can improve the experience of site visitors to your website.

The Website Configuration of a bucket involves setting the following properties:

Specifies the object to serve when just the domain name is requested, for example, if a site visitor requests http://www.example.com or http://www.example.com/ (with the trailing slash).

The MainPageSuffix will only affect requests directed to CNAME aliases of c.storage.googleapis.com . For example, only requests to www.example.com will show the index page. This preserves existing API behavior, such as bucket listing, for requests using a Google Cloud Storage domain. For more information, see Listing objects for a bucket configured as a static website.

Specifies the object to serve when site visitors request a resource that does not exist.

Источник

Читайте также:  Changed post value php
Оцените статью