Improved responsive design
This commit is contained in:
parent
ea805dbb28
commit
e7c13a732d
3 changed files with 23 additions and 16 deletions
|
|
@ -19,6 +19,7 @@ async function getProjectDescription(obj, id = projectID) {
|
||||||
async function loadProject(id = projectID, objTitle, objSubtitle, objAuthor, objDescription, objLogo, objDownloadLink, changeColor, changeBackground) {
|
async function loadProject(id = projectID, objTitle, objSubtitle, objAuthor, objDescription, objLogo, objDownloadLink, changeColor, changeBackground) {
|
||||||
try {
|
try {
|
||||||
const jsonData = await getProjectJSON(id);
|
const jsonData = await getProjectJSON(id);
|
||||||
|
document.title = `${jsonData.project.author}:${id}@neoBeta`
|
||||||
|
|
||||||
if (objTitle) objTitle.innerText = jsonData.project.title;
|
if (objTitle) objTitle.innerText = jsonData.project.title;
|
||||||
if (objSubtitle) objSubtitle.innerText = jsonData.project.subtitle;
|
if (objSubtitle) objSubtitle.innerText = jsonData.project.subtitle;
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@
|
||||||
"project": {
|
"project": {
|
||||||
"author": "tenkuma",
|
"author": "tenkuma",
|
||||||
"title": "Ghosts 'n Stuff",
|
"title": "Ghosts 'n Stuff",
|
||||||
|
"downloadLink": "https://modrinth.com/plugin/ghosts/versions",
|
||||||
"subtitle": "Adds a simple way to add custom commands with custom responses to your server.",
|
"subtitle": "Adds a simple way to add custom commands with custom responses to your server.",
|
||||||
"backgroundImage": "projects/ghostsandstuff/ghosts.jpg",
|
"backgroundImage": "projects/ghostsandstuff/ghosts.jpg",
|
||||||
"backgroundImageSize": "cover",
|
"backgroundImageSize": "cover",
|
||||||
|
|
|
||||||
33
styles.css
33
styles.css
|
|
@ -102,7 +102,7 @@ code {
|
||||||
|
|
||||||
.featuredProject {
|
.featuredProject {
|
||||||
transition: .2s;
|
transition: .2s;
|
||||||
height: auto;
|
height: fit-content;
|
||||||
width: 15%;
|
width: 15%;
|
||||||
font-size: smaller;
|
font-size: smaller;
|
||||||
padding: 4px;
|
padding: 4px;
|
||||||
|
|
@ -121,7 +121,7 @@ code {
|
||||||
.featuredProject p {
|
.featuredProject p {
|
||||||
margin-right: auto;
|
margin-right: auto;
|
||||||
margin-left: auto;
|
margin-left: auto;
|
||||||
text-overflow: ellipsis;
|
text-overflow:clip;
|
||||||
}
|
}
|
||||||
|
|
||||||
#featured h2 {
|
#featured h2 {
|
||||||
|
|
@ -132,6 +132,7 @@ code {
|
||||||
|
|
||||||
#featuredHelper {
|
#featuredHelper {
|
||||||
gap: 10px;
|
gap: 10px;
|
||||||
|
flex-wrap: wrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
#projectTitleSubtitle {
|
#projectTitleSubtitle {
|
||||||
|
|
@ -218,19 +219,27 @@ code {
|
||||||
margin-right: auto;
|
margin-right: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
#projectAuthor {
|
|
||||||
margin-left: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#projectTitle {
|
|
||||||
margin-right: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
#projectHeader img {
|
#projectHeader img {
|
||||||
width: 10vh;
|
width: 10vh;
|
||||||
height: 10vh;
|
height: 10vh;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#projectTitleAuthor {
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* #featuredHelper {
|
||||||
|
flex-direction: column;
|
||||||
|
} */
|
||||||
|
|
||||||
|
#featuredHelper * {
|
||||||
|
margin-right: auto;
|
||||||
|
margin-left: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
header {
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@media only screen and (max-width: 300px) {
|
@media only screen and (max-width: 300px) {
|
||||||
|
|
@ -239,10 +248,6 @@ code {
|
||||||
max-width: 90%;
|
max-width: 90%;
|
||||||
}
|
}
|
||||||
|
|
||||||
#projectTitleAuthor {
|
|
||||||
flex-direction: column;
|
|
||||||
}
|
|
||||||
|
|
||||||
#projectAuthor {
|
#projectAuthor {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue