Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

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.

+ add another resource

JavaScript

Babel is required to process package imports. If you need a different preprocessor remove all packages first.

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

Behavior

Save Automatically?

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

              
                <div class="container">
  <div class="side">
    
    <div class="menu"><i class="fa fa-ellipsis-v"></i></div>
    <div class="share"><i class="fa fa-share-alt"></i></div>
  </div>
  <div class="copy">
    <header>
    <h3>OTH.</h3>
    <div class="circle">&sdot; a&nbsp;&nbsp; story&nbsp;&nbsp; from&nbsp; mynamar &nbsp;
    </div>
    </header>
    <main>
    <h1>Morning's<br> Light</h1>
    <h4>Welcoming break of dawn on<br> the world's longest teak bridge.</h4>
    <h6>read 
<svg width="512px" height="512px" enable-background="new 0 0 64 64" version="1.1" viewBox="0 0 64 64" xml:space="preserve" xmlns="http://www.w3.org/2000/svg">
		<polygon points="53.293 40.293 54.854 41.707 64 32.707 64 31.293 54.854 22.293 53.366 23.707 60.586 31 0 31 0 33 60.586 33" fill="#dabdbd"/>
</svg>
</h6>
    </main>
  </div>
  <div class="photo">
    <img src="https://static1.squarespace.com/static/572c7ec0e707eb121372a3e9/572dcd8da3360c68b3d743f3/58ac7c1e03596e6e756eedfc/1502475692643/OTH+-+MYN+-DSCF2176.jpg" alt="">

  </div>
</div>


              
            
!

CSS

              
                @import url('https://fonts.googleapis.com/css?family=Lato|Montserrat|Playfair+Display:700');

$bckgrnd: #f0f2f1;
$blk: #191919;
$drkgrey: #d7d7d7;
$lghtgrey: #fafafa;
$white: #ffffff;
$rose: #dabdbd;

body {
  background: $bckgrnd;
  display: flex;
  align-items: center;
  justify-content: center;
}

.container {
  box-shadow: 0 25px 55px -20px rgba(0,0,0, .25);
  display: flex;
  height: 445px;
  width: 700px;
  margin-top: 7vh;
}

.side {
  background: $lghtgrey;
  border-right: 1px solid $drkgrey;
  height: 100%;
  width: 10%;
}

.copy {
  background: $white;
  height: 100%;
  width: 45%;
}

.photo {
  background: {
    color: $blk;
  } 
  overflow: hidden;
  width: 45%;
  height: 100%;
  & img {
    height: 445px;
    width: 667px;
    position: relative;
    right: 150px;
  }
}

header {
  top: 0;
  position: absolute;
}

main {
  top: 75px;
  position: relative;
}

h1 {
  color: $blk;
  font: {
    family: "Playfair Display", serif;
    size: 3.25em;
  }
  text-align: center;
  margin-top: 1.5em;
}

h3 {
  color: $rose;
  font: {
    family: "Montserrat", sans-serif;
    size: .90em;
  }
  letter-spacing: 1.5px;
  position: relative;
  top: 110px;
  left: 130px;
  width: 300px;
}

h4 {
  color: $blk;
  font: {
    family: "Montserrat", sans-serif;
    size: .75em;
    weight: 500;
  }
  letter-spacing: .25px;
  line-height: 1.25em;
  text-align: center;
}

h6 {
  color: $rose;
  font: {
    family: "Montserrat", sans-serif;
    size: .65em;
    weight: 400;
  }
  letter-spacing: 1.5px;
  text: {
    align: center;
    transform: uppercase;
  }
}

.circle {
  color: $rose;
  font: {
    family: "Lato", sans-serif;
    size: .75em;
  }
  letter-spacing: 0;
  top: 45px;
  text-transform: uppercase;
  position: relative;
  width: 300px;
}

i {
  color: $drkgrey;
}

.menu {
  text-align: center;
  font-size: 1.25em;
  top: 30px;
  position: relative;
}

.share {
  text-align: center;
  margin-top: 23.5em;
  position: relative;
}

svg {
  display: inline;
  vertical-align: middle;
  height: 36px;
  width: 36px;
}
              
            
!

JS

              
                /*
 * CircleType 0.34
 * Peter Hrynkow
 * Copyright 2013, Licensed GPL & MIT
 *
*/

