Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
yPhil
Pétrolette
Commits
5d15f2da
Commit
5d15f2da
authored
Sep 12, 2017
by
yPhil
Browse files
Refactoring: Theming: Theme switcher: Hard-coded Background-color :(
parent
5c4e41cb
Changes
3
Hide whitespace changes
Inline
Side-by-side
README.md
View file @
5d15f2da
...
...
@@ -47,7 +47,7 @@ To run NWS locally, simply install a basic PHP server:
-
Install the server components:
`sudo apt install php7.0 php7.0-xml`
(you may have to log in and out)
-
Start the server in the NWS directory :
`php -S localhost:8000`
-
Point your browser to http://localhost:8000
/nws
-
Point your browser to http://localhost:8000
### Usage
...
...
index.php
View file @
5d15f2da
...
...
@@ -31,7 +31,7 @@ $feeds = 'libs/feeds2.xml';
<style
type=
"text/css"
media=
"screen"
>
@import
"libs/nws-style.css"
;
</style>
<base
target=
'_blank'
/>
</head>
<body
class=
"
ui-state-default
"
>
<body
class=
"
nws-page
"
>
<script
src=
"https://code.jquery.com/jquery-3.2.1.min.js"
...
...
@@ -52,6 +52,8 @@ $feeds = 'libs/feeds2.xml';
$
(
document
).
ready
(
function
()
{
$
(
"
#theme-menu
"
).
menu
();
$
(
document
).
tooltip
({
position
:
{
my
:
"
center bottom-20
"
,
...
...
@@ -67,20 +69,10 @@ $feeds = 'libs/feeds2.xml';
}
});
/*
* $('.expose').click(function(e){
* $(this).css('z-index','99999');
* $('#overlay').fadeIn(300);
* });
*
* $('#overlay').click(function(e){
* $('#overlay').fadeOut(300, function(){
* $('.expose').css('z-index','1');
* });
* });*/
$
(
"
#nav li a
"
).
click
(
function
()
{
$
(
"
link#jquery-ui-css
"
).
attr
(
"
href
"
,
$
(
this
).
attr
(
'
rel
'
));
$
(
'
body
'
).
css
(
"
background-color
"
,
"
#333
"
)
/* alert($('.ui-widget-content').css("color"))*/
return
false
;
});
...
...
@@ -501,7 +493,7 @@ $feeds = 'libs/feeds2.xml';
<div id="tab-'
.
$tabName
.
'" class="nws-tab-feeds nws-tab-feeds-col">
<i class="nws-button-col-wrapping-block fa fa-columns" title="Set ['
.
$tabName
.
'] flowing style to block" aria-hidden="true"></i>
<i class="nws-button-col-wrapping-col fa fa-newspaper-o" title="Set ['
.
$tabName
.
'] flowing style to column" aria-hidden="true"></i>
<i class="nws-button-col-wrapping-phone fa fa-
mobi
le" title="Set ['
.
$tabName
.
'] flowing style to phone" aria-hidden="true"></i>
<i class="nws-button-col-wrapping-phone fa fa-
tab
le
t
" title="Set ['
.
$tabName
.
'] flowing style to phone" aria-hidden="true"></i>
<i class="nws-button-gallery-tab fa fa-picture-o" title="View all images in the ['
.
$tabName
.
'] tab" aria-hidden="true"></i>
'
;
foreach
(
$tabGroups
[
$tabName
]
as
$tabUrl
)
...
...
@@ -528,6 +520,42 @@ $feeds = 'libs/feeds2.xml';
}
?>
<ul
id=
"theme-menu"
>
<li
class=
"ui-state-disabled"
><div>
Toys (n/a)
</div></li>
<li><div>
Books
</div></li>
<li><div>
Clothing
</div></li>
<li><div>
Electronics
</div>
<ul>
<li
class=
"ui-state-disabled"
><div>
Home Entertainment
</div></li>
<li><div>
Car Hifi
</div></li>
<li><div>
Utilities
</div></li>
</ul>
</li>
<li><div>
Movies
</div></li>
<li><div>
Music
</div>
<ul>
<li><div>
Rock
</div>
<ul>
<li><div>
Alternative
</div></li>
<li><div>
Classic
</div></li>
</ul>
</li>
<li><div>
Jazz
</div>
<ul>
<li><div>
Freejazz
</div></li>
<li><div>
Big Band
</div></li>
<li><div>
Modern
</div></li>
</ul>
</li>
<li><div>
Pop
</div></li>
</ul>
</li>
<li
class=
"ui-state-disabled"
><div>
Specials (n/a)
</div></li>
</ul>
<span
id=
"result"
></span>
<ul
id=
"nav"
>
<li><a
href=
"#"
rel=
"https://code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css"
>
base
</a></li>
<li><a
href=
"#"
rel=
"https://code.jquery.com/ui/1.12.1/themes/black-tie/jquery-ui.css"
>
black-tie
</a></li>
...
...
@@ -555,9 +583,8 @@ $feeds = 'libs/feeds2.xml';
<li><a
href=
"#"
rel=
"https://code.jquery.com/ui/1.12.1/themes/trontastic/jquery-ui.css"
>
trontastic
</a></li>
<li><a
href=
"#"
rel=
"https://code.jquery.com/ui/1.12.1/themes/ui-darkness/jquery-ui.css"
>
ui-darkness
</a></li>
<li><a
href=
"#"
rel=
"https://code.jquery.com/ui/1.12.1/themes/ui-lightness/jquery-ui.css"
>
ui-lightness
</a></li>
<li><a
href=
"#"
rel=
"https://code.jquery.com/ui/1.12.1/themes/vader/jquery-ui.css"
></a></li>
</ul>
<div
id=
"overlay"
></div>
</body>
</html>
libs/nws-style.css
View file @
5d15f2da
...
...
@@ -27,7 +27,7 @@
body
,
.ui-widget
{
font-family
:
"system"
!important
;
/*
font-family: "system" !important;
*/
/* background:var(--main-color-level-9); */
/* color:var(--main-color-level-1); */
/* color:#eeeeec; */
...
...
@@ -43,7 +43,7 @@ label {
.ui-tooltip
,
.arrow
:after
{
/*
background: black;
*/
background
:
black
;
border
:
2px
solid
white
;
}
...
...
@@ -137,7 +137,7 @@ li.nws-feed-link {
.outerContainer
{
/* min-height:50vh; */
min-height
:
100px
;
/*
min-height:100px;
*/
margin
:
0
0
.5em
0
;
}
...
...
@@ -233,9 +233,10 @@ div.nws-tab-feeds {
}
.feedTitle
{
height
:
1.2em
;
/*
height:1.2em;
*/
font-size
:
.8em
!important
;
font-variant
:
small-caps
;
/* font-variant: small-caps; */
padding
:
.2em
;
overflow
:
hidden
;
/* background:var(--main-color-level-3); */
/* padding:.2em .2em 0; */
...
...
@@ -243,6 +244,8 @@ div.nws-tab-feeds {
text-overflow
:
ellipsis
;
}
.ui-menu
{
width
:
150px
;
}
.feedTitle
:hover
{
filter
:
brightness
(
175%
);
}
...
...
@@ -295,8 +298,8 @@ div.nws-tab-feeds {
}
.fa-fw
{
font-size
:
.
5
em
!important
;
margin
:
.
2
0
0
0
;
font-size
:
.
7
em
!important
;
margin
:
.
3em
.3em
0
0
;
}
...
...
@@ -310,7 +313,7 @@ div.nws-tab-feeds {
/* color: var(--main-color-level-5); */
cursor
:
pointer
;
float
:
right
;
margin
:
.5em
0
0
0
;
/*
margin: .5em 0 0 0;
*/
}
.nws-button-gallery-tab
,
...
...
@@ -377,9 +380,8 @@ i:hover {
/* color:none; */
/* font-weight:normal; */
/* text-decoration:none; */
margin
:
.1em
;
/*
margin:.1em;
*/
width
:
16px
;
vertical-align
:
text-top
;
}
img
.full
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment