From: David Polakovic Date: Mon, 8 Jan 2024 18:39:55 +0000 (+0100) Subject: added RSS support for blog X-Git-Url: http://git.dpolakovic.space/?a=commitdiff_plain;h=6bb68f0d19d0276972e3ba1182b17394c558ecb7;p=my-website added RSS support for blog --- diff --git a/Pictures/emacs3.png b/Pictures/emacs3.png new file mode 100644 index 0000000..e92c1df Binary files /dev/null and b/Pictures/emacs3.png differ diff --git a/Pictures/gnu40.png b/Pictures/gnu40.png deleted file mode 100644 index 2147bfd..0000000 Binary files a/Pictures/gnu40.png and /dev/null differ diff --git a/Pictures/rss2.png b/Pictures/rss2.png new file mode 100644 index 0000000..c6f354e Binary files /dev/null and b/Pictures/rss2.png differ diff --git a/README.txt b/README.txt index 32a7542..b060634 100755 --- a/README.txt +++ b/README.txt @@ -8,17 +8,20 @@ mobile design and client side computing. So I made html/php site to occupy littl piece of cyberspace. Here is description of the files: .htaccess - hides file extensions in address bar -index.php - the "About page" with contacts (not much going on here) -blog.php - here I place my toughts which could be sorted by form (blogs or tweets) +index.php - the "About page" with contact info (not much going on here) +blog.php - here I place my some of my toughts (they are loaded from rss.xml) lib.php - my book library in one table -gpg.html - page with my email gpg key -test.html - default test page for troubleshooting new features -both .txt files are sources for php sites with hand written content. -blog/pics/ - pictures for blogs -blogs/blog-list.html - source for tweets and links to blogs for blog.php +gpg.html - page with my public gpg key +test.php - default test page for troubleshooting and new features +cypher.html - ? +dir.php - links to useful stuff +rss.xml - rss feed for my blogs +blogs/pics/ - pictures for blogs blogs/blog-template.html - default template for new blogs -Pictures/ - directory with all pictures for sites (except the blogs) -Styles/* - dir with font I use and CSS style file +php/ - all php code on one place +Pictures/ - directory with all pictures on the web (except for the blogs) +Styles/ - dir with font I use and CSS style file +Zax/ - stuff for my other website https://www.zax-game.com (simple, one page) LICENSE: https://www.gnu.org/licenses/gpl-3.0.en.html diff --git a/Styles/noto-serif.bold.ttf b/Styles/noto-serif.bold.ttf old mode 100644 new mode 100755 diff --git a/Styles/noto-serif.italic.ttf b/Styles/noto-serif.italic.ttf old mode 100644 new mode 100755 diff --git a/Styles/noto-serif.regular.ttf b/Styles/noto-serif.regular.ttf old mode 100644 new mode 100755 diff --git a/Styles/styles.css b/Styles/styles.css index acbbda6..cedbf4b 100755 --- a/Styles/styles.css +++ b/Styles/styles.css @@ -56,43 +56,74 @@ tr:hover { just simple bar from W3 schools with minor edits https://www.w3schools.com/Css/css_navbar_horizontal.asp */ -.nav-bar {} -.nav-bar ul { - list-style-type: none; - max-width:1000px; - width: 100%; - margin: 0 auto; - padding: 0; - overflow: hidden; - background-color: #333; - border-radius: 10px; +nav { + display: flex; +} + +.nav-bar > ul { + list-style-type: none; + max-width: 1000px; + width: 100%; + margin: 0 auto; + padding: 0; + background-color: #333; + border-radius: 10px; } -/* make everything stick to left side */ .nav-bar li { - float: left; + float: left; +} + +.nav-bar li a { + display: block; + color: white; + text-align: center; + padding: 14px 16px; + text-decoration: none; } -/* make "Git server" be on the far right */ .nav-bar li:last-child { - float: right; + float: right; + position: relative; } -/* style for contents of the nav bar */ -.nav-bar li a { - display: block; - color: white; - text-align: center; - padding: 14px 16px; - text-decoration: none; +.nav-bar li:last-child a { + border-radius: 0 14px 14px 0; } -/* make background of the "Git server" with other color */ .gitserver { - background-color: #1e1e1e; + background-color: #1e1e1e; +} + +.gitstatus { + display: none; + list-style-type: none; + position: absolute; + color: black; +} + +.nav-bar li:last-child:hover .gitstatus { + display: block; } +/* +.gitstatus li::before { + content: ''; + width: 10px; + height: 10px; + border-radius: 50%; + position: absolute; + top: 50%; + left: -14px; + transform: translateY(-50%); + background-color: green; +} + +.gitstatus.offline li:before { + background-color: red; +} +*/ /* Banner pictures style pictures shown on top of every page - should be all same size, @@ -131,6 +162,10 @@ tr:hover { max-width: 100%; } +.content img.bee-gifs { + max-width: 95px; +} + .hide-link { color: inherit; text-decoration: inherit; @@ -167,6 +202,10 @@ tr:hover { float: right; } +.dir { + margin-left: 10px; +} + /* Blog previews these are clases for my blog page - they show small picture and description in small fonts @@ -189,6 +228,7 @@ tr:hover { } .blog-prev-text { + margin-left: 10px; height: 95px; float: left; color: #545454; @@ -255,8 +295,9 @@ tr:hover { border: 1px solid #000; /*border-left: 3px solid #f36d33; */ border-left: 3px solid #000; - color: #99ffe6; - /*color: #80ffdf; */ + color: white; + /* color: #99ffe6; + color: #80ffdf; */ font-weight: bold; page-break-inside: avoid; font-family: monospace; diff --git a/Zax/Helvetica_Narrow_Bold.TTF b/Zax/Helvetica_Narrow_Bold.TTF new file mode 100644 index 0000000..91a074d Binary files /dev/null and b/Zax/Helvetica_Narrow_Bold.TTF differ diff --git a/Zax/index.html b/Zax/index.html new file mode 100644 index 0000000..435c18f --- /dev/null +++ b/Zax/index.html @@ -0,0 +1,40 @@ + + + + + + + Zax The Alien Hunter + + + + + + + +
+

