Skip to content
This repository has been archived by the owner on Jan 11, 2023. It is now read-only.

start working on themes #479

Open
wants to merge 17 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 3 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ set(UI_PACKAGES
vala_precompile(FEEDREADER ${FEEDREADER_NAME}
src/FavIcon.vala
src/FeedReader.vala
src/ArticleTheme.vala
src/Widgets/AddPopover.vala
src/Widgets/ArticleRow.vala
src/Widgets/ArticleView.vala
Expand Down Expand Up @@ -190,7 +191,7 @@ OPTIONS
--header=FeedReader.h
--vapi=FeedReader.vapi
--enable-experimental

GENERATE_VAPI
FeedReader

Expand Down Expand Up @@ -234,3 +235,4 @@ install (FILES ${CMAKE_CURRENT_SOURCE_DIR}/data/org.gnome.FeedReader.appdata.xml
install (DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/data/application-icons/hicolor DESTINATION ${CMAKE_INSTALL_PREFIX}/share/icons)
install (CODE "execute_process (COMMAND gtk-update-icon-cache -t ${CMAKE_INSTALL_PREFIX}/share/icons/hicolor)")
install (DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/data/GrabberConfig DESTINATION ${PKGDATADIR})
install (DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/data/ArticleView DESTINATION ${PKGDATADIR})
27 changes: 0 additions & 27 deletions data/ArticleView/article.html

This file was deleted.

33 changes: 33 additions & 0 deletions data/ArticleView/default/article.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<!DOCTYPE>
<html>
<head>
<title>FeedReader Article View</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style>
$CSS
</style>
</head>

<body style="font-size:$FONTSIZEpt;font-family:$FONTFAMILY;">

<div id="feedreader-container">
<article>
<header class="unselectable">
<div id="source" style="font-size:$SMALLSIZEpt;">$FEED</div>
<div id="title" target="_blank" style="font-size:$LARGESIZEpt;"><a href="$URL">$TITLE</a></div>
<div id="author" style="font-size:$SMALLSIZEpt;">
$AUTHOR
</div>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it be make sense to use more semantic tags like <h2> instead of <div>?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The theme isn't ready, it's just an example of how things works 👍
Once the Vala code is ready, i will work on two/three themes that will replace the default ones

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh cool, that makes sense :)

</header>

<div id="content" class="$UNSELECTABLE">
$HTML
</div>

</article>
</div>


</body>
</html>
67 changes: 67 additions & 0 deletions data/ArticleView/default/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
html, body {
margin: 0;
padding: 0;
width: auto;
}
a {
text-decoration: none;
color: #000;
}


.unselectable {
-webkit-user-select: none;
-webkit-touch-callout: none;
-webkit-user-drag: none;
user-select: none;
}


a:hover {
opacity:0.7;
}

body{
font-family: Arial, Helvetica, sans-serif;
}
img {
max-width: 100%;
height: auto;
width: auto;
}

p {
text-align: justify;
}

#feedreader-container {
background-color: #FFFFFF;
margin: 10px;
padding: 20px;
}
#feedreader-container article header {
font-family: LyonText,Georgia,serif;
margin-bottom: 50px;
}

#feedreader-container article header #title {
font-size: 3em;
font-weight: 400;
line-height: 1.3em;
margin-bottom: 5px;
margin-top: 0;
}

#feedreader-container article header #author {
font-size: 1.1em;
font-weight: 400;
line-height: 0.8em;
margin-bottom: 5px;
margin-top: 0;
color: #AFAFAF;
}


#feedreader-container article #content {
margin: 5px;
}
4 changes: 4 additions & 0 deletions data/ArticleView/default/theme.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"name": "Default",
"author": "Bilal Elmoussaoui"
}
33 changes: 33 additions & 0 deletions data/ArticleView/midnight/article.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<!DOCTYPE>
<html>
<head>
<title>FeedReader Article View</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style>
$CSS
</style>
</head>

<body style="font-size:$FONTSIZEpt;font-family:$FONTFAMILY;">

<div id="feedreader-container">
<article>
<header class="unselectable">
<div id="source" style="font-size:$SMALLSIZEpt;">$FEED</div>
<div id="title" target="_blank" style="font-size:$LARGESIZEpt;"><a href="$URL">$TITLE</a></div>
<div id="author" style="font-size:$SMALLSIZEpt;">
$AUTHOR
</div>
</header>

<div id="content" class="$UNSELECTABLE">
$HTML
</div>

</article>
</div>


</body>
</html>
87 changes: 87 additions & 0 deletions data/ArticleView/midnight/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
html,
body {
margin: 0;
padding: 0;
width: auto;
}

a,
body {
color: #ECECEC;
}

img {
max-width: 100%;
height: auto;
width: auto;
}

pre,
code {
background-color: #D7DDE8;
padding: 3px;
color: #2E3440;
font-family: monospace;
display: inline-block;
margin: 3px;
}

pre {
width: 100%;
}

.unselectable {
-webkit-user-select: none;
-webkit-touch-callout: none;
-webkit-user-drag: none;
user-select: none;
}

a {
text-decoration: none;
}

a:hover {
opacity: 0.7;
}

body {
font-family: Arial, Helvetica, sans-serif;
background-color: #2E3440;
}

p {
text-align: justify;
}

#feedreader-container {
margin: 10px;
padding: 20px;
}

#feedreader-container article header {
font-family: LyonText, Georgia, serif;
margin-bottom: 50px;
}

#feedreader-container article header #title {
font-size: 3em;
font-weight: 400;
line-height: 1.3em;
margin-bottom: 5px;
margin-top: 0;
}

#feedreader-container article header #author {
font-size: 1.1em;
font-weight: 400;
line-height: 0.8em;
margin-bottom: 5px;
margin-top: 0;
color: #AFAFAF;
}

#feedreader-container article #content {
margin: 5px;
}

4 changes: 4 additions & 0 deletions data/ArticleView/midnight/theme.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"name": "Midnight",
"author": "Bilal Elmoussaoui"
}
Loading