Skip to content

Commit

Permalink
+ upload site WIP v2
Browse files Browse the repository at this point in the history
  • Loading branch information
lunden23 committed Jan 26, 2022
1 parent 68bc81e commit b1a56ee
Show file tree
Hide file tree
Showing 4 changed files with 335 additions and 207 deletions.
2 changes: 1 addition & 1 deletion skanhama/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ class UploadPackage(FlaskForm):
name = StringField("Package Name", validators=[DataRequired()])
version = StringField("Current Version", validators=[DataRequired(), Length(min=1, max=30)])
author = StringField("Author(s) or Team", validators=[DataRequired()])
summary = TextAreaField("Brief Description", validators=[DataRequired(), Length(min=1, max=240)])
summary = TextAreaField("Brief Description", validators=[DataRequired(), Length(min=1, max=230)])
description = TextAreaField("Description", validators=[DataRequired(), Length(min=1, max=5000)])
requirements = TextAreaField("Requirements", validators=[DataRequired()])
category = SelectField("Primary Category", choices=["Combat", "Sex"], validators=[DataRequired()])
Expand Down
2 changes: 1 addition & 1 deletion skanhama/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ class Package(db.Model):
name = db.Column(db.String(120), unique=True, nullable=False)
version = db.Column(db.String(30), nullable=False)
author = db.Column(db.String(100), nullable=False)
nsfw = db.Column(db.Boolean, nullable=False)
summary = db.Column(db.String(230), nullable=False)
description = db.Column(db.Text, nullable=False)
requirements = db.Column(db.Text, nullable=False)
Expand All @@ -38,7 +39,6 @@ class Package(db.Model):
downloads_current_version = db.Column(db.BigInteger, nullable=False)
likes = db.Column(db.BigInteger, nullable=False)
views_total = db.Column(db.BigInteger, nullable=False)
nsfw = db.Column(db.Boolean, nullable=False)
user_id = db.Column(db.Integer, db.ForeignKey("user.id"), nullable=False)
category = db.relationship("Categories", backref="category_id", lazy=True)
comments = db.relationship("Comment", backref="package_comments", lazy=True)
Expand Down
281 changes: 183 additions & 98 deletions skanhama/static/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
--clr-bg-dropdown-accent: rgba(59, 59, 66, 0.8);
--clr-bg-content: rgb(37, 37, 42);
--clr-bg-content-accent: rgb(33, 33, 36);
--clr-bg-content-dark: rgb(29, 29, 31);
--clr-bg-footer: var(--clr-bg-header);
--clr-bg-hover: rgb(43, 43, 49);
--clr-bg-btn: rgba(16, 16, 19, 0.4);
Expand Down Expand Up @@ -93,9 +94,6 @@ p {
font-weight: 300;
/*border: solid #13e1aa 1px;*/
}
.fc-generic {
font-family: 'Work Sans', sans-serif;
}
a {
color: var(--clr-AB);
}
Expand Down Expand Up @@ -295,7 +293,7 @@ a:visited {
}
.content-container {
margin: 1rem 1.2rem;
border: solid var(--clr-AA) 1px;
/*border: solid var(--clr-AA) 1px;*/
}
.content-2col {
margin: 1rem 1.2rem;
Expand All @@ -320,7 +318,9 @@ a:visited {
padding: 0.3rem;
}

/* Forms */
/************************************************************************/
/* Forms */
/************************************************************************/
.container-form {
display: inline-flex;
flex-direction: column;
Expand All @@ -332,9 +332,9 @@ a:visited {
width: 100%;
}
.form-group {
display: flex;
flex-direction: column;
margin: 2rem 0 0 0;
/*display: flex;*/
/*flex-direction: column;*/
/*!*margin: 2rem 0 0 0;*!*/
}

.container-sidebar-right .form-group {
Expand All @@ -360,91 +360,193 @@ a:visited {
justify-content: flex-end;
align-items: center;
}
fieldset.form-group-field {
border: none;
}
.form-control-label {
margin: 0;
font-weight: 400;
font-size: var(--size-p);
}
/*
Form Labels
fl-hint
*/

/*
Generic Form Controls
form-control, fc-generic, fc-upload
*/
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active{
-webkit-box-shadow: 0 0 0 30px var(--clr-bg-content) inset !important;
-webkit-text-fill-color: var(--clr-text-light) !important;
}
/* Form Control */
.form-control {
height: 2em;
font-family: 'Work Sans', sans-serif;
font-weight: 400;
color: var(--clr-text-light);
background: rgba(52, 56, 68, 0.15);
border: solid var(--clr-offsetA) 1px;
}
.form-control:focus {
background: rgba(52, 56, 68, 0.25);
border: solid 1px;
border-image: var(--gradient-A);
outline-style: none;
}
/* Form Control - Generic */
.fc-generic {
height: 1.4rem;
width: 100%;
}
.invalid-feedback {
margin: 0.2rem 0 0 0;
/* Form Label - Hint */
.fl-hint {
font-size: 0.9em;
margin: 0 0 0.4rem 0;
}
#forgot-password {
.fc-select option {
background: var(--clr-bg-content-accent);
}

/*
Upload Page Forms
*/
/* Upload Divs */
.upload-content {
background-color: var(--clr-bg-content-accent);

}
.upload-content-header {
background-color: var(--clr-bg-content-dark);
}
.upload-content-row {
/*background-color: var(--clr-bg-content-accent);*/
/*padding: 0.5rem 0.75rem 0.5rem 0.75rem;*/
display: flex;
justify-content: center;
margin: 1rem;
flex-direction: row;
flex-wrap: wrap;
justify-content: flex-start;
gap: 2rem;
padding: 0.25rem 0.75rem 0.75rem 0.75rem;
}
.btn {
width: 8rem;
height: 2.4rem;
display: inline-flex;
justify-content: center;
align-items: center;
.upload-content-col {
display: flex;
flex-direction: column;
flex-wrap: wrap;
justify-content: flex-start;
gap: 1rem;
padding: 0.25rem 0.75rem 0.75rem 0.75rem;
}
/* Text Styling */
.upload-header {
margin: 0 0 0.5rem 0;
padding: 0.5rem 0.75rem;
}
#h1-upload {
padding: 0.5rem 0.75rem 0.5rem 0;
}
.fl-upload {
font-size: 1em;
}
/* Form Control - Upload */
.fc-upload {
display: flex;
flex-direction: column;
margin-top: 0.2rem;
width: 100%;
text-align: left;
resize: none;
}
.fc-select {
padding-top: 4px;
}
.fc-upload-radio {

/* Footer */
.footer {
grid-area: footer;
display: grid;
grid-template-areas: ". footer-inner .";
grid-template-columns: inherit;
grid-template-rows: inherit;
background: #485F6E;
}
.footer-inner {
grid-area: footer-inner;
display: inline-flex;
justify-content: center;
align-items: center;
height: var(--height-footer);
#fc-nsfw {
width: 1.6rem;
height: 1.6rem;
margin: 0;
padding: 0;
}
/************************************************************************/
/* Forms */
/************************************************************************/
fieldset.form-group-field {
border: none;
#fc-summary {
height: 3em;
}
.fc-generic {
color: var(--clr-text-light);
border: none;
border-bottom: solid var(--clr-offsetA) 1px;
background: var(--clr-bg-content);
font-weight: 400;
#fc-desc {
height: 40em;
}
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active{
-webkit-box-shadow: 0 0 0 30px var(--clr-bg-content) inset !important;
-webkit-text-fill-color: var(--clr-text-light) !important;
/* Upload Control Widths */
#upload-basic-name {
flex-basis: 30%;
}
.fc-generic:focus {
#upload-basic-authors {
flex-basis: 25%;
}
#upload-basic-version {
flex-basis: 15%;
}
#upload-category-category {
flex-basis: 35%;
}
#upload-category-nsfw {
flex-basis: 35%;
}
#upload-desc-summary {
width: 50%;
}
/* Form Group - Upload */
.fg-upload {
margin: 0;
padding: 0;
border: none;
border-bottom: solid 1px;
border-image: var(--gradient-A);
outline-style: none;
display: flex;
flex-direction: column;
gap: 1.5rem;
}




/*
Misc Forms
*/
.invalid-feedback {
margin: 0.2rem 0 0 0;
font-size: 0.75em;
color: var(--clr-text-accent);
}
.invalid-form {
border-bottom: solid rgb(90, 8, 35) 1px;
}
.form-check {
#forgot-password {
display: flex;
justify-content: center;
margin: 1rem;
font-family: 'Open Sans', sans-serif;
font-size: 0.8em;
font-weight: 400;
}
#forgot-password {
.invalid-form {
border-bottom: solid rgb(90, 8, 35) 1px;
}
.form-check {
font-family: 'Open Sans', sans-serif;
font-size: 0.8em;
font-weight: 400;
}
/* Account Page */








/************************************************************************/
/* Account Page */
/************************************************************************/
#account-header {
margin: 0 0 0.8rem 0;
text-align: center;
Expand Down Expand Up @@ -503,49 +605,25 @@ input:-webkit-autofill:active{
font-size: 1.1em;
}

/* Upload Form */
.upload-content {
/*border: 1px solid red;*/

}
#upload-basic {
background-color: var(--clr-bg-content-accent);
padding: 0.5rem 0.75rem 0.5rem 0.75rem;
}
.form-group-upload {
margin: 0;
padding: 0;
border: none;
}
.form-label-upload {
font-size: 1em;
}
.fc-generic .fc-upload {
color: var(--clr-text-light);
border: none;
border-bottom: solid var(--clr-offsetA) 1px;
background: transparent;
font-weight: 400;
display: flex;
flex-direction: column;
margin-top: 0.15rem;

}
.fc-generic .fc-upload:focus {
border: none;
border-bottom: solid 1px;
border-image: var(--gradient-A);
outline-style: none;
}

.upload-header {
margin: 0 0 0.5rem 0;
/* Footer */
.footer {
grid-area: footer;
display: grid;
grid-template-areas: ". footer-inner .";
grid-template-columns: inherit;
grid-template-rows: inherit;
background: #485F6E;
}
#h1-upload {
padding: 0.5rem 0.75rem 0.5rem 0.75rem;
.footer-inner {
grid-area: footer-inner;
display: inline-flex;
justify-content: center;
align-items: center;
height: var(--height-footer);
}


/* Browse Page */
.browse-section-popular .inner {
display: flex;
Expand Down Expand Up @@ -656,6 +734,13 @@ input:-webkit-autofill:active{
}

/* Buttons */
.btn {
width: 8rem;
height: 2.4rem;
display: inline-flex;
justify-content: center;
align-items: center;
}
.btn {
cursor: pointer;
text-decoration: none;
Expand Down
Loading

0 comments on commit b1a56ee

Please sign in to comment.