+ Welcome to the new official site of ZAX The Alien Hunter videogame! +

+

+ When I got my first PC, Zax was one of the three games that came bundled + with it. The other two were Morrowind and Aquanox. Out of nostalgia I + searched my room for this promo CD and I saw this domain printed on + top of it. Turns out it was free to claim. Now I have free ad for website + on 20 years old disk. nice +

+

+ If you are super fan of this game, send me an + >>email + and I will put your name here on the official domain. +

+

+

THE FAN CLUB:

+ + David (me!), +  Majky,  rancor4,  KCR,  ScarletWitch,  Princess_Bx2, +  WoodenBarQueen,  RoperSoul_X,  StickyBall_2 + +
+ + diff --git a/Zax/styles.css b/Zax/styles.css new file mode 100644 index 0000000..245c473 --- /dev/null +++ b/Zax/styles.css @@ -0,0 +1,39 @@ +@font-face{ + font-family: Sans-serif; + src: url('Helvetica_Narrow_Bold.TTF'); + font-weight: bold; +} + +body { + background: linear-gradient(rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.8)), + url('wall.jpg'); + background-repeat: no-repeat; + background-attachment: fixed; + background-position: center; + background-color: black; + color: #e2ddba; +} + +h2 { + color: white; +} + +a { + color: green; +} + +/* Main content + style for main content of each page - centers text and other stuff +*/ +.content { + max-width: 975px; + width: 100%; + margin: 0 auto; + #text-align: justify; + padding: 100px 0; +} + +.what-is-this { + color: #34301a; +} + diff --git a/Zax/wall.jpg b/Zax/wall.jpg new file mode 100644 index 0000000..017dc7a Binary files /dev/null and b/Zax/wall.jpg differ diff --git a/blog.php b/blog.php old mode 100644 new mode 100755 index fa574d7..cce666b --- a/blog.php +++ b/blog.php @@ -6,14 +6,13 @@ dpolakovic.space - + + - - '; - } - - - // Prints latest 15 tweets and offers user to see them all - function printFileTweets($filename) { - $lines = file($filename); - $count = 0; - echo '
'; - - foreach ($lines as $line) { - // check for word "tweet" in the lines - if (strpos($line, 'tweet') !== false) { - echo $line . '
'; // Display the line if it contains 'foo' - $count++; - - if ($count >= 15) { - break; // Break the loop after displaying 15 matching lines - } - } - } - - if ($count >= 15) { - // Display a clickable link if there are more than 15 matching lines - echo '
Check the rest...
'; - } - - echo '
'; - } - - - // Prints all tweets - function printFileAllTweets($filename) { - $file = fopen($filename, "r"); - - while (($line = fgets($file)) !== false) { - // check for word "tweet" in the lines - if (strpos($line, 'tweet') !== false) { - echo $line . '
'; - } - } - fclose($file); - } - - - // Prints latest 15 blogs and offers user to see them all - function printFileBlogs($filename) { - $lines = file($filename); - $count = 0; - echo '
'; - - foreach ($lines as $line) { - // check for word "blog-prev" in the lines - if (strpos($line, 'blog-prev') !== false) { - echo $line . '
'; // Display the line if it contains 'foo' - $count++; - - if ($count >= 15) { - break; // Break the loop after displaying 15 matching lines - } - } - } - - if ($count >= 15) { - // Display a clickable link if there are more than 15 matching lines - echo '
Check the rest...
'; - } - echo '
'; - } - - - // Prints all blogs - function printFileAllBlogs($filename) { - $file = fopen($filename, "r"); - - while (($line = fgets($file)) !== false) { - // check for word "blog-prev" in the lines - if (strpos($line, 'blog-prev') !== false) { - echo $line . '
'; - } - } - fclose($file); - } - ?> -

-

- Sort:   - - Tweets   - Blogs -
-


Current value of key: $key
"; - - // Print file sorted by user input - - // save path to the file into variable... - $filename = './blogs/blog-list.html'; - - // default - main page - if ($sort == "all") { - printFile($filename); - } - - // show first 15 tweets - if ($sort == "tweets") { - printFileTweets($filename); - } - - // show first 15 blogs - if ($sort == "blogs") { - printFileBlogs($filename); - } - - // show all tweets - if ($sort == "tweetsfull") { - printFileAllTweets($filename); - } - - // show all blogs - if ($sort == "blogsfull"){ - printFileAllBlogs($filename); - } - ?> -
+ printBlog2("./rss.xml"); + ?> +
-