Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updating style assets #110

Merged
merged 44 commits into from
Jul 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
4384e80
updating css files
acholyn Jun 4, 2024
2bb1e80
new fonts
acholyn Jun 4, 2024
e304ab2
adding iframe for mediacentral
acholyn Jun 4, 2024
8ba5349
updating video previews for mediacentral
acholyn Jun 5, 2024
ec68ee6
card component basis
acholyn Jun 7, 2024
d058f72
tweaks + tidy
acholyn Jun 7, 2024
77a256e
adding card component
acholyn Jun 7, 2024
36b3733
fixing fonts and tags
acholyn Jun 7, 2024
ada3251
using card component
acholyn Jun 7, 2024
af2fff9
adding card css
acholyn Jun 7, 2024
f7c03dc
tweaks to imports and colours
acholyn Jun 7, 2024
878d8ae
hiding file for videos in admin
acholyn Jun 7, 2024
4315b77
tweaks and fixes
acholyn Jun 10, 2024
cf91c99
new header
acholyn Jun 10, 2024
698d643
tweaks to fonts and footer
acholyn Jun 14, 2024
02b9020
footer mobile tweaks + adding logo area placeholder
acholyn Jun 14, 2024
3e9a8ce
abstracting pagination
acholyn Jun 14, 2024
c27bfef
fixing footer sizing to be more consistent and responsive
acholyn Jun 14, 2024
bd445fb
slight bibliography tweaks
acholyn Jun 14, 2024
ebc7ac1
tweaks to bib styling
acholyn Jun 18, 2024
50bb888
adding collab logos + using text instead of image for logo text
acholyn Jun 24, 2024
4742640
tweaks to mobile view of collab logos
acholyn Jun 24, 2024
0f20a7c
adding collaborator logos and putting them in the footer
acholyn Jun 25, 2024
f1aaecf
center aligning header text
acholyn Jun 25, 2024
cbbd8c7
adding width to header menu icons
acholyn Jun 25, 2024
b2b802f
adding lang attr to html
acholyn Jun 25, 2024
bfc4de3
adding more links to menu and footer + 404 placeholders + small tweaks
acholyn Jun 27, 2024
4cb9d6a
tweaking shadows
acholyn Jun 27, 2024
705770e
header tweaks to make things bolder + tidying
acholyn Jun 27, 2024
c5bb499
Add Feedback model
p-j-smith Jun 27, 2024
cf6935e
Add migrations for Feedback model
p-j-smith Jun 27, 2024
daa6a0d
Add Feedback model to admin view
p-j-smith Jun 27, 2024
027babe
adding some menu icons
acholyn Jun 27, 2024
434aaa2
fixing project note bib related name
acholyn Jun 27, 2024
7cc1ee7
Remove unnecessary alteration for projectnote related_name
p-j-smith Jun 27, 2024
aa3909c
tweaks/fixes to drawer
acholyn Jun 27, 2024
3d8dd3d
font + footer tweaks for Aylin, initial base for d/l modes
acholyn Jul 1, 2024
dab647d
minor tweaks to video and source previews
acholyn Jul 1, 2024
f289835
updated logos
acholyn Jul 1, 2024
5644141
logo styling
acholyn Jul 1, 2024
d9c07e2
adding js conditional to stop console complaining
acholyn Jul 1, 2024
86ceeed
basic bits for colours + fixing mobile title
acholyn Jul 1, 2024
f20b335
tidying
acholyn Jul 2, 2024
b5665f4
colour distinctions for for light/dark modes
acholyn Jul 2, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion mod_app/admin/bibliography_admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class Meta:
@admin.register(BibliographyItem)
class BibliographyItemAdmin(admin.ModelAdmin):
model = BibliographyItem
list_display = ["safe_citation", "annotation"]
list_display = ["safe_citation"]
form = BIAdminForm

def safe_citation(self, obj):
Expand Down
17 changes: 6 additions & 11 deletions mod_app/admin/film_admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,17 +114,12 @@ def safe_temporary_images(self, obj):

def preview_video(self, obj):
if obj.videos.first():
if obj.videos.first().file:
return format_html(
'<video width="150" height="120" controls><source src="{}" type="video/mp4"></video>',
obj.videos.first().file.url,
)
else:
return format_html(
'<video width="150" height="120" controls ><source src="{}" type="video/mp4"></video>',
obj.videos.first(),
)
# previously tried to use youtube but that seems to be more tricky than expected and may not be used
# format for working with mediacentral embeds
return format_html(
'<div"><iframe src="{}" frameborder="0" scrolling="no" allowfullscreen></iframe></div>',
obj.videos.first(),
)
# previously tried to use youtube but that seems to be more tricky than expected and may not be used
else:
return "-"

Expand Down
9 changes: 5 additions & 4 deletions mod_app/admin/link_admin.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from django.contrib import admin
from mod_app.utils.mixins import PreviewMixin, s3BrowserButtonMixin

from ..models import *
from mod_app.models import *


class SourceInline(PreviewMixin, admin.TabularInline):
Expand All @@ -14,14 +14,15 @@ class SourceInline(PreviewMixin, admin.TabularInline):
]


class VideoInline(PreviewMixin, s3BrowserButtonMixin, admin.TabularInline):
class VideoInline(PreviewMixin, admin.TabularInline):
model = Video
extra = 1
classes = [
"inline-inline",
"grp-collapse",
"grp-closed",
]
exclude = ("file",)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this now excluded because files are no longer used for videos (only links)?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yep! All the other models that are based on links can still use files, and technically speaking, you could add a file to a video instance still, but you'd have to do it through the command line. This just disables it from being shown in the admin frontend so the researchers can't use it



class ScriptInline(PreviewMixin, s3BrowserButtonMixin, admin.TabularInline):
Expand Down Expand Up @@ -115,9 +116,9 @@ class OtherLinkInline(PreviewMixin, admin.TabularInline):


@admin.register(Video)
class VideoAdmin(PreviewMixin, s3BrowserButtonMixin, admin.ModelAdmin):
class VideoAdmin(PreviewMixin, admin.ModelAdmin):
search_fields = ["description", "url"]
list_display = ["description", "film", "file", "url", "preview"]
list_display = ["description", "film", "url", "preview"]


@admin.register(Source)
Expand Down
21 changes: 0 additions & 21 deletions mod_app/migrations/0022_bibliographyitem_annotation.py

This file was deleted.

4 changes: 0 additions & 4 deletions mod_app/models/bibliography_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,3 @@ def __str__(self):
null=True,
help_text="Please use Harvard reference list style. Examples: Author surname, initial. (year). 'Title of article/book/website/photograph'. Available at: URL or DOI where applicable (date accessed). Please note that the website or photo title should be italicised. For more detailed information and examples visit: https://www5.open.ac.uk/library/referencing-and-plagiarism/quick-guide-to-harvard-referencing-cite-them-right",
)
annotation = RichTextField(
null=True,
help_text="Notes on how this item was helpful or relevant, for example.",
)
4 changes: 0 additions & 4 deletions mod_app/static/css/analysis.css
Original file line number Diff line number Diff line change
@@ -1,5 +1 @@
/* for analysis list and detail pages */

.card-area {
margin-top: 2rem;
}
29 changes: 18 additions & 11 deletions mod_app/static/css/bibliography.css
Original file line number Diff line number Diff line change
@@ -1,19 +1,26 @@
.bibliography__area {
margin: 2rem 1rem;
}
.bibliography__item {
margin-bottom: 1rem;
display: flex;
columns: 2;
margin: 1vw 6vw;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just curious why the change from rem to vw?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It might just be personal bias but I felt like it worked a bit better for responsiveness - maybe since it's based off the width of the screen instead of an element?


> :first-child {
flex: 0 0 75%; /* shorthand for flex-grow, flex-shrink, and flex-basis */
}
.bibliography__item {
margin-bottom: 1rem;
padding-inline-start: 1vw;
display: flex;
columns: 2;

> :first-child {
flex: 0 0 75%;
}

> :last-child {
flex: 1; /* The second column takes the remaining space */
> :last-child {
flex: 1; /* The second column takes the remaining space */
}
}
.ro {
/* odd rows get a colour to make things more readable */
background-color: var(--cyan-0);
}
}

.bib__ref-list {
font-size: 0.7rem;
}
Expand Down
29 changes: 4 additions & 25 deletions mod_app/static/css/film.css
Original file line number Diff line number Diff line change
Expand Up @@ -19,24 +19,6 @@
font-size: 1rem;
}

