This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.lazy-image | |
text-align: center | |
// img 先把透明度調成 0,才有淡入的效果 | |
img | |
opacity: 0 | |
transition: opacity 1s linear | |
// 將區塊等比例撐開 | |
.small |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- 16:9 --> | |
<div class="lazy-image w16-9"> | |
<figure> | |
<!-- | |
.js-get-img 用js抓原始大圖資訊 | |
style 裡的 background-image 放 placeholder 作用的小圖 | |
data-img 放原始大圖的路徑 | |
--> | |
<div | |
class="small js-get-img" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(window).on('load', () => { | |
// 自由尺寸,先處理 padding-bottom | |
if($('.w-free').length > 0) { | |
$('.w-free').each(function() { | |
const w = $(this).find('.js-get-img').data('width'), | |
h = $(this).find('.js-get-img').data('height'), | |
pd = (h / w) * 100; | |
$(this).find('.js-get-img').css('paddingBottom', pd + '%'); | |
}); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 看到所有接了GCP的專案 | |
gcloud config configurations list | |
// [NAME]替換成專案的名字 | |
gcloud config configurations activate [NAME] | |
// 看所有config的指令碼 | |
gcloud config configurations --help |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "gcp-test", | |
"version": "1.0.0", | |
"description": "", | |
"main": "app.js", | |
"scripts": { | |
"start": "node NAME.js" | |
}, | |
"author": "", | |
"license": "ISC", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 引用express、path | |
const express = require('express'); | |
const app = express(); | |
const path = require('path'); | |
// port的部份 | |
const PORT = process.env.PORT || 8080; | |
app.listen(PORT); | |
// 開放的靜態檔放在public的資料夾裡 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"id": "JakeWilson.vscode-cdnjs", | |
"name": "vscode-cdnjs", | |
"publisher": "JakeWilson", | |
"version": "0.14.3" | |
}, | |
{ | |
"id": "QassimFarid.ejs-language-support", | |
"name": "ejs-language-support", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"id": "A-Hjerpe.hacky-es6-template-strings", | |
"name": "hacky-es6-template-strings", | |
"publisher": "A-Hjerpe", | |
"version": "0.0.3" | |
}, | |
{ | |
"id": "alefragnani.project-manager", | |
"name": "project-manager", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.btn-linear | |
position: relative | |
&::after | |
content: '' | |
position: absolute | |
top: 0 | |
right: 0 | |
bottom: 0 | |
left: 0 | |
z-index: -1 |
OlderNewer