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.

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

              
                <html>

<body>
  <div class="container-fluid">
    <div class="row">
      <div class="col-xs-12 col-md-4">
      <div class="instructions">
        <h4>사용방법</h4>
        <p>1. 옆 화면의 입력창을 클릭 <br><br> 2. 한글 단어 발음을 입력 후 엔터 누르기
        </p>
        <p><strong>주의 사항:</strong><br> 1. 이 페이지는 Aㅏ 어플의 프로토타입입니다.<br> 2. 어플리케이션의 시범, 체험 및 개발을 위해 만들어 졌음으로 선정된 단어들만 번역이 가능하다는 점을 참고 해 주시기 바랍니다.
        </p>
        <p>
          <strong>선정 단어:</strong><br> ゴム / GOM - 곰<br> べー / BAE - 배<br> ナム / NAMU - 나무<br> アンニョン / ANNYEONG - 안녕<br> グンムル / GUNMUL - 건물<br> ウンシク / UMSIK - 음식<br> バーダー / BADA - 바다<br>
        </p>

      </div>
      </div>
      
      <div class="col-xs-12 col-md-6">
        
      <div class="phone">
      
      <div class="screen">

        <!--           <div class="searchInput bold">GOM</div> -->

        <section class="content">

          <span class="input input--isao">
					<input class="input__field" type="text" placeholder="Click"/>
				
			</section>
          
          
          <div class="koreanOutput bold"></div>
          <hr class="hide" width="240" color="#ff0000">
          
          <div class="definition">
            
          <span class="korDef">
          </span>

      </div>
    </div>
        
        <div class="homeButton">
        </div>
    
      </div>
        </div>
      </div>
    </div>
    </body>
  <footer>
    <div class="row">
      <div class="col-md-12">
  <div class="footer">
      <span> ** 이 페이지는 프로토타입임으로 완벽히 작동하지 않을 수 있음을 알려드립니다. / </span><br>
      <span> ** This page is a prototype - hence may not be fully functional.</span>
    </div>
    </div>
    </div>
  </footer>
  
    </html>
              
            
!

CSS

              
                body {
  background: #ededed;
}

.instructions {
  word-wrap: break-word;
  width: 300px;
  margin-top: 200px;
  margin-left: 150px;
}


.phone {
  border-style: solid;
  border-radius: 25px;
  color: #dbdbdb;
  width: 300px;
  height: 600px;
  margin-top: 100px;
  margin-left: 30%;
}

.screen {
  position: absolute;
/*   margin: auto; */
  margin-top: 65px;
/*   margin-bottom: 100px; */
  margin-left: 10px;
  background-color: #FFF;
  word-wrap: break-word;
  /* iPhone 7 screen resolution 1334-by-750-pixel resolution */
  width: 275px;
  height: 465px;
}

.homeButton {
  margin: auto;
  margin-top: 535px;
  width: 50px;
      height: 50px;
      -webkit-border-radius: 25px;
      -moz-border-radius: 25px;
      border-radius: 25px;
  border-style: solid;
      color: #dbdbdb;
}


.searchInput {
  margin-top: 0px;
  margin-left: 40px;
  font-family: gotham; 
  font-size: 500%;
  
}

.koreanOutput {
  margin-left: 40px;
  font-size: 500%;
}

hr {
  position: relative;
  margin-top: 5px;
  margin-left: 30px;
}

.definition {
  display: block;
  position: absolute;
  margin-top: 20px;
  padding-left: 25px;
  padding-right: 25px;
  
  color: #CCCCCC;
  
}



/* @Font-Face*/

/* For normal */
.normal {
  font-weight: 400;
}

/* For bold */
.bold,
strong {
  font-weight: 700;
}

/* For thin */
.light {
  font-weight: 300;
}

@font-face {
  font-family: 'Gotham';
  src: url('fonts/Gotham-Bold.eot'); /* IE9 Compat Modes */
  src: url('fonts/Gotham-Bold.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
     url('fonts/Gotham-Bold.woff') format('woff'), /* Modern Browsers */
     url('fonts/Gotham-Bold.ttf')  format('truetype'), /* Safari, Android, iOS */
     url('fonts/Gotham-Bold.svg#svgFontName') format('svg'); /* Legacy iOS */
   font-weight: 700;
   font-style: normal;
 }

@font-face {
  font-family: 'Gotham';
  src: url('fonts/Gotham-Medium.eot'); /* IE9 Compat Modes */
  src: url('fonts/Gotham-Medium.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
     url('fonts/Gotham-Medium.woff') format('woff'), /* Modern Browsers */
     url('fonts/Gotham-Medium.ttf')  format('truetype'), /* Safari, Android, iOS */
     url('fonts/Gotham-Medium.svg#svgFontName') format('svg'); /* Legacy iOS */
   font-weight: 400;
   font-style: normal;
 }

@font-face {
  font-family: 'Gotham';
  src: url('fonts/Gotham-Thin.eot'); /* IE9 Compat Modes */
  src: url('fonts/Gotham-Thin.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
     url('fonts/Gotham-Thin.woff') format('woff'), /* Modern Browsers */
     url('fonts/Gotham-Thin.ttf')  format('truetype'), /* Safari, Android, iOS */
     url('fonts/Gotham-Thin.svg#svgFontName') format('svg'); /* Legacy iOS */
   font-weight: 300;
   font-style: normal;
 }




/* INPUT CSS */

.content {
  margin-top: 35px;
  margin-left: 40px;
}

input::placeholder {
  color: #e5e5e5;
}


.input {
	display: inline-block;
	max-width: 300px;
	vertical-align: top;
}

.input__field {
	display: block;
	width: 60%;
	border: none;
	border-radius: 0;
	background: #f0f0f0;
	font-weight: bold;
	font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 500%;
	width: 100%;
	background: transparent;
	color: #333333;
	-webkit-appearance: none; /* for box shadows to show on iOS */
}

.input__field:focus {
	outline: none;
}

.footer {
  color: white;
  position: relative;
  margin-top: 150px;
 
}

.hide {
 display: none; 
}







/* ANIMATION */

.slideanim {visibility:hidden;}
.slide {
    /* The name of the animation */
    animation-name: slide;
    -webkit-animation-name: slide; 
    /* The duration of the animation */
    animation-duration: 1s; 
    -webkit-animation-duration: 1s;
    /* Make the element visible */
    visibility: visible; 
}

/* Go from 0% to 100% opacity (see-through) and specify the percentage from when to slide in the element along the Y-axis */
@keyframes slide {
    0% {
        opacity: 0;
        transform: translateY(70%);
    } 
    100% {
        opacity: 1;
        transform: translateY(0%);
    } 
}
@-webkit-keyframes slide {
    0% {
        opacity: 0;
        -webkit-transform: translateY(70%);
    } 
    100% {
        opacity: 1;
        -webkit-transform: translateY(0%);
    }
}
              
            
!

JS

              
                $(document).ready(function(){
  $('input').keypress(function(e) {
    if(e.which == 13) {
      
      var val = $("input:text").val();
      //var splitVal = val.toLowerCase().split("")
      var valUpperCase = val.toUpperCase();
      
      console.log(val);
      // $(".koreanOutput").text(val);
      translate(valUpperCase);
    }
    });
});

function translate(val) {
  var GOM = '<strong>'+ "곰" + '</strong>' + "[곰ː] 발음 듣기 " + "BEAR: [NOUN]" + '<br>' + "1. (Animal) A bear is a large, strong wild animal with thick fur and sharp claws." + '<br>' + '<br>' + "2. (동물) 포유강 식육목 곰과의 동물을 통틀어 이르는 말. 몸이 비대하며 다리가 굵고 짧다. 꼬리는 털에...";
  
  var BAE = '<strong>'+ "배" + '</strong>' + "[배ː] 발음 듣기 " + "STOMACH: [NOUN] | BOAT: [NOUN]" + '<br>' + "1.(body) stomach, belly, abdomen; tummy" + "배가 고프다" + "(vehicle)boat, ship, vessel";
  
  var NAMU = '<strong>'+ "나무" + '</strong>' + "[나무ː] 발음 듣기 " + "TREE: [NOUN]" + '<br>' + "1. (Plant) tree" + '<br>' + '<br>' + "2. 줄기나 가지가 목질로 된 여러해살이 식물.";
  
  var ANNYEONG = '<strong>'+ "안녕" + '</strong>' + "[안녕ː] 발음 듣기 " + "Hi, Hello: [NOUN]" + '<br>' + "1. greeting (public) peace; (안정) stability, well;" + '<br>' + '<br>' + "2. 아무 탈 없이 편안하다.";
 
  var GUNMUL = '<strong>'+ "건물" + '</strong>' + "[건물ː] 발음 듣기 " + "BUILDING: [NOUN]" + '<br>' + "1. building, structure; (거대한) (formal) edifice" + '<br>' + '<br>' + "2. 사람이 들어 살거나, 일을 하거나, 물건을 넣어 두기 위하여 지은 집을 통틀어 이르는 말.";
  
  var UMSIK = '<strong>'+ "음식" + '</strong>' + "[음식ː] 발음 듣기 " + "FOOD: [NOUN]" + '<br>' + "1. food" + '<br>' + '<br>' + "2. 사람이 먹을 수 있도록 만든, 밥이나 국 따위의 물건.";
  
  var BADA = '<strong>'+ "바다" + '</strong>' + "[바다ː] 발음 듣기 " + "OCEAN: [NOUN]" + '<br>' + "1. sea, ocean" + '<br>' + '<br>' + "2. <지리>지구 위에서 육지를 제외한 부분으로 짠물이 괴어 하나로 이어진 넓고 큰 부분. ...";
  
  switch (val) {
    case "GOM":
      $(".koreanOutput").text("곰")
      $(".korDef").html(GOM)
      $("koreanOutput").addClass("slideanim")
      $("hr").removeClass("hide")
      break;
    case "BAE":
      $(".koreanOutput").html("배")
      $(".korDef").html(BAE)
      $("hr").removeClass("hide")
      break;
    case "NAMU":
      $(".koreanOutput").html("나무")
      $(".korDef").html(NAMU)
      $("hr").removeClass("hide")
      break;
    case "ANNYEONG":
      $(".koreanOutput").html("안녕")
      $(".korDef").html(ANNYEONG)
      $("hr").removeClass("hide")
      break;
    case "GUNMUL":
      $(".koreanOutput").html("건물")
      $(".korDef").html(GUNMUL)
      $("hr").removeClass("hide")
      break;
    case "UMSIK":
      $(".koreanOutput").html("음식")
      $(".korDef").html(UMSIK)
      $("hr").removeClass("hide")
      break;
    case "BADA":
      $(".koreanOutput").html("바다")
      $(".korDef").html(BADA)
      $("hr").removeClass("hide")
      break;
      
      //Japanese Characters
    case "ゴム":
      $(".koreanOutput").html("곰")
      $(".korDef").html(GOM)
      $("hr").removeClass("hide")
      break;
    case "べー":
      $(".koreanOutput").html("배")
      $(".korDef").html(BAE)
      $("hr").removeClass("hide")
      break;
    case "ナム":
      $(".koreanOutput").html("나무")
      $(".korDef").html(NAMU)
      $("hr").removeClass("hide")
      break;
    case "アンニョン":
      $(".koreanOutput").html("안녕")
      $(".korDef").html(ANNYEONG)
      $("hr").removeClass("hide")
      break;
    case "グンムル":
      $(".koreanOutput").html("건물")
      $(".korDef").html(GUNMUL)
      $("hr").removeClass("hide")
      break;
    case "ウンシク":
      $(".koreanOutput").html("음식")
      $(".korDef").html(UMSIK)
      $("hr").removeClass("hide")
      break;
    case "バーダー":
      $(".koreanOutput").html("바다")
      $(".korDef").html(BADA)
      $("hr").removeClass("hide")
      break;
             }
  
  /*
  switch(expression) {
    case n:
        code block
        break;
    case n:
        code block
        break;
    default:
        code block
}
  */
}
              
            
!
999px

Console