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. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.
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.
If the stylesheet 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 CSS 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.
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.
.container.d-flex.flex-column
.header.d-flex.flex-column.justify-content-between.align-items-center
nav.topmenu.d-flex.justify-content-center
a(href="#about") About
.line.align-self-center
a(href="#rules") Rules
.line.align-self-center
a(href="https://discord.gg/red") Join
.server-info.d-flex.align-items-center.flex-column.text-center
h1 Red - Discord Bot
a.links-suppressor.join-btn.btn-pill.white(href="https://discord.gg/red") Join Server
.inner.d-flex.flex-column
section#about.d-flex.justify-content-between.flex-lg-nowrap.flex-wrap
.image.image1(style="flex-grow: 1")
.text
h2 About
p
b Red
| is a fully modular bot which comes with sets of features/commands that can be enabled/disabled to your liking, making it customizable exactly how you want. You can turn Red into a trivia bot, an admin bot, a music bot (...) or all of these together
br
br
b The default set of modules includes and it's not limited to:
br
ul
li Moderation features (kick/ban/softban, filters, mod-log...)
li Trivia (lists included and you can make new ones!)
li Music features (playlists, youtube, soundcloud, queues...)
li Stream alerts (twitch/hitbox)
li Slot machines (yes, really!)
li Custom commands
li Imgur/gif search
li And much much more
section.discord-widget
iframe.d-flex(src="https://discordapp.com/widget?id=279193513806135296&theme=dark",
allowtransparency="true",
frameborder="0")
section#rules.d-flex.justify-content-between.flex-lg-nowrap.flex-wrap.flex-row-reverse
.image.image2(style="flex-grow: 1")
.text
h2 Rules
p
b Red
| is a fully modular bot which comes with sets of features/commands that can be enabled/disabled to your liking, making it customizable exactly how you want. You can turn Red into a trivia bot, an admin bot, a music bot (...) or all of these together
br
br
b The default set of modules includes and it's not limited to:
br
ul
li Moderation features (kick/ban/softban, filters, mod-log...)
li Trivia (lists included and you can make new ones!)
li Music features (playlists, youtube, soundcloud, queues...)
li Stream alerts (twitch/hitbox)
li Slot machines (yes, really!)
li Custom commands
li Imgur/gif search
li And much much more
section.join.d-flex.justify-content-center
.line.align-self-center(style="flex-grow: 1")
a.links-suppressor.btn-pill.white(href="https://discord.gg/red") Join Server
.line.align-self-center(style="flex-grow: 1")
.footer.d-flex.justify-content-between.flex-lg-nowrap.flex-wrap
.d-flex
.block.d-flex.flex-column.justify-content-between
h3.d-flex Staff
span Twentysix26#2152
span JennJenn#4953
span Will#0234
span irdumb#9823
span Kowlin#8251
.block.d-flex.flex-column.justify-content-between
h3.d-flex Moderators
span Twentysix26#2152
span JennJenn#4953
span Will#0234
span irdumb#9823
span Kowlin#8251
p.align-self-end Red is a fully modular bot which comes with sets of features/commands that can be enabled/disabled to your liking, making it customizable exactly how you want. You can turn Red into a trivia bot, an admin bot, a music bot (...) or all of these together
// Fonts
@import 'https://fonts.googleapis.com/css?family=Lato:300,400,700,900'
// Images
$background: url('../img/bg-main.jpg')
$intro: url('../img/top.jpg')
$image1: url('../img/example.jpg')
$image2: url('../img/example-2.jpg')
body, html
min-height: 100%
body
background-image: $background
background-size: cover
background-position: center center
position: relative
font-family: 'Lato', sans-serif
&:before
content: ''
position: absolute
top: 0
left: 0
width: 100%
height: 100%
background: rgba(0,0,0,0.8)
.container
background: #25272C
min-height: 100%
padding: 0
.header
height: 550px
width: 100%
background: $intro
background-size: cover
background-position: center center
position: relative
&:before
content: ''
position: absolute
z-index: 10
top: 0
left: 0
width: 100%
height: 550px
background-image: linear-gradient(45deg, rgba(101,128,233,0.73) 0%, #1E6DB6 100%)
.topmenu
position: relative
z-index: 20
margin-top: 20px
a
color: #fff
text-transform: uppercase
font-size: 16px
line-height: 28px
padding: 0 27px
text-decoration: none
.line
display: block
width: 45px
border-bottom: 1px solid #fff
.server-info
margin-bottom: 150px
position: relative
z-index: 20
.inner
padding: 40px
section
.image
width: 300px
min-height: 480px
margin: 40px
background-position: center center
background-size: cover
&.image1
background-image: $image1
&.image2
background-image: $image2
.text
padding: 40px
max-width: 700px
p
font-size: 18px
line-height: 26px
color: rgba(255,255,255,0.5)
b
color: #fff
font-weight: 700
ul
color: #fff
margin: 0
padding: 0 0 0 20px
li
font-size: 18px
line-height: 26px
color: rgba(255,255,255,0.5)
margin: 0
padding: 0
b
color: #fff
font-weight: 700
&.discord-widget
padding: 40px
width: 100%
iframe
height: 500px
width: 100%
&.join
padding: 40px
.btn-pill
margin: 30px
.line
border-bottom: 1px solid #fff
.footer
padding: 40px
background-color: #25272C
background-image: linear-gradient(45deg, rgba(101,128,233,0.66) 0%, #1E3FB6 100%)
line-height: 24px
font-size: 20px
color: #fff
font-weight: 300
.block
min-height: 200px
margin-right: 80px
p
max-width: 500px
padding-top: 40px
margin-bottom: 0
// Headers
h1
font-size: 68px
color: #fff
text-transform: uppercase
font-weight: 900
line-height: 86px
margin: 0 0 35px 0
padding: 0
h2
font-size: 48px
line-height: 57px
font-weight: 900
color: #fff
text-transform: uppercase
margin: 0 0 40px 0
padding: 0
h3
font-size: 36px
line-height: 44px
color: #fff
font-weight: 900
padding: 0
margin-bottom: 6px
// Buttons
.btn-pill
height: 50px
padding: 0 100px
box-shadow: 0 2px 10px 0 rgba(0,0,0,0.28)
border-radius: 100px
text-align: center
line-height: 50px
font-size: 24px
position: relative
transition: all 300ms ease
bottom: 0
&:hover
bottom: 10px
box-shadow: 0 12px 15px 0 rgba(0,0,0,0.28)
&.white
background: #fff
color: #4360AE
// Links suppressor
a.links-suppressor, .links-suppressor a
text-decoration: none
Also see: Tab Triggers