Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update dev #23

Merged
merged 5 commits into from
Dec 20, 2024
Merged
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
283 changes: 283 additions & 0 deletions images/n_logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 5 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!DOCTYPE html>
<html lang="en">
<html lang="en" data-theme="dark">

<head>
<meta name="generator" content="Coding Club">
Expand All @@ -15,6 +15,7 @@
</head>

<body id="body">
<a id="theme-switch">☀️</a>
<!-- navigation -->
<nav>
<svg id="nav-open" viewbox="0 0 20 20">
Expand All @@ -28,7 +29,7 @@
</path>
</svg>
<div class="logo logo-1">
<img src="images/n_logo.png" alt="niser logo" id="niser-logo">
<img src="images/n_logo.svg" alt="niser logo" id="niser-logo">
</div>
<ul>
<li><a href="#about" class="scroll">about&nbsp;us</a></li>
Expand All @@ -37,6 +38,8 @@
<li><a href="#team" class="scroll">team</a></li>
<!-- <li><a href="#news" class="scroll">news</a></li> -->
<li><a href="#contact" class="scroll">contact&nbsp;us</a></li>
<!-- <li><a id="theme-switch">☀️</a></li> -->
<!-- <li><a id="theme-switch">🌙</a></li> -->
</ul>
<div class="logo logo-2">
<img src="images/cc_logo.png" alt="cc logo">
Expand Down
28 changes: 26 additions & 2 deletions js/app.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,27 @@
// by default, the dark mode is switched off
var darkMode = false;
document.documentElement.setAttribute('data-theme', ['dark', 'light'][darkMode]);
if (darkMode) {
$('#theme-switch').html('🌙')
} else {
$('#theme-switch').html('☀️')
}

function darkModeSwitcher () {
document.documentElement.setAttribute('data-theme', ['dark', 'light'][+darkMode]);
darkMode = !darkMode;

if (darkMode) {
$('#theme-switch').html('🌙')
} else {
$('#theme-switch').html('☀️')
}
}

$('#theme-switch').click(function () {
darkModeSwitcher()
})

const elem = selector => {
return document.querySelector(selector)
}
Expand Down Expand Up @@ -282,11 +306,11 @@ $(window).scroll(function () {
// NAVIGATION
if (wScroll > introHeight) {
nav.classList.add('alone')
$('#niser-logo').attr("src", "images/n_logo_color.png")
// $('#niser-logo').attr("src", "images/n_logo_color.png")
}
if (wScroll < introHeight) {
nav.classList.remove('alone')
$('#niser-logo').attr("src", "images/n_logo.png")
// $('#niser-logo').attr("src", "images/n_logo.png")
}

// LANDING ELEMENTS
Expand Down
2 changes: 1 addition & 1 deletion style/main.min.css

Large diffs are not rendered by default.

47 changes: 40 additions & 7 deletions style/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@ $bold : 'Circular Std',
sans-serif;
$yellow: #F7941D;
$yellow-dark: #e48209;
$yellow-tr: #f7951d9e;
// $yellow-tr: #f7951d9e;
// $yellow-tr: #b46c13;
$yellow-tr: #FABD73;
$dark: #414a4d;

%is-not-showingX {
transform: translateX(20px);
Expand Down Expand Up @@ -36,6 +39,25 @@ $yellow-tr: #f7951d9e;
cursor: default;
}

html {
scroll-behavior: smooth;
--section-title: #414a4d;
--text-color: #89807A;
--about-text: #272727;
}

html[data-theme='dark'] {
// background: #0a061a;
--d2: #0f091f;
background-color: #080618;
opacity: 1;
background-image: linear-gradient(var(--d2) 3.2px, transparent 3.2px), linear-gradient(90deg, var(--d2) 3.2px, transparent 3.2px), linear-gradient(var(--d2) 1.6px, transparent 1.6px), linear-gradient(90deg, var(--d2) 1.6px, #080618 1.6px);
background-size: 80px 80px, 80px 80px, 16px 16px, 16px 16px;
background-position: -3.2px -3.2px, -3.2px -3.2px, -1.6px -1.6px, -1.6px -1.6px;--section-title: #fff;
--text-color: #ccc;
--about-text: #eee;
}

@import 'sections/nav';
@import 'sections/intro';
@import 'sections/about';
Expand All @@ -45,14 +67,10 @@ $yellow-tr: #f7951d9e;
@import 'sections/news';
@import 'sections/footer';

html {
scroll-behavior: smooth;
}

body {
font-family: 'Poppins', "Roboto Slab", serif;
font-size: 1.3125rem;
color: #89807A;
color: var(--text-color);
font-weight: 400;
overflow-x: hidden;
}
Expand All @@ -62,6 +80,21 @@ body {
color: #fff;
}

#theme-switch {
position: fixed;
bottom: 20px;
right: 20px;
font-size: 3rem;
z-index: 999;
text-shadow: 0 0 10px #0009;
}

@media (max-width: 680px) {
#theme-switch {
font-size: 2.5rem;
}
}

.text {
font-size: 2rem;
color: #fff;
Expand All @@ -77,7 +110,7 @@ a {
font-family: $bold;
line-height: 1;
font-size: 3rem;
color: #414A4D;
color: var(--section-title);
text-transform: uppercase;
position: relative;
margin-bottom: 30px;
Expand Down
3 changes: 2 additions & 1 deletion style/sections/_about.scss
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@
position: relative;
}
.section--about .section__content p {
color: #272727
color: var(--about-text);
font-size: 1.2rem;
}
}
59 changes: 51 additions & 8 deletions style/sections/_blogs.scss
Original file line number Diff line number Diff line change
@@ -1,17 +1,58 @@
html {
--dark-back: #111a1d;
--dark-back-text-title: rgb(247, 148, 29);
--dark-back-text: #eee;
--dark-btn-hover: #e48209;
--dark-btn: #fff0;
}

html[data-theme='dark'] {
// --dark-back-text: #111a1d;
// --dark-back: #F7941D;
// --dark-back-text-title: #111a1d;
// --dark-btn-hover: #000;
--dark-back-text: #c5d3d8;
--dark-back: #F7941D;
--dark-back-text-title: #F7941D;
--dark-btn-hover: #e48209;
--dark-btn: #fff0;
}

.section--blogs {
display: flex;
flex-direction: column;
align-items: center;
background: #111a1d;
background: var(--dark-back);
padding: 3rem 0;
color: #eee;
color: var(--dark-back-text);

.section__title {
color: $yellow;
color: var(--dark-back-text-title);

}
}

html[data-theme='dark'] .section--blogs, html[data-theme='dark'] footer {
--s: 48px; /* control the size*/
// --c1: #f7941d;
// --c2: #ee8c15;
--c1: #080618;
--c2: #0f0c28;

--c:var(--c1) 0 25%,#0000 0;
--p:0 0/calc(3*var(--s)) calc(2*var(--s));
background:
conic-gradient(from -45deg at 75% 62.5%,var(--c)) var(--p),
conic-gradient(from 135deg at 25% 37.5%,var(--c)) var(--p),
repeating-conic-gradient(from 90deg,var(--c),var(--c2) 0 50%)
0 0/var(--s) var(--s);
}

html[data-theme='dark'] footer {
--c1: #f7941d;
--c2: #ee8c15;
}

.blogs {
width: 80%;
margin: 3rem 0;
Expand All @@ -30,6 +71,7 @@

.blog-title {
cursor: pointer;
color: var(--dark-back-text-title);

&:hover {
text-decoration: underline;
Expand All @@ -42,7 +84,7 @@
}

.blog-date {
color: $yellow;
color: var(--dark-back-text);
}

.blog-abstract {
Expand All @@ -51,16 +93,17 @@

.blog-author {
margin-top: 5px;
color: $yellow;
color: var(--dark-back-text-title);
}

.blog-btn {
background: $yellow;
background: var(--dark-btn);
padding: 3px 8px;
color: #000;
color: var(--dark-back-text-title);
transition: background .1s ease-in-out;
&:hover {
background: $yellow-dark;
color: #fff;
background: var(--dark-btn-hover);
}
}

Expand Down
20 changes: 16 additions & 4 deletions style/sections/_footer.scss
Original file line number Diff line number Diff line change
@@ -1,15 +1,27 @@
html {
--footer-text: #D1C9C1;
// --footer-back: #111a1d;
--footer-social: #a49b92;
}

html[data-theme='dark'] {
--footer-text: #111a1d;
// --footer-back: #222;
--footer-social: #111a1d;
}

footer {
text-align: center;
padding: 30px 0;
color: #D1C9C1;
color: var(--footer-text);
display: flex;
flex-direction: column;
justify-content: center;
background: #111a1d;
align-items: center ;

h2.section__title {
color: $yellow;
color: var(--footer-text);
}
p {
justify-self: end;
Expand All @@ -27,12 +39,12 @@ footer {
svg {
width: 30px;
height: 30px;
fill: #a49b92;
fill: var(--footer-social);
transition: fill .1s ease-in-out;
cursor: pointer;
}
a:hover svg{
fill: $yellow;
fill: var(--dark-btn-hover);
}
}

21 changes: 18 additions & 3 deletions style/sections/_nav.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
html {
--nav-text:#ffffff82;
--nav-text-alone:#181818;
--nav-back-alone:#fff;
--nav-logo-fill: #0066ff;
}

html[data-theme='dark'] {
--nav-text:#ffffff82;
--nav-text-alone:#eee;
--nav-back-alone:#0f091f;
--nav-logo-fill:#fff;
}

nav {
position: fixed;
top: 0;
Expand All @@ -11,8 +25,8 @@ nav {
display: flex;
justify-content: space-evenly;
&.alone {
color: #181818;
background: #fff;
color: var(--nav-text-alone);
background:var(--nav-back-alone);
box-shadow: 0 3px 20px rgba(0, 0, 0, 0.322);
}
svg {
Expand Down Expand Up @@ -80,6 +94,7 @@ nav {
height: 100%;
}
&.logo-1 {
fill: #eee;
padding: 10px;
}
}
Expand All @@ -88,7 +103,7 @@ nav ul {
display: flex;
list-style: none;
justify-content: space-around;
max-width: 450px;
// max-width: 450px;
margin: auto 0;
transition: .5s ease-in
}
Expand Down
Loading