tiles menu changes and floting navbar

This commit is contained in:
Stanislaw
2022-05-13 22:44:44 +02:00
parent 7e49c1a759
commit 87381cf6b8
7 changed files with 200 additions and 32 deletions

92
assets/Icons.js Normal file
View File

@@ -0,0 +1,92 @@
module.exports = {
PaperPlane: function (props) {
return (
<svg width="24px" height="24px" viewBox="0 0 24 24" {...props}>
<path
fill="currentColor"
d="M13.7612096,12.010246 L3.00114069,10.9260828 L3.00000002,4.07390726 C2.9999013,3.48090338 3.4805459,3.00009873 4.07354978,3.00000001 C4.24030125,2.99997226 4.40476746,3.03878301 4.55391451,3.11335654 L20.4062223,11.0395104 C20.9366211,11.3047098 21.1516077,11.9496696 20.8864083,12.4800684 C20.78252,12.6878448 20.6140494,12.8563254 20.4062791,12.960226 L4.55631145,20.8863826 C4.02592835,21.1516134 3.38095585,20.936665 3.11572505,20.4062819 C3.04118163,20.2572172 3.00236221,20.092846 3.0023401,19.9261816 L3.00143069,13.0735399 L13.7612096,12.010246 Z"
id="Shape"
></path>
</svg>
);
},
DiscordIcon: function (props) {
return (
<svg width="71" height="55" viewBox="0 0 71 55" {...props}>
<g clip-path="url(#clip0)">
<path
d="M60.1045 4.8978C55.5792 2.8214 50.7265 1.2916 45.6527 0.41542C45.5603 0.39851 45.468 0.440769 45.4204 0.525289C44.7963 1.6353 44.105 3.0834 43.6209 4.2216C38.1637 3.4046 32.7345 3.4046 27.3892 4.2216C26.905 3.0581 26.1886 1.6353 25.5617 0.525289C25.5141 0.443589 25.4218 0.40133 25.3294 0.41542C20.2584 1.2888 15.4057 2.8186 10.8776 4.8978C10.8384 4.9147 10.8048 4.9429 10.7825 4.9795C1.57795 18.7309 -0.943561 32.1443 0.293408 45.3914C0.299005 45.4562 0.335386 45.5182 0.385761 45.5576C6.45866 50.0174 12.3413 52.7249 18.1147 54.5195C18.2071 54.5477 18.305 54.5139 18.3638 54.4378C19.7295 52.5728 20.9469 50.6063 21.9907 48.5383C22.0523 48.4172 21.9935 48.2735 21.8676 48.2256C19.9366 47.4931 18.0979 46.6 16.3292 45.5858C16.1893 45.5041 16.1781 45.304 16.3068 45.2082C16.679 44.9293 17.0513 44.6391 17.4067 44.3461C17.471 44.2926 17.5606 44.2813 17.6362 44.3151C29.2558 49.6202 41.8354 49.6202 53.3179 44.3151C53.3935 44.2785 53.4831 44.2898 53.5502 44.3433C53.9057 44.6363 54.2779 44.9293 54.6529 45.2082C54.7816 45.304 54.7732 45.5041 54.6333 45.5858C52.8646 46.6197 51.0259 47.4931 49.0921 48.2228C48.9662 48.2707 48.9102 48.4172 48.9718 48.5383C50.038 50.6034 51.2554 52.5699 52.5959 54.435C52.6519 54.5139 52.7526 54.5477 52.845 54.5195C58.6464 52.7249 64.529 50.0174 70.6019 45.5576C70.6551 45.5182 70.6887 45.459 70.6943 45.3942C72.1747 30.0791 68.2147 16.7757 60.1968 4.9823C60.1772 4.9429 60.1437 4.9147 60.1045 4.8978ZM23.7259 37.3253C20.2276 37.3253 17.3451 34.1136 17.3451 30.1693C17.3451 26.225 20.1717 23.0133 23.7259 23.0133C27.308 23.0133 30.1626 26.2532 30.1066 30.1693C30.1066 34.1136 27.28 37.3253 23.7259 37.3253ZM47.3178 37.3253C43.8196 37.3253 40.9371 34.1136 40.9371 30.1693C40.9371 26.225 43.7636 23.0133 47.3178 23.0133C50.9 23.0133 53.7545 26.2532 53.6986 30.1693C53.6986 34.1136 50.9 37.3253 47.3178 37.3253Z"
fill="currentColor"
/>
</g>
<defs>
<clipPath id="clip0">
<rect width="71" height="55" fill="currentColor" />
</clipPath>
</defs>
</svg>
);
},
YtIcon: function (props) {
return (
<svg viewBox="0 0 461.001 461.001" {...props}>
<g>
<path
d="M365.257,67.393H95.744C42.866,67.393,0,110.259,0,163.137v134.728 c0,52.878,42.866,95.744,95.744,95.744h269.513c52.878,0,95.744-42.866,95.744-95.744V163.137 C461.001,110.259,418.135,67.393,365.257,67.393z M300.506,237.056l-126.06,60.123c-3.359,1.602-7.239-0.847-7.239-4.568V168.607 c0-3.774,3.982-6.22,7.348-4.514l126.06,63.881C304.363,229.873,304.298,235.248,300.506,237.056z"
fill="currentColor"
/>
</g>
</svg>
);
},
GithubIcon: function (props) {
return (
<svg width="24" height="24" viewBox="0 0 24 24" {...props}>
<path
d="M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z"
fill="currentColor"
/>
</svg>
);
},
TwitterIcon: function (props) {
return (
<svg width="24" height="24" viewBox="0 0 24 24" {...props}>
<path
d="M24 4.557c-.883.392-1.832.656-2.828.775 1.017-.609 1.798-1.574 2.165-2.724-.951.564-2.005.974-3.127 1.195-.897-.957-2.178-1.555-3.594-1.555-3.179 0-5.515 2.966-4.797 6.045-4.091-.205-7.719-2.165-10.148-5.144-1.29 2.213-.669 5.108 1.523 6.574-.806-.026-1.566-.247-2.229-.616-.054 2.281 1.581 4.415 3.949 4.89-.693.188-1.452.232-2.224.084.626 1.956 2.444 3.379 4.6 3.419-2.07 1.623-4.678 2.348-7.29 2.04 2.179 1.397 4.768 2.212 7.548 2.212 9.142 0 14.307-7.721 13.995-14.646.962-.695 1.797-1.562 2.457-2.549z"
fill="currentColor"
/>
</svg>
);
},
Minecraft: function (props) {
return (
<svg width="24" height="24" viewBox="0 0 24 24" {...props}>
<path
d="M24 4.557c-.883.392-1.832.656-2.828.775 1.017-.609 1.798-1.574 2.165-2.724-.951.564-2.005.974-3.127 1.195-.897-.957-2.178-1.555-3.594-1.555-3.179 0-5.515 2.966-4.797 6.045-4.091-.205-7.719-2.165-10.148-5.144-1.29 2.213-.669 5.108 1.523 6.574-.806-.026-1.566-.247-2.229-.616-.054 2.281 1.581 4.415 3.949 4.89-.693.188-1.452.232-2.224.084.626 1.956 2.444 3.379 4.6 3.419-2.07 1.623-4.678 2.348-7.29 2.04 2.179 1.397 4.768 2.212 7.548 2.212 9.142 0 14.307-7.721 13.995-14.646.962-.695 1.797-1.562 2.457-2.549z"
fill="currentColor"
/>
</svg>
);
},
MemberIcon: function (props) {
return (
<svg width="24px" height="24px" viewBox="0 0 24 24" {...props}>
<path
d="M10,22 C5.581722,22 2,18.418278 2,14 C2,9.581722 5.581722,6 10,6 C14.418278,6 18,9.581722 18,14 C18,18.418278 14.418278,22 10,22 Z M10,20 C13.3137085,20 16,17.3137085 16,14 C16,10.6862915 13.3137085,8 10,8 C6.6862915,8 4,10.6862915 4,14 C4,17.3137085 6.6862915,20 10,20 Z M13,15 C13,16.6568542 11.6568542,18 10,18 C8.34314575,18 7,16.6568542 7,15 L13,15 Z M8,13 C8.55228475,13 9,12.5522847 9,12 C9,11.4477153 8.55228475,11 8,11 C7.44771525,11 7,11.4477153 7,12 C7,12.5522847 7.44771525,13 8,13 Z M12,13 C11.4477153,13 11,12.5522847 11,12 C11,11.4477153 11.4477153,11 12,11 C12.5522847,11 13,11.4477153 13,12 C13,12.5522847 12.5522847,13 12,13 Z M18.625,8 C17.7980697,7.8203108 15.25,6.41000009 15.25,3.875 C15.25,2.83946609 16.0894661,2 17.125,2 C17.7383496,2 18.2829142,2.29450366 18.625,2.7498172 C18.9670858,2.29450366 19.5116504,2 20.125,2 C21.1605339,2 22,2.83946609 22,3.875 C22,6.41000009 19.4519303,7.8203108 18.625,8 Z"
fill="currentColor"
></path>
</svg>
);
},
CalendarIcon: function (props) {
return (
<svg width="24px" height="24px" viewBox="0 0 24 24" {...props}>
<path
d="M8,4 L16,4 L16,2 L18,2 L18,4 L19,4 C20.1045695,4 21,4.8954305 21,6 L21,20 C21,21.1045695 20.1045695,22 19,22 L5,22 C3.8954305,22 3,21.1045695 3,20 L3,6 C3,4.8954305 3.8954305,4 5,4 L6,4 L6,2 L8,2 L8,4 Z M5,8 L5,20 L19,20 L19,8 L5,8 Z M7,11 L9,11 L9,13 L7,13 L7,11 Z M11,11 L13,11 L13,13 L11,13 L11,11 Z M15,11 L17,11 L17,13 L15,13 L15,11 Z M15,15 L17,15 L17,17 L15,17 L15,15 Z M11,15 L13,15 L13,17 L11,17 L11,15 Z M7,15 L9,15 L9,17 L7,17 L7,15 Z"
fill="currentColor"
></path>
</svg>
);
},
};

View File

@@ -1,11 +0,0 @@
export function PaperPlane(props) {
return (
<svg width="24px" height="24px" viewBox="0 0 24 24" {...props}>
<path
fill="currentColor"
d="M13.7612096,12.010246 L3.00114069,10.9260828 L3.00000002,4.07390726 C2.9999013,3.48090338 3.4805459,3.00009873 4.07354978,3.00000001 C4.24030125,2.99997226 4.40476746,3.03878301 4.55391451,3.11335654 L20.4062223,11.0395104 C20.9366211,11.3047098 21.1516077,11.9496696 20.8864083,12.4800684 C20.78252,12.6878448 20.6140494,12.8563254 20.4062791,12.960226 L4.55631145,20.8863826 C4.02592835,21.1516134 3.38095585,20.936665 3.11572505,20.4062819 C3.04118163,20.2572172 3.00236221,20.092846 3.0023401,19.9261816 L3.00143069,13.0735399 L13.7612096,12.010246 Z"
id="Shape"
></path>
</svg>
);
}

27
package-lock.json generated
View File

@@ -8,8 +8,10 @@
"name": "gractwo-pl",
"version": "0.1.0",
"dependencies": {
"chart.js": "^3.7.1",
"next": "12.1.6",
"react": "18.1.0",
"react-chartjs-2": "^4.1.0",
"react-dom": "18.1.0",
"sass": "^1.51.0",
"yarn": "^1.22.18"
@@ -664,6 +666,11 @@
"url": "https://github.com/chalk/chalk?sponsor=1"
}
},
"node_modules/chart.js": {
"version": "3.7.1",
"resolved": "https://registry.npmjs.org/chart.js/-/chart.js-3.7.1.tgz",
"integrity": "sha512-8knRegQLFnPQAheZV8MjxIXc5gQEfDFD897BJgv/klO/vtIyFFmgMXrNfgrXpbTr/XbTturxRgxIXx/Y+ASJBA=="
},
"node_modules/chokidar": {
"version": "3.5.3",
"resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz",
@@ -2500,6 +2507,15 @@
"node": ">=0.10.0"
}
},
"node_modules/react-chartjs-2": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/react-chartjs-2/-/react-chartjs-2-4.1.0.tgz",
"integrity": "sha512-AsUihxEp8Jm1oBhbEovE+w50m9PVNhz1sfwEIT4hZduRC0m14gHWHd0cUaxkFDb8HNkdMIGzsNlmVqKiOpU74g==",
"peerDependencies": {
"chart.js": "^3.5.0",
"react": "^16.8.0 || ^17.0.0 || ^18.0.0"
}
},
"node_modules/react-dom": {
"version": "18.1.0",
"resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.1.0.tgz",
@@ -3441,6 +3457,11 @@
"supports-color": "^7.1.0"
}
},
"chart.js": {
"version": "3.7.1",
"resolved": "https://registry.npmjs.org/chart.js/-/chart.js-3.7.1.tgz",
"integrity": "sha512-8knRegQLFnPQAheZV8MjxIXc5gQEfDFD897BJgv/klO/vtIyFFmgMXrNfgrXpbTr/XbTturxRgxIXx/Y+ASJBA=="
},
"chokidar": {
"version": "3.5.3",
"resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz",
@@ -4781,6 +4802,12 @@
"loose-envify": "^1.1.0"
}
},
"react-chartjs-2": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/react-chartjs-2/-/react-chartjs-2-4.1.0.tgz",
"integrity": "sha512-AsUihxEp8Jm1oBhbEovE+w50m9PVNhz1sfwEIT4hZduRC0m14gHWHd0cUaxkFDb8HNkdMIGzsNlmVqKiOpU74g==",
"requires": {}
},
"react-dom": {
"version": "18.1.0",
"resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.1.0.tgz",

View File

@@ -9,8 +9,10 @@
"lint": "next lint"
},
"dependencies": {
"chart.js": "^3.7.1",
"next": "12.1.6",
"react": "18.1.0",
"react-chartjs-2": "^4.1.0",
"react-dom": "18.1.0",
"sass": "^1.51.0",
"yarn": "^1.22.18"

View File

@@ -1,6 +1,16 @@
import Header from "../components/Header.js";
import Banner from "../components/Banner.js";
import { PaperPlane } from "../icons/PaperPlane.js";
import {
PaperPlane,
DiscordIcon,
YtIcon,
GithubIcon,
TwitterIcon,
MemberIcon,
CalendarIcon,
} from "../assets/Icons.js";
import { Line } from "react-chartjs-2";
import { Chart as ChartJS } from "chart.js/auto";
export default function Home() {
return (
<>
@@ -17,26 +27,26 @@ export default function Home() {
<p>Status botów</p>
</div>
<div className="discord">
<PaperPlane className="icons" />
<DiscordIcon className="icons" />
</div>
<div className="twitter">
<PaperPlane className="icons" />
<TwitterIcon className="icons" />
</div>
<div className="members">
<h1>99,9k</h1>
<p>Wysłane wiadomości</p>
<PaperPlane className="icons" />
<h1>196</h1>
<p>Członków</p>
<MemberIcon className="icons" />
</div>
<div className="days">
<h1>99,9k</h1>
<p>Wysłane wiadomości</p>
<PaperPlane className="icons" />
<h1>697 dni</h1>
<p>Istnienia Gractwa</p>
<CalendarIcon className="icons" />
</div>
<div className="yt">
<PaperPlane className="icons" />
<YtIcon className="icons" />
</div>
<div className="github">
<PaperPlane className="icons" />
<GithubIcon className="icons" />
</div>
<div className="minecraft">
<PaperPlane className="icons" />

View File

@@ -14,15 +14,19 @@
body {
background-color: var(--black1);
color: white;
-ms-overflow-style: none; /* IE and Edge */
scrollbar-width: none; /* Firefox */
}
nav.main {
z-index: 1;
height: 4rem;
width: 100%;
background-color: var(--black1);
display: flex;
align-items: center;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
position: relative;
position: fixed;
a {
font-family: "Lexend", sans-serif;
display: block;
@@ -66,6 +70,7 @@ section.banner {
align-items: center;
width: 100%;
height: 25rem;
padding-top: 4rem;
h1,
p {
position: absolute;
@@ -90,11 +95,11 @@ article.main {
display: flex;
justify-content: center;
.Map {
margin-top: 2rem;
margin: 2rem;
display: grid;
grid-gap: 2rem;
grid-template-rows: repeat(2, 10rem);
grid-template-columns: repeat(7, 10rem);
grid-template-rows: repeat(4, 10rem);
grid-template-columns: repeat(7, 11rem);
div {
display: flex;
flex-direction: column;
@@ -113,6 +118,20 @@ article.main {
font-family: "Lexend", sans-serif;
font-size: 1.6rem;
}
}
div:hover {
background-color: var(--black0);
box-shadow: 7 px 21px rgba(0, 0, 0, 0.25);
}
.icons {
width: 6rem;
height: 6rem;
position: absolute;
color: white;
}
.msg {
grid-column: 1/3;
grid-row: 1;
.icons {
margin-bottom: 4rem;
margin-left: 11rem;
@@ -121,13 +140,8 @@ article.main {
height: 15rem;
opacity: 5%;
position: absolute;
color: white;
}
}
.msg {
grid-column: 1/3;
grid-row: 1;
}
.bots {
grid-column: 3/6;
grid-row: 1;
@@ -143,10 +157,30 @@ article.main {
.members {
grid-column: 1/3;
grid-row: 2;
.icons {
transform: scaleX(-1) rotate(20deg);
margin-top: rem;
margin-left: 16rem;
width: 16rem;
height: 15rem;
opacity: 5%;
position: absolute;
color: white;
}
}
.days {
grid-column: 3/5;
grid-row: 2;
.icons {
transform: rotate(20deg);
margin-top: rem;
margin-left: 14rem;
width: 14rem;
height: 15rem;
opacity: 5%;
position: absolute;
color: white;
}
}
.yt {
grid-column: 5;
@@ -162,3 +196,7 @@ article.main {
}
}
}
/* Hide scrollbar for Chrome, Safari and Opera */
body::-webkit-scrollbar {
display: none;
}

View File

@@ -293,6 +293,11 @@
"ansi-styles" "^4.1.0"
"supports-color" "^7.1.0"
"chart.js@^3.5.0", "chart.js@^3.7.1":
"integrity" "sha512-8knRegQLFnPQAheZV8MjxIXc5gQEfDFD897BJgv/klO/vtIyFFmgMXrNfgrXpbTr/XbTturxRgxIXx/Y+ASJBA=="
"resolved" "https://registry.npmjs.org/chart.js/-/chart.js-3.7.1.tgz"
"version" "3.7.1"
"chokidar@>=3.0.0 <4.0.0":
"integrity" "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw=="
"resolved" "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz"
@@ -1357,6 +1362,11 @@
"resolved" "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz"
"version" "1.2.3"
"react-chartjs-2@^4.1.0":
"integrity" "sha512-AsUihxEp8Jm1oBhbEovE+w50m9PVNhz1sfwEIT4hZduRC0m14gHWHd0cUaxkFDb8HNkdMIGzsNlmVqKiOpU74g=="
"resolved" "https://registry.npmjs.org/react-chartjs-2/-/react-chartjs-2-4.1.0.tgz"
"version" "4.1.0"
"react-dom@^17.0.2 || ^18.0.0-0", "react-dom@18.1.0":
"integrity" "sha512-fU1Txz7Budmvamp7bshe4Zi32d0ll7ect+ccxNu9FlObT605GOEB8BfO4tmRJ39R5Zj831VCpvQ05QPBW5yb+w=="
"resolved" "https://registry.npmjs.org/react-dom/-/react-dom-18.1.0.tgz"
@@ -1370,7 +1380,7 @@
"resolved" "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz"
"version" "16.13.1"
"react@^17.0.2 || ^18.0.0-0", "react@^18.1.0", "react@>= 16.8.0 || 17.x.x || ^18.0.0-0", "react@18.1.0":
"react@^16.8.0 || ^17.0.0 || ^18.0.0", "react@^17.0.2 || ^18.0.0-0", "react@^18.1.0", "react@>= 16.8.0 || 17.x.x || ^18.0.0-0", "react@18.1.0":
"integrity" "sha512-4oL8ivCz5ZEPyclFQXaNksK3adutVS8l2xzZU0cqEFrE9Sb7fC0EFK5uEk74wIreL1DERyjvsU915j1pcT2uEQ=="
"resolved" "https://registry.npmjs.org/react/-/react-18.1.0.tgz"
"version" "18.1.0"