$.fn.circleType = function(options) {

    var settings = {
        dir: 1,
        position: 'relative'
    };
    if (typeof($.fn.lettering) !== 'function') {
        console.log('Lettering.js is required');
        return;
    }
    return this.each(function () {
    
        if (options) { 
            $.extend(settings, options);
        }
        var elem = this, 
            delta = (180 / Math.PI),
            ch = parseInt($(elem).css('line-height'), 10),
            fs = parseInt($(elem).css('font-size'), 10),
            txt = elem.innerHTML.replace(/^\s+|\s+$/g, '').replace(/\s/g, '&nbsp;'),
            letters, 
            center;
        
        elem.innerHTML = txt
        $(elem).lettering();

        elem.style.position =  settings.position;

        letters = elem.getElementsByTagName('span');
        center = Math.floor(letters.length / 2)
                
        var layout = function () {
            var tw = 0, 
                i,
                offset = 0,
                minRadius, 
                origin, 
                innerRadius,
                l, style, r, transform;
                                                
            for (i = 0; i < letters.length; i++) {
                tw += letters[i].offsetWidth;
            }
            minRadius = (tw / Math.PI) / 2 + ch;
            
            if (settings.fluid && !settings.fitText) {
                settings.radius = Math.max(elem.offsetWidth / 2, minRadius);
            }    
            else if (!settings.radius) {
                settings.radius = minRadius;
            }   
            
            if (settings.dir === -1) {
                origin = 'center ' + (-settings.radius + ch) / fs + 'em';
            } else {
                origin = 'center ' + settings.radius / fs + 'em';
            }

            innerRadius = settings.radius - ch;
                
            for (i = 0; i < letters.length; i++) {
                l = letters[i];
                offset += l.offsetWidth / 2 / innerRadius * delta;
                l.rot = offset;                      
                offset += l.offsetWidth / 2 / innerRadius * delta;
            }   
            for (i = 0; i < letters.length; i++) {
                l = letters[i]
                style = l.style
                r = (-offset * settings.dir / 2) + l.rot * settings.dir            
                transform = 'rotate(' + r + 'deg)';
                    
                style.position = 'absolute';
                style.left = '50%';
                style.marginLeft = -(l.offsetWidth / 2) / fs + 'em';

                style.webkitTransform = transform;
                style.MozTransform = transform;
                style.OTransform = transform;
                style.msTransform = transform;
                style.transform = transform;

                style.webkitTransformOrigin = origin;
                style.MozTransformOrigin = origin;
                style.OTransformOrigin = origin;
                style.msTransformOrigin = origin;
                style.transformOrigin = origin;
                if(settings.dir === -1) {
                    style.bottom = 0;
                }
            }
            
            if (settings.fitText) {
                if (typeof($.fn.fitText) !== 'function') {
                    console.log('FitText.js is required when using the fitText option');
                } else {
                    $(elem).fitText();
                    $(window).resize(function () {
                        updateHeight();
                    });
                }
            }    
            updateHeight();
        };
        
        var getBounds = function (elem) {
        	var docElem = document.documentElement,
        	    box = elem.getBoundingClientRect();
	        return {
		        top: box.top + window.pageYOffset - docElem.clientTop,
		        left: box.left + window.pageXOffset - docElem.clientLeft,
		        height: box.height
	        };
        };        
        
        var updateHeight = function () {
            var mid = getBounds(letters[center]),
                first = getBounds(letters[0]),
                h;
            if (mid.top < first.top) {
                h = first.top - mid.top + first.height;
            } else {
                h = mid.top - first.top + first.height;
            }
            elem.style.height = h + 'px';  
        }

        if (settings.fluid && !settings.fitText) {
            $(window).resize(function () {
                layout();
            });
        }    

        if (document.readyState !== "complete") {
            elem.style.visibility = 'hidden';
            $(window).load(function () {
                elem.style.visibility = 'visible';
                layout();
            });
        } else {
            layout();
        }
    });
};




$('.circle').circleType({position: 'relative'});






/*
Photo: https://www.opiumteahouse.co.uk/

Ellipsis & Share Icon: Font Awesome

Arrow Icon: Dario Ferrando from Flaticon
*/
              
            
!
999px

Console