-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #222 from D10S0VSkY-OSS/feature/stacks-cards
Feature/stacks cards
- Loading branch information
Showing
20 changed files
with
667 additions
and
78 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
table { | ||
border-collapse: collapse; | ||
width: 100%; | ||
} | ||
th, td { | ||
border: 1px solid #020116; | ||
padding: 8px; | ||
text-align: left; | ||
} | ||
th { | ||
background-color: #f2f2f2; | ||
} | ||
|
||
|
||
td { | ||
word-wrap: break-word; | ||
max-width: 300px; /* ajusta esto según tus necesidades */ | ||
} | ||
|
||
|
||
h1, h2, h3, h4, h5, h6 { | ||
color: #333; | ||
margin-top: 20px; | ||
} | ||
p { | ||
line-height: 1.6; | ||
} | ||
|
||
a { | ||
color: #007bff; | ||
text-decoration: none; | ||
} | ||
a:hover { | ||
text-decoration: underline; | ||
} | ||
|
||
@media screen and (max-width: 600px) { | ||
table { | ||
width: 100%; | ||
} | ||
td { | ||
max-width: 100px; /* ajusta para dispositivos móviles */ | ||
} | ||
} | ||
|
||
img { | ||
max-width: 150%; | ||
height: auto; | ||
} | ||
|
||
|
||
|
||
/* offcanvas.css */ | ||
.offcanvas-header { | ||
background-color: #007bff; | ||
color: white; | ||
} | ||
|
||
.offcanvas-body { | ||
padding: 15px; | ||
background-color: #f8f9fa; | ||
} | ||
|
||
/* Style for the button that will toggle the offcanvas */ | ||
.offcanvas-toggle-btn { | ||
background-color: #007bff; | ||
color: white; | ||
padding: 10px 20px; | ||
border: none; | ||
border-radius: 4px; | ||
cursor: pointer; | ||
} | ||
|
||
.offcanvas-toggle-btn:hover { | ||
background-color: #0056b3; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
sld-dashboard/app/base/static/assets/js/selector_stacks.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
document.addEventListener('DOMContentLoaded', function() { | ||
let preferredView = localStorage.getItem('preferredView'); | ||
|
||
// Asegúrate de que estas rutas coincidan exactamente con la ubicación de tus archivos HTML | ||
const cardsPath = '/stacks-cards'; | ||
const tablePath = '/stacks-list'; | ||
|
||
if (preferredView === 'table' && !window.location.href.endsWith(tablePath)) { | ||
window.location.href = tablePath; | ||
} else if (preferredView === 'cards' && !window.location.href.endsWith(cardsPath)) { | ||
window.location.href = cardsPath; | ||
} | ||
}); | ||
|
||
|
||
function changeView(view) { | ||
localStorage.setItem('preferredView', view); | ||
if (view === 'table') { | ||
window.location.href = '/stacks-list'; | ||
} else { | ||
window.location.href = '/stacks-cards'; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import urllib.parse | ||
|
||
|
||
def fetch_url_readme(git_repo, branch='main'): | ||
if not git_repo.endswith('.git'): | ||
git_repo += '.git' | ||
|
||
parsed_url = urllib.parse.urlparse(git_repo) | ||
|
||
if parsed_url.netloc == 'github.com': | ||
raw_url = f"https://raw.githubusercontent.com/{parsed_url.path[1:-4]}" | ||
url_readme = f"{raw_url}/{branch}/README.md" | ||
elif parsed_url.netloc == 'gitlab.com': | ||
raw_url = f"https://gitlab.com/{parsed_url.path[1:-4]}" | ||
url_readme = f"{raw_url}/-/raw/{branch}/README.md" | ||
else: | ||
print("Unsupported Git repository platform.") | ||
return None | ||
|
||
print(f"Fetching {url_readme}...") | ||
return url_readme |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.