Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
howto-cards
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Roland Krause
howto-cards
Commits
377a6a9a
Commit
377a6a9a
authored
4 years ago
by
Jacek Lebioda
Committed by
Laurent Heirendt
4 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Fixing a couple of issues in the redesign
parent
acdab0cd
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
_layouts/landing.html
+9
-2
9 additions, 2 deletions
_layouts/landing.html
assets/css/landing.css
+19
-7
19 additions, 7 deletions
assets/css/landing.css
assets/js/box_hider.js
+7
-2
7 additions, 2 deletions
assets/js/box_hider.js
cards.md
+15
-0
15 additions, 0 deletions
cards.md
with
50 additions
and
11 deletions
_layouts/landing.html
+
9
−
2
View file @
377a6a9a
...
...
@@ -42,14 +42,21 @@
<main
class=
"page-content"
aria-label=
"Content"
style=
"margin-right: 0%"
>
{% if site.internal %}
<div
class=
"indicator tooltip"
id=
"external-indicator"
>
<i
class=
"material-icons"
>
verified
</i>
<p>
External
<i
class=
"material-icons"
>
info
</i>
</p>
<span
class=
"tooltip-text"
>
You are connected to the uni.lu network.
<br
/>
You see all the cards.
</span>
</div>
{% else %}
<div
class=
"indicator tooltip"
id=
"internal-indicator"
>
<i
class=
"material-icons"
>
pending
</i>
<p>
External
<i
class=
"material-icons"
>
info
</i>
</p>
<span
class=
"tooltip-text"
>
You are
<strong>
not connected
</strong>
to the uni.lu network.
<br
/>
You can see only publicly available cards.
<br
/>
In order to see all, please connect to the university network via VPN.
</span>
...
...
This diff is collapsed.
Click to expand it.
assets/css/landing.css
+
19
−
7
View file @
377a6a9a
...
...
@@ -260,7 +260,7 @@
/* ==================================================== */
div
.search-bar
{
width
:
60%
;
margin-left
:
2
0
%
;
margin-left
:
1
2%
;
display
:
flex
;
}
@media
(
max-width
:
1080px
)
{
...
...
@@ -300,19 +300,31 @@ div.search-bar {
.indicator
{
position
:
absolute
;
top
:
190px
;
right
:
7
5px
;
right
:
5
9
px
;
color
:
#d6d6d6
;
text-align
:
center
;
cursor
:
pointer
;
}
@media
(
max-width
:
1080px
)
{
.indicator
{
top
:
40
px
;
right
:
2
0
px
;
top
:
128
px
;
right
:
7
2px
;
}
}
.indicator
>
i
{
font-size
:
36px
;
@media
(
max-width
:
650px
)
{
.indicator
{
top
:
50px
;
right
:
50px
;
}
}
.indicator
>
p
>
i
{
font-size
:
20px
;
position
:
relative
;
top
:
5px
;
left
:
5px
;
}
.indicator
>
p
{
font-size
:
14px
;
}
/* ==================================================== */
/* Tooltip */
...
...
@@ -321,7 +333,7 @@ div.search-bar {
visibility
:
hidden
;
width
:
400px
;
right
:
120%
;
top
:
-
15
px
;
top
:
-
43
px
;
background-color
:
var
(
--tooltip-bg
);
color
:
var
(
--secondary-color
);
text-align
:
center
;
...
...
This diff is collapsed.
Click to expand it.
assets/js/box_hider.js
+
7
−
2
View file @
377a6a9a
...
...
@@ -38,7 +38,7 @@ window.boxHider = (function() {
}
}
function
Unhide
Element
(
element
)
{
function
Show
Element
(
element
)
{
if
(
element
instanceof
HTMLElement
)
{
element
.
style
[
'
display
'
]
=
'
inline-block
'
;
}
...
...
@@ -52,7 +52,7 @@ window.boxHider = (function() {
function
ShowAllBoxes
()
{
var
allBoxes
=
GetAllBoxElementsArray
();
allBoxes
.
map
(
function
(
box
)
{
Unhide
Element
(
box
);
Show
Element
(
box
);
});
}
...
...
@@ -74,17 +74,22 @@ window.boxHider = (function() {
// Hide the "All Categories" element
HideAllCategories
();
// Finally, hide all boxes except of the selected one
// Moreover, make sure that the selected boxes are displayed.
var
allBoxes
=
GetAllBoxElementsArray
();
if
(
boxId
.
startsWith
(
'
handbook
'
))
{
allBoxes
.
map
(
function
(
box
)
{
if
(
!
box
.
id
.
startsWith
(
'
handbook
'
))
{
HideElement
(
box
);
}
else
{
ShowElement
(
box
);
}
});
}
else
{
allBoxes
.
map
(
function
(
box
)
{
if
(
box
!=
selectedBox
)
{
HideElement
(
box
);
}
else
{
ShowElement
(
box
);
}
});
}
...
...
This diff is collapsed.
Click to expand it.
cards.md
+
15
−
0
View file @
377a6a9a
...
...
@@ -12,6 +12,21 @@ order: -1
}
</style>
{% comment %}
This code adds CSS that hides the index-boxes by default.
It's in javascript, so that it doesn't effect the browsers with javascript disabled.
How the correct boxes are shown then? box_hider.js shows them
{% endcomment %}
<script>
var element = document.createElement('style');
var content = document.createTextNode(".index-box {display: none;}");
var head = document.getElementsByTagName('head');
if (head.length > 0) {
element.appendChild(content);
head[0].appendChild(element);
}
</script>
<!-- index -->
<div
class=
"index-box-container"
>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment