Skip to content

Commit

Permalink
Clean up theme directory structure, fix login page styles
Browse files Browse the repository at this point in the history
  • Loading branch information
Etheryte committed Dec 11, 2024
1 parent 577a73a commit 8dfc5af
Show file tree
Hide file tree
Showing 60 changed files with 455 additions and 550 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ html(lang=window.preferredLocale.replace("_", "-"))

include /templates/common.jade

body(class='#{webTheme}' == "uyuni" ? "theme-#{webTheme} new-theme login-page" : "theme-#{webTheme} new-theme")
body(class="theme-#{webTheme} new-theme login-page")
#login

+csrfToken
Expand Down
1 change: 0 additions & 1 deletion java/code/webapp/WEB-INF/decorators/layout_c.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,5 @@
</c:if>
</script>
</div>
<button id="scroll-top"><i class='fa fa-angle-up'></i></button>
</body>
</html:html>
158 changes: 80 additions & 78 deletions java/code/webapp/WEB-INF/decorators/layout_error.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -54,86 +54,88 @@
</head>
<c:set var="webTheme" value="${GlobalInstanceHolder.USER_PREFERENCE_UTILS.getCurrentWebTheme(pageContext)}"/>
<body class="theme-${webTheme} new-theme" onload="<decorator:getProperty property="body.onload" />">
<c:set var="custom_header" scope="page" value="${rhn:getConfig('java.custom_header')}" />
<c:set var="custom_header" scope="page" value="${rhn:getConfig('java.custom_header')}" />

<header class="navbar-pf navbar">
<div class="navbar-header d-flex flex-row">
<div id="breadcrumb">
<c:choose>
<c:when test="${Config.get().getString('product_name').compareToIgnoreCase('Uyuni') == 0 }">
<a href="/" class="navbar-brand js-spa" target="" title="Uyuni homepage">
<span>Uyuni</span>
</a>
</c:when>
<c:otherwise>
<a href="/" class="navbar-brand js-spa" target="" title="SUSE Manager homepage">
<span>SUSE<i class="fa fa-registered"></i>Manager</span>
</a>
</c:otherwise>
</c:choose>
</div>
</div>
<ul class="nav navbar-nav navbar-controls">
<li>
<a class="about-link" href="/rhn/help/about.do"><bean:message key="About Spacewalk"/></a>
</li>
</ul>
</header>
<div class="spacewalk-main-column-layout">
<aside id="spacewalk-aside" class="navbar-collapse in" style="height: 689px;">
<div id="nav">
<nav class="collapsed">
<ul class="level1" style="height: 601px;">
<li>
<div class=" nodeLink ">
<i class="fa fa-home"></i>
<a href="/" class="undefined js-spa" target="">Homepage</a>
</div>
</li>
<li>
<div class=" nodeLink ">
<i class="fa fa-link"></i>
<c:choose>
<c:when test="${Config.get().getString('product_name').compareToIgnoreCase('Uyuni') == 0 }">
<a href="https://www.uyuni-project.org/uyuni-docs/uyuni/index.html" class="undefined js-spa" target="_blank"><bean:message key="header.jsp.documentation"/></a>
</c:when>
<c:otherwise>
<a href="https://documentation.suse.com/suma/" class="undefined js-spa" target="_blank"><bean:message key="header.jsp.documentation"/></a>
</c:otherwise>
</c:choose>
</div>
</li>
</ul>
</nav>
</div>
</aside>
<div id="page-body">
<div id="page-body-default">
<section id="spacewalk-content">
<decorator:body />
</section>
</div>
<script type="text/javascript">
<c:if test="${rhn:getConfig('web.spa.enable')}">
<c:set var="spaTimeout" value="${rhn:getConfig('web.spa.timeout')}"/>
window.pageRenderers && window.pageRenderers.spaengine.init && window.pageRenderers.spaengine.init(${spaTimeout});
</c:if>
</script>
</div>
</div>
<footer>
<div class="wrapper">
<div class="footer-copyright">
<bean:message key="footer.jsp.copyright" />
</div>
<div class="footer-release">
<bean:message key="footer.jsp.release" arg0="/docs/${docsLocale}/release-notes/release-notes-server.html" arg1="${rhn:getProductVersion()}" />
<header class="navbar-pf navbar">
<div class="header-content container-fluid">
<div class="navbar-header d-flex flex-row">
<a href="#" class="navbar-toggle">
<i class="fa fa-bars" aria-hidden="true"></i>
</a>
<div id="breadcrumb">
<div>
<c:choose>
<c:when test="${Config.get().getString('product_name').compareToIgnoreCase('Uyuni') == 0 }">
<a href="/" class="navbar-brand js-spa" target="" title="Uyuni homepage">
<span>Uyuni</span>
</a>
</c:when>
<c:otherwise>
<a href="/" class="navbar-brand js-spa" target="" title="SUSE Manager homepage">
<span>SUSE<i class="fa fa-registered"></i>Manager</span>
</a>
</c:otherwise>
</c:choose>
</div>
</div>
</div>
</header>

