Compare commits

...

13 Commits

Author SHA1 Message Date
Michel 6bfaef1f85
Same as proposed in #dev 2018-07-01 18:50:31 +02:00
Alex D. 52639f70f1 Path Quickfix 2018-07-01 01:52:45 +02:00
Alex D. 2f6de7457f Improved code readability
Also added few features
2018-07-01 01:46:34 +02:00
Alex D. ffaef4a72b Fixed bugs, improved content responsiveness etc. 2018-06-30 18:30:25 +02:00
Alex D. 3a49532357 Quick Fix Viewport 2018-06-27 16:41:50 +02:00
Alex D. 9b1f843da7 Revamp 2018-06-27 16:10:12 +02:00
Alex D. 0616d7946a Added sourceban and news 2018-06-14 09:39:18 +02:00
Alex D. a9dbb24eb1 Last fix 2018-06-13 19:45:32 +02:00
Alex D. a30b7b1fda Mobile improvement and fitting 2018-06-13 19:38:10 +02:00
Alex D. 09b037a5c7 Tweaked stuff around 2018-06-13 19:12:17 +02:00
Alex D. 9b299894df Added functionality
Added jQuery for performance improvement
Moved DOM elements by priority
Moved header below banner
Swapped sides for easier css adapting
2018-06-13 17:36:29 +02:00
Alex D. 6d1274354b Merge branch 'master' of https://github.com/casKd-dev/RXHomepage 2018-06-10 19:29:31 +02:00
Alex 5faec60ab6
Update README.md 2018-06-07 18:50:02 +02:00
8 changed files with 455 additions and 302 deletions

View File

@ -3,7 +3,7 @@
## What is this?
Well, nothing special...
This is just the homepage i use for the community i am running [here](http://redxen.dynu.net)
This is just the homepage i use for the community i am running [here](https://redxen.eu)
## Why do i host it on GitHub?

399
css/web.css Normal file
View File

@ -0,0 +1,399 @@
html {
margin: 0;
top: 0;
left: 0;
font-family: 'Oswald', sans-serif;
/*Fixed Background*/
background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url(../res/bg.jpg);
background-attachment: fixed;
background-size: cover;
background-position: center;
background-repeat: no-repeat;
min-height: 300px;
/*Global Variables*/
--desktop-height: calc(20px + 2vw);
--mobile-height: calc(10px + 2vw);
--header-transparency: rgba(0, 0, 0, 0.7);
--image-size: 20%;
--red: #d22;
--dark-gray: #111;
--gray: #151515;
--light-gray: #222;
--quick-transition: cubic-bezier(0.165, 0.84, 0.44, 1) 0.5s;
--long-transition: cubic-bezier(0.215, 0.610, 0.355, 1) 1s;
}
/* Desktop header*/
.header {
width: 100%;
left: 0;
z-index: 20;
display: flex;
position: absolute;
overflow: hidden;
transition: var(--quick-transition);
}
.header-title {
width: 100%;
color: #fff;
display: flex;
flex-wrap: nowrap;
font-size: calc(var(--desktop-height) / 2);
margin: auto 0;
}
#logo-header {
display: none;
opacity: 0;
margin: auto 0;
}
#logo-header a {
text-decoration: none;
color: #fff;
}
#logo-header img {
display: flex;
margin-left: 5px;
}
#links-header {
display: flex;
flex: 1;
margin: auto 0;
justify-content: space-around;
transition: var(--quick-transition);
}
#links-header a {
color: #eee;
text-align: center;
margin: auto 1vw;
text-decoration: none;
font-family: 'Dosis', sans-serif;
transition: var(--quick-transition);
}
.header, #links-header, #logo-header, #logo-header img{
height: var(--desktop-height);
font-size: calc(var(--desktop-height) / 2);
}
/*Hover settings*/
.header:hover {
background-color: var(--header-transparency);
height: calc(var(--desktop-height) * 1.5);
}
.header:hover > .header-title {
font-size: calc(var(--desktop-height) / 1.75);
height: calc(var(--desktop-height) * 1.5);
}
#links-header a:hover {
color: var(--red);
}
/*Sticky header*/
.sticky > #logo-header {
opacity: 1;
display: flex;
}
.sticky > #links-header {
display: flex;
flex: 1 1 0;
justify-content: flex-end;
}
.sticky {
position: fixed;
background-color: var(--header-transparency);
top: 0;
}
/* Content settings */
.content {
width: 100%;
min-height: 100%;
top: 0;
left: 0;
display: flex;
position: absolute;
flex-wrap: wrap;
flex-direction: column;
}
/* Banner settings */
#banner {
/*Sizing*/
height: 100vh;
width: 100%;
color: #fff;
overflow: hidden;
font-size: 4vw;
transition: var(--long-transition);
/*Flexbox content*/
justify-content: center;
align-items: center;
display: flex;
}
#banner h1 {
filter: drop-shadow(-5px 6px 3px rgba(0,0,0,.7));
}
#banner img {
width: 20vw;
filter: drop-shadow(-5px 6px 3px rgba(0,0,0,.7));
transition: var(--long-transition);
}
/* Text field settings */
#text {
display: flex;
flex-wrap: wrap;
width: 80%;
min-height: 100px;
background-color: var(--light-gray);
color: #fff;
align-self: center;
transition: var(--quick-transition);
}
#text h2 {
text-align: center;
width: 100%;
margin: 3vw 0;
font-size: 5vw;
line-height: 8vw;
background-color: var(--gray);
transition: var(--quick-transition);
color: var(--red);
}
.text-field {
width: 100%;
justify-content: center;
display: flex;
padding: 20px;
background-color: var(--gray);
margin: 0 auto;
flex-direction: row;
flex: 1;
font-size: 1.2vw;
flex-wrap: wrap;
align-items: flex-start;
text-align: center;
font-family: 'Dosis', sans-serif;
transition: var(--quick-transition);
}
.row {
width: 45%;
}
.text-field h3 {
font-size: 1.2vw;
margin: 0;
}
/*Category of descriptions*/
.category {
margin: 1.5vw 0;
display: flex;
flex-wrap: nowrap;
width: 100%;
overflow: hidden;
transition: var(--quick-transition);
filter: saturate(0%);
color: #fff;
box-shadow: 0 4px 8px -2px #000;
}
.category img {
width: 40%;
max-width: 900px;
padding: 5% 5% 5% 5%;
transition: var(--quick-transition);
}
.category:hover {
color: #c22;
box-shadow: 0 10px 8px -2px #000;
filter: saturate(100%);
}
/*Left Side settings*/
.left {
background-color: var(--dark-gray);
width: var(--image-size);
display: flex;
justify-content: center;
align-items: center;
min-width: 200px;
transition: var(--quick-transition);
}
.swap .left {
order: 1;
}
/*Right side settings*/
.right {
background-color: var(--gray);
width: calc(100% - var(--image-size));
display: flex;
flex-direction: column;
padding: 2%;
justify-content: center;
text-align: right;
transition: var(--quick-transition);
}
.right h3 {
font-size: 3vw;
margin: 0;
}
.right p {
font-size: 1.2vw;
font-family: 'Open Sans Condensed', sans-serif;
}
.swap .right {
order: 0;
text-align: left;
}
/*Webpage footer*/
#footer {
color: #fff;
display: flex;
width: 100%;
height: auto;
font-size: 1vw;
text-align: center;
align-items: center;
overflow: hidden;
align-content: space-around;
padding: 2% 0;
background-color: var(--dark-gray);
}
#footer a {
color: var(--red);
text-decoration: none;
padding: 0 0.5vw;
}
#footer-r, #footer-r a {
font-size: 1.2vw;
padding: 0
}
/*Adaptive content using media queries*/
@media screen and (max-width: 720px) {
/*Header settings*/
.header {
position: relative;
padding: 5px 0;
background-color: var(--dark-gray);
}
.header-title {
opacity: 0;
display: none;
}
#links-header a {
font-size: 3vw;
}
.header, #links-header, #links-header a, #logo-header img {
height: var(--mobile-height);
line-height: var(--mobile-height);
}
.header:hover {
background-color: var(--header-transparency);
height: var(--mobile-height);
}
.header:hover > #links-header a {
line-height: var(--mobile-height);
font-size: 3vw;
}
/*Banner settings*/
#banner {
font-size: 4vw;
height: 300px;
}
#banner img {
width: 20vw;
}
/*Category settings*/
.category {
flex-wrap: wrap;
margin: 2vw 0;
}
.category img {
width: 30%;
margin: 0 auto;
}
/*Sides and swapping*/
.left, .right {
width: 100%;
}
.swap .left {
order: 0;
}
.left {
min-width: 200px;
}
.swap .right {
order: 1;
text-align: center;
}
.right {
padding: 10px 25px 10px 25px;
text-align: center;
}
.right h3 {
font-size: 6vw;
}
.right p {
font-size: 3vw;
margin: 0;
}
/*Text field settings*/
.row {
width: 100%;
margin: 10px 0;
}
.text-field {
font-size: 3vw;
padding: 10px;
justify-content: space-between;
}
.text-field h3 {
font-size: 4vw;
}
/*Footer settings*/
#footer {
width: 90%;
padding: 0 5%;
font-size: 4vw;
height: auto;
flex-flow: wrap;
}
#footer a {
font-size: 4vw;
padding: 0 7px 0 7px;
}
#footer-r, #footer-r a {
font-size: 3vw;
padding: 0;
}
#footer-r {
padding: 0 0 10px 0;
}
}
/*Fit text to whole screen*/
@media screen and (max-width: 1280px) {
#text {
width: 100%;
}
}
/*Scrollbar hide*/
::-webkit-scrollbar {
width: 0;
}

View File

@ -1,44 +1,40 @@
<html>
<head>
<!--Styles and such-->
<link rel="stylesheet" href="res/web.css">
<!--Styles and meta-->
<title>RedXen Community</title>
<link rel="stylesheet" href="css/web.css">
<meta name="author" content="caskd">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta charset="UTF-8">
<meta name="description" content="The homepage of the RedXen Community">
<script src="js/jquery-3.3.1.min.js"></script>
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.0.13/css/all.css" integrity="sha384-DNOHZ68U8hZfKXOrtjWvjxusGo9WQnrNx2sqG0tfsghAvtVlRW3tvkXWZh58N9jp" crossorigin="anonymous">
<link href="https://fonts.googleapis.com/css?family=Oswald" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Open+Sans+Condensed:300" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Dosis" rel="stylesheet">
<link rel="shortcut icon" href="/favicon.ico">
<!--Meta and tracking-->
<meta name="author" content="caskd">
<meta charset="UTF-8">
<meta name="description" content="The homepage of the RedXen Community">
<title>RedXen Community</title>
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-120536610-1"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-120536610-1');
</script>
<script src="js/main.js"></script>
</head>
<body>
<div class="interface">
<div class="header">
<span id="logo-header">
<img src="res/logo.png" alt="logo">
</span>
<span id="links-header">
<a href="https://forum.redxen.eu">Forum</a>
<a href="https://steamcommunity.com/groups/redxengaming">Steam</a>
<a href="/discord">Discord</a>
<a href="https://yagpdb.redxen.eu">PMBot</a>
</span>
</div>
<div class="content">
<div id="banner">
<img id="logobig" src="res/logo.png" alt="logo">
<h1>RedXen Gaming</h1>
</div>
<div class="header" id="pgHeader">
<span id="logo-header">
<div><a href="https://redxen.eu"><img src="res/logo.png" alt="logo"></a></div>
<div class="header-title"><a href="https://redxen.eu">RedXen Gaming</a></div>
</span>
<span id="links-header">
<a href="https://forum.redxen.eu">Forum</a>
<a href="https://steamcommunity.com/groups/redxengaming">Steam</a>
<a href="/discord">Discord</a>
<a href="https://sb.redxen.eu">SourceBans</a>
<a href="https://yagpdb.redxen.eu">PMBot</a>
</span>
</div>
<div id="text">
<h2>About us</h2>
<div id="forum" class="category">
@ -50,7 +46,7 @@
<p>Our forum is a easy-to-browse forum that is fast and reliable, it is powered by Discourse and it is one of the best community forums!</p>
</div>
</div>
<div id="discord" class="category">
<div id="discord" class="swap category">
<div class="left">
<img alt="discord" src="res/discord.png">
</div>
@ -68,10 +64,22 @@
<p>We also host a slightly customized version of YAGPDB called PMBot that can moderate your servers, you can add him to your server!</p>
</div>
</div>
<div id="sb" class="swap category">
<div class="left">
<img alt="sourcebans" src="res/sb.png">
</div>
<div class="right">
<h3>SourceBans</h3>
<p>Got banned? Don't know the reason why, or want to make a complaint? You should be visiting our SourceBans page</p>
</div>
</div>
<h2>News</h2>
<div id="news" class="text-field">
<div class="row">
<h3>June 2018</h3>
Added SourceBans for easier ban management<br>
Now hosting TF2 &amp; CSS servers<br>
Forums are stable and ready to use<br>
Created this webpage and added meta tags for SEO's<br>
Now hosting server on DigitalOcean with improved bandwidth
</div>

2
js/jquery-3.3.1.min.js vendored Normal file

File diff suppressed because one or more lines are too long

18
js/main.js Normal file
View File

@ -0,0 +1,18 @@
$(document).ready(function() {
/* Load Google Analytics */
$.getScript("https://www.googletagmanager.com/gtag/js?id=UA-120536610-1");
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-120536610-1');
});
$(document).scroll(function() {
/* On scroll check if scrolled beyond 100% */
var header = document.getElementById("pgHeader");
if (window.pageYOffset >= $(window).height()) {
header.classList.add("sticky");
} else {
header.classList.remove("sticky");
}
});

BIN
res/sb.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

View File

@ -1,274 +0,0 @@
html {
margin: 0;
top: 0;
left: 0;
font-family: 'Oswald', sans-serif;
background: rgb(10, 10, 10);
min-height: 300px;
}
.header {
height: 50px;
width: 100%;
top: 0;
left: 0;
position: fixed;
background-color: rgba(10, 10, 10, 0.4);
z-index: 20;
display: flex;
overflow: hidden;
}
#logo-header img {
display: flex;
height: 40px;
padding: 5px;
}
#links-header {
display: flex;
height: 50px;
line-height: 50px;
flex: 1 1 0;
justify-content: flex-end;
}
#links-header a {
line-height: 50px;
color: #eee;
text-align: center;
padding-right: 10px;
padding-left: 10px;
text-decoration: none;
font-size: 20px;
font-family: 'Dosis', sans-serif;
}
.header a:hover {
background-color: rgba(255 ,255 ,255, 0.5);
color: #a11;
}
.content {
width: 100%;
min-height: 100%;
top: 0;
left: 0;
display: flex;
position: absolute;
flex-wrap: wrap;
flex-direction: column;
}
#banner {
/*Sizing*/
height: 400px;
width: 100%;
color: #fff;
overflow: hidden;
font-size: 40px;
transition: ease-in-out 0.2s;
/*Flexbox content*/
justify-content: center;
align-items: center;
display: flex;
/*Background settings*/
background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url(bg.jpg);
background-attachment: scroll;
background-size: cover;
background-repeat: no-repeat;
}
#banner img {
width: 220px;
filter: drop-shadow(-5px 6px 3px rgba(0,0,0,.7));
transition: ease-in-out 0.2s;
}
#text {
display: flex;
flex-wrap: wrap;
width: 100%;
max-width: 1700px;
min-height: 100px;
background-color: rgba(70, 70, 70, 0.4);
color: #fff;
align-self: center;
}
#text h2 {
text-align: center;
width: 100%;
font-size: 60px;
line-height: 100px;
background-color: rgba(10, 10, 10, 0.4);
transition: ease-in-out 0.2s;
}
/*Category of descriptions*/
.category {
padding: 70px 0 0 0;
display: flex;
flex-wrap: nowrap;
width: 100%;
overflow: hidden;
transition: ease-in 200ms;
filter: saturate(0%);
color: #fff;
box-shadow: 0 4px 8px -2px #000;
}
.category:hover {
color: #c22;
box-shadow: 0 10px 8px -2px #000;
}
.category:hover { filter: saturate(100%); }
.category img {
width: 40%;
max-width: 900px;
padding: 5% 5% 5% 5%;
transition: ease-in-out 0.2s;
}
h2 { color: #F33;}
#news {margin-bottom: 20px;}
.text-field {
width: 100%;
justify-content: center;
display: flex;
padding: 20px;
background-color: rgba(10, 10, 10, 0.4);
max-width: 1200px;
margin: 1 auto;
flex-direction: row;
flex: 1;
font-size: 20px;
flex-wrap: wrap;
align-items: flex-start;
text-align: center;
font-family: 'Dosis', sans-serif;
}
.row {
width: 50%;
}
.text-field h3 {
font-size: 25px;
margin: 0;
}
/*Left Side settings*/
.left {
background-color: rgba(0, 0, 0, 0.5);
width: 30%;
display: flex;
justify-content: center;
align-items: center;
min-width: 200px;
transition: ease-in-out 0.2s;
}
/*Right side settings*/
.right {
background-color: rgba(10, 10, 10, 0.4);
width: 70%;
display: flex;
flex-direction: column;
padding: 50px 50px 50px 30px;
justify-content: center;
transition: ease-in-out 0.2s;
}
.right h3 {
font-size: 40px;
margin: 0;
}
.right p {
font-style: italic;
font-family: 'Open Sans Condensed', sans-serif;
}
/*Webpage footer*/
#footer {
color: #fff;
display: flex;
max-width: 1700px;
width: 80%;
font-size: 20px;
height: 200px;
text-align: center;
align-items: center;
overflow: hidden;
margin: 1 auto;
}
#footer a {
color: #f22;
text-decoration: none;
padding: 0 10px 0 10px;
font-size: 30px;
}
#footer-r, #footer-r a {
font-size: 20px;
padding: 0;
font-style: italic;
}
/*Adaptive content using media queries*/
@media screen and (max-width: 730px) {
.header {
height: 50px;
}
#banner {
font-size: 20px;
height: 300px;
}
#text h2 {
font-size: 30px;
line-height: 50px;
}
#banner img {
width: 110px;
}
.category {
flex-wrap: wrap;
}
.category img {
width: 30%;
}
.left, .right {
width: 100%;
}
.right {
padding: 10px 25px 10px 25px;
}
.right h3 {
font-size: 30px;
}
.right p {
font-size: 15px;
margin: 0;
}
.row {
width: 100%;
margin: 10px 0;
}
.text-field {
font-size: 10px;
padding: 10px;
justify-content: space-between;
}
.text-field h3 {
font-size: 20px;
}
#footer {
width: 90%;
font-size: 15px;
height: auto;
flex-flow: wrap;
}
#footer a {
font-size: 25px;
padding: 0 7px 0 7px;
}
#footer-r, #footer-r a {
font-size: 15px;
padding: 0;
}
#footer-r {
padding: 0 0 10px 0;
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 50 KiB

After

Width:  |  Height:  |  Size: 48 KiB