Skip to content

Instantly share code, notes, and snippets.

@Inom-Turdikulov
Created April 21, 2021 07:44
Show Gist options
  • Save Inom-Turdikulov/47486fb20d49e94750572ab06dba85f6 to your computer and use it in GitHub Desktop.
Save Inom-Turdikulov/47486fb20d49e94750572ab06dba85f6 to your computer and use it in GitHub Desktop.
Simple responsive HTML/CSS template
<header class="header">
<h1 class="header-title">
<a href="/">
<pre>
██╗███╗░░██╗░█████╗░███╗░░░███╗░█████╗░███████╗
██║████╗░██║██╔══██╗████╗░████║██╔══██╗╚════██║
██║██╔██╗██║██║░░██║██╔████╔██║██║░░██║░░███╔═╝
██║██║╚████║██║░░██║██║╚██╔╝██║██║░░██║██╔══╝░░
██║██║░╚███║╚█████╔╝██║░╚═╝░██║╚█████╔╝███████╗
╚═╝╚═╝░░╚══╝░╚════╝░╚═╝░░░░░╚═╝░╚════╝░╚══════╝</pre>
</a>
</h1>
<nav class="navbar">
<ul class="navbar-section">
<li><a href="#">Life</a></li>
<li><a href="#">Programming</a></li>
<li><a href="#">CG</a></li>
<li><a href="#">Awesome Links</a></li>
<li><a href="#">
<span class="icon svg-baseline">
<svg viewBox="0 0 16 16" class="bi bi-file-earmark-person-fill" fill="currentColor" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" d="M2 2a2 2 0 0 1 2-2h5.293A1 1 0 0 1 10 .293L13.707 4a1 1 0 0 1 .293.707V14a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V2zm7.5 1.5v-2l3 3h-2a1 1 0 0 1-1-1zM11 8a3 3 0 1 1-6 0 3 3 0 0 1 6 0zm2 5.755S12 12 8 12s-5 1.755-5 1.755V14a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1v-.245z"></path></svg>
</span>Resume</a></li>
</ul>
</nav>
</header>
<section>
<a href="#" class="article-w">
<article>
<header>
<h1>About Me Typewr iter delectus cred Typewriter delectus cred</h1>
<i class="gg-link"></i>
</header>
<section>
<p>Bushwick Schlitz. Est Shoreditch small batch, dolor Schlitz sapiente twee stumptown ex. Duis Carles pickled, cornhole Thundercats McSweeney's minim PBR vegan Tumblr irony. Kogi eu Thundercats, sed scenester before they sold out et aesthetic. Elit cred Vice ethical pickled sartorial. Stumptown roof party freegan High Life vero, ea sed minim meggings.</p>
</section>
<footer>
<p class="published-time"><time datetime="2012-12-23T08:23:11+07:00">[8 apr at 12:40 | ~ 5 min read | 8 comments]</time></p>
</footer>
</article>
</a>
<a href="#" class="article-w">
<article>
<header>
<h1>About Me Typewr iter delectus cred Typewriter delectus cred</h1>
<i class="gg-link"></i>
</header>
<section>
<p>Bushwick Schlitz. Est Shoreditch small batch, dolor Schlitz sapiente twee stumptown ex. Duis Carles pickled, cornhole Thundercats McSweeney's minim PBR vegan Tumblr irony. Kogi eu Thundercats, sed scenester before they sold out et aesthetic. Elit cred Vice ethical pickled sartorial. Stumptown roof party freegan High Life vero, ea sed minim meggings.</p>
</section>
<footer>
<p class="published-time"><time datetime="2012-12-23T08:23:11+07:00">[8 apr at 12:40 | 11 views | 8 comments]</time></p>
</footer>
</article>
</a>
<a href="#" class="article-w">
<article>
<header>
<h1>About Me Typewr iter delectus cred Typewriter delectus cred</h1>
<i class="gg-link"></i>
</header>
<section>
<p>Bushwick Schlitz. Est Shoreditch small batch, dolor Schlitz sapiente twee stumptown ex. Duis Carles pickled, cornhole Thundercats McSweeney's minim PBR vegan Tumblr irony. Kogi eu Thundercats, sed scenester before they sold out et aesthetic. Elit cred Vice ethical pickled sartorial. Stumptown roof party freegan High Life vero, ea sed minim meggings.</p>
</section>
<footer>
<p class="published-time"><time datetime="2012-12-23T08:23:11+07:00">[8 apr at 12:40 | 11 views | 8 comments]</time></p>
</footer>
</article>
</a>
</section>
<footer class="footer">By Inom T. © 2021</footer>
/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */
/* Document
========================================================================== */
/**
* 1. Correct the line height in all browsers.
* 2. Prevent adjustments of font size after orientation changes in iOS.
*/
html {
line-height: 1.15; /* 1 */
-webkit-text-size-adjust: 100%; /* 2 */
font-family: monospace, monospace;
}
/* Sections
========================================================================== */
/**
* Remove the margin in all browsers.
*/
body {
margin: 0;
}
/**
* Render the `main` element consistently in IE.
*/
main {
display: block;
}
/**
* Correct the font size and margin on `h1` elements within `section` and
* `article` contexts in Chrome, Firefox, and Safari.
*/
h1 {
font-size: 2em;
margin: 0.67em 0;
}
/* Grouping content
========================================================================== */
/**
* 1. Add the correct box sizing in Firefox.
* 2. Show the overflow in Edge and IE.
*/
hr {
box-sizing: content-box; /* 1 */
height: 0; /* 1 */
overflow: visible; /* 2 */
}
/**
* 1. Correct the inheritance and scaling of font size in all browsers.
* 2. Correct the odd `em` font sizing in all browsers.
*/
pre {
font-family: monospace, monospace; /* 1 */
font-size: 1em; /* 2 */
}
/* Text-level semantics
========================================================================== */
/**
* Remove the gray background on active links in IE 10.
*/
a {
background-color: transparent;
}
/**
* 1. Remove the bottom border in Chrome 57-
* 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.
*/
abbr[title] {
border-bottom: none; /* 1 */
text-decoration: underline; /* 2 */
text-decoration: underline dotted; /* 2 */
}
/**
* Add the correct font weight in Chrome, Edge, and Safari.
*/
b,
strong {
font-weight: bolder;
}
/**
* 1. Correct the inheritance and scaling of font size in all browsers.
* 2. Correct the odd `em` font sizing in all browsers.
*/
code,
kbd,
samp {
font-family: monospace, monospace; /* 1 */
font-size: 1em; /* 2 */
}
/**
* Add the correct font size in all browsers.
*/
small {
font-size: 80%;
}
/**
* Prevent `sub` and `sup` elements from affecting the line height in
* all browsers.
*/
sub,
sup {
font-size: 75%;
line-height: 0;
position: relative;
vertical-align: baseline;
}
sub {
bottom: -0.25em;
}
sup {
top: -0.5em;
}
/* Embedded content
========================================================================== */
/**
* Remove the border on images inside links in IE 10.
*/
img {
border-style: none;
}
/* Forms
========================================================================== */
/**
* 1. Change the font styles in all browsers.
* 2. Remove the margin in Firefox and Safari.
*/
button,
input,
optgroup,
select,
textarea {
font-family: inherit; /* 1 */
font-size: 100%; /* 1 */
line-height: 1.15; /* 1 */
margin: 0; /* 2 */
}
/**
* Show the overflow in IE.
* 1. Show the overflow in Edge.
*/
button,
input { /* 1 */
overflow: visible;
}
/**
* Remove the inheritance of text transform in Edge, Firefox, and IE.
* 1. Remove the inheritance of text transform in Firefox.
*/
button,
select { /* 1 */
text-transform: none;
}
/**
* Correct the inability to style clickable types in iOS and Safari.
*/
button,
[type="button"],
[type="reset"],
[type="submit"] {
-webkit-appearance: button;
}
/**
* Remove the inner border and padding in Firefox.
*/
button::-moz-focus-inner,
[type="button"]::-moz-focus-inner,
[type="reset"]::-moz-focus-inner,
[type="submit"]::-moz-focus-inner {
border-style: none;
padding: 0;
}
/**
* Restore the focus styles unset by the previous rule.
*/
button:-moz-focusring,
[type="button"]:-moz-focusring,
[type="reset"]:-moz-focusring,
[type="submit"]:-moz-focusring {
outline: 1px dotted ButtonText;
}
/**
* Correct the padding in Firefox.
*/
fieldset {
padding: 0.35em 0.75em 0.625em;
}
/**
* 1. Correct the text wrapping in Edge and IE.
* 2. Correct the color inheritance from `fieldset` elements in IE.
* 3. Remove the padding so developers are not caught out when they zero out
* `fieldset` elements in all browsers.
*/
legend {
box-sizing: border-box; /* 1 */
color: inherit; /* 2 */
display: table; /* 1 */
max-width: 100%; /* 1 */
padding: 0; /* 3 */
white-space: normal; /* 1 */
}
/**
* Add the correct vertical alignment in Chrome, Firefox, and Opera.
*/
progress {
vertical-align: baseline;
}
/**
* Remove the default vertical scrollbar in IE 10+.
*/
textarea {
overflow: auto;
}
/**
* 1. Add the correct box sizing in IE 10.
* 2. Remove the padding in IE 10.
*/
[type="checkbox"],
[type="radio"] {
box-sizing: border-box; /* 1 */
padding: 0; /* 2 */
}
/**
* Correct the cursor style of increment and decrement buttons in Chrome.
*/
[type="number"]::-webkit-inner-spin-button,
[type="number"]::-webkit-outer-spin-button {
height: auto;
}
/**
* 1. Correct the odd appearance in Chrome and Safari.
* 2. Correct the outline style in Safari.
*/
[type="search"] {
-webkit-appearance: textfield; /* 1 */
outline-offset: -2px; /* 2 */
}
/**
* Remove the inner padding in Chrome and Safari on macOS.
*/
[type="search"]::-webkit-search-decoration {
-webkit-appearance: none;
}
/**
* 1. Correct the inability to style clickable types in iOS and Safari.
* 2. Change font properties to `inherit` in Safari.
*/
::-webkit-file-upload-button {
-webkit-appearance: button; /* 1 */
font: inherit; /* 2 */
}
/* Interactive
========================================================================== */
/*
* Add the correct display in Edge, IE 10+, and Firefox.
*/
details {
display: block;
}
/*
* Add the correct display in all browsers.
*/
summary {
display: list-item;
}
/* Misc
========================================================================== */
/**
* Add the correct display in IE 10+.
*/
template {
display: none;
}
/**
* Add the correct display in IE 10.
*/
[hidden] {
display: none;
}
:root {
--main-border-color: #000;
--main-link-color: #ef5350;
--main-link-color-visited: #ff867c;
--main-link-color-hover: #f00;
--main-body-color: #000;
--main-hover-bg: rgba(0,0,0,3%);
}
body{
max-width: 960px;
margin: 0 auto;
/* background: linear-gradient(var(--main-hover-bg) 1px, transparent 1px) left top / 29px 29px; */
font-family: Consolas, monospace;
}
body{
font-size: 1rem;
line-height: 1.8125rem;
}
body > header, body > section, body > footer{
background: #fff;
}
.article-w{
display: block;
color: var(--main-body-color);
text-decoration: none;
border-radius: 4px;
}
.article-w:visited{
color: var(--main-body-color);
}
.article-w:hover,
.article-w:focus{
background-color: var(--main-hover-bg);
color: var(--main-body-color);
}
.article-w:hover h1,
.article-w:focus h1{
text-decoration: underline;
}
.article-w:hover .gg-link,
.article-w:focus .gg-link{
color: red;
}
.article-w:not(:first-of-type){
margin-top: -1px;
}
h1, .h1 {
font-size: 2.625rem;
line-height: 3.625rem;
margin-top: 1.8125rem;
margin-bottom: 1.8125rem;
}
h2, .h2 {
font-size: 1.625rem;
line-height: 1.8125rem;
margin-top: 1.8125rem;
margin-bottom: 1.8125rem;
}
h3, .h3 {
font-size: 1.625rem;
line-height: 1.8125rem;
margin-top: 1.8125rem;
margin-bottom: 1.8125rem;
}
h4, .h4 {
font-size: 1rem;
line-height: 1.8125rem;
margin-top: 1.8125rem;
margin-bottom: 0rem;
}
h5, .h5 {
font-size: 1rem;
line-height: 1.8125rem;
margin-top: 1.8125rem;
margin-bottom: 0rem;
}
p, ul, ol, pre, table, blockquote{
margin-top: 0rem;
margin-bottom: 1.8125rem;
}
ul ul, ol ol, ul ol, ol ul {
margin-top: 0rem;
margin-bottom: 0rem;
}
/* Let's make sure all's aligned */
hr, .hr {
border: 1px solid;
margin: -1px 0;
}
sub, sup {
line-height: 0;
position: relative;
vertical-align: baseline;
}
sup {
top: -0.5em;
}
sub {
bottom: -0.25em;
}
a{
color: var(--main-link-color);
}
a:visited{
color: var(--main-link-color-visited);
}
a:hover,
a:focus{
color: var(--main-link-color-hover);
}
.icon {
display: inline-flex;
align-self: center;
margin-right: .2em;
}
.icon svg {
height:1em;
width:1em;
}
.icon.svg-baseline svg {
top: .125em;
position: relative;
}
.header{
display: flex;
flex-wrap: wrap;
justify-content: space-between;
padding: 0 20px;
align-items: center;
}
body > section{
border-top: 2px solid var(--main-border-color);
margin-top: -2px;
}
.header .header-title{
display: flex;
font-weight: 400;
font-size: .5rem;
line-height: 1;
margin-top: 0;
margin-bottom: 0;
cursor: default;
}
.header .header-title a{
color: var(--main-body-color)
}
.header .header-title pre{
margin-bottom: 0;
}
/* Custom styles */
.navbar .navbar-section {
align-items: center;
display: flex;
flex: 1 0 0;
list-style: none;
padding-left: 0;
margin-top: 1.8125rem;
}
.navbar .navbar-section a{
text-decoration: none;
display: inline-block;
border-bottom: 1px solid transparent;
margin-top: -1px;
}
.navbar .navbar-section a:hover,
.navbar .navbar-section a:focus{
border-bottom: 1px solid currentColor;
}
.navbar .navbar-section li:not(:last-of-type)::after{
content: '/';
padding-left: 0.5em;
padding-right: 0.5em;
color: rgba(0, 0, 0, 20%);
}
.footer{
margin-top: 1.8125rem;
margin-top: calc(1.8125rem - 2px);
border-top: 2px solid var(--main-border-color);
text-align: center;
padding: 0 20px;
}
article > header{
position: relative;
padding: 0 20px;
}
article > section{
padding: 0 20px;
}
article > footer{
padding: 0 20px;
}
article > header .gg-link{
position: absolute;
top:8px;
right: 5px;
color: var(--main-link-color);
}
.published-time{
margin-bottom: 0;
}
.gg-link {
box-sizing: border-box;
position: relative;
display: block;
transform: rotate(-45deg) scale(var(--ggs,1));
width: 8px;
height: 2px;
background: currentColor;
border-radius: 4px
}
.gg-link::after,
.gg-link::before {
content: "";
display: block;
box-sizing: border-box;
position: absolute;
border-radius: 3px;
width: 8px;
height: 10px;
border: 2px solid;
top: -4px
}
.gg-link::before {
border-right: 0;
border-top-left-radius: 40px;
border-bottom-left-radius: 40px;
left: -6px
}
.gg-link::after {
border-left: 0;
border-top-right-radius: 40px;
border-bottom-right-radius: 40px;
right: -6px
}
@Inom-Turdikulov
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment