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.
<!-- Navbar -->
<body data-spy="scroll" data-target=".navbar" data-offset="75" class="text-justify">
<nav class="navbar navbar-default navbar-fixed-top" id="_nav">
<div class="navbar-header">
<a class="navbar-brand" href="#"><i class="fa fa-cog fa-spin" aria-hidden="true"></i> HomokoZó</a>
</div>
<div class="collapse navbar-collapse">
<ul class="nav navbar-nav">
<li><a href="#about">About</a></li>
<li><a href="#_caseS">Case Studies</a></li>
<li><a href="#_references">References</a></li>
</ul>
</div>
</nav>
<!-- Intro -->
<section id="intro">
<div class="container-fluid bounceUP">
<h1 class="text-center">
Get Your Jobs Done!
</h1>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure
dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
</p>
</div>
</section>
<!-- About starts from here -->
<section id="about">
<div class="container-fluid">
<div class="row bounceDOWN">
<div class="col-xs-8 col-sm-9 col-md-10">
<h1 class="text-center">
About me!
</h1>
<p>
I'm Jakab Krisztián, a 23 years old front-end enthusiast from Hungary. I started learning front-end design through Free Code Camp.
</p>
<p>
I believe, that front-end design is more than a beautiful pixel-perfect photoshop file or PDF. Its more the structure, that helps you get the jobs done.
</p>
<p>
My goal is, to define the jobs, then define the structure. From the structure build up the user interactions and the experience. End of the day, get a well structured, clear and transparent page, that gives you the solution, to your certain jobs.
</p>
</div>
<div class="col-xs-4 col-sm-3 col-md-2 text-center">
<img src="https://scontent.fbud1-1.fna.fbcdn.net/v/t1.0-9/13015412_1032581440122250_6046418866117038698_n.jpg?oh=e8dafa19a168cb4b210eb670bbd972a0&oe=57DC4BE5" class="img-responsive img-circle img-thumbnail slideanim slide">
<h4 class="text-center">Jakab Krisztián</h4>
<p class="text-muted quote">"Szeretem a sajtot!"</p>
<p><a href="#" target="_blank"><i class="fa fa-facebook" aria-hidden="true"></i> Facebook</a></p>
<p><a href="#" target="_blank"><i class="fa fa-instagram" aria-hidden="true"></i> Instagram</a></p>
<p><a href="#" target="_blank"><i class="fa fa-youtube" aria-hidden="true"></i> Youtube</a></p>
<p><a href="#" target="_blank"><i class="fa fa-twitch" aria-hidden="true"></i> Twitch.tv</a></p>
<p><a href="#" target="_blank"><i class="fa fa-twitter" aria-hidden="true"></i> Twitter</a></p>
</ol>
</div>
</div>
</div>
</section>
<!-- case studies -->
<section id="_caseS">
<div class="container-fluid">
<div class="row animation-element slide-left" id="case01">
<div class="col-xs-12 col-sm-6 col-md-4">
<a href="https://codepen.io/wokSiHD/full/oLbVJR" target="_blank"><img src="https://drive.google.com/uc?id=0B4fqXqd3Z02MV3BTcmoyMVVwYU0" class="img-responsive img-thumbnail"></a>
</div>
<div class="col-xs-12 col-sm-6 col-md-8">
<h2>
Kamui Senketsu<small> - tribute page</small>
</h2>
<p>
This tribute page was the first front-end I've created. It's been done for the first big challenge on <a href="https://www.freecodecamp.com" target="_blank">Free Code Camp</a>.
</p>
<p>
It had very simple user stories, that I broke down later, into more complex jobs, and jobstories:
</p>
<ul style="text-align: left;">
<li><strong>User Story 1:</strong> I can view a tribute page with an image and text.
</li>
<li><strong>User Story 2:</strong> I can click on a link that will take me to an external website with further information on the topic.
</li>
</ul>
<p>
<strong>For me the biggest challenge was knowing when the page is finished.</strong> As it's started out as a sketch to play around with the environment of <a href="https://codepen.io/" target="_blank"><i class="fa fa-codepen" aria-hidden="true"></i> Codepen</a> and the structure of <a href="https://getbootstrap.com" target="_blank">Bootstrap</a>, but the further the project progressed, it became more clear and also more transparent at the end.
</p>
<p>
<strong>To sum it up:</strong> this project was something nice to start off with, and to learn some of the basics.
</p>
<p>
Also the fact, that <strong>the structure is the most important part of any front-end design</strong>, this project gave me a clear vision to follow in the future.
</p>
</div>
</div>
<div class="row animation-element slide-right" id="case02">
<div class="col-xs-8">
<h2>
Case 02
</h2>
<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor
in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
</p>
</div>
<div class="col-xs-4">
</div>
</div>
<div class="row animation-element slide-left" id="case03">
<div class="col-xs-4">
</div>
<div class="col-xs-8">
<h2>
Case 03
</h2>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute
irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
</div>
</div>
</div>
</section>
<!-- references -->
<section id="_references">
<div id="getRow" class="carousel slide" data-ride="carousel">
<!-- indicators -->
<ol class="carousel-indicators">
<li data-target="#getRow" data-slide-to="0" class="active"></li>
<li data-target="#getRow" data-slide-to="1"></li>
<li data-target="#getRow" data-slide-to="2"></li>
</ol>
<!-- content -->
<div class="carousel-inner">
<!-- item with no big img -->
<div class="item active">
<div class="container-fluid">
<div class="row">
<div class="col-xs-8">
<h3 class="text-center">
The first reference
</h3>
<p class="text-justify">
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
</p>
</div>
<div class="col-xs-4">
<img src="https://scontent.fbud1-1.fna.fbcdn.net/v/t1.0-9/12004862_920892367957825_36217278864647897_n.jpg?oh=5fd10d3b946982044ef988b4cb3a4e83&oe=57CCF4DA" class="img-responsive img-thumbnail" alt="motivational picture thumbnail">
</div>
</div>
</div>
</div>
<!-- end of: item with no big img -->
<!-- image base item -->
<div class="item">
<img src="https://scontent.fbud1-1.fna.fbcdn.net/v/t1.0-9/12004862_920892367957825_36217278864647897_n.jpg?oh=5fd10d3b946982044ef988b4cb3a4e83&oe=57CCF4DA" alt="motivational picture" class="center-block">
<div class="carousel-caption">
<h3>
The second reference
</h3>
<p class="text-justify">
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat
</p>
</div>
</div>
<div class="item">
<img src="https://scontent.fbud1-1.fna.fbcdn.net/t31.0-8/331318_311278985585836_1508417094_o.jpg" class="center-block">
</div>
<!-- end of: image base items -->
</div>
<!-- buttons -->
<a class="left carousel-control" data-slide="prev" href="#getRow" role="button">
<i class="fa fa-chevron-left" aria-hidden="true"></i>
</a>
<a class="right carousel-control" data-slide="next" href="#getRow" role="button">
<i class="fa fa-chevron-right" aria-hidden="true"></i>
</a>
<!-- end of: buttons -->
</div>
</section>
<section id="_legacy">
<div class="container-fluid">
<h2>The road is ahead of you!</h2>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>
<div>
<h3>Subscribe for newsletter!</h3>
</div>
</div>
</section>
</body>
<!-- footer -->
<footer class="text-center text-muted">
<p><img src="https://scontent.fbud1-1.fna.fbcdn.net/v/t1.0-9/13015412_1032581440122250_6046418866117038698_n.jpg?oh=e8dafa19a168cb4b210eb670bbd972a0&oe=57DC4BE5" class="img-circle"> Jakab Krisztián - <i class="fa fa-envelope" aria-hidden="true"></i> wokSiHD@gmail.com - <i class="fa fa-phone" aria-hidden="true"></i> +36 30 639 2682 - <i class="fa fa-copyright" aria-hidden="true"></i> 2016</p>
</footer>
/* Global */
body {
font-family: 'Raleway', Helvetica, sans-serif !important;
padding-top: 0%;
padding-bottom: 0%;
}
h1,
h2,
h3,
h4,
h5,
h6 {
text-align: left;
}
strong {
font-weight: 900;
}
section {
min-height: 400px;
}
#_nav {
background: rgba(242, 242, 242, 1);
border: 0;
}
.blured
{
-webkit-filter: blur(5px);
-moz-filter: blur(5px);
-o-filter: blur(5px);
-ms-filter: blur(5px);
filter: blur(5px);
}
#intro {
background-image: url(https://newevolutiondesigns.com/images/freebies/city-wallpaper-47.jpg);
background-repeat: no-repeat;
background-attachment: fixed;
background-position: 15%;
background-size: cover;
min-height: 400px;
padding: 15%;
color: #f2f2f2;
}
#intro h1,
#intro p,
#_legacy h2,
#_legacy p,
#_legacy h3 {
background: rgba(33, 33, 33, .4);
}
#about {
background-color: #212121;
color: #f2f2f2;
padding: 5%;
}
p.quote {
font-style: italic;
}
#_caseS {
padding: 5%;
overflow: hidden;
}
#_references {
background-color: #212121;
color: #f2f2f2;
}
#getRow {
height: 400px !important;
}
#getRow img {
max-height: 400px !important;
}
.carousel-control i {
position: absolute;
top: 50%;
}
#_legacy {
background-image: url(https://1.bp.blogspot.com/-mhU3QYznQq4/U-y2KF6XZtI/AAAAAAAAF3k/D1VK0wwX_o0/s1600/desert_road_wallpapers_hd.jpg);
background-position: 15%;
background-repeat: no-repeat;
background-attachment: fixed;
padding: 5% 20% 0 5%;
color: #f2f2f2;
/* text-shadow: 0px 1px 4px rgba(0,0,0,.7); */
}
footer {
background-color: #212121;
height: 75px;
padding: 10px;
}
footer img {
max-width: 50px;
border: 2px solid;
}
/* Responsive */
@media screen and (max-width: 620px)
{
footer img
{
display: none;
}
#intro
{
background-size: cover;
}
#_legacy
{
background-size: cover;
}
}
/* Animations */
.animation-element {
opacity: 0;
position: relative;
}
/* slide lefts */
.animation-element.slide-left {
opacity: 0;
-moz-transition: all 1000ms linear;
-webkit-transition: all 1000ms linear;
-o-transition: all 1000ms linear;
transition: all 1000ms linear;
-moz-transform: translate3d(-100px, 0px, 0px);
-webkit-transform: translate3d(-100px, 0px, 0px);
-o-transform: translate(-100px, 0px);
-ms-transform: translate(-100px, 0px);
transform: translate3d(-100px, 0px, 0px);
}
.animation-element.slide-left.in-view {
opacity: 1;
-moz-transform: translate3d(0px, 0px, 0px);
-webkit-transform: translate3d(0px, 0px, 0px);
-o-transform: translate(0px, 0px);
-ms-transform: translate(0px, 0px);
transform: translate3d(0px, 0px, 0px);
}
/* slide rights */
.animation-element.slide-right {
opacity: 0;
-moz-transition: all 1000ms linear;
-webkit-transition: all 1000ms linear;
-o-transition: all 1000ms linear;
transition: all 1000ms linear;
-moz-transform: translate3d(100px, 0px, 0px);
-webkit-transform: translate3d(100px, 0px, 0px);
-o-transform: translate(100px, 0px);
-ms-transform: translate(100px, 0px);
transform: translate3d(100px, 0px, 0px);
}
.animation-element.slide-right.in-view {
opacity: 1;
-moz-transform: translate3d(0px, 0px, 0px);
-webkit-transform: translate3d(0px, 0px, 0px);
-o-transform: translate(0px, 0px);
-ms-transform: translate(0px, 0px);
transform: translate3d(0px, 0px, 0px);
}
#_nav {
background: rgba(242, 242, 242, 0);
border: 0;
}
#_nav.scrolled {
background: rgba(242, 242, 242, 1);
border: 1;
}
#_nav a.navbar-brand,
#_nav ul.navbar-nav li a {
color: #f2f2f2;
text-shadow: 0px 1px 4px rgba(0, 0, 0, .7);
}
#_nav a.navbar-brand.scrolled,
#_nav ul.navbar-nav.scrolled li a {
color: #777;
text-shadow: 0px 0px 0px rgba(0, 0, 0, 0);
}
/*on load*/
.bounceUP {
opacity: 0;
-webkit-transition: all 1s ease-in;
-moz-transition: all 1s ease-in;
-o-transition: all 1s ease-in;
-ms-transition: all 1s ease-in;
transition: all 1s ease-in;
-moz-transform: translate3d(0px, 50px, 0px);
-webkit-transform: translate3d(0px, 50px, 0px);
-o-transform: translate(0px, 50px);
-ms-transform: translate(0px, 50px);
transform: translate3d(0px, 50px, 0px);
}
.bounceUP.load {
opacity: 1;
-moz-transform: translate3d(0px, 0px, 0px);
-webkit-transform: translate3d(0px, 0px, 0px);
-o-transform: translate(0px, 0px);
-ms-transform: translate(0px, 0px);
transform: translate3d(0px, 0, 0px);
}
.bounceDOWN {
opacity: 0;
-webkit-transition: all 750ms ease-in;
-moz-transition: all 750ms ease-in;
-o-transition: all 750ms ease-in;
-ms-transition: all 750ms ease-in;
transition: all 750ms ease-in;
-moz-transform: translate3d(0px, -100px, 0px);
-webkit-transform: translate3d(0px, -100px, 0px);
-o-transform: translate(0px, -100px);
-ms-transform: translate(0px, -100px);
transform: translate3d(0px, -100px, 0px);
}
.bounceDOWN.load {
opacity: 1;
-moz-transform: translate3d(0px, 0px, 0px);
-webkit-transform: translate3d(0px, 0px, 0px);
-o-transform: translate(0px, 0px);
-ms-transform: translate(0px, 0px);
transform: translate3d(0px, 0, 0px);
}
/* for debug */
._border
{
border: 2px solid red !important;
}
._overFlowHidden
{
overflow-x: hidden;
}
var $animation_elements = $('.animation-element');
var $window = $(window);
/* ha görgetünk vagy átméretezzük az ablakot elindul a check_if_in_view */
$window.on('scroll resize', check_if_in_view);
$window.on('scroll resize', topbarToggle);
/* check_if_in_view elindul, ha a DOM (Document Object Model) betöltött » triggereljük az előbb felvett scroll eventet. */
$window.trigger('scroll');
/* megnézzük benne van-e a képben » check if in view */
function check_if_in_view() {
/* ablak méretet leíró változók */
var window_height = $window.height();
var window_top_position = $window.scrollTop();
var window_bottom_position = (window_top_position + window_height);
/* minden animation_elements változója */
$.each($animation_elements, function() {
var $element = $(this);
var element_height = $element.outerHeight();
var element_top_position = $element.offset().top;
var element_bottom_position = (element_top_position + element_height);
/*ha az adott elem látszik akkor megkapja az "in-view" class-t, amivel CSS-ben lehet operálni »
"We compare each item to see if its bottom position is greater than the top position of the window but also that the item’s top position is less than the bottom position of the window." */
if ((element_bottom_position >= window_top_position) &&
(element_top_position <= window_bottom_position)) {
$element.addClass('in-view');
} else {
$element.removeClass('in-view');
}
});
}
/* airmoove-ból túrva :D */
function topbarToggle() {
$(document).scroll(function() {
$(".navbar-fixed-top, .navbar-brand, .navbar-nav").toggleClass("scrolled", $(document).scrollTop() >= 40);
});
};
/* betöltésre */
$(document).ready(function() {
$(".bounceUP").addClass("load");
$(".bounceDOWN").addClass("load");
});
Also see: Tab Triggers