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

Homepage update #2663

Draft
wants to merge 24 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
4ba9f04
Fix file drag and drop
reecebrowne Dec 30, 2024
0c0a50f
Merge branch 'main' of https://github.com/reecebrowne/Stirling-PDF
reecebrowne Jan 3, 2025
01e97ad
Match navbar in homepage
reecebrowne Jan 3, 2025
7c2ef7e
Homepage overhaul
reecebrowne Jan 10, 2025
3ffcfc9
Merge branch 'main' of https://github.com/reecebrowne/Stirling-PDF in…
reecebrowne Jan 10, 2025
d06b374
full width and bug fixes
reecebrowne Jan 10, 2025
e69329a
correct resize and wrap
reecebrowne Jan 10, 2025
0831787
improve search
reecebrowne Jan 10, 2025
90d2b4a
Favourites rework
reecebrowne Jan 14, 2025
0a7c205
fix fragment
reecebrowne Jan 14, 2025
7981f38
Merge branch 'main' of https://github.com/reecebrowne/Stirling-PDF in…
reecebrowne Jan 14, 2025
c40ee9f
Remove unnecessary function
reecebrowne Jan 14, 2025
539c6f0
Restore old homepage as option and add feature row
reecebrowne Jan 15, 2025
de5921b
Toggle homepage and favourites clean up
reecebrowne Jan 15, 2025
0f87fe8
Always show favourites when selecting favourites
reecebrowne Jan 15, 2025
9e56914
Css tweak
reecebrowne Jan 15, 2025
9015c01
Merge branch 'main' of https://github.com/reecebrowne/Stirling-PDF in…
reecebrowne Jan 15, 2025
35408a1
Mapping
reecebrowne Jan 15, 2025
bfd5d71
Order homepage + UI tweaks
reecebrowne Jan 17, 2025
a62db9a
Theming updates and UI tweaks/fixes
reecebrowne Jan 17, 2025
0e4ec43
UI tweaks and js cleanup
reecebrowne Jan 20, 2025
0174892
Central UI with seperator
Jan 21, 2025
a43a5c7
convert colour updates
Jan 21, 2025
06186eb
Update centring
Jan 22, 2025
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
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,12 @@ public String root(Model model) {
return "redirect:/";
}

@GetMapping("/home-legacy")
public String homeLegacy(Model model) {
model.addAttribute("currentPage", "home-legacy");
return "home-legacy";
}

@GetMapping(value = "/robots.txt", produces = MediaType.TEXT_PLAIN_VALUE)
@ResponseBody
@Hidden
Expand Down
9 changes: 9 additions & 0 deletions src/main/resources/messages_en_GB.properties
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ analytics.settings=You can change the settings for analytics in the config/setti
# NAVBAR #
#############
navbar.favorite=Favorites
navbar.recent=New and recently updated
navbar.darkmode=Dark Mode
navbar.language=Languages
navbar.settings=Settings
Expand Down Expand Up @@ -265,6 +266,14 @@ home.viewPdf.title=View PDF
home.viewPdf.desc=View, annotate, add text or images
viewPdf.tags=view,read,annotate,text,image

home.setFavorites=Set Favourites
home.hideFavorites=Hide Favourites
home.showFavorites=Show Favourites
home.legacyHomepage=Old homepage
home.newHomePage=Try our new homepage!
home.alphabetical=Alphabetical
home.globalPopularity=Global Popularity

home.multiTool.title=PDF Multi Tool
home.multiTool.desc=Merge, Rotate, Rearrange, Split, and Remove pages
multiTool.tags=Multi Tool,Multi operation,UI,click drag,front end,client side,interactive,intractable,move,delete,migrate,divide
Expand Down
22 changes: 21 additions & 1 deletion src/main/resources/static/css/general.css
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ input[data-autocompleted] {
color: whitesmoke;
animation: fadeup 0.15s linear;
}

@keyframes fadeup {
0% {
transform: translateY(10px);
Expand All @@ -126,7 +127,7 @@ input[data-autocompleted] {
}
.btn:hover .btn-tooltip {
display: block;
}
}
.btn-primary:hover .btn-tooltip {
display: block;
}
Expand All @@ -142,3 +143,22 @@ input[data-autocompleted] {
.toolbarButton:hover .btn-tooltip {
display: block;
}
.nav-tooltip {
position: absolute;
display: none;
bottom: 3.2rem;
white-space: nowrap;
flex-wrap: nowrap;
padding: 7px;
background-color: rgb(0, 29, 41);
border-radius: 3px;
font-size: 12px;
color: whitesmoke;
animation: fadeup 0.15s linear;
z-index: 20;
width:15rem;
text-wrap: auto;
}
.dropdown-item:hover .nav-tooltip {
display: block;
}
229 changes: 229 additions & 0 deletions src/main/resources/static/css/home-legacy.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,229 @@
#searchBar {
color: var(--md-sys-color-on-surface);
background-color: var(--md-sys-color-surface-container-low);
width: 100%;
font-size: 16px;
margin-bottom: 2rem;
padding: 0.75rem 3.5rem;
border: 1px solid var(--md-sys-color-outline-variant);
border-radius: 3rem;
outline-color: var(--md-sys-color-outline-variant);
}

#filtersContainer {
display: flex;
width: 100%;
align-items: center;
justify-content: center;
gap: 10px;
}

.filter-button {
color: var(--md-sys-color-secondary);
user-select: none;
cursor: pointer;
transition: transform 0.3s;
transform-origin: center center;
}

.filter-button:hover {
transform: scale(1.08);
}

.search-icon {
position: absolute;
margin: 0.75rem 1rem;
border: 0.1rem solid transparent;
}

.features-container {
display: flex;
flex-direction: column;
gap: 30px;
}

.feature-group-legacy {
display: flex;
flex-direction: column;
}

.feature-group-header {
display: flex;
align-items: center;
justify-content: flex-start;
color: var(--md-sys-color-on-surface);
margin-bottom: 15px;
user-select: none;
cursor: pointer;
gap: 10px;
}

.feature-group-container {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(15rem, 3fr));
gap: 30px 30px;
overflow: hidden;
margin: -20px;
padding: 20px;
box-sizing:content-box;
}

.feature-group-container.animated-group {
transition: 0.5s all;
}

.feature-group-legacy.collapsed>.feature-group-container {
max-height: 0 !important;
margin: 0;
padding: 0;
}

.header-expand-button {
transition: 0.5s all;
transform: rotate(90deg);
}

.header-expand-button.collapsed {
transform: rotate(0deg);
}

.feature-card {
border: 1px solid var(--md-sys-color-surface-5);
border-radius: 1.75rem;
padding: 1.25rem;
display: flex;
flex-direction: column;
align-items: flex-start;
background: var(--md-sys-color-surface-5);
transition:
transform 0.3s,
border 0.3s;
transform-origin: center center;
outline: 0px solid transparent;
position:relative;
}

.feature-card a {
text-decoration: none;
color: var(--md-sys-color-on-surface);
display: flex;
flex-direction: column;
width: 100%;
height: 100%;
}

.feature-card .card-text {
font-size: .875rem;
}

.feature-card:hover {
cursor: pointer;
transform: scale(1.08);
box-shadow: var(--md-sys-elevation-2);
}

.card-title.text-primary {
color: #000;
}

.home-card-icon {
width: 3rem;
height: 3rem;
transform: translateY(-5px);
}

.favorite-icon {
display: none !important;
position: absolute;
top: 10px;
right: 10px;
color: var(--md-sys-color-secondary);
}

#tool-icon {
height: 100%;
}

#tool-text {
margin: 0.0rem 0 0 1.25rem;
}

.card-title {
margin-bottom: 1rem;
font-size: 1.1rem;
}

/* Only show the favorite icons when the parent card is being hovered over */
.feature-card:hover .favorite-icon {
display: block !important;
}

.favorite-icon img {
filter: brightness(0) invert(var(--md-theme-filter-color));
}

.favorite-icon:hover .material-symbols-rounded {
transform: scale(1.2);
}

.favorite-icon .material-symbols-rounded.fill{
color: #f5c000;
}

.jumbotron {
padding: 3rem 3rem;
/* Reduce vertical padding */
}

.lookatme {
opacity: 1;
position: relative;
display: inline-block;
}

.lookatme::after {
color: #e33100;
text-shadow: 0 0 5px #e33100;
/* in the html, the data-lookatme-text attribute must */
/* contain the same text as the .lookatme element */
content: attr(data-lookatme-text);
padding: inherit;
position: absolute;
inset: 0 0 0 0;
z-index: 1;
/* 20 steps / 2 seconds = 10fps */
-webkit-animation: 2s infinite Pulse steps(20);
animation: 2s infinite Pulse steps(20);
}

@keyframes Pulse {
from {
opacity: 0;
}

50% {
opacity: 1;
}

to {
opacity: 0;
}
}

.update-notice {
animation: scale 1s infinite alternate;
}

@keyframes scale {
0% {
transform: scale(0.96);
}

100% {
transform: scale(1);
}
}

.hidden {
visibility: hidden;
}
Loading
Loading