Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ add another resource

JavaScript

Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

Behavior

Auto Save

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                <!doctype html> 
<html amp4email data-css-strict> 
<head> 
	<meta charset="utf-8"> 
	<script async src="https://cdn.ampproject.org/v0.js"></script> 
	<script async custom-element="amp-bind" src="https://cdn.ampproject.org/v0/amp-bind-0.1.js"></script> 
	<script async custom-element="amp-form" src="https://cdn.ampproject.org/v0/amp-form-0.1.js"></script>
	<script async custom-template="amp-mustache" src="https://cdn.ampproject.org/v0/amp-mustache-0.2.js"></script> 
	<style amp4email-boilerplate>body{visibility:hidden}</style> 
	<style amp-custom>*{margin:0;padding:0}
	body{
		font-family:Verdana, Arial, Helvetica, sans-serif;
	}
	.form_wrap{
		width: 100%;
		padding: 30px 20px;
		background:#F2E8FF;
		box-sizing: border-box;
		max-width: 600px;
		margin: 0 auto;
	}
	.form_wrap .textinput{
		border: 1px solid #cccccc;
		height: 50px;
		width:100%;
		box-sizing: border-box;
		padding: 10px 15px;
		margin-bottom: 10px;
		resize:vertical;
	}
	.title{
		text-align:left;
		font-weight: bold;
		padding-bottom: 20px;
		color: #7D4DA3;
		font-size: 18px;
	}
	.btn18{
		background-color:#7D4DA3;
		font-size:14px;
		line-height:40px;
		width:120px;
		color:#ffffff;
		font-family:Verdana, Arial, Helvetica, sans-serif;
		text-align:center;
		text-decoration:none;
		display:inline-block;
		box-sizing:border-box;
		border: 0 none;
	}</style> 
</head> 
<body> 
	
	<div class="form_wrap">
		<form method="POST" action-xhr="https://ampier.ru/amp/post/1139?key=d843a912a56d80e1bdff1806b26e2c0b" on="submit-success: AMP.setState({SuccessHideForm1139: true})" class="ampform"> <!-- SuccessHideForm1132 нужен, чтобы форма скрылась после того как её заполнили -->
			<div [hidden]="SuccessHideForm1139">
				<div class="field">
					<div class="title">Пожалуйста, оставьте отзыв:</div> 
					<textarea type="text" name="i_9880_kommentarii_923" class="textinput"></textarea> <!-- Синтаксис перменных так же есть на странице https://ampier.ru/ui#/components/1139/connection -->
				</div> 
				<div>
					<button type="submit" class="btn18">Отправить
					</button>
				</div> 
				<input type="hidden" name="email" value="{{email}}"> <!-- в скрытом поле передаём имейл подписчика -->
			</div> 
			<div submit-success="" class="form_success">
				<template type="amp-mustache">{% verbatim %}{{success}}{% endverbatim %}
          <!-- Текст редактируется в настройках https://ampier.ru/ui#/components/1132/settings -->
          <!-- Переменная success передаётся из Ampier, чтобы Mailganer не стал её обрабатывать, нужно обернуть в verbatim, подробней тут https://mailganer.com/ru/explanation/kak-podstavit-peremennuyu -->
				</template>
			</div> 
			<div submit-error="" class="form_error">
				<template type="amp-mustache">Пожалуйста, укажите корректно {% verbatim %}{{#error}}{% endverbatim %} <!-- вывод ошибок валидации полей, подробнее про валидацию полей в форме https://docs.ampier.ru/ru/ampier/documentation/amp-components/amp-form -->
					<b>{% verbatim %}{{title}}{% endverbatim %}
						<br>
					</b>{% verbatim %}{{/error}}{% endverbatim %}
				</template>
			</div> 
			<div submitting="" class="loading">Отправляем...</div>
		</form>
	</div>
	
</body> 
</html> 

              
            
!

CSS

              
                
              
            
!

JS

              
                
              
            
!
999px

Console