Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added bg.mp4
Binary file not shown.
81 changes: 81 additions & 0 deletions css/main.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
* {
padding: 0%;
margin: 0%;
box-sizing: border-box;
font-family: "Noto Sans Mono", monospace;
}

.mainbg {
height: auto;
}

.mainbg video {
width: 100vw;
height: 100vh;
object-fit: cover;
position: fixed;
z-index: -1;
}

.content {
padding-bottom: 5%;
padding-top: 8%;
}

.content div {
position: relative;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
text-align: center;
color: white;
}

.contenthead {
padding: 3px;
}

.contentheading {
font-family: inherit;
margin: 0%;
padding: 5px;
display: flex;
justify-content: center;
font-size: 20px;
text-shadow: 0 0 3px #fff;
}

.animatedText {
height: 5vh;
padding-bottom: 10px;
font-size: 18px;
text-shadow: 0 0 5px #fff;
width: 100%;
}

/* Style for both button and anchor */
.contentbtn button,
.contentbtn a {
width: 100%;
margin-bottom: 20px;
border-radius: 5px;
transition: all .15s ease;
letter-spacing: .025em;
text-shadow: 0 0 1px #fff;
text-decoration: none; /* Remove default underline on anchor elements */
display: inline-block; /* Ensure consistent spacing */
}

.contentbtn button:hover,
.contentbtn a:hover {
color: black;
background-color: #fff;
}

/* Responsive */
@media screen AND (max-width: 700px) {
.mainbg {
height: 100vh !important;
}
}
51 changes: 39 additions & 12 deletions index.html
Original file line number Diff line number Diff line change
@@ -1,32 +1,59 @@
{{ define "main"}}
<!DOCTYPE html>
<html><head>
<meta name="generator" content="Hugo 0.118.2">
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">

<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous" />
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/js/bootstrap.bundle.min.js"
integrity="sha384-MrcW6ZMFYlzcLA8Nl+NtUVF0sA7MsXsP1UyJoMp4YLEuNSfAP+JcXn/tWtIaxVXM"
crossorigin="anonymous"></script>

<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.12.1/css/all.css" crossorigin="anonymous">


<link rel="icon" type="image/x-icon" href="/favicon.png">

<link rel="stylesheet" href="/css/main.css">
<title>Glim Midnight</title>
</head><body>
<div>
<div class='mainbg'>
<video autoplay muted loop>
{{ if .Site.Params.background }}
<source src="{{ .Site.Params.background }}" type="video/mp4">
{{ else }}

<source src="bg.mp4" type="video/mp4">
{{ end }}

</video>
<div class='content'>
<div>
<div class='contenthead'>
<h3 class='contentheading'>{{ .Site.Params.title }}</h3>
<h3 class='contentheading'>Glim Midnight</h3>
</div>
<div class='contenttypewritter animatedText'></div>
<div class='contentbtn'>
{{ range .Site.Params.links }}
<a href="{{ .url }}" class='btn btn-outline-light' role='button' target="_blank">{{ .name }}</a>
{{ end }}

<a href="https://github.com/mansoorbarri/glim-midnight/" class='btn btn-outline-light' role='button' target="_blank">Github</a>

<a href="https://github.com/mansoorbarri/glim-midnight/wiki" class='btn btn-outline-light' role='button' target="_blank">Wiki</a>

<a href="https://maheenwaris.com/" class='btn btn-outline-light' role='button' target="_blank">Author I</a>

<a href="https://mansoorbarri.com/" class='btn btn-outline-light' role='button' target="_blank">Author II</a>

<a href="https://gohugo.io/" class='btn btn-outline-light' role='button' target="_blank">Hugo</a>

</div>
</div>
</div>
</div>
</div>

<!-- JS for typewritter -->

<script>
const textArray = {{ .Site.Params.phrases | jsonify | safeJS }};
const textArray = ["Bootstrap","Dark","Minimal","Responsive"];
</script>
<script src='/js/script.js'></script>
{{ end }}

</body>
</html>
37 changes: 37 additions & 0 deletions js/script.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
// typewritter
let typeJsText = document.querySelector(".animatedText");
let stringIndex = 0;
let charIndex = 0;
let isTyping = true;

function typeJs() {
if (stringIndex < textArray.length) {
const currentString = textArray[stringIndex];

if (isTyping) {
if (charIndex < currentString.length) {
typeJsText.innerHTML += currentString.charAt(charIndex);
charIndex++;
} else {
isTyping = false;
}
} else {
if (charIndex > 0) {
typeJsText.innerHTML = currentString.substring(0, charIndex - 1);
charIndex--;
} else {
isTyping = true;
stringIndex++;

if (stringIndex >= textArray.length) {
stringIndex = 0;
}

charIndex = 0;
typeJsText.innerHTML = "";
}
}
}
}

setInterval(typeJs, 120);