-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add erb - and partials for header/footer
- directory views for erb files - html files still live at root of project - add notes, resume docs
- Loading branch information
Showing
11 changed files
with
198 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,38 @@ | ||
|
||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset='utf-8'> | ||
<meta http-equiv='X-UA-Compatible' content='IE=edge'> | ||
<title>Page Title</title> | ||
<title>Notes</title> | ||
<meta name='viewport' content='width=device-width, initial-scale=1'> | ||
<link rel='stylesheet' type='text/css' media='screen' href='css/styles.css'> | ||
</head> | ||
<body> | ||
<header> | ||
<ul> | ||
<li><a href="./index.html">Index</a></li> | ||
</ul> | ||
<li class="header"><a href="https://aavalam.org/" target="_blank">Aavalam Home</a></li> | ||
<li class="header">|</li> | ||
<li class="header"><a href="./index.html">Kelly's Aavalam Space</a></li> | ||
</ul> | ||
<hr> | ||
<br> | ||
</header> | ||
|
||
|
||
Coming soon | ||
|
||
<footer> | ||
<hr> | ||
<br> | ||
<ul> | ||
<li class="footer"><a href="https://github.com/kellyky" target="_blank">GitHub</a></li> | ||
<li class="footer"><a href="https://medium.com/@kelpopko" target="_blank">Medium</a></li> | ||
<li class="footer"><a href="https://exercism.org/profiles/kellyky" target="_blank">Exercism</a></li> | ||
<li class="footer"><a href="https://www.codewars.com/users/kellyky" target="_blank">CodeWars</a></li> | ||
<li class="footer"><a href="https://www.linkedin.com/in/kelly-popko/" target="_blank">LinkedIn</a></li> | ||
</ul> | ||
</footer> | ||
|
||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<footer> | ||
<hr> | ||
<br> | ||
<ul> | ||
<li class="footer"><a href="https://github.com/kellyky" target="_blank">GitHub</a></li> | ||
<li class="footer"><a href="https://medium.com/@kelpopko" target="_blank">Medium</a></li> | ||
<li class="footer"><a href="https://exercism.org/profiles/kellyky" target="_blank">Exercism</a></li> | ||
<li class="footer"><a href="https://www.codewars.com/users/kellyky" target="_blank">CodeWars</a></li> | ||
<li class="footer"><a href="https://www.linkedin.com/in/kelly-popko/" target="_blank">LinkedIn</a></li> | ||
</ul> | ||
</footer> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<header> | ||
<ul> | ||
<li class="header"><a href="https://aavalam.org/" target="_blank">Aavalam Home</a></li> | ||
<li class="header">|</li> | ||
<li class="header"><a href="./index.html">Kelly's Aavalam Space</a></li> | ||
</ul> | ||
<hr> | ||
<br> | ||
</header> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
require 'erb' | ||
|
||
def render_partial(file_name) | ||
File.read("partials/#{file_name}.erb") | ||
end | ||
|
||
def render_template(file_name) | ||
template = File.read("views/#{file_name}.erb") | ||
renderer = ERB.new(template) | ||
output = renderer.result(binding) | ||
|
||
File.write("#{file_name}.html", output) # Write output to HTML file | ||
end | ||
|
||
# List of main files to render | ||
main_files = ['index', 'today_i_learned', 'notes', 'resume'] | ||
|
||
main_files.each do |file| | ||
render_template(file) | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,38 @@ | ||
|
||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset='utf-8'> | ||
<meta http-equiv='X-UA-Compatible' content='IE=edge'> | ||
<title>Resume Page</title> | ||
<title>Resume</title> | ||
<meta name='viewport' content='width=device-width, initial-scale=1'> | ||
<link rel='stylesheet' type='text/css' media='screen' href='css/styles.css'> | ||
</head> | ||
<body> | ||
<header> | ||
<ul> | ||
<li><a href="./index.html">Index</a></li> | ||
</ul> | ||
<li class="header"><a href="https://aavalam.org/" target="_blank">Aavalam Home</a></li> | ||
<li class="header">|</li> | ||
<li class="header"><a href="./index.html">Kelly's Aavalam Space</a></li> | ||
</ul> | ||
<hr> | ||
<br> | ||
</header> | ||
|
||
|
||
Placeholder - resume | ||
|
||
<footer> | ||
<hr> | ||
<br> | ||
<ul> | ||
<li class="footer"><a href="https://github.com/kellyky" target="_blank">GitHub</a></li> | ||
<li class="footer"><a href="https://medium.com/@kelpopko" target="_blank">Medium</a></li> | ||
<li class="footer"><a href="https://exercism.org/profiles/kellyky" target="_blank">Exercism</a></li> | ||
<li class="footer"><a href="https://www.codewars.com/users/kellyky" target="_blank">CodeWars</a></li> | ||
<li class="footer"><a href="https://www.linkedin.com/in/kelly-popko/" target="_blank">LinkedIn</a></li> | ||
</ul> | ||
</footer> | ||
|
||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<% require 'erb' %> | ||
<html> | ||
<head> | ||
<meta charset='utf-8'> | ||
<meta http-equiv='X-UA-Compatible' content='IE=edge'> | ||
<title>Kelly's Site</title> | ||
<meta name='viewport' content='width=device-width, initial-scale=1'> | ||
<link rel='stylesheet' type='text/css' media='screen' href='css/styles.css'> | ||
</head> | ||
<body> | ||
<%= File.read('partials/_header.erb') %> | ||
|
||
<ul> | ||
<li><a href="./today_i_learned.html">Today I Learned</a></li> | ||
</ul> | ||
|
||
<%= File.read('partials/_footer.erb') %> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<% require 'erb' %> | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset='utf-8'> | ||
<meta http-equiv='X-UA-Compatible' content='IE=edge'> | ||
<title>Notes</title> | ||
<meta name='viewport' content='width=device-width, initial-scale=1'> | ||
<link rel='stylesheet' type='text/css' media='screen' href='css/styles.css'> | ||
</head> | ||
<body> | ||
<%= File.read('partials/_header.erb') %> | ||
|
||
Coming soon | ||
|
||
<%= File.read('partials/_footer.erb') %> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<% require 'erb' %> | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset='utf-8'> | ||
<meta http-equiv='X-UA-Compatible' content='IE=edge'> | ||
<title>Resume</title> | ||
<meta name='viewport' content='width=device-width, initial-scale=1'> | ||
<link rel='stylesheet' type='text/css' media='screen' href='css/styles.css'> | ||
</head> | ||
<body> | ||
<%= File.read('partials/_header.erb') %> | ||
|
||
Placeholder - resume | ||
|
||
<%= File.read('partials/_footer.erb') %> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<% require 'erb' %> | ||
<html> | ||
<head> | ||
<meta charset='utf-8'> | ||
<meta http-equiv='X-UA-Compatible' content='IE=edge'> | ||
<title>Today I Learned...</title> | ||
<meta name='viewport' content='width=device-width, initial-scale=1'> | ||
<link rel='stylesheet' type='text/css' media='screen' href='css/styles.css'> | ||
</head> | ||
<body> | ||
<%= File.read('partials/_header.erb') %> | ||
|
||
<h1>Posts</h1> | ||
<ul> | ||
<li><a href="https://medium.com/@kelpopko/today-i-learned-git-series-custom-base-branch-23296860b403" target="_blank">git: Set custom base branch</a></li> | ||
<li><a href="https://medium.com/@kelpopko/today-i-learned-git-series-custom-base-branch-revisited-71aa8db3e0f2" target="_blank">git: custom base branch revisited</a></li> | ||
<li><a href="https://medium.com/@kelpopko/today-i-learned-searching-git-log-77cf7346d6f4" target="_blank">git: git log search</a></li> | ||
<li><a href="https://medium.com/@kelpopko/today-i-learned-searching-git-logs-by-author-2037e6c40c1e" target="_blank">git: git log author search</a></li> | ||
</ul> | ||
|
||
<%= File.read('partials/_footer.erb') %> | ||
</body> | ||
</html> | ||
|
||
|