Merge pull request 'AHHH?' (#6) from sageTheDm/foss_alternatives:main into pages

Reviewed-on: https://codeberg.org/Patrick_Pluto/foss_alternatives/pulls/6
This commit is contained in:
Patrick 2024-06-30 15:58:41 +00:00
commit 02d6afea00
5 changed files with 183 additions and 200 deletions

14
.vscode/launch.json vendored Normal file
View file

@ -0,0 +1,14 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "chrome",
"request": "launch",
"name": "Open index.html",
"file": "c:\\Users\\lucab\\Desktop\\FOSS\\foss_alternatives\\index.html"
}
]
}

View file

@ -11,8 +11,11 @@ class Header extends HTMLElement {
</style> </style>
<header> <header>
<div class="header-content"> <div class="header-content">
<div class="project-name"><a href="../index.html">FOSS alternatives</a></div> <div><a href="../index.html" class="project-name">FOSS alternatives</a></div>
<button class="burger-menu" style="display: block;" onclick="toggleMenu()"></button> <button class="burger-menu" style="display: block;" onclick="toggleMenu()"></button>
</div>
</header>
<div class="div-menu">
<ul class="menu"> <ul class="menu">
<li><a href="../games/index.html">Games</a></li> <li><a href="../games/index.html">Games</a></li>
<li><a href="../general_purpose/index.html">General Purpose</a></li> <li><a href="../general_purpose/index.html">General Purpose</a></li>
@ -22,7 +25,6 @@ class Header extends HTMLElement {
<li><a href="../social_platforms/index.html">Social Platforms</a></li> <li><a href="../social_platforms/index.html">Social Platforms</a></li>
</ul> </ul>
</div> </div>
</header>
`; `;
} }
} }

View file

@ -11,8 +11,11 @@ class Header extends HTMLElement {
</style> </style>
<header> <header>
<div class="header-content"> <div class="header-content">
<div class="project-name"><a href="index.html">FOSS alternatives</a></div> <div><a href="index.html" class="project-name">FOSS alternatives</a></div>
<button class="burger-menu" onclick="toggleMenu()"></button> <button class="burger-menu" onclick="toggleMenu()"></button>
</div>
</header>
<div class="div-menu">
<ul class="menu"> <ul class="menu">
<li><a href="games/index.html">Games</a></li> <li><a href="games/index.html">Games</a></li>
<li><a href="general_purpose/index.html">General Purpose</a></li> <li><a href="general_purpose/index.html">General Purpose</a></li>
@ -21,8 +24,6 @@ class Header extends HTMLElement {
<li><a href="operating_systems/index.html">Operating Systems</a></li> <li><a href="operating_systems/index.html">Operating Systems</a></li>
<li><a href="social_platforms/index.html">Social Platforms</a></li> <li><a href="social_platforms/index.html">Social Platforms</a></li>
</ul> </ul>
</div>
</header>
`; `;
} }
} }

176
list.css
View file

@ -4,7 +4,7 @@
margin: 0; margin: 0;
padding: 0; padding: 0;
font-family: "Roboto", Arial, sans-serif; font-family: "Roboto", Arial, sans-serif;
transition: all 2s ease; /* Smooth transitions */ transition: 0.5s; /* Smooth transitions */
} }
/* Body styles */ /* Body styles */
@ -18,16 +18,29 @@ body {
padding: 0; padding: 0;
} }
/* Header styles */ .div-menu{
header { z-index: 0;
background-color: #2c3e50; background-color: #2c3e50;
padding: 10px 0; /* Smaller padding */
width: 100%; width: 100%;
position: fixed; position: fixed;
top: 0; top: 0;
left: 0; left: 0;
z-index: 1000;
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2); box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
padding: 0; /* Further reduce the padding */
height: auto;
}
/* Header styles */
header {
background-color: #2c3e50;
width: 100%;
position: fixed;
top: 0;
left: 0;
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
padding: 0; /* Further reduce the padding */
height: auto;
z-index: 10; /* Higher z-index to ensure it is above other elements */
} }
.header-content { .header-content {
@ -36,52 +49,79 @@ header {
align-items: center; align-items: center;
max-width: 1200px; max-width: 1200px;
margin: 0 auto; margin: 0 auto;
padding: 0 20px; flex-direction: row;
justify-content: space-between;
align-items: center;
padding: 0 20px; /* Original padding */
z-index: 10;
}
.div-menu li {
margin: 0;
padding: 10px;
z-index: -100;
}
.div-menu a {
width: 100%;
padding: 12px 0;
text-align: center; /* Center align the menu items */
color: #ffffff;
text-decoration: none;
padding: 8px; /* Smaller padding */
border-radius: 5px;
transition: background-color 0.3s ease;
justify-content: center;
z-index: -100;
}
.div-menu a:hover {
background-color: #34495e;
} }
.project-name { .project-name {
text-decoration: none;
color: #ffffff; color: #ffffff;
font-size: 1.5em; /* Smaller font size */ font-size: 1.5em; /* Updated font size */
font-weight: bold; font-weight: bold;
z-index: 11; /* Higher z-index to ensure it is above the menu */
} }
.burger-menu { .burger-menu {
background: none; background: none;
border: none; border: none;
color: #ffffff; color: #ffffff;
font-size: 1.5em; /* Smaller font size */ font-size: 1.5em; /* Updated font size */
cursor: pointer; cursor: pointer;
display: none; display: block;
padding: 0;
z-index: 12; /* Higher z-index to ensure it is above the menu */
} }
.menu { .menu {
list-style: none;
display: flex; display: flex;
justify-content: space-around; flex-direction: column;
align-items: center; background-color: #2c3e50;
flex-grow: 1; position: absolute;
margin: 0; top: -40vh;
left: 0;
width: 100%; /* Full width of the header */
z-index: 0; /* Lower z-index than header, header content, and project name */
padding: 0;
list-style: none;
justify-content: center; /* Center items vertically */
text-align: center; /* Center items horizontally */
animation: top 1s ease-in-out; /* Initial animation state */
} }
header li { .menu.active {
margin: 10px; /* Smaller margin */ display: flex;
} top: 11vh;
z-index: 0; /* Lower z-index than header, header content, and project name */
header a {
color: #ffffff;
text-decoration: none;
padding: 8px; /* Smaller padding */
border-radius: 5px;
transition: background-color 0.3s ease;
}
header a:hover {
background-color: #34495e;
} }
/* Article styles */ /* Article styles */
article { article {
margin-top: 6em; /* Adjusted top margin */
margin-bottom: 50px; margin-bottom: 50px;
padding: 20px; padding: 20px;
width: 90%; width: 90%;
@ -90,6 +130,8 @@ article {
border-radius: 10px; border-radius: 10px;
box-shadow: 0 0 15px rgba(0, 0, 0, 0.1); box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
text-align: left; text-align: left;
margin-top: 140px; /* Increase margin-top for better readability */
padding-top: 20px;
} }
h1 { h1 {
@ -138,12 +180,14 @@ nav {
} }
.folder-list { .folder-list {
justify-content: center;
list-style-type: none; list-style-type: none;
padding: 0; padding: 0;
} }
.folder-list-item { .folder-list-item {
margin-bottom: 10px; margin-bottom: 10px;
justify-content: center;
} }
.folder-link { .folder-link {
@ -165,75 +209,6 @@ nav {
transform: scale(0.98); /* Slight scale down on click */ transform: scale(0.98); /* Slight scale down on click */
} }
/* Mobile Styles */
@media (max-width: 4000px) {
.burger-menu {
display: block;
padding: 0;
}
.menu {
display: none;
flex-direction: column;
background-color: #2c3e50;
position: absolute;
top: 100%;
left: 0;
width: 100%;
z-index: 999;
padding: 0;
}
.menu.active {
display: flex;
padding: 10px;
}
header {
padding: 0; /* Further reduce the padding */
height: auto;
}
.header-content {
flex-direction: row;
justify-content: space-between;
align-items: center;
padding: 0 20px 0 20px;
}
.project-name {
font-size: 1.5em;
}
header li {
margin: 0;
padding: 10px;
}
header a {
width: 100%;
padding: 12px 0;
text-align: center; /* Center align the menu items */
}
article {
margin-top: 140px; /* Increase margin-top for better readability */
padding-top: 20px;
margin-bottom: 20px; /* Adjust margin-bottom for consistency */
}
}
/* Additional styles for article */
article ul {
list-style-type: none;
padding: 0;
width: 50%;
margin: 0 auto;
background-color: #fff;
border-radius: 8px;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
overflow: hidden;
}
ul.fully-free { ul.fully-free {
border: 2px solid #4CAF50; border: 2px solid #4CAF50;
@ -294,3 +269,8 @@ ul.death {
font-weight: bold; font-weight: bold;
text-shadow: red; text-shadow: red;
} }
article ul{
list-style: none;
margin: 1em;
}

View file

@ -4,7 +4,7 @@
margin: 0; margin: 0;
padding: 0; padding: 0;
font-family: "Roboto", Arial, sans-serif; font-family: "Roboto", Arial, sans-serif;
transition: all 2s ease; /* Smooth transitions */ transition: 0.5s; /* Smooth transitions */
} }
/* Body styles */ /* Body styles */
@ -18,16 +18,29 @@ body {
padding: 0; padding: 0;
} }
/* Header styles */ .div-menu{
header { z-index: 0;
background-color: #2c3e50; background-color: #2c3e50;
padding: 15px 0; /* Adjusted padding */
width: 100%; width: 100%;
position: fixed; position: fixed;
top: 0; top: 0;
left: 0; left: 0;
z-index: 1000;
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2); box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
padding: 0;
height: auto;
}
/* Header styles */
header {
background-color: #2c3e50;
width: 100%;
position: fixed;
top: 0;
left: 0;
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
padding: 0; /* Further reduce the padding */
height: auto;
z-index: 10; /* Higher z-index to ensure it is above other elements */
} }
.header-content { .header-content {
@ -36,13 +49,42 @@ header {
align-items: center; align-items: center;
max-width: 1200px; max-width: 1200px;
margin: 0 auto; margin: 0 auto;
flex-direction: row;
justify-content: space-between;
align-items: center;
padding: 0 20px; /* Original padding */ padding: 0 20px; /* Original padding */
z-index: 10;
}
.div-menu li {
margin: 0;
z-index: -100;
padding: 1em;
}
.div-menu a {
width: 100%;
padding: 12px 0;
text-align: center; /* Center align the menu items */
color: #ffffff;
text-decoration: none;
padding: 8px; /* Smaller padding */
border-radius: 5px;
transition: background-color 0.3s ease;
justify-content: center;
z-index: -100;
}
.div-menu a:hover {
background-color: #34495e;
} }
.project-name { .project-name {
text-decoration: none;
color: #ffffff; color: #ffffff;
font-size: 1.5em; /* Updated font size */ font-size: 1.5em; /* Updated font size */
font-weight: bold; font-weight: bold;
z-index: 11; /* Higher z-index to ensure it is above the menu */
} }
.burger-menu { .burger-menu {
@ -51,37 +93,35 @@ header {
color: #ffffff; color: #ffffff;
font-size: 1.5em; /* Updated font size */ font-size: 1.5em; /* Updated font size */
cursor: pointer; cursor: pointer;
display: none; display: block;
padding: 0;
z-index: 12; /* Higher z-index to ensure it is above the menu */
} }
.menu { .menu {
list-style: none;
display: flex; display: flex;
justify-content: space-around; flex-direction: column;
align-items: center; background-color: #2c3e50;
flex-grow: 1; position: absolute;
margin: 0; top: -40vh;
left: 0;
width: 100%; /* Full width of the header */
z-index: 0; /* Lower z-index than header, header content, and project name */
padding: 0;
list-style: none;
justify-content: center; /* Center items vertically */
text-align: center; /* Center items horizontally */
animation: top 1s ease-in-out; /* Initial animation state */
} }
header li { .menu.active {
margin: 10px; /* Smaller margin */ display: flex;
} top: 11vh;
z-index: 0; /* Lower z-index than header, header content, and project name */
header a {
color: #ffffff;
text-decoration: none;
padding: 8px; /* Smaller padding */
border-radius: 5px;
transition: background-color 0.3s ease;
}
header a:hover {
background-color: #34495e;
} }
/* Article styles */ /* Article styles */
article { article {
margin-top: 8em;
margin-bottom: 50px; margin-bottom: 50px;
padding: 20px; padding: 20px;
width: 90%; width: 90%;
@ -90,6 +130,8 @@ article {
border-radius: 10px; border-radius: 10px;
box-shadow: 0 0 15px rgba(0, 0, 0, 0.1); box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
text-align: left; text-align: left;
margin-top: 140px; /* Increase margin-top for better readability */
padding-top: 20px;
} }
h1 { h1 {
@ -138,12 +180,14 @@ nav {
} }
.folder-list { .folder-list {
justify-content: center;
list-style-type: none; list-style-type: none;
padding: 0; padding: 0;
} }
.folder-list-item { .folder-list-item {
margin-bottom: 10px; margin-bottom: 10px;
justify-content: center;
} }
.folder-link { .folder-link {
@ -164,61 +208,3 @@ nav {
.folder-link:active { .folder-link:active {
transform: scale(0.98); /* Slight scale down on click */ transform: scale(0.98); /* Slight scale down on click */
} }
/* Mobile Styles */
@media (max-width: 4000px) {
.burger-menu {
display: block;
padding: 0;
}
.menu {
display: none;
flex-direction: column;
background-color: #2c3e50;
position: absolute;
top: 100%;
left: 0;
width: 100%;
z-index: 999;
padding: 0;
}
.menu.active {
display: flex;
padding: 10px;
}
header {
padding: 0; /* Further reduce the padding */
height: auto;
}
.header-content {
flex-direction: row;
justify-content: space-between;
align-items: center;
padding: 0 20px; /* Original padding */
}
.project-name {
font-size: 1.5em; /* Updated font size */
}
header li {
margin: 0;
padding: 10px;
}
header a {
width: 100%;
padding: 12px 0;
text-align: center; /* Center align the menu items */
}
article {
margin-top: 140px; /* Increase margin-top for better readability */
padding-top: 20px;
margin-bottom: 20px; /* Adjust margin-bottom for consistency */
}
}