Skip to content

Instantly share code, notes, and snippets.

View otabekoff's full-sized avatar
👨‍💻
Contributing to GitHub

Otabek otabekoff

👨‍💻
Contributing to GitHub
View GitHub Profile
@otabekoff
otabekoff / posts.data.js
Created August 24, 2024 12:58
Posts data auto create content loader
import { createContentLoader } from "vitepress";
import "dotenv/config";
const formatDate = (raw) => {
const date = new Date(raw);
date.setUTCHours(12);
return {
time: +date,
string: date.toLocaleDateString("en-US", {
year: "numeric",
@otabekoff
otabekoff / index.css
Created March 24, 2024 21:37 — forked from adrianhajdin/index.css
3D Portfolio Gists
@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@100;200;300;400;500;600;700;800;900&family=Work+Sans:wght@100;200;300;400;500;600;700;800;900&display=swap");
@tailwind base;
@tailwind components;
@tailwind utilities;
:root {
--blue-rgb: 237 245 255;
--green-rgb: 125 161 35;
}
.parent {
border: 1px solid #333;
height: 250px;
position: relative;
width: 250px;
}
.child {
left: 50%;
position: absolute;
<div class="parent">
<div class="child">Makrazlashgan kontent.</div>
</div>
.grid-centering {
display: grid;
justify-content: center;
align-items: center;
height: 400px;
}
<div class="grid-centering">
<div class="child">Makrazlashgan kontent.</div>
</div>
.container {
border: 1px solid #333;
height: 40px;
width: 400px;
}
.center {
display: table;
height: 100%;
width: 100%;
}
<div class="container">
<div class="center"><span>Makrazlashgan kontent.</span></div>
</div>
.flexbox-centering {
height: 400px;
display: flex;
justify-content: center;
align-items: center;
}
<div class="flexbox-centering">
<div class="child">Markazlashgan matn.</div>
</div>