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 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.

Details

Privacy

Go PRO Window blinds lowered to protect code. Code Editor with window blinds (raised) and a light blub turned on.

Keep it secret; keep it safe.

Private Pens are hidden everywhere on CodePen, except to you. You can still share them and other people can see them, they just can't find them through searching or browsing.

Upgrade to PRO

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.

Template

Make Template?

Templates are Pens that can be used to start other Pens quickly from the create menu. The new Pen will copy all the code and settings from the template and make a new Pen (that is not a fork). You can view all of your templates, or learn more in the documentation.

Template URL

Any Pen can act as a template (even if you don't flip the toggle above) with a special URL you can use yourself or share with others. Here's this Pen's template URL:

Screenshot

Screenshot or Custom Thumbnail

Screenshots of Pens are shown in mobile browsers, RSS feeds, to users who chose images instead of iframes, and in social media sharing.

This Pen is using the default Screenshot, generated by CodePen. Upgrade to PRO to upload your own thumbnail that will be displayed on previews of this pen throughout the site and when sharing to social media.

Upgrade to PRO

HTML

              
                <html lang="en" >
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <!-- Angular Material style sheet -->
    <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
    <link rel="stylesheet" href="https://ajax.googleapis.com/ajax/libs/angular_material/1.0.0/angular-material.min.css">
    <link rel="stylesheet" href="style.css">
</head>
<body ng-app="BlankApp" ng-controller="AppController as ctrl" ng-cloak>
<!--
  Your HTML content here
-->
<md-content class="content">
<div class="sentence-box md-whiteframe-1dp" ng-repeat="n in [1]">
    <div class="header md-whiteframe-4dp">
        <div class="main-sentence" layout="row" layout-align="center center">
            <img src="https://tatoeba.org/img/flags/eng.png" class="lang"/>
            <div class="text" flex>
                Hard work never killed anyone. But why take the risk?!
            </div>
            <md-button aria-label="Play audio" class="md-icon-button">
                <md-icon>volume_up</md-icon>
            </md-button>
            <md-button aria-label="Menu" class="md-icon-button" ng-click="ctrl.toggleMenu()">
                <md-icon md-menu-origin>menu</md-icon>
            </md-button>
        </div>

        <div class="menu" ng-show="ctrl.isMenuVisible">
            <md-button class="md-icon-button" aria-label="Translate">
                <md-icon md-svg-src="https://tatoeba.org/img/translate.svg"></md-icon>
            </md-button>
            <md-button class="md-icon-button" aria-label="Edit">
                <md-icon md-svg-src="https://tatoeba.org/img/edit.svg"></md-icon>
            </md-button>
            <md-button class="md-icon-button" aria-label="Add to favorites">
                <md-icon md-svg-src="https://tatoeba.org/img/favorite-add.svg"></md-icon>
            </md-button>
            <md-button class="md-icon-button" aria-label="Copy">
                <md-icon md-svg-src="https://tatoeba.org/img/copy.svg"></md-icon>
            </md-button>
            <md-button class="md-icon-button" aria-label="Link to sentence">
                <md-icon md-svg-src="https://tatoeba.org/img/link.svg"></md-icon>
            </md-button>
        </div>
    </div>


    <div class="direct translations">
        <h5>Translations</h5>
        <div class="translation" layout="row" layout-align="center center">
            <img src="https://tatoeba.org/img/flags/ara.png" class="lang"/>
            <div class="text" flex>
                لم يقتل العمل الشاق أحدًا. لكن لم المخاطرة؟!
            </div>
            <md-button aria-label="Play audio" class="md-icon-button">
                <md-icon>volume_up</md-icon>
            </md-button>
            <md-button aria-label="More" class="md-icon-button" ng-click="$mdOpenMenu($event)">
                <md-icon>more_horiz</md-icon>
            </md-button>
        </div>
        <div class="translation" layout="row" layout-align="center center">
            <img src="https://tatoeba.org/img/flags/deu.png" class="lang"/>
            <div class="text" flex>
                Harte Arbeit hat noch keinen umgebracht. Aber wozu das Risiko eingehen?!
            </div>
            <md-button aria-label="Play audio" class="md-icon-button">
                <md-icon>volume_up</md-icon>
            </md-button>
            <md-button aria-label="More" class="md-icon-button" ng-click="$mdOpenMenu($event)">
                <md-icon>more_horiz</md-icon>
            </md-button>
        </div>
        <div class="translation" layout="row" layout-align="center center">
            <img src="https://tatoeba.org/img/flags/heb.png" class="lang"/>
            <div class="text" flex>
                עבודה קשה אף פעם לא הרגה אף אחד. אבל לשם מה להסתכן?!
            </div>
            <md-button aria-label="Play audio" class="md-icon-button">
                <md-icon>volume_up</md-icon>
            </md-button>
            <md-button aria-label="More" class="md-icon-button" ng-click="$mdOpenMenu($event)">
                <md-icon>more_horiz</md-icon>
            </md-button>
        </div>
        <div class="translation" layout="row" layout-align="center center">
            <img src="https://tatoeba.org/img/flags/nld.png" class="lang"/>
            <div class="text" flex>
                Van hard werken is nog nooit iemand dood gegaan. Maar waarom het risico nemen?!
            </div>
            <md-button aria-label="Play audio" class="md-icon-button">
                <md-icon>volume_up</md-icon>
            </md-button>
            <md-button aria-label="More" class="md-icon-button" ng-click="$mdOpenMenu($event)">
                <md-icon>more_horiz</md-icon>
            </md-button>
        </div>
        <div class="translation" layout="row" layout-align="center center">
            <img src="https://tatoeba.org/img/flags/rus.png" class="lang"/>
            <div class="text" flex>
                От тяжёлой работы ещё никто не умирал. Но зачем рисковать?
            </div>
            <md-button aria-label="No audio" ng-disabled="true" class="md-icon-button">
                <md-icon>volume_up</md-icon>
            </md-button>
            <md-button aria-label="More" class="md-icon-button" ng-click="$mdOpenMenu($event)">
                <md-icon>more_horiz</md-icon>
            </md-button>
        </div>
        <div class="translation" layout="row" layout-align="center center">
            <img src="https://tatoeba.org/img/flags/spa.png" class="lang"/>
            <div class="text" flex>
                El trabajo duro nunca ha matado a nadie. ¡¿Pero para qué arriesgarse?!
            </div>
            <md-button aria-label="Play audio" class="md-icon-button">
                <md-icon>volume_up</md-icon>
            </md-button>
            <md-button aria-label="More" class="md-icon-button" ng-click="$mdOpenMenu($event)">
                <md-icon>more_horiz</md-icon>
            </md-button>
        </div>
    </div>

    <md-divider></md-divider>

    <div class="indirect translations">
        <h5>Translations of translations</h5>
        <div class="translation" layout="row" layout-align="center center">
            <img src="https://tatoeba.org/img/flags/epo.png" class="lang"/>
            <div class="text" flex>
                Neniu mortis ankoraŭ pro multa laboro. Sed kial riski?
            </div>
            <md-button aria-label="Play audio" class="md-icon-button">
                <md-icon>volume_up</md-icon>
            </md-button>
            <md-button aria-label="More" class="md-icon-button" ng-click="$mdOpenMenu($event)">
                <md-icon>more_horiz</md-icon>
            </md-button>
        </div>
        <div class="translation" layout="row" layout-align="center center">
            <img src="https://tatoeba.org/img/flags/fra.png" class="lang"/>
            <div class="text" flex>
                Travailler dur n'a encore jamais tué personne. Mais pourquoi prendre le risque ?
            </div>
            <md-button aria-label="Play audio" class="md-icon-button">
                <md-icon>volume_up</md-icon>
            </md-button>
            <md-button aria-label="More" class="md-icon-button" ng-click="$mdOpenMenu($event)">
                <md-icon>more_horiz</md-icon>
            </md-button>
        </div>
    </div>
</div>

</md-content>

<!-- Angular Material requires Angular.js Libraries -->
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular-animate.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular-aria.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular-messages.min.js"></script>

<!-- Angular Material Library -->
<script src="https://ajax.googleapis.com/ajax/libs/angular_material/1.0.0/angular-material.min.js"></script>

<!-- Your application bootstrap  -->
<script type="text/javascript">
    /**
     * You must include the dependency on 'ngMaterial'
     */
    angular
        .module('BlankApp', ['ngMaterial'])
        .config(function($mdThemingProvider) {
            $mdThemingProvider.theme('default')
                    .primaryPalette('pink')
                    .accentPalette('orange');
        })
        .controller('AppController', AppController);

    function AppController() {
        var self = this;

        self.toggleMenu = toggleMenu;
        self.isMenuVisible = false;

        function toggleMenu() {
            self.isMenuVisible= !self.isMenuVisible;
        }
    }
</script>

</body>
</html>
              
            
!

CSS

              
                html {
    font-family: "Noto Sans";
}

.content {
    max-width: 960px;
    margin: auto;
}

.sentence-box {
    margin: 40px 20px;
}

.lang {
    display: inline-block;
    float: left;
    margin-right: 10px;
    width: 30px;
    height: 20px;
}

.text {
    display: inline-block;

}

.main-sentence {
}

.translations {
    padding: 10px 0 10px 10px;
}
.translation {
    padding: 0 5px 0 10px;
}

.translations h5 {
    margin: 0;
    padding: 0;
    color: grey;
}

.main-sentence md-icon {
    color: white;
}

.main-sentence md-icon:hover {
    cursor: pointer;
}

.audio {
    padding: 0 10px;
}

.audio .disabled {
    color: #E0E0E0;
}

.header {
    font-size: 24px;
    padding: 10px 5px 10px 20px;
    background-color: #424242;
    color: white;
}

.sentence-box .menu {
    padding-top: 10px;
}

.sentence-box .menu md-icon {
    color: white;
}
              
            
!

JS

              
                
              
            
!
999px
💕 I'm the CSS to your HTML.

Console