<div class="spacewalk-main-column-layout">
<aside id="spacewalk-aside" class="navbar-collapse in">
<div id="nav">
<nav class="collapsed">
<ul class="level1">
<li>
<div class="nodeLink">
<i class="fa fa-home"></i><a href="/" class="js-spa">Home</a>
</div>
</li>
<li>
<div class="nodeLink">
<c:choose>
<c:when test="${Config.get().getString('product_name').compareToIgnoreCase('Uyuni') == 0 }">
<i class="fa fa-link"></i><a href="https://www.uyuni-project.org/uyuni-docs/uyuni/index.html" class="js-spa" target="_blank"><bean:message key="header.jsp.documentation"/></a>
</c:when>
<c:otherwise>
<i class="fa fa-link"></i><a href="https://documentation.suse.com/suma/" class="js-spa" target="_blank"><bean:message key="header.jsp.documentation"/></a>
</c:otherwise>
</c:choose>
</div>
</li>
</ul>
</nav>
</div>

<footer>
<div class="wrapper">
<div class="footer-copyright">
<bean:message key="footer.jsp.copyright" />
</div>
<div class="footer-release">
<bean:message key="footer.jsp.release" arg0="/docs/${docsLocale}/release-notes/release-notes-server.html" arg1="${rhn:getProductVersion()}" />
</div>
<c:set var="custom_footer" scope="page" value="${rhn:getConfig('java.custom_footer')}" />
<c:if test="${! empty custom_footer}">
<div><c:out value="${custom_footer}" escapeXml="false"/></div>
</c:if>
</div>
</footer>
</aside>

<div id="page-body">
<div id="page-body-default">
<section id="spacewalk-content">
<decorator:body />
</section>
</div>
<script type="text/javascript">
<c:if test="${rhn:getConfig('web.spa.enable')}">
<c:set var="spaTimeout" value="${rhn:getConfig('web.spa.timeout')}"/>
window.pageRenderers && window.pageRenderers.spaengine.init && window.pageRenderers.spaengine.init(${spaTimeout});
</c:if>
</script>
</div>
<c:set var="custom_footer" scope="page" value="${rhn:getConfig('java.custom_footer')}" />
<c:if test="${! empty custom_footer}">
<div><c:out value="${custom_footer}" escapeXml="false"/></div>
</c:if>
</div>
</footer>
</body>
</html:html>
1 change: 1 addition & 0 deletions java/spacewalk-java.changes.eth.scope
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- Layout improvements for the login page and error page
10 changes: 0 additions & 10 deletions web/html/javascript/spacewalk-essentials.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,18 +46,8 @@ function listenForGlobalNotificationChanges() {
// On section#spacewalk-content scroll
function scrollTopBehavior() {
jQuery(scrollTarget).on("scroll", function () {
if(jQuery(this).scrollTop() > 100) {
jQuery('#scroll-top').show();
} else {
jQuery('#scroll-top').hide();
}

sstScrollBehavior();
});

jQuery(document).on('click', '#scroll-top', function() {
jQuery(scrollTarget).scrollTo(0,0);
});
}

// A container function for what should be fired
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// NB! This must be in sync between the old and the new theme!
html,
body {
height: 100%;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// NB! Do NOT add anything new to this file, it's a remnant of old theme bits

// See https://stackoverflow.com/a/42887127/1470607
.pull-right {
@extend .float-start;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ div.form-control,
&,
&:focus,
&:active {
color: $eos-bc-gray-1000;
background: #fff;
}

Expand Down
65 changes: 65 additions & 0 deletions web/html/src/branding/css/base/fonts.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
@font-face {
font-family: "Lato";
font-style: normal;
font-weight: 300;
src: local("Lato"), url("~branding/fonts/Lato/Lato-Regular.ttf") format("truetype");
}
@font-face {
font-family: "Lato Bold";
font-style: normal;
font-weight: 300;
src: local("Lato Bold"), local("LatoBold"),
url("~branding/fonts/Lato/Lato-Bold.ttf") format("truetype");
}

@font-face {
font-family: "WorkSans";
font-style: normal;
font-weight: 300;
src: local("WorkSans"), url("~branding/fonts/WorkSans/static/WorkSans-Regular.ttf") format("truetype");
}
@font-face {
font-family: "WorkSans Bold";
font-style: normal;
font-weight: 300;
src: local("WorkSans Bold"), local("WorkSansBold"),
url("~branding/fonts/WorkSans/static/WorkSans-Bold.ttf") format("truetype");
}

@font-face {
font-family: "Poppins";
font-style: normal;
font-weight: 300;
src: url("~branding/fonts/Poppins/poppins-v15-latin-300.eot"); /* IE9 Compat Modes */
src: local(""), url("~branding/fonts/Poppins/poppins-v15-latin-300.eot?#iefix") format("embedded-opentype"),
/* IE6-IE8 */ url("~branding/fonts/Poppins/poppins-v15-latin-300.woff2") format("woff2"),
/* Super Modern Browsers */ url("~branding/fonts/Poppins/poppins-v15-latin-300.woff") format("woff"),
/* Modern Browsers */ url("~branding/fonts/Poppins/poppins-v15-latin-300.ttf") format("truetype"),
/* Safari, Android, iOS */ url("~branding/fonts/Poppins/poppins-v15-latin-300.svg#Poppins") format("svg"); /* Legacy iOS */
}

@font-face {
font-family: "Poppins";
font-style: normal;
font-weight: 500;
src: url("~branding/fonts/Poppins/poppins-v15-latin-500.eot"); /* IE9 Compat Modes */
src: local(""), url("~branding/fonts/Poppins/poppins-v15-latin-500.eot?#iefix") format("embedded-opentype"),
/* IE6-IE8 */ url("~branding/fonts/Poppins/poppins-v15-latin-500.woff2") format("woff2"),
/* Super Modern Browsers */ url("~branding/fonts/Poppins/poppins-v15-latin-500.woff") format("woff"),
/* Modern Browsers */ url("~branding/fonts/Poppins/poppins-v15-latin-500.ttf") format("truetype"),
/* Safari, Android, iOS */ url("~branding/fonts/Poppins/poppins-v15-latin-500.svg#Poppins") format("svg"); /* Legacy iOS */
}

@font-face {
font-family: "Roboto Light";
font-style: normal;
font-weight: 300;
src: local("Roboto Light"), local("RobotoLight"), url("~branding/fonts/Roboto/Roboto-Light.ttf") format("truetype");
}

@font-face {
font-family: "Roboto Bold";
font-style: normal;
font-weight: 300;
src: local("Roboto Bold"), local("RobotoBold"), url("~branding/fonts/Roboto/Roboto-Bold.ttf") format("truetype");
}
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
@import "../base/theme.scss";
@import "../base/tables.scss";
@import "../base/error.scss";
@import "../base/tools.scss";
@import "../base/setup-wizard.scss";
@import "../base/notifications.scss";
@import "../base/fixes.scss";
@import "../base/network.scss";
@import "../base/inputs.scss";
@import "../base/forms.scss";
@import "../base/hr.scss";

@import "./legacy-pages/login.scss";
@import "./theme.scss";
@import "./tables.scss";
@import "./error.scss";
@import "./tools.scss";
@import "./setup-wizard.scss";
@import "./notifications.scss";
@import "./fixes.scss";
@import "./network.scss";
@import "./inputs.scss";
@import "./forms.scss";
@import "./hr.scss";

@import "./components/titles.scss";
@import "./components/alerts.scss";
Expand All @@ -36,7 +34,7 @@
@import "./components/lists.scss";
@import "./components/dropdown-menu.scss";

@import "./bootstrap-fixes.scss";
@import "./bootstrap/legacy-fixes.scss";

// Responsive overrides
@import "../base/responsive-rules.scss";
@import "./responsive-rules.scss";
File renamed without changes.
39 changes: 1 addition & 38 deletions web/html/src/branding/css/base/theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ footer {
bottom: 0px;
width: 100%;
@include make-row;
margin: 0 auto;

a {
color: inherit;
Expand All @@ -98,17 +99,6 @@ footer {
color: inherit;
}

/* override spacewalk rules */
div:nth-child(1),
div:nth-child(2) {
float: none;
width: 100%;
margin: 0;
min-height: auto;
text-align: left !important;
padding: 0;
}

div.wrapper {
background: $aside-footer-logo-background;
min-height: 28px;
Expand Down Expand Up @@ -333,33 +323,6 @@ nav.navbar-pf {
}
}

#scroll-top {
display: none;
position: fixed;
bottom: 5px;
right: 3px;
cursor: pointer;
z-index: 1000;
border-radius: 20px;
width: 35px;
height: 35px;
font-size: 1.5em;
padding: 0;
text-align: center;
background-color: rgba(77, 211, 167, 0.2);
color: $gray-dark;
border: 1px solid rgba(0, 192, 129, 0.2);
i {
margin: 0 auto;
height: 26px;
}
}
#scroll-top:hover {
background-color: rgba(0, 192, 129, 0.9);
color: $gray-light;
border: 1px solid darken($green, 10%);
}

//Nav menu in left column
#nav {
font-size: 1.1em;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@import "./fonts.scss";

/**
* EOS Colors guideline for products https://productbrand.suse.com/colors
*
Expand Down
Loading

0 comments on commit 8dfc5af

Please sign in to comment.