HTML preprocessors can make writing HTML more powerful or convenient. For instance, Markdown is designed to be easier to write and read for text documents and you could write a loop in Pug.
In CodePen, whatever you write in the HTML editor is what goes within the <body>
tags in a basic HTML5 template. So you don't have access to higher-up elements like the <html>
tag. If you want to add classes there that can affect the whole document, this is the place to do it.
In CodePen, whatever you write in the HTML editor is what goes within the <body>
tags in a basic HTML5 template. If you need things in the <head>
of the document, put that code here.
The resource you are linking to is using the 'http' protocol, which may not work when the browser is using https.
CSS preprocessors help make authoring CSS easier. All of them offer things like variables and mixins to provide convenient abstractions.
It's a common practice to apply CSS to a page that styles elements such that they are consistent across all browsers. We offer two of the most popular choices: normalize.css and a reset. Or, choose Neither and nothing will be applied.
To get the best cross-browser support, it is a common practice to apply vendor prefixes to CSS properties and values that require them to work. For instance -webkit-
or -moz-
.
We offer two popular choices: Autoprefixer (which processes your CSS server-side) and -prefix-free (which applies prefixes via a script, client-side).
Any URL's 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 it's URL and the proper URL extention.
You can apply CSS to your Pen from any stylesheet on the web. Just put a URL to it here and we'll apply it, in the order you have them, before the CSS in the Pen itself.
You can also link to another Pen here (use the .css
URL Extension) and we'll pull the CSS from that Pen and include it. If it's using a matching preprocessor, use the appropriate URL Extension and we'll combine the code before preprocessing, so you can use the linked Pen as a true dependency.
JavaScript preprocessors can help make authoring JavaScript easier and more convenient.
Babel includes JSX processing.
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.
You can apply a script from anywhere on the web to your Pen. Just put a URL to it here and we'll add it, in the order you have them, before the JavaScript in the Pen itself.
If the script you link to has the file extension of a preprocessor, we'll attempt to process it before applying.
You can also link to another Pen here, and we'll pull the JavaScript from that Pen and include it. If it's using a matching preprocessor, we'll combine the code before preprocessing, so you can use the linked Pen as a true dependency.
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.
Using packages here is powered by Skypack, which makes packages from npm not only available on a CDN, but prepares them for native JavaScript ES6 import
usage.
All packages are different, so refer to their docs for how they work.
If you're using React / ReactDOM, make sure to turn on Babel for the JSX processing.
If active, Pens will autosave every 30 seconds after being saved once.
If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.
If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.
Visit your global Editor Settings.
%main{:class => 'container-page'}
%nav{:class => 'main-menu'}
%img(class="logotipo" src="http://ia.media-imdb.com/images/M/MV5BMTk3ODA4Mjc0NF5BMl5BcG5nXkFtZTgwNDc1MzQ2OTE@._V1_.png" alt="imdb logo")/
%ul{:class => 'menu-list'}
%li{:class => 'menu-item'}
%i{:class => 'icon fa fa-newspaper-o'}
%span{:class => 'title-menu'}News
%ul{:class => 'child-body'}
%div{:class => 'news'}
%li{:class => 'post-news'}
%img(src="https://goo.gl/wMqxsg" alt="")/
%i{:class => 'fa fa-ellipsis-v'}
%span{:class => 'date'}15/08/17
%h3{:class => 'title-post'} Lorem ipsum dolor sit amet
%li{:class => 'post-news'}
%img(src="https://goo.gl/74GmN7" alt="")/
%i{:class => 'fa fa-ellipsis-v'}
%span{:class => 'date'}15/08/17
%h3{:class => 'title-post'} Lorem ipsum dolor sit amet
%li{:class => 'post-news'}
%img(src="https://goo.gl/9uBtr1" alt="")/
%i{:class => 'fa fa-ellipsis-v'}
%span{:class => 'date'}15/08/17
%h3{:class => 'title-post'} Lorem ipsum dolor sit amet
%a(href="#")More
%li{:class => 'menu-item'}
%i{:class => 'icon fa fa-film'}
%span{:class => 'title-menu'}Movies
%li{:class => 'menu-item'}
%i{:class => 'icon fa fa-television'}
%span{:class => 'title-menu'}Tv Series
%li{:class => 'menu-item'}
%i{:class => 'icon fa fa-calendar-o'}
%span{:class => 'title-menu'}Events
%li{:class => 'menu-item'}
%i{:class => 'icon fa fa-youtube-play'}
%span{:class => 'title-menu'}Trailers
%li{:class => 'menu-item'}
%i{:class => 'icon fa fa-list-ul'}
%span{:class => 'title-menu'}Watchlist
-# /End
-# - Main page
-# - Main menu
-# - - logotipo
-# - - Menu list
-# - - Itens do menu
-# /Start body page
%section{:class => 'body-page'}
// # Wrapper login
%div{:class => 'wrapper-login'}
%div{:class => 'login-with-social col-2'}
%h3{:class => 'title-box'}Sign in with
%ul{:class => 'list-social-logins'}
%li{:class => 'wrap-login-btn facebook'}
%i{:class => 'fa fa-facebook'}
%span login with facebook
%li{:class => 'wrap-login-btn twitter'}
%i{:class => 'fa fa-twitter'}
%span login with twitter
%li{:class => 'wrap-login-btn google'}
%i{:class => 'fa fa-google'}
%span login with google
%div{:class => 'login-form col-2'}
%form(action="")
%h3{:class => 'title-box'}Fazer Login
%div{:class => 'wrap-input'}
%label(for="login")Login
%input(type="text" class="ipt-style" placeholder="user@domain.com")/
%div{:class => 'wrap-input'}
%label(for="password")Password
%input(type="password" class="ipt-style" placeholder="user pass")/
%div{:class => 'wrap-input'}
%button Login
%div{:class => 'wrap-benefits'}
%h3{:class => 'title-box'}Benefits of your free IMDb account
%ul{:class => 'list-benefits'}
%li{:class => 'benefit'}
%i{:class => 'fa fa-cogs'}
%strong Personalized Recommendations
%span Discover shows you'll love.
%li{:class => 'benefit'}
%i{:class => 'fa fa-star'}
%strong Your Watchlist
%span Track everything you want to watch and receive e-mail when.
%li{:class => 'benefit'}
%i{:class => 'fa fa-bar-chart'}
%strong Your Ratings
%span Rate and remember everything you've seen.
%li{:class => 'benefit'}
%i{:class => 'fa fa-life-saver'}
%strong Contribute to IMDb
%span Add data that will be seen by millions of people and get cool badges.
// # cover
%div{:class => 'cover-page'}
// # Links top
%div{:class => 'wrap-links-top'}
%span{:class => 'link-menu'}
%i{:class => 'icon fa fa-user'}
%a(href="#" id="btn-login" class="link muted")Login
%span{:class => 'link-menu'}
%i{:class => 'icon fa fa-search'}
%a(href="#" id="btn-search" class="link muted")Search
// #Header page
%header{:class => 'header-page'}
%span{:class => 'cat-tv'}Tv Series
%h1{:class => 'main-title'}Better Call Saul
%ul{:class => 'wrap-infos'}
%li{:class => 'info-item rate'}8,7
%li{:class => 'info-item'}AMC
%li{:class => 'info-item'}Crime, drama
%li{:class => 'info-item'}Tv Series (2015 -)
%span{:class => 'btn-more'}
See more
%i{:class => 'icon fa fa-angle-down'}
// #body page
%section{:class => 'body-page'}
// #aside-left
%div{:class => 'aside-left'}
%img(src="https://goo.gl/fVq4Zi" class ="thumb-serie" alt="thumb better call saul")/
%p{:class => 'excerpt'}The trials and tribulations of criminal lawyer, Jimmy McGill, in the time leading up to establishing his strip-mall law office in Albuquerque, New Mexico.
%div{:class => 'wrap-tags'}
%span{:class => 'btn-tag'}Crime
%span{:class => 'btn-tag'}Drama
// #aside-right
%div{:class => 'aside-right'}
// #proggress
%div{:class => 'rating-progress'}
%span{:class => 'rate-text'}8.7
// #menu-rating-site
%ul{:class => 'menu-rating-site'}
%li{:class => 'rate-site'}
%span{:class => 'rate'}8.7/10 - imdb
%progress{:class => '', :value => '87', :max => '100'}8.7
%li{:class => 'rate-site'}
%span{:class => 'rate'}9.7/10 - Rotten Tomatoes
%progress{:class => '', :value => '97', :max => '100'}8.7
%li{:class => 'rate-site'}
%span{:class => 'rate'}9.0/10 - tv.com
%progress{:class => '', :value => '90', :max => '100'}8.7
// menu footer
%nav{:class => 'menu-footer'}
%li{:class => 'menu-item'}sinopse
%li{:class => 'menu-item'}full cast
%li{:class => 'menu-item'}awards
%li{:class => 'menu-item'}related
// Configurações do documento
html
font-size: 62.5%
// #1 - Configs
// #2 - Style of app
$font-maven: 'Maven Pro', sans-serif
$font-ubuntu: 'Ubuntu', sans-serif
// End Fonts -
a
text-decoration: none
font-family: $font-ubuntu
// #Tamanhos
$screen-width: 100%
$screen-height: 100vh
$main-menu-width: 110px
$page-body-width: calc(100% - 110px)
// #colors
$menu-color: #7e7e7e
$white-color: #ffffff
$black-color: #000000
// #transitions
$trans-normal: .2s linear
$trans-delay: .1s
$fast-trans: .5s
$ease-trans: ease
// #cover page address
$cover-serie: url('https://images-na.ssl-images-amazon.com/images/I/A1dF3y4zGcL._RI_.jpg')
.container-page
background: #ccc
width: $screen-width
height: $screen-height
margin: 0 auto
display: flex
flex-wrap: wrap
.main-menu
background: #F3F3F3
width: $main-menu-width
height: 100%
// #logotipo
.logotipo
width: 100%
height: auto
margin-bottom: 25px
// #menu-list
.menu-list
width: 100%
height: 569px
// display: none
// #menu-item
.menu-item
width: 100%
height: calc(100% / 6 - 10px)
margin: 5px auto
cursor: pointer
color: $menu-color
opacity: .9
transition: $trans-normal
transition-delay: $trans-delay
// #child-body
.child-body
display: none
background: $white-color
width: 320px
height: calc(100vh - 150px)
border-top-right-radius: 4px
border-bottom-right-radius: 4px
border-left: 1px solid #ccc
top: 80px
left: 110px
position: fixed
.news
width: 95%
height: 100%
margin-left: 2.5%
position: relative
// li
.post-news
width: 100%
height: 150px
font-family: $font-maven
margin: 7px auto
position: relative
&:after
content: ''
background: rgba(0, 0, 0, .5)
width: 100%
height: 100%
top: 0
position: absolute
img
width: 100%
height: 100%
position: absolute
i
font-size: 2em
color: $white-color
top: 10px
right: 10px
z-index: 9
position: absolute
.date
font-size: 1.5em
color: $white-color
font-weight: 100
letter-spacing: 2px
top: 10px
left: 10px
z-index: 9
position: absolute
.title-post
font-size: 2em
color: $white-color
font-weight: 100
letter-spacing: 2px
top: 80px
left: 10px
z-index: 9
position: absolute
&:hover
transition: $trans-normal
transition-delay: $trans-delay
color: #EDC612
opacity: 1
// #iconmenu
.icon
width: 100%
height: 40%
font-size: 2.4em
text-align: center
// #title-menu
.title-menu
font-family: $font-ubuntu
font-size: 1.4em
text-align: center
text-transform: lowercase
display: block
margin-top: 10px
// - Body page
.body-page
width: $page-body-width
height: 100%
position: relative
// display: none
perspective: 1200px
// - #login
.wrapper-login
background: #fff
width: 360px
height: 300px
top: 70px
right: 150px
border-radius: 4px
display: flex
align-items: center
z-index: -99
opacity: 0
position: absolute
transform: rotateY(0deg) rotateX(180deg)
transition-duration: $fast-trans
transition-timing-function: $ease-trans
.login-with-social
display: none
.login-form,
.login-with-social
width: calc(100% - 20px)
height: 90%
margin: 0 10px
right: 0
position: absolute
.title-box
font-family: $font-maven
font-size: 2.1em
font-weight: 800
text-align: left
color: #58595b
margin: 15px
margin-bottom: 25px
// - ul
.list-social-logins
width: 90%
height: 170px
margin: 25px auto
.wrap-login-btn
width: 185px
height: 35px
margin: 5px 0
// font-size: 1.6em
text-align: center
color: $white-color
border: 1px solid $black-color
border-radius: 4px
i
font-size: 1.8em
margin: 8px 10px
span
font-family: $font-ubuntu
font-size: 1.3em
.facebook
background: #3b5998
.twitter
background: #1da1f2
.google
background: #ea4335
// - Inputs
.wrap-input
width: 90%
height: 70px
margin: 10px auto
label
font-family: $font-ubuntu
font-size: 1.3em
color: #58595b
margin: 5px 0
display: block
.ipt-style
width: 100%
height: 35px
margin: 0
border: none
border-bottom: 1px solid #58595b
outline: none
opacity: .5
button
background: none
width: 140px
height: 40px
border: 1px solid $black-color
border-radius: 3px
.wrap-benefits
width: 790px
height: 290px
right: 0
bottom: -295px
background: #e5e8ed
position: absolute
.title-box
font-family: $font-maven
font-size: 2.1em
font-weight: 800
text-align: left
margin: 15px
.list-benefits
display: flex
flex-wrap: wrap
width: 98%
height: 70%
margin: auto
.benefit
width: calc(100% / 2 - 20px)
height: calc(100% / 2 - 20px)
font-family: $font-ubuntu
font-size: 1.6em
text-align: left
margin: 10px auto
position: relative
i
position: absolute
top: 20px
span,
strong
width: calc(100% - 40px)
font-weight: 700
color: $menu-color
display: block
top: 20px
left: 35px
position: absolute
span
font-weight: 100
top: 55px
// Login active
.active-box
opacity: 1
transform: rotateY(0deg) rotateX(0deg)
z-index: 999
transition-duration: $fast-trans
transition-timing-function: $ease-trans
// - #cover
.cover-page
background: $cover-serie no-repeat center center fixed
background-size: cover
width: 100%
height: 100%
z-index: 1
position: absolute
opacity: .9
&:after
content: ''
background: $black-color
width: 100%
height: 100%
position: absolute
opacity: .6
// #Botões link
.wrap-links-top
width: 250px
height: 60px
top: 20px
right: 20px
display: flex
z-index: 9
position: absolute
// #span link
.link-menu
background: none
width: calc(100% / 2 - 20px)
height: 35px
display: inline-block
margin: 10px
cursor: pointer
text-align: center
line-height: 2
border: 1px solid $white-color
border-radius: 5px
transition: $trans-normal
transition-delay: $trans-delay
&:hover
transition: $trans-normal
transition-delay: $trans-delay
background: #EDC612
border: 1px solid #EDC612
border-radius: 5px
.icon
font-size: 1.6em
color: $white-color
margin: auto 5px
.link
font-size: 1.6em
color: $white-color
// #Header page
.header-page
width: calc(100% - 150px)
height: 150px
top: 100px
margin: 25px auto
z-index: 9
position: relative
&:after
content: ''
background: $white-color
width: 100%
height: 1px
left: 0
bottom: -20px
opacity: .5
position: absolute
// #btn-more
.btn-more
width: 90px
height: 30px
font-family: $font-ubuntu
font-size: 1.4em
color: $white-color
text-transform: uppercase
display: flex
justify-content: space-between
cursor: pointer
bottom: -80px
left: calc(100% / 2 - 45px)
position: absolute
// #cat-tv
.cat-tv
font-family: $font-ubuntu
font-size: 1.6em
font-weight: 500
text-transform: uppercase
margin: 5px auto
display: block
color: $white-color
// #main-title
.main-title
font-family: $font-maven
font-size: 5.6em
font-weight: 900
color: $white-color
margin: 15px auto
display: block
// #wrap-infos
.wrap-infos
width: 75%
height: 40px
display: flex
align-items: center
font-family: $font-ubuntu
.info-item
font-size: 1.4em
color: $white-color
margin: auto 5px
padding: 0 8px
border-right: 1px solid $white-color
&:last-child
border: none
.rate
background: green
width: 35px
height: 35px
border-radius: 100%
border: none
padding: 0 0
text-align: center
line-height: 2.5
// #body-page
.body-page
@extend .header-page
height: 220px
top: 200px
display: flex
&:after
content: none
// #aside-left
.aside-left
width: calc(100% / 2 - 5px)
position: relative
// #thumb-serie
.thumb-serie
width: 140px
margin: 5px 0px
// #excerpt
.excerpt
width: 58%
position: absolute
left: 160px
top: 5px
font-family: $font-ubuntu
font-size: 1.8em
line-height: 1.8
color: $white-color
// #tags
.wrap-tags
@extend .excerpt
height: 35px
top: auto
bottom: 10px
display: flex
font-size: inherit
// justify-content: space-around
// #btn-tag
.btn-tag
border-radius: 2px
border: 1px solid $white-color
margin: auto 3px
padding: 0px 25px
cursor: pointer
display: block
font-size: 1.4em
font-weight: 100
text-transform: lowercase
// #aside-right
.aside-right
@extend .aside-left
display: flex
// #rating-progress
.rating-progress
width: 175px
height: 175px
margin: 10px 15px
border: 3px solid $white-color
border-radius: 100%
// #rate-text
.rate-text
font-size: 8.2em
font-family: $font-ubuntu
color: $white-color
text-align: center
line-height: 2.2
display: block
// #menu-rating-site
.menu-rating-site
width: 220px
height: 190px
margin-left: 50px
// #li.rate-site
.rate-site
width: 100%
height: 60px
margin: 2px auto
cursor: pointer
// #rate
.rate
display: block
margin: 8px 0
font-family: $font-ubuntu
font-size: 1.4em
text-transform: uppercase
color: $white-color
// #progress
progress
width: 100%
height: 20px
border-radius: 5px
display: block
-webkit-appearance: none
progress::-webkit-progress-bar
background: rgba(255, 255, 255, .4)
border-radius: 5px
progress::-webkit-progress-value
background: yellow
border-radius: 5px
// #nav-footer
.menu-footer
width: calc(100% - 110px)
height: 60px
bottom: 0
left: 110px
z-index: 9
display: flex
flex-grow: grow
position: absolute
font-family: $font-maven
// #menu-item
.menu-item
background: rgba(0, 0, 0, .7)
width: calc(100% / 4 - 2px)
margin: 0 1px
font-size: 1.6em
font-weight: 300
text-align: center
text-transform: uppercase
color: $white-color
line-height: 3.5
list-style: none
cursor: pointer
transition: .2s linear
transition-delay: .1s
&:hover
transition: $trans-normal
transition-delay: $trans-delay
background: #EDC612
color: rgba(0, 0, 0, .7)
// - Main Menu | Pronto 16/07 23:53
// - Logo | Pronto 16/07 23:53
// - News + Icon | Pronto 16/07 23:53
// - Movies + icon | Pronto 16/07 23:53
// - Tv Series + icon| Pronto 16/07 23:53
// - Events + Icon | Pronto 16/07 23:53
// - Trailers + icon | Pronto 16/07 23:53
// - Watchlist + icon| Pronto 16/07 23:53
// body page
// - Botões | Pronto 17/07 00:23
// - Login | Pronto 17/07 00:23
// - Search + icon | Pronto 17/07 00:23
// - Cover | Pronto 17/07 00:10
// - Wallpaper full page da série | Pronto 17/07 00:10
// - Header page | Pronto 17/07 01:01
// - Cat: Tv Series | Pronto 17/07 01:01
// - Nome: Better call Saul | Pronto 17/07 01:01
// - Informações | Pronto 17/07 01:01
// - - Nota Imdb | Pronto 17/07 01:01
// - - Canal: AMC | Pronto 17/07 01:01
// - - Genre: Crime, drama | Pronto 17/07 01:01
// - - Title: Tv Series (2015 -) | Pronto 17/07 01:01
// - Div transparente | Pronto 17/07 01:01
// - Botão: See More + icon | Pronto 17/07 01:01
// - Body page
// - Aside left | Pronto 17/07 02:13
// - - Thumb Capa da serie | Pronto 17/07 02:13
// - - Resumo da série | Pronto 17/07 02:13
// - - Botões links dos generos | Pronto 17/07 02:13
// - Aside right: Botões com as notas dos sites: IMDB, TV.COM e ROTTEN TOMATOES
// - - progress circular com + nota | Pronto 17/07 12:11
// - - Botão: Nota/10 - IMDB + progress circular com a nota | Pronto 17/07 12:11
// - - Botão: Nota/10 - TV.COM + progress circular com a nota | Pronto 17/07 12:11
// - - Botão: Nota/10 - ROTTEN + progress circular com a nota | Pronto 17/07 12:11
// - Botões de informações sobre a série | Pronto - 18/07 00:08
// - - Botão: SINOPSE | Pronto - 18/07 00:08
// - - Botão: FULL CAST | Pronto - 18/07 00:08
// - - Botão: AWARDS | Pronto - 18/07 00:08
// - - Botão: RELATED | Pronto - 18/07 00:08
/*
* - Globals
* - $ = bind query selector
*/
/*
* - Elements
* Botões
* Box login
*/
var btnLogin = $('#btn-login');
var btnSearch = $('#btn-search');
var wrapperLogin = $('.wrapper-login');
btnLogin.on('click', function (event) {
event.preventDefault();
wrapperLogin.toggleClass('active-box');
})
Also see: Tab Triggers