Wednesday, December 29, 2021

TC Cup of Codes: Creating Responsive Three Columns Layout

I've made another change in my blog! Now I'm adding my videography portfolio


Previously, I used a simple table to just put my embedded videos and some information related to the videos in one row. Sadly, it looked so pathetic when the clients opened it from their phone, since it only resize the table into smaller size, and the videos are squeezed into their smallest dimensions.

Then, I remembered one time that I saw a random portfolio of someone which smoothly change its table visualization from columns to rows when the screen-size changed. I try to meditate Google it up and found out it's called Responsive Column Layout.


So, in this post I would like to show you how to make a responsive column layout like how I showcase my current videography portfolio

1. Set up your <meta>

The <meta>  tag defines metadata about an HTML document. Metadata is data (information) about data. Just a quick reminder, in case you're interested.

 
1
<meta name="viewport" content="width=device-width, initial-scale=1">
 
 
<meta name="viewport" content="width=device-width, initial-scale=1">

2. Set up the column

Add this CSS class to your theme (check first if there's already the same class used before in your theme). It will create equals columns that floats next to each other.

 
1
2
3
4
5
6
.column {
  float: left;
  width: calc(100%/3);
  padding: 10px;
  height: 300px; /* Should be removed. Only for demonstration */
}
 
 
.column {
  float: left;
  width: calc(100%/3);
  padding: 10px;
  height: 300px; /* Should be removed. Only for demonstration */
}

3. Set up the row

Add this CSS class to set another row whenever you finished adding the columns.

 
1
2
3
4
5
.row:after {
  content: "";
  display: table;
  clear: both;
}
 
 
.row:after {
  content: "";
  display: table;
  clear: both;
}

4. Set up the responsive layout

Add this responsive layout to makes the columns stack on top of each other instead of next to each other.

 
1
2
3
4
@media screen and (max-width: 600px) {
  .column {
    width: 100%;
  }
 
 
@media screen and (max-width: 600px) {
  .column {
    width: 100%;
  }

5. Set up the content

Now, we're going to put these floating columns on your page

 
01
02
03
04
05
06
07
08
09
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<div class="row">
  <div class="column" style="background-color:#aaa;">
    <h2>Column 1</h2>
    <p>Some text..</p>
  </div>
  <div class="column" style="background-color:#bbb;">
    <h2>Column 2</h2>
    <p>Some text..</p>
  </div>
  <div class="column" style="background-color:#ccc;">
    <h2>Column 3</h2>
    <p>Some text..</p>
  </div>
</div>
<div class="row">
  <div class="column" style="background-color:#aaa;">
    <h2>Column 1</h2>
    <p>Some text..</p>
  </div>
  <div class="column" style="background-color:#bbb;">
    <h2>Column 2</h2>
    <p>Some text..</p>
  </div>
  <div class="column" style="background-color:#ccc;">
    <h2>Column 3</h2>
    <p>Some text..</p>
  </div>
</div>
 
 
<div class="row">
  <div class="column" style="background-color:#aaa;">
    <h2>Column 1</h2>
    <p>Some text..</p>
  </div>
  <div class="column" style="background-color:#bbb;">
    <h2>Column 2</h2>
    <p>Some text..</p>
  </div>
  <div class="column" style="background-color:#ccc;">
    <h2>Column 3</h2>
    <p>Some text..</p>
  </div>
</div>
<div class="row">
  <div class="column" style="background-color:#aaa;">
    <h2>Column 1</h2>
    <p>Some text..</p>
  </div>
  <div class="column" style="background-color:#bbb;">
    <h2>Column 2</h2>
    <p>Some text..</p>
  </div>
  <div class="column" style="background-color:#ccc;">
    <h2>Column 3</h2>
    <p>Some text..</p>
  </div>
</div>


That's it! Now you have a more interesting visual with a responsive effect (try resize the window size to see how it works or try open it from your phone with mobile view).

--
Source:

Friday, September 17, 2021

TC Speaks Fluently: Some English Proverbs Equivalent to Indonesian Proverbs

Often times, when you translate an English literature, you will stumble upon some proverbs in the language and do not want to translate it per words. Instead, you want to find equal proverbs which have the similar meaning in your target language (in this post, it will be Indonesian). Here are some examples of those proverbs:
  1. To have an axe to grind = Ada udang di balik batu
  2. One scabbed sheep is enough to spoil a flock = Sebab nila setitik rusak susu sebelanga
  3. To cherish a viper in one’s bosom = Air susu dibalas air tuba
  4. To fish in troubled waters = Memancing di air keruh
  5. Cut your coat according to your cloth = Bayang-bayang hendaklah sepanjang badan
  6. To carry coals to New-castle = Membuang garam ke laut
  7. The pot calls the cattle black = Udang hendak mengatai ikan
  8. He is a dog in the manger = Badak-badak, minta aku daging; Bangau2, minta aku leher
  9. A thorn in one’s flesh = Seperti duri dalam daging
  10. Home, sweet home = Hujan emas di negeri orang, hujan batu di negeri awak, elok juga di negeri awak
  11. Huge winds blow on high hills = Besar kapal besar gelombangnya, besar kayu besar dahannya
  12. Barking dogs seldom bite = Anjing menggonggong tidak akan menggigit
  13. No rose without thorn = Tiada gading yang tak retak
  14. Like father, like child = Air cucuran atap jatuhnya ke pelimpahan juga
  15. Misfortunes never come singly = Antan patah, lesung hilang
  16. Out of the frying-pan into the fire = Lepas dari mulut harimau jatuh ke mulut buaya
  17. To behold the mote in the eye of one’s neighbour, but not the beam in one’s own = Gajah di kelopak mata tak tampak, kuman di seberang lautan tampak
  18. Once a use and ever a custom = Kebiasaan menjadi tabiat
  19. Strike the iron while it is hot = Menjemur di waktu hari panas.
  20. Such things bring grist to his mill = Pucuk dicinta ulam tiba
  21. Such as the tree, such is the fruit = Bagaimana biduk, bagaimana pengayuh
  22. The apple falls near the tree = Air cucuran atap jatuhnya ke pelimpahan juga
  23. Harm set, haram get= Siapa menggali lubang, ia juga terperosok ke dalamnya
  24. After rain comes sunshine = Sesudah hujan datang terang
  25. His bread is buttered on both sides = Seperti parang bermata dua
  26. There is no smoke without a fire = Kalau tak ada api takkan ada asap
  27. The right man in the right place = Asal ayam pulang ke lesung, asal itik pulang ke pelimpahan
  28. The tongue wounds more than a lance = Berkata peliharakan lidah
  29. To show the white feather = Malu berani, mati takut
  30.  When at Rome, do as Rome does = Di mana tanah dipijak, disitu langit dijunjung
  31. In the land of the blind, the one-eyed is king = Dimana tiada elang, kata belalang, akulah elang
  32. To kill two birds with one stone = Sekali merangkuh dayung, dua, tiga pulau terlampaui
  33. To pour water into a broken basin = Bagai menghasta kain sarung
  34. Too much of a good thing is good for nothing = Seperti kersik di pulau
  35. To save money for a rainy day = Sebelum hujan sediakan payung
  36. Where there is a will there is a way = Dimana ada kemauan disitu ada jalan
  37. You must not countyour chickens before they are hatched = Belum beranak sudah ditimang
  38. Repentance always comes too late = Sesal dahulu pendapatan, sesal kemudian tiada berguna
  39. So many countries, so many customs = Lain ladang lain belalang, lain lubuk lain ikannya
  40. Spare the rod and spoil the child = Kasih akan anak dipertangis, kasih akan istri dipertinggalkan
  41. Falling crumb one must be content with crust = Tidak ada rotan, akar pun jadi
  42. Bean-pods are noisiest when dry = Tong kosong nyaring bunyinya
  43. The die is cast = Nasi sudah menjadi bubur
  44. Many a little makes a mickle = Sehari selembar benang, lama2 menjadi sehelai kain
  45. To put the cart before the horse = Dahulu bajak dari jawi
  46. With one’s back to the wall = Seperti ikan dalam belat
  47. Once bitten twice shy = Sekali jalan terkena, dua kali jalan tahu
  48. Let sleeping dogs lie = Jangan dibangunkan kucing tidur
  49. No pains, no gains = pahit dahulu manis kemudian
  50. A penny saved is a penny gained = Hemat pangkal kaya
  51. If the blind lead the blind, both fall into the ditch = Seperti kapak menyelam beliung
  52. Between the devil and the deep sea = Bagai memakan si mala kama, jika dimakan ibu mati, tidak dimakan ayah mati.
  53. Don’t cut your nose off to spite your face = Menepuk air di dulang, terpercik muka sendiri
  54. As the twig is bent, the tree is inclined = Kecil termanja-manja, besar terbawa-bawa
  55. A dwarf is on a giant’s shoulder can see of the two = Berdiri sama tinggi, duduk sama rendah
  56. A golden key opens every door = Ada uang abang sayang, tidak ada uang abang melayang
  57. Little helps =Sedikit demi sedikit lama-lama jadi bukit
  58. Live and learn = Jauh berjalan banyak dilihat
  59. A well-regulated family often gets the accident = Sepandai-pandai tupai melompat, suatu saat akan jatuh juga

Friday, April 23, 2021

TC Speaks Fluently: Spanish Alphabets (Part One)

So, one of my goals this year is to be able to speak yet another language. And for that I choose Spanish. Why, you said? It's because there are over 400 million Spanish speakers world-wide. With more than 33 million speakers, Spanish is the second largest language in the United States. Hispanics are the largest minority in the United States, with the majority of them being Spanish speakers. By learning Spanish, you'll be better able to communicate with Spanish speakers. Latin American countries are our most important trading partners. Being able to speak Spanish greatly enhances your resume. If you are bilingual you are more competitive in the workplace. Whether as a Spanish teacher or that of any discipline, you can make a difference in the field of education. Your language skills will enable you to interact with English Language Learners. You can travel to a Spanish-speaking country and really get to know the culture. Your ability to understand Spanish enables you to gain important insights which monolinguals cannot. As we grow older, our memory begins to fade. Learning a foreign language actually helps keep your memory sharp. so that I could watch Spanish TV series without english subtitle despite the dissapointing news from the most waited show La Casa de Papel just now.

To not wasting too much space, let's start learning this beautiful language from the very basic of its alphabets. For this part one, I'll show you a table from letter A to LL

Letter Letter Name Pronunciation Tips Word Examples
a a This letter sounds like the ah sound you use to express realization in English: Ah, that's the one! Arroz, Azul, Arepa, Comida
b be This letter often sounds like an English b. Especially when it occurs between two vowels, it is pronounced with the lips not touching, much like the Spanish v. Bueno, Alberto, Barco
c ce/td> This letter often sounds like the English k. Before e or i, it sounds like an s (or like the th in thick in many parts of Spain.)
"a, o, u -> ka, ko, ku
e, i -> che, chi, Latin America -> s
h -> c"
Cambiar, Carro, Coche, Comer, Cocina, Cucaracha
Cebolla, Cerrado, Cerdo, Cebra, Cine
Chorizo, Coche, Chimenea
d de This letter sounds much like an English d, except you should place your tongue against your upper teeth instead of the roof of your mouth when pronouncing it. It often sounds like the th in English then, especially when it comes between two vowels. Dormir, Dormitorio, Diego, Duro
e e This letter sounds like the eh sound you make when asking for clarification or agreement in English: Eh? What did you say? Elena, Empanada, Espejo, Elefante
f efe This letter sounds like the English f. Fantasma, Flor, Fuego, Fuerte
g ge 'e', 'i' -> kh
'a','o','u' -> ge
'ue' -> ge
'ui' -> gi
This letter usually sounds much like an English g. Before e or i, it sounds like a harsh English h. It's very similar to the j in Spanish."
Gimnasio, Gerardo, General, Girasol, Gerente
Gato, Galleta, Gol,Gorra, Guante
Guerra, Guerrero
Guia, Aguila
h hache "In general, this letter is silent. However, in words adopted from other languages, the breathy aspiration is maintained. For example, Hawái. Hermana, Hermosa, Hablar, Alcohol
i i This letter sounds like English ee but shorter. Ignacio, Indonesia, Idioma, Ingles
j jota This letter sounds close to the English h sound, though it varies from country to country. In some places, it makes a harsh sound (almost like you are trying to spit something up). It never sounds like the j in English judge. Jose, Juan, Jirafa, Jabon, Jalapeno
K ka This letter is uncommon in Spanish, but sounds much like the English k. Kiwi, Koala, Ketchup, Kimono, Kiosko
l ele This letter sounds close to the English l, but with the tongue raised closer to the roof of the mouth (rather than dipped down). Lapiz, Luna, Libro, Lampara, Leon
LL elle / doble ele 'ij' or 'y'
While this is not considered a letter anymore by the RAE, it sounds like the y sound in English yellow in many places. It can also be pronounced like the j in judge or the s in pleasure. You may also hear it called doble
Llamar, Llave, Lluvia, Galletas, Botella

Sunday, February 14, 2021

TC Speaks Fluently: Greetings in Indonesian Language

Thank you for having interest in learn Indonesian Language! Whether you plan to visit for short-term or long-term, the ability to speak the local language is necessary, since a lot of locals are having a hard time understand other languages. You can try resorting to English, but a lot of times you could only get some responses in broken English or on the least form of it, Yes and No answers. 

On this first part of the series, let's take a look on how you can greet others using Indonesian language.

Indonesian English
Halo! Hello!
Selamat Pagi! Good Morning!
Selamat Siang! Good Afternoon!
Selamat Malam! Good Evening / Good Night!
Apa kabar? How are you? / How's it going? / What's new?
Terima Kasih Thank You
Selamat Tinggal Good Bye
Sampai Jumpa See You Later

Monday, February 1, 2021

TC Comfy Corner: The First of Many Pages

I've never posted food reviews or places recommendation before since I didn't really go out that much anyway. But since last year, I've grown interest in food photography and also had a chance visited a lot of cool cafés with astounding interiors and great vibes. Yes, I thought 2020 (with all those quarantines time happening) I will be just stay in the city. But, I felt so blessed that I still could travel around the country.

So, in this section of my blog, I'm going to share places that are comfortable to chill, spending time be it alone or with friends which also provide delicious treats. I'm excited for this! See you soon!

Wednesday, January 27, 2021

TC Lazy Screening: Watching FRIENDS The First Time In My 30s!

I've been a fan of situational comedy or SitCom most people would say. For example, How I Met Your Mother & The Big Bang Theory are still two of the series I keep watching randomly until now. One of the reasons probably because of its simplicity. I remember coming back from a hard day in uni to a fresh and funny episode that didn't take much to make me laugh. It's short enough to be watched during my dinner time with all the problems that has surfaced, resolved in the end of the episode. And also, having those kind of circle who get to hang out everytime is the dream.

Among all of the series I've watched, there's one huge title that I haven't touched yet, not until recently.

I have never ever ever ever ever watched Friends.

This show, which apparently lots of other shows look up to, is finally within my reach and I've finished watching everything in around 6 days.

As like other shows, Friends gave you life lessons, valuable guidance on how to interact with people, and obviously, great times. There are lots of lessons I gathered from the show, but in a glance, here are 3 points I learnt from watching 236 episodes of F.R.I.E.N.D.S:

1. Yes, Turning 30 is Kind of Scary

Accepting the fact that you're an adult is horrifying, and realizing that everything you have imagined being an adult when you're a kid then finding out you're still not reaching it kind of a bit frightening. But we gotta enjoy it since we create memories with people around us and at some point on our lives we're gonna cherish it.



2. Starting a Relationship is Hard (pretty much throughout all of the seasons)

As everybody get histories with tons of their relationship before, you will find yourself disappointed several times because of some crushed expectations.

“Welcome to the real world. It sucks. You’re gonna love it!” – Monica

3. It's Always Seems Crazy to Change Career and Start Something New

Some people love their jobs, some don't. Finding ways to channel your passions sometimes seems taking a long time. But it's worth the time spent. And you know what they say about comfort zone is a dangerous place, that stuff is real.

Alright then, I'll get back to watch some random episodes of it, and update this post whenever I got new lessons. Ciao!

Tuesday, January 26, 2021

TC Cup of Codes: Smooth Scroll to The Top

On today's post, I would like to add another enhancement to my blog. As I've been reading my posts on my phone, one thing came to my realization, it's tiring to scroll back up finding home. So I decided to look around on what I could do, which finally led to this snippet for a Scroll Up.

For this tutorial, I would like to use a circular button (you can use any button you want) with an up arrow sign. I believe, in the UX part, it won't be treated as having an ambiguous function (Up Arrow means go to the Top). 


1. Go To Your Layout


There are two ways to do this, the first option is you can go to your Theme section and edit your template. The second option is go to your Layout and add HTML/Javascript widget. For this tutorial, I'm gonna use the second way.

Choose Add A Gadget:


Pick HTML/Javascript:

2. Add The Codes Below

ouou




  
01
02
03
04
05
06
07
08
09
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<!--Smooth Back to Top Button Start-->
<script>
jQuery(document).ready(function() {
var offset = 220;
var duration = 500;
jQuery(window).scroll(function() {
if (jQuery(this).scrollTop() > offset) {
jQuery('.back-to-top').fadeIn(duration);} else {
jQuery('.back-to-top').fadeOut(duration);}});
jQuery('.back-to-top').click(function(event) {
event.preventDefault();
jQuery('html, body').animate({scrollTop: 0}, duration);
return false;})});</script>
<style>
div#page {
max-width: 900px;
margin-left: auto;
margin-right: auto;
padding: 20px;}
.back-to-top {
position: fixed;
bottom: 0%;
left: 50%;
text-decoration: none;
color: #000000;
font-size: 12px;
padding: 1em;
display: none;}
.back-to-top:hover {
text-decoration: none;}</style>
<!--Smooth Back to Top Button End-->
 

  
<!--Smooth Back to Top Button Start-->
<script>
jQuery(document).ready(function() {
var offset = 220;
var duration = 500;
jQuery(window).scroll(function() {
if (jQuery(this).scrollTop() > offset) {
jQuery('.back-to-top').fadeIn(duration);} else {
jQuery('.back-to-top').fadeOut(duration);}});
jQuery('.back-to-top').click(function(event) {
event.preventDefault();
jQuery('html, body').animate({scrollTop: 0}, duration);
return false;})});</script>
<style>
div#page {
max-width: 900px;
margin-left: auto;
margin-right: auto;
padding: 20px;}
.back-to-top {
position: fixed;
bottom: 0%;
left: 50%;
text-decoration: none;
color: #000000;
font-size: 12px;
padding: 1em;
display: none;}
.back-to-top:hover {
text-decoration: none;}</style>
<a href="#" class="back-to-top"><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEis0o6j0ShMri8ADgshCFbc6yKh9zI6p0s6h4mlRho1nyxoGUMGwQAFMhQyWjgOKllc5-W5U3viGUONvadVm2V63czLARhYRBYycwfRkpGwuX61hg4jnPoBbQOY9F4fNUuQY0_h_xVut8k/" alt="Back to Top" / /></a>
<!--Smooth Back to Top Button End-->
Let's analyze the codes part by part.

1. The <script> part

The document ready() method will specify a function to execute when the DOM is fully loaded.
 
1
jQuery(document).ready(function()
 
 
jQuery(document).ready(function()
The offset will allow you to determine when the button will show up, the duration will determine how long the animation will work (in will be used for the fade in and fade out effect)
 
1
2
var offset = 220;
var duration = 500;
 
 
var offset = 220;
var duration = 500;
And the last part, here comes the magic. scrollTop() method will set or return the vertical scrollbar position for the elements. It will also use offset to determine whether the page has moved or not.

 
1
2
3
4
5
6
7
8
jQuery(window).scroll(function() {
if (jQuery(this).scrollTop() > offset) {
jQuery('.back-to-top').fadeIn(duration);} else {
jQuery('.back-to-top').fadeOut(duration);}});
jQuery('.back-to-top').click(function(event) {
event.preventDefault();
jQuery('html, body').animate({scrollTop: 0}, duration);
return false;})});
 
 
jQuery(window).scroll(function() {
if (jQuery(this).scrollTop() > offset) {
jQuery('.back-to-top').fadeIn(duration);} else {
jQuery('.back-to-top').fadeOut(duration);}});
jQuery('.back-to-top').click(function(event) {
event.preventDefault();
jQuery('html, body').animate({scrollTop: 0}, duration);
return false;})});
So, there you have it. A button to scroll your page up to the top after reading the article you've written. See you on another post!