.page__description {
display: flex;
justify-content: space-between;
margin-bottom: 2rem;
}
/* pagination */
.button--toggle-pagination {
float: right;
}
.pagination {
margin-inline: auto;
text-align: center;
margin-top: 1rem;
.current {
display: block;
}
}

/***************** detail ***************/
.top-level {
display: flex;
Expand Down Expand Up @@ -89,17 +71,12 @@

/*************** for tabs *******************/

.tabs-container {
display: flex;
height: 100vh;
}

.tab-titles {
width: 20vw;
padding: 10px;
flex-direction: column;
box-sizing: border-box;
position: fixed;
position: sticky;
top: 0px;

[name="tab-group"] {
opacity: 0;
Expand Down Expand Up @@ -132,4 +109,6 @@
padding: 10px;
border: 1px solid var(--cream);
margin-left: 20vw;
position: static;
top: 0;
}
30 changes: 18 additions & 12 deletions mod_app/static/css/image-styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,31 @@

#title__logo-img {
float: left;
margin-left: 1vw;
margin-left: 6vw;
width: 15vw;
}
#title__logo-text {
width: 25vw;
transform: translateY(-0.5rem);
transform: translateY(-0.8rem) scale(85%);

@media screen and (max-width: 767px) {
display: none;
}
}

.footer-logo {
/* this contains the logo image and text */
margin-inline: 3vw;
transform: translateY(-2.5rem);
display: flex;
flex-direction: row;
align-items: center;
@media screen and (max-width: 767px) {
display: none;
}
}
#footer__logo-img {
float: left;
width: 8vw;
transform: translateY(0.5rem);
}
#footer__logo-text {
width: 15vw;
/* transform: translateY(-5rem); */

.dlm {
filter: invert(1);
}
body.lm .dlm {
filter: none;
}
37 changes: 14 additions & 23 deletions mod_app/static/css/imports.css
Original file line number Diff line number Diff line change
@@ -1,47 +1,38 @@
/* Other css files */
@import url("utility-classes.css");
@import url("image-styles.css");
@import url("palette.css");
@import url("carousel.css");
@import url("film.css");
@import url("bibliography.css");
@import url("analysis.css");
@import url("utility-classes.css");
@import url("s3-browser.css");
@import url("animations.css");

/* open props */
@import url("open-props.min.css");

/**************** Google Fonts + MUI **********************/
/* Gruppo, Josefin Sans, Noto Serif, Open Sans, Playfair Display, Monoton */
@import url("https://fonts.googleapis.com/css2?family=Gruppo&family=Josefin+Sans&family=Noto+Serif&family=Open+Sans&family=Playfair+Display&family=Monoton&family=Montserrat&display=swap");
/* Gruppo, Open Sans, Playfair Display, Montserrat */
@import url("https://fonts.googleapis.com/css2?family=Gruppo&family=Noto+Serif&family=Open+Sans&family=Playfair+Display&family=Montserrat:ital,wght@0,100..900;1,100..900&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@24,400,0,0");

/**************** Engebrechtre Font *******************/
@font-face {
font-family: "Engebrechtre";
src: url("../fonts/engebrechtre/engebrechtre_rg.otf") format("opentype");
}
/**************** Agency FB Font *******************/
@font-face {
font-family: "Engebrechtre";
font-style: italic;
src: url("../fonts/engebrechtre/engebrechtre_rg_it.otf") format("opentype");
font-family: "Agency FB";
font-weight: normal;
font-style: normal;
src: url("../fonts/agencyfb/agencyfb_reg.ttf") format("truetype");
}
@font-face {
font-family: "Engebrechtre";
font-style: bold, italic;
src: url("../fonts/engebrechtre/engebrechtre_bd_it.otf") format("opentype");
}
@font-face {
font-family: "Engebrechtre";
font-family: "Agency FB";
font-weight: bold;
font-style: bold;
src: url("../fonts/engebrechtre/engebrechtre_bd.otf") format("opentype");
src: url("../fonts/agencyfb/agencyfb_bold.ttf") format("truetype");
}

/*************** Standing Room Only Font **************/

/****************** Impact Font ******************/
@font-face {
font-family: "Standing Room Only";
src: url("../fonts/standingroomonly/StandingRoomOnlyNF.otf")
format("opentype");
font-family: "Impact";
src: url("../fonts/impact/impact.ttf") format("truetype");
}
Loading